瀏覽代碼

提交代码

陈少旭 9 月之前
父節點
當前提交
4578a41dc0
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      controllers/his_project_api_controller.go
  2. 1 1
      service/smart_sch.go

+ 2 - 0
controllers/his_project_api_controller.go 查看文件

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

+ 1 - 1
service/smart_sch.go 查看文件

@@ -146,7 +146,7 @@ func GetScheduleByZoneAndBed(org_id int64, partitionId int64, bed_id int64, sche
146 146
 }
147 147
 
148 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 150
 	return
151 151
 }
152 152
 func SaveSmartSch(sch models.SmartSchedule) {