test_user 1 rok temu
rodzic
commit
f9261727a7
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      service/device_service.go

+ 2 - 2
service/device_service.go Wyświetl plik

@@ -844,9 +844,9 @@ func GetScheduleTemplateForDeviceNumber(orgID int64, deviceNumberID int64, templ
844 844
 }
845 845
 
846 846
 //某模板下,某周几下,该床位是否有患者
847
-func GetScheduleTemplateOne(orgID int64, deviceNumberID int64, template_id int64, week_type int64) (models.PatientScheduleTemplateItem, error) {
847
+func GetScheduleTemplateOne(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64) (models.PatientScheduleTemplateItem, error) {
848 848
 	var item models.PatientScheduleTemplateItem
849
-	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ?", deviceNumberID, orgID, template_id, week_type).First(&item).Error
849
+	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ?", deviceNumberID, orgID, template_id, week_type, time_type).First(&item).Error
850 850
 	return item, err
851 851
 }
852 852