|  | @ -269,48 +269,6 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 		return success("请求成功");
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorIndexConsultCount)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数", notes = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数")
 | 
	
		
			
				|  |  | 	public Envelop doctorIndexConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
 | 
	
		
			
				|  |  | 	                                           @RequestParam(value = "doctor",required = true) String doctor){
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//专家咨询
 | 
	
		
			
				|  |  | 		Integer zjCount = imService.sessionCountByType(doctor,1,0);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//复诊咨询
 | 
	
		
			
				|  |  | 		Integer imgCount = imService.sessionCountByType(doctor,9,0);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 		//正在进行中的视频复诊
 | 
	
		
			
				|  |  | 		Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
 | 
	
		
			
				|  |  | 		Integer videoCount = _videoOnlineCount.intValue();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//获取候诊居民数量(包含进行中的)
 | 
	
		
			
				|  |  | 		Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
 | 
	
		
			
				|  |  | 		Integer waitVideoCount = _waitVideoCount.intValue();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 		result.put("zjCount",zjCount);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		imgCount = imgCount - videoCount;
 | 
	
		
			
				|  |  | 		if(imgCount <=0){
 | 
	
		
			
				|  |  | 			imgCount = 0;
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		result.put("zjCount",zjCount);//专家咨询数量
 | 
	
		
			
				|  |  | 		result.put("imgCount",imgCount);//图文复诊数量
 | 
	
		
			
				|  |  | 		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
 | 
	
		
			
				|  |  | 		result.put("xtCount",0);//协同门诊候诊数量
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
 | 
	
		
			
				|  |  | 		result.put("imgPickCount",resultPick.getIntValue("twCount"));
 | 
	
		
			
				|  |  | 		result.put("videoPickCount",resultPick.getIntValue("spCount"));
 | 
	
		
			
				|  |  | 		result.put("xtPickCount",resultPick.getIntValue("xtCount"));
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		return success("请求成功",result);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.records)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "医生咨询记录查询")
 | 
	
		
			
				|  |  | 	public Envelop records(
 | 
	
	
		
			
				|  | @ -444,4 +402,98 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorIndexConsultCount)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数", notes = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数")
 | 
	
		
			
				|  |  | 	public Envelop doctorIndexConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
 | 
	
		
			
				|  |  | 	                                       @RequestParam(value = "doctor",required = true) String doctor){
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//专家咨询
 | 
	
		
			
				|  |  | 		Integer zjCount = imService.sessionCountByType(doctor,1,0);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//复诊咨询
 | 
	
		
			
				|  |  | 		Integer imgCount = imService.sessionCountByType(doctor,9,0);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//正在进行中的视频复诊
 | 
	
		
			
				|  |  | 		Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
 | 
	
		
			
				|  |  | 		Integer videoCount = _videoOnlineCount.intValue();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//获取候诊居民数量(包含进行中的)
 | 
	
		
			
				|  |  | 		Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
 | 
	
		
			
				|  |  | 		Integer waitVideoCount = _waitVideoCount.intValue();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 		result.put("zjCount",zjCount);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		imgCount = imgCount - videoCount;
 | 
	
		
			
				|  |  | 		if(imgCount <=0){
 | 
	
		
			
				|  |  | 			imgCount = 0;
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		result.put("zjCount",zjCount);//专家咨询数量
 | 
	
		
			
				|  |  | 		result.put("imgCount",imgCount);//图文复诊数量
 | 
	
		
			
				|  |  | 		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
 | 
	
		
			
				|  |  | 		result.put("xtCount",0);//协同门诊候诊数量
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
 | 
	
		
			
				|  |  | 		result.put("imgPickCount",resultPick.getIntValue("twCount"));
 | 
	
		
			
				|  |  | 		result.put("videoPickCount",resultPick.getIntValue("spCount"));
 | 
	
		
			
				|  |  | 		result.put("xtPickCount",resultPick.getIntValue("xtCount"));
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		return success("请求成功",result);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorSpecialistConsultCount)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "医生端:进行中的专家咨询数量", notes = "医生端:进行中的专家咨询数量")
 | 
	
		
			
				|  |  | 	public Envelop doctorSpecialistConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
 | 
	
		
			
				|  |  | 	                                       @RequestParam(value = "doctor",required = true) String doctor){
 | 
	
		
			
				|  |  | 		//专家咨询
 | 
	
		
			
				|  |  | 		Integer zjCount = imService.sessionCountByType(doctor,1,0);
 | 
	
		
			
				|  |  | 		JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 		result.put("zjCount",zjCount);//专家咨询数量
 | 
	
		
			
				|  |  | 		return success("请求成功",result);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorReviewConsultCount)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "医生端:图文复诊、视频复诊咨询数量", notes = "医生端:图文复诊、视频复诊咨询数量")
 | 
	
		
			
				|  |  | 	public Envelop doctorReviewConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
 | 
	
		
			
				|  |  | 	                                            @RequestParam(value = "doctor",required = true) String doctor){
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//复诊咨询
 | 
	
		
			
				|  |  | 		Integer imgCount = imService.sessionCountByType(doctor,9,0);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//正在进行中的视频复诊
 | 
	
		
			
				|  |  | 		Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
 | 
	
		
			
				|  |  | 		Integer videoCount = _videoOnlineCount.intValue();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//获取候诊居民数量(包含进行中的)
 | 
	
		
			
				|  |  | 		Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
 | 
	
		
			
				|  |  | 		Integer waitVideoCount = _waitVideoCount.intValue();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		imgCount = imgCount - videoCount;
 | 
	
		
			
				|  |  | 		if(imgCount <=0){
 | 
	
		
			
				|  |  | 			imgCount = 0;
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		result.put("imgCount",imgCount);//图文复诊数量
 | 
	
		
			
				|  |  | 		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
 | 
	
		
			
				|  |  | 		result.put("xtCount",0);//协同门诊候诊数量
 | 
	
		
			
				|  |  | 		return success("请求成功",result);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorPickCount)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "医生端:可抢单数量", notes = "医生端:可抢单数量")
 | 
	
		
			
				|  |  | 	public Envelop doctorPickCount(@ApiParam(name = "doctor", value = "医生CODE")
 | 
	
		
			
				|  |  | 	                                        @RequestParam(value = "doctor",required = true) String doctor){
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
 | 
	
		
			
				|  |  | 		JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 		result.put("imgPickCount",resultPick.getIntValue("twCount"));
 | 
	
		
			
				|  |  | 		result.put("videoPickCount",resultPick.getIntValue("spCount"));
 | 
	
		
			
				|  |  | 		result.put("xtPickCount",resultPick.getIntValue("xtCount"));
 | 
	
		
			
				|  |  | 		return success("请求成功",result);
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | }
 |