张保健 10 months ago
parent
commit
a4f55a9ebb

+ 9 - 7
controllers/mobile_api_controllers/check_weight_api_controller.go View File

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