Browse Source

提交代码

陈少旭 11 months ago
parent
commit
4578a41dc0
2 changed files with 3 additions and 1 deletions
  1. 2 0
      controllers/his_project_api_controller.go
  2. 1 1
      service/smart_sch.go

+ 2 - 0
controllers/his_project_api_controller.go View File

1326
 		temp_p_type = 2
1326
 		temp_p_type = 2
1327
 	}
1327
 	}
1328
 
1328
 
1329
+	sch, _ := service.GetScheduleByDate(adminUserInfo.CurrentOrgId, recordDateTime, patient_id)
1329
 	advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime, idStrs, adminUserInfo.CurrentOrgId, temp_p_type)
1330
 	advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime, idStrs, adminUserInfo.CurrentOrgId, temp_p_type)
1330
 	projectlist, err := service.GetAllProjectList(adminUserInfo.CurrentOrgId, "")
1331
 	projectlist, err := service.GetAllProjectList(adminUserInfo.CurrentOrgId, "")
1331
 	his, _ := service.GetLastHisPatient(patient_id, adminUserInfo.CurrentOrgId)
1332
 	his, _ := service.GetLastHisPatient(patient_id, adminUserInfo.CurrentOrgId)
1361
 		"eles":              eles,
1362
 		"eles":              eles,
1362
 		"psn_info":          psn_info,
1363
 		"psn_info":          psn_info,
1363
 		"roles":             roles,
1364
 		"roles":             roles,
1365
+		"sch":               sch,
1364
 	})
1366
 	})
1365
 }
1367
 }
1366
 
1368
 

+ 1 - 1
service/smart_sch.go View File

146
 }
146
 }
147
 
147
 
148
 func GetScheduleByDate(org_id int64, schedule_date int64, patient_id int64) (sch models.SmartSchedule, err error) {
148
 func GetScheduleByDate(org_id int64, schedule_date int64, patient_id int64) (sch models.SmartSchedule, err error) {
149
-	err = readDb.Model(&models.SmartSchedule{}).Where(" user_org_id = ? AND schedule_date = ? AND status = 1 AND patient_id = ?", org_id, schedule_date, patient_id).First(&sch).Error
149
+	err = readDb.Model(&models.SmartSchedule{}).Where(" user_org_id = ? AND schedule_date = ? AND status = 1 AND patient_id = ?", org_id, schedule_date, patient_id).Preload("DeviceNumber", "status = 1").First(&sch).Error
150
 	return
150
 	return
151
 }
151
 }
152
 func SaveSmartSch(sch models.SmartSchedule) {
152
 func SaveSmartSch(sch models.SmartSchedule) {