csx 3 years ago
parent
commit
9ac2a5838c
2 changed files with 482 additions and 465 deletions
  1. 6 4
      service/bl_service.go
  2. 476 461
      service/ystx_service.go

+ 6 - 4
service/bl_service.go View File

549
 
549
 
550
 				project_id := int64(0)
550
 				project_id := int64(0)
551
 				if len("180") > 0 {
551
 				if len("180") > 0 {
552
-					project_id, _ = GetGzjhProjectID(org_id, item.Groupname)
552
+					project_id, _ = GetBljhProjectID(org_id, item.Groupname)
553
 				} else {
553
 				} else {
554
 					continue
554
 					continue
555
 				}
555
 				}
556
 				printInfo, _ := GetHisLabelPrintInfoById("180")
556
 				printInfo, _ := GetHisLabelPrintInfoById("180")
557
 
557
 
558
-				item_id, _ := GetItemID(org_id, item.Groupname, item.Itemname, project_id)
558
+				item_id, _ := GetBlItemID(org_id, item.Groupname, item.Itemname, project_id)
559
 
559
 
560
 				tx := writeMiddleDb.Begin()
560
 				tx := writeMiddleDb.Begin()
561
 				var inspection models.MiddleInspection
561
 				var inspection models.MiddleInspection
562
 				var inspection_reference models.MiddleInspectionReference
562
 				var inspection_reference models.MiddleInspectionReference
563
 
563
 
564
 				recordDateStr := ""
564
 				recordDateStr := ""
565
-
565
+				inspect_date := item.Repdate.Format("2006-01-02 15:04")
566
 				if item.Repdate.Unix() == 0 {
566
 				if item.Repdate.Unix() == 0 {
567
 					recordDateStr = time.Now().Format("2006-01-02 15:04")
567
 					recordDateStr = time.Now().Format("2006-01-02 15:04")
568
+				} else {
569
+
570
+					recordDateStr = inspect_date
568
 				}
571
 				}
569
 
572
 
570
-				inspect_date := item.Repdate.Format("2006-01-02 15:04")
571
 				date, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", recordDateStr)
573
 				date, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", recordDateStr)
572
 				record_date, _ := utils.ParseTimeStringToTime("2006-01-02", date.Format("2006-01-02"))
574
 				record_date, _ := utils.ParseTimeStringToTime("2006-01-02", date.Format("2006-01-02"))
573
 				var total int
575
 				var total int

File diff suppressed because it is too large
+ 476 - 461
service/ystx_service.go