张保健 10 ヶ月 前
コミット
a4f55a9ebb
共有1 個のファイルを変更した9 個の追加7 個の削除を含む
  1. 9 7
      controllers/mobile_api_controllers/check_weight_api_controller.go

+ 9 - 7
controllers/mobile_api_controllers/check_weight_api_controller.go ファイルの表示

@@ -1206,23 +1206,25 @@ func (c *CheckWeightApiController) GetPatientInfoDialysis() {
1206 1206
 	// 获取当前或者下次排班信息
1207 1207
 	var sc map[string]interface{}
1208 1208
 	sc = make(map[string]interface{})
1209
+	var mode_id int64
1209 1210
 	if dialysistype == 1 {
1210 1211
 		daySchedule, _ := service.GetPatientScheduleFormDay(adminUserInfo.Org.Id, startTime, endTime, id)
1212
+		println(daySchedule[0].Schedule.ModeId)
1211 1213
 		if len(daySchedule) <= 0 {
1212 1214
 			sc["code"] = 1
1213 1215
 			sc["msg"] = "抱歉,您今天没有排版!"
1214
-			sc["mode"] = 0
1216
+			mode_id = 0
1215 1217
 			sc["data"] = daySchedule
1216 1218
 		} else {
1217 1219
 			if daySchedule[0].Schedule.ID > 0 {
1218 1220
 				sc["code"] = 0
1219 1221
 				sc["msg"] = ""
1220
-				sc["mode"] = daySchedule[0].Schedule.ModeId
1222
+				mode_id = daySchedule[0].Schedule.ModeId
1221 1223
 				sc["data"] = daySchedule
1222 1224
 			} else {
1223 1225
 				sc["code"] = 1
1224 1226
 				sc["msg"] = "抱歉,您今天没有排版!"
1225
-				sc["mode"] = 0
1227
+				mode_id = 0
1226 1228
 				sc["data"] = daySchedule
1227 1229
 			}
1228 1230
 		}
@@ -1239,24 +1241,24 @@ func (c *CheckWeightApiController) GetPatientInfoDialysis() {
1239 1241
 		if len(nextSchedule) <= 0 {
1240 1242
 			sc["code"] = 1
1241 1243
 			sc["msg"] = "抱歉,您后续没有排版!"
1242
-			sc["mode"] = 0
1244
+			mode_id = 0
1243 1245
 			sc["data"] = nextSchedule
1244 1246
 		} else {
1245 1247
 			if nextSchedule[0].Schedule.ID > 0 {
1246 1248
 				sc["code"] = 0
1247 1249
 				sc["msg"] = ""
1248
-				sc["mode"] = nextSchedule[0].Schedule.ModeId
1250
+				mode_id = nextSchedule[0].Schedule.ModeId
1249 1251
 				sc["data"] = nextSchedule
1250 1252
 			} else {
1251 1253
 				sc["code"] = 1
1252 1254
 				sc["msg"] = "抱歉,您后续没有排版!"
1253
-				sc["mode"] = 0
1255
+				mode_id = 0
1254 1256
 				sc["data"] = nextSchedule
1255 1257
 			}
1256 1258
 		}
1257 1259
 	}
1258 1260
 
1259
-	switch sc["mode"] {
1261
+	switch mode_id {
1260 1262
 	case 1:
1261 1263
 		sc["mode"] = "HD"
1262 1264
 		break