|
@@ -609,7 +609,7 @@ func GetPatientScheduleByBed(schedule_date int64, zoneid int64, orgid int64, cla
|
609
|
609
|
}
|
610
|
610
|
if class_type > 0 {
|
611
|
611
|
err = db.Select("x.id,x.number,x.sort,x.group_id,x.zone_id,x.sort").Preload("DeviceZone", "status = 1").Preload("Schedule", func(db *gorm.DB) *gorm.DB {
|
612
|
|
- return XTReadDB().Model(&models.BlodSchedule{}).Where("status = 1 AND user_org_id = ? and schedule_date = ? and class_type = ?", orgid, schedule_date, class_type).Preload("VmBloodPatients", "status = 1 and user_org_id = ?", orgid).Preload("BloodDialysisOrder", "status = 1 and dialysis_date = ?", schedule_date).Preload("BloodDialysisPrescription", "status = 1 and record_date = ?", schedule_date)
|
|
612
|
+ return XTReadDB().Model(&models.BlodSchedule{}).Where("status = 1 AND user_org_id = ? and schedule_date = ? and schedule_type = ?", orgid, schedule_date, class_type).Preload("VmBloodPatients", "status = 1 and user_org_id = ?", orgid).Preload("BloodDialysisOrder", "status = 1 and dialysis_date = ?", schedule_date).Preload("BloodDialysisPrescription", "status = 1 and record_date = ?", schedule_date)
|
613
|
613
|
}).Find(&list).Error
|
614
|
614
|
} else {
|
615
|
615
|
err = db.Select("x.id,x.number,x.sort,x.group_id,x.zone_id,x.sort").Preload("DeviceZone", "status = 1").Preload("Schedule", func(db *gorm.DB) *gorm.DB {
|