XMLWAN 3 anni fa
parent
commit
7a998a72ea
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 4 0
      models/xcx_user_models.go
  2. 1 1
      service/xcx_mobile_api_service.go

+ 4 - 0
models/xcx_user_models.go Vedi File

@@ -200,3 +200,7 @@ type XcXDialysisOrder struct {
200 200
 	DifficultPunctureNurse int64  `gorm:"column:difficult_puncture_nurse" json:"difficult_puncture_nurse" form:"difficult_puncture_nurse"`
201 201
 	NewFistulaNurse        string `gorm:"column:new_fistula_nurse" json:"new_fistula_nurse" form:"new_fistula_nurse"`
202 202
 }
203
+
204
+func (XcXDialysisOrder) TableName() string {
205
+	return "xt_dialysis_order"
206
+}

+ 1 - 1
service/xcx_mobile_api_service.go Vedi File

@@ -234,7 +234,7 @@ func GetNextPatientSchedule(patient_id int64, dialysis_date int64) (models.Blood
234 234
 	if dialysis_date > 0 {
235 235
 		db = db.Where("x.schedule_date >?", dialysis_date)
236 236
 	}
237
-	err := db.Select("x.patient_id,x.schedule_date,x.mode_id,z.name,n.number").Joins("left join xt_device_zone as z on z.id = x.partition_id").Joins("left join xt_device_number as n on n.id = x.bed_id").Order("x.schedule_date asc").Limit(1).Scan(&schedule).Error
237
+	err := db.Select("x.patient_id,x.schedule_type,x.schedule_date,x.mode_id,z.name,n.number").Joins("left join xt_device_zone as z on z.id = x.partition_id").Joins("left join xt_device_number as n on n.id = x.bed_id").Order("x.schedule_date asc").Limit(1).Scan(&schedule).Error
238 238
 	return schedule, err
239 239
 }
240 240