|
@@ -139,7 +139,7 @@ func GetDialysisSetting(orgid int64) (models.XtDialysisSetting, error) {
|
139
|
139
|
return setting, err
|
140
|
140
|
}
|
141
|
141
|
|
142
|
|
-func GetDialysisParameterList(keywords string, limit int64, page int64, partition_id int64, schedule_type int64, scheduleDate int64, orgID int64, ids []string) (schedule []*models.VmBloodSchedule, total int64, err error) {
|
|
142
|
+func GetDialysisParameterList(keywords string, limit int64, page int64, partition_id []string, schedule_type int64, scheduleDate int64, orgID int64, ids []string) (schedule []*models.VmBloodSchedule, total int64, err error) {
|
143
|
143
|
db := XTReadDB().Model(&models.VmBloodSchedule{}).Where("xt_schedule.status = 1")
|
144
|
144
|
offset := (page - 1) * limit
|
145
|
145
|
if scheduleDate > 0 {
|
|
@@ -148,8 +148,11 @@ func GetDialysisParameterList(keywords string, limit int64, page int64, partitio
|
148
|
148
|
if schedule_type > 0 {
|
149
|
149
|
db = db.Where("xt_schedule.schedule_type = ?", schedule_type)
|
150
|
150
|
}
|
151
|
|
- if partition_id > 0 {
|
152
|
|
- db = db.Where("xt_schedule.partition_id = ?", partition_id)
|
|
151
|
+ //if partition_id > 0 {
|
|
152
|
+ // db = db.Where("xt_schedule.partition_id = ?", partition_id)
|
|
153
|
+ //}
|
|
154
|
+ if len(partition_id) > 0 {
|
|
155
|
+ db = db.Where("xt_schedule.partition_id in(?)", partition_id)
|
153
|
156
|
}
|
154
|
157
|
if orgID > 0 {
|
155
|
158
|
db = db.Where("xt_schedule.user_org_id = ?", orgID)
|