test_user 2 lat temu
rodzic
commit
70c836326b

+ 1 - 2
controllers/schedule_api_controller.go Wyświetl plik

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

+ 1 - 1
service/schedule_service.go Wyświetl plik

@@ -921,7 +921,7 @@ func GetWeekDayScheduleByIdThee(orgid int64, scheduleDate int64, scheduleType in
921 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 925
 		return db.Where("status =1 and parent_id = 0 and advice_date = ?", scheduleDate).Preload("ChildDoctorAdvice", "status = 1")
926 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 927
 		return db.Where("status =1").Order("id asc")