|  | @ -1,9 +1,11 @@
 | 
	
		
			
				|  |  | package com.yihu.jw.care.endpoint.admin;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.endpoint.BaseController;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.service.admin.AdminDoorCoachOrderService;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.message.SystemMessageDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.ResponseContant;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
	
		
			
				|  | @ -11,10 +13,7 @@ import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestParam;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.util.ArrayList;
 | 
	
		
			
				|  |  | import java.util.List;
 | 
	
	
		
			
				|  | @ -28,7 +27,7 @@ import java.util.List;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | @RestController
 | 
	
		
			
				|  |  | @RequestMapping(value = "/admin/doorCoach/serviceOrder", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 | 
	
		
			
				|  |  | @Api(description = "医生端-上门辅导")
 | 
	
		
			
				|  |  | @Api(description = "管理员调度大屏")
 | 
	
		
			
				|  |  | public class AdminDoorCoachOrderController extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
	
		
			
				|  | @ -98,6 +97,41 @@ public class AdminDoorCoachOrderController extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @RequestMapping(value = "message/getWaitingMessages",method = RequestMethod.GET)
 | 
	
		
			
				|  |  |     @ApiOperation("调度员获取服务工单待接单列表")
 | 
	
		
			
				|  |  |     public String getWaitingMessages(
 | 
	
		
			
				|  |  |             @ApiParam(name = "message",value = "消息对象")
 | 
	
		
			
				|  |  |             @RequestParam(value = "message")String message,
 | 
	
		
			
				|  |  |             @ApiParam(name="types",value="消息类型")
 | 
	
		
			
				|  |  |             @RequestParam(value="types",required = true) String types,
 | 
	
		
			
				|  |  |             @ApiParam(name="page",value="第几页",defaultValue = "1")
 | 
	
		
			
				|  |  |             @RequestParam(value="page",required = true) String page,
 | 
	
		
			
				|  |  |             @ApiParam(name="pageSize",value="",defaultValue = "10")
 | 
	
		
			
				|  |  |             @RequestParam(value="pageSize",required = true) String pageSize){
 | 
	
		
			
				|  |  |         if (org.apache.commons.lang3.StringUtils.isBlank(pageSize)) {
 | 
	
		
			
				|  |  |             pageSize = "10";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (page.equals("0")) {
 | 
	
		
			
				|  |  |             page = "1";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String[] split = org.apache.commons.lang3.StringUtils.split(types, ",");
 | 
	
		
			
				|  |  |         List<Integer> typeList = new ArrayList<>();
 | 
	
		
			
				|  |  |         for (String s : split) {
 | 
	
		
			
				|  |  |             typeList.add(Integer.valueOf(s));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         SystemMessageDO message1 = new SystemMessageDO();
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONObject object = JSON.parseObject(message);
 | 
	
		
			
				|  |  |         message1.setOver(object.getString("over"));
 | 
	
		
			
				|  |  |         message1.setIsRead(object.get("read")+"");
 | 
	
		
			
				|  |  |         message1.setReceiver(getUID());
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  |             org.json.JSONObject waitingMessages = doctorDoorCoachOrderService.getWaitingMessages(message1, types, Integer.valueOf(page), Integer.valueOf(pageSize));
 | 
	
		
			
				|  |  |             return baseController.write(200, "查询成功","data",waitingMessages);
 | 
	
		
			
				|  |  |         }catch (Exception e){
 | 
	
		
			
				|  |  |             return baseController.errorResult(e);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @GetMapping(value = "getServiceDynamic")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "管理员调度实时动态")
 | 
	
		
			
				|  |  |     public String getServiceDynamic(
 |