test_user 2 anos atrás
pai
commit
70c836326b

+ 1 - 2
controllers/schedule_api_controller.go Ver arquivo

1265
 	end_time := c.GetString("end_time")
1265
 	end_time := c.GetString("end_time")
1266
 
1266
 
1267
 	adminInfo := c.GetAdminUserInfo()
1267
 	adminInfo := c.GetAdminUserInfo()
1268
-
1269
 	thisTime := time.Now()
1268
 	thisTime := time.Now()
1270
 	today := thisTime.Format("2006-01-02")
1269
 	today := thisTime.Format("2006-01-02")
1271
 	if week < 1 || week > 4 {
1270
 	if week < 1 || week > 4 {
4622
 				Status:       1,
4621
 				Status:       1,
4623
 				CreatedTime:  time.Now().Unix(),
4622
 				CreatedTime:  time.Now().Unix(),
4624
 				UpdatedTime:  0,
4623
 				UpdatedTime:  0,
4625
-				IsExport:     2000,
4624
+				IsExport:     200000,
4626
 			}
4625
 			}
4627
 
4626
 
4628
 			var DialysisMachineName string
4627
 			var DialysisMachineName string

+ 1 - 1
service/schedule_service.go Ver arquivo

921
 		db = db.Where("x.partition_id in (?)", zone)
921
 		db = db.Where("x.partition_id in (?)", zone)
922
 	}
922
 	}
923
 
923
 
924
-	err = db.Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.is_export").Preload("SchedulesPatientsVM", "status = 1").Preload("DeviceZone", "status = 1").Preload("DeviceNumber", "status = 1").Preload("DialysisOrder", "status = 1 and dialysis_date = ?", scheduleDate).Preload("XtAssessmentBeforeDislysis", "status = 1 and assessment_date =?", scheduleDate).Preload("DoctorAdvice", func(db *gorm.DB) *gorm.DB {
924
+	err = db.Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.is_export").Preload("XtPatients", "status = 1").Preload("DeviceZone", "status = 1").Preload("DeviceNumber", "status = 1").Preload("DialysisOrder", "status = 1 and dialysis_date = ?", scheduleDate).Preload("XtAssessmentBeforeDislysis", "status = 1 and assessment_date =?", scheduleDate).Preload("DoctorAdvice", func(db *gorm.DB) *gorm.DB {
925
 		return db.Where("status =1 and parent_id = 0 and advice_date = ?", scheduleDate).Preload("ChildDoctorAdvice", "status = 1")
925
 		return db.Where("status =1 and parent_id = 0 and advice_date = ?", scheduleDate).Preload("ChildDoctorAdvice", "status = 1")
926
 	}).Preload("HisDoctorAdviceInfo", "status = 1 and advice_date = ? and user_org_id = ? ", scheduleDate, orgid).Preload("DialysisPrescription", "status = 1 and record_date =? and user_org_id = ?", scheduleDate, orgid).Preload("DialysisSolution", func(db *gorm.DB) *gorm.DB {
926
 	}).Preload("HisDoctorAdviceInfo", "status = 1 and advice_date = ? and user_org_id = ? ", scheduleDate, orgid).Preload("DialysisPrescription", "status = 1 and record_date =? and user_org_id = ?", scheduleDate, orgid).Preload("DialysisSolution", func(db *gorm.DB) *gorm.DB {
927
 		return db.Where("status =1").Order("id asc")
927
 		return db.Where("status =1").Order("id asc")