Kaynağa Gözat

历史排班

28169 2 yıl önce
ebeveyn
işleme
2a2afd5653

+ 4 - 2
controllers/dialysis_api_controller.go Dosyayı Görüntüle

@@ -5095,8 +5095,10 @@ func (this *DialysisApiController) GetDialysisParameterList() {
5095 5095
 
5096 5096
 	page, _ := this.GetInt64("page")
5097 5097
 
5098
-	partition_id, _ := this.GetInt64("partition_id")
5098
+	//partition_id, _ := this.GetInt64("partition_id")
5099 5099
 
5100
+	partion_type := this.GetString("partition_id")
5101
+	idSplit := strings.Split(partion_type, ",")
5100 5102
 	schedule_type, _ := this.GetInt64("schedule_type")
5101 5103
 
5102 5104
 	start_time := this.GetString("schedule_date")
@@ -5111,7 +5113,7 @@ func (this *DialysisApiController) GetDialysisParameterList() {
5111 5113
 	if scheduids != "" {
5112 5114
 		ids = strings.Split(scheduids, ",")
5113 5115
 	}
5114
-	list, total, err := service.GetDialysisParameterList(keyword, limit, page, partition_id, schedule_type, startTime.Unix(), orgId, ids)
5116
+	list, total, err := service.GetDialysisParameterList(keyword, limit, page, idSplit, schedule_type, startTime.Unix(), orgId, ids)
5115 5117
 
5116 5118
 	dialysisSett, _ := service.GetDialysisSetting(orgId)
5117 5119
 	if err == nil {

+ 6 - 3
service/dialysis_solution_service.go Dosyayı Görüntüle

@@ -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)