|
@@ -239,7 +239,7 @@ func GetLastSyncResultRecord(org_id int64) (record LisSyncResultStatusInfo, err
|
239
|
239
|
}
|
240
|
240
|
|
241
|
241
|
func GetResultRecord() (record []CmResult, err error) {
|
242
|
|
- err = dataBase.Model(&CmResult{}).Order("barcode asc").Limit(1).Find(&record).Error
|
|
242
|
+ err = dataBase.Model(&CmResult{}).Order("barcode asc").Find(&record).Error
|
243
|
243
|
return
|
244
|
244
|
}
|
245
|
245
|
|
|
@@ -264,7 +264,7 @@ func GetLisDataById(org_id int64, last_id int64) (list []*HisLabelPrintInfo, err
|
264
|
264
|
}).Where("status = 1")
|
265
|
265
|
}).Where("status = 1")
|
266
|
266
|
}).Where("status = 1")
|
267
|
|
- }).Where("id > ? AND user_org_id = ? AND status = 1", last_id, org_id).Limit(100).Find(&list).Error
|
|
267
|
+ }).Where("id > ? AND user_org_id = ? AND status = 1", last_id, org_id).Find(&list).Error
|
268
|
268
|
return
|
269
|
269
|
}
|
270
|
270
|
|
|
@@ -277,7 +277,7 @@ func GetAllLisData(org_id int64) (list []*HisLabelPrintInfo, err error) {
|
277
|
277
|
}).Where("status = 1")
|
278
|
278
|
}).Where("status = 1")
|
279
|
279
|
}).Where("status = 1")
|
280
|
|
- }).Where("user_org_id = ? AND status = 1", org_id).Limit(100).Find(&list).Error
|
|
280
|
+ }).Where("user_org_id = ? AND status = 1", org_id).Find(&list).Error
|
281
|
281
|
return
|
282
|
282
|
}
|
283
|
283
|
|
|
@@ -657,9 +657,7 @@ func GetResultDataInsertDB(org_id int64) (result []*CmResult) {
|
657
|
657
|
|
658
|
658
|
} else {
|
659
|
659
|
if record.LastId != 0 {
|
660
|
|
- fmt.Println("~~~~~~~~")
|
661
|
|
-
|
662
|
|
- list, err := GetResultRecord()
|
|
660
|
+ list, err := GetResultRecordByID(record.LastId)
|
663
|
661
|
fmt.Println(list)
|
664
|
662
|
//插入中间库中
|
665
|
663
|
//插入一条插入中间库记录数据
|
|
@@ -667,15 +665,13 @@ func GetResultDataInsertDB(org_id int64) (result []*CmResult) {
|
667
|
665
|
|
668
|
666
|
//插入到系统检验检查数据
|
669
|
667
|
for _, item := range list {
|
670
|
|
-
|
671
|
668
|
project_id := int64(0)
|
672
|
|
- if len("180") > 0 {
|
|
669
|
+ if len(item.Barcode) > 0 {
|
673
|
670
|
project_id, _ = GetBljhProjectID(org_id, item.Groupname)
|
674
|
671
|
} else {
|
675
|
672
|
continue
|
676
|
673
|
}
|
677
|
|
- printInfo, _ := GetHisLabelPrintInfoById("180")
|
678
|
|
-
|
|
674
|
+ printInfo, _ := GetHisLabelPrintInfoById(item.Barcode)
|
679
|
675
|
item_id, _ := GetBlItemID(org_id, item.Groupname, item.Itemname, project_id)
|
680
|
676
|
|
681
|
677
|
tx := writeMiddleDb.Begin()
|