| 
					
				 | 
			
			
				@ -471,36 +471,38 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorIndexConsultCount) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@ApiOperation(value = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数", notes = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@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);//协同门诊候诊数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//		//专家咨询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//		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(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//		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")); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -525,36 +527,14 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorReviewConsultCount) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@ApiOperation(value = "医生端:图文复诊、视频复诊咨询数量", notes = "医生端:图文复诊、视频复诊咨询数量") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@ApiOperation(value = "医生端:图文复诊、视频复诊咨询数量、协同门诊候诊数量", notes = "医生端:图文复诊、视频复诊咨询数量、协同门诊候诊数量") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					public Envelop doctorReviewConsultCount(@ApiParam(name = "doctor", value = "医生CODE") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                            @RequestParam(value = "doctor",required = true) String doctor){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						logger.info("action:doctorReviewConsultCount--start:"+DateUtil.dateToStrLong(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						//复诊咨询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						Integer imgCount = imService.sessionCountByType(doctor,9,0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						logger.info("action:doctorReviewConsultCount--imgCount:"+DateUtil.dateToStrLong(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						//正在进行中的视频复诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						Integer videoCount = _videoOnlineCount.intValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						logger.info("action:doctorReviewConsultCount--videoCount:"+DateUtil.dateToStrLong(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						//获取候诊居民数量(包含进行中的) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						logger.info("action:doctorReviewConsultCount--waitVideoCount:"+DateUtil.dateToStrLong(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						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);//协同门诊候诊数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						logger.info("action:doctorReviewConsultCount--start:"+DateUtil.dateToStrLong(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						result.put("imgCount",prescriptionService.getWaitVideoCount(doctor,"1","1"));//图文复诊数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						result.put("videoCount",prescriptionService.getWaitVideoCount(doctor,"2","1"));//视频复诊数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						result.put("xtCount",prescriptionService.getWaitVideoCount(doctor,"","2"));//协同门诊候诊数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						logger.info("action:doctorReviewConsultCount--end:"+DateUtil.dateToStrLong(new Date())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						return success("请求成功",result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 |