csx 3 years ago
parent
commit
793d2e180f
3 changed files with 11 additions and 1 deletions
  1. 6 0
      controllers/lis.go
  2. 1 0
      routers/router.go
  3. 4 1
      service/bl_service.go

+ 6 - 0
controllers/lis.go View File

400
 	service.GetDataInsertDB(10138)
400
 	service.GetDataInsertDB(10138)
401
 
401
 
402
 }
402
 }
403
+
404
+func (c *LisController) SyncBlResultLis() {
405
+
406
+	service.GetResultDataInsertDB(10138)
407
+
408
+}

+ 1 - 0
routers/router.go View File

19
 	beego.Router("/api/lis/hbdylissync", &controllers.LisController{}, "get:SyncHbJldyLis")
19
 	beego.Router("/api/lis/hbdylissync", &controllers.LisController{}, "get:SyncHbJldyLis")
20
 
20
 
21
 	beego.Router("/api/lis/bltest", &controllers.LisController{}, "get:SyncBlLis")
21
 	beego.Router("/api/lis/bltest", &controllers.LisController{}, "get:SyncBlLis")
22
+	beego.Router("/api/lis/blresulttest", &controllers.LisController{}, "get:SyncBlResultLis")
22
 
23
 
23
 }
24
 }

+ 4 - 1
service/bl_service.go View File

237
 }
237
 }
238
 
238
 
239
 func GetResultRecord() (record []*CmResult, err error) {
239
 func GetResultRecord() (record []*CmResult, err error) {
240
-	err = dataBase.Model(&CmResult{}).Order("barcode desc").Find(&record).Error
240
+	err = dataBase.Model(&CmResult{}).Order("barcode desc").Limit(100).Find(&record).Error
241
 	return
241
 	return
242
 }
242
 }
243
 
243
 
529
 	if record.ID == 0 {
529
 	if record.ID == 0 {
530
 		list, err := GetResultRecord()
530
 		list, err := GetResultRecord()
531
 		if err == nil {
531
 		if err == nil {
532
+			fmt.Println(list)
532
 			//插入一条查询检验检查结果记录状态数据
533
 			//插入一条查询检验检查结果记录状态数据
533
 			var info LisSyncResultStatusInfo
534
 			var info LisSyncResultStatusInfo
534
 			info.Ctime = time.Now().Unix()
535
 			info.Ctime = time.Now().Unix()
653
 
654
 
654
 	} else {
655
 	} else {
655
 		if record.LastId != 0 {
656
 		if record.LastId != 0 {
657
+
656
 			list, err := GetResultRecordByID(record.LastId)
658
 			list, err := GetResultRecordByID(record.LastId)
659
+			fmt.Println(list)
657
 			//插入中间库中
660
 			//插入中间库中
658
 			//插入一条插入中间库记录数据
661
 			//插入一条插入中间库记录数据
659
 			if err == nil {
662
 			if err == nil {