| 
					
				 | 
			
			
				@@ -85,10 +85,10 @@ public class MzyReqrecServiceImpl implements MzyReqrecService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private OrderStatusChangeService orderStatusChangeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private HolidaysService holidaysService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    private HaiCiAdapterService haiCiAdapterService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    //无需新冠调查的科室 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    private List notCovid=Arrays.asList("1040200","1040000","1040100","1070000","1260000"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private HaiCiAdapterService haiCiAdapterService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //无需新冠调查的科室 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private List notCovid=Arrays.asList("1040200","1040000","1040100","1070000","1260000"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Value("${lxbdcwjUrl}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private String lxbdcwjUrl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -114,24 +114,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new MzException("当前号别不存在,请先设置!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         MzyRequest mzyRequest = mzyRequestMapper.selectMzyRequestById(mzyReqrecPageDto.getMzyRequestId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        //除了儿科与急诊科外都需要做新冠调查 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        if(!notCovid.contains(mzyRequest.getUnitCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            CovidPojo covidPojo = covidPojoMapper.selectLastCovidPojoByIdcard(mzPatientMi.getSocialNo(), mzPatientMi.getPatientId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            if (covidPojo == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(),"{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"很抱歉,您的暂时无法进行挂号,详情如下:\"},\"keyword1\":{\"color\":\"#173177\",\"value\":\"\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"挂号失败\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"\"},\"keyword3\":{\"color\":\"#173177\",\"value\":\"您还未做新型冠状病毒感染流行病学史问卷,请前往填写\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\"\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"PEDh0niCG93uQsY5P6XS-J3haoB8sn4Pq-ZSrEZ6gGo\",\"touser\":\"\",\"url\":\""+lxbdcwjUrl+mzyReqrec.getPatientId()+"\"}",new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                throw new MzException("当前挂号的病人还未做新型冠状病毒感染流行病学史问卷,请告知病人及时前往填写!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            boolean temperature =false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            if(covidPojo.getTemperature()==2){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                BigDecimal feverNumber = new BigDecimal(covidPojo.getFeverNumber()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                temperature= feverNumber.compareTo(BigDecimal.valueOf(37.3)) >= 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            if (temperature|| covidPojo.getItem1() != 14 || covidPojo.getItem2() != 24 || covidPojo.getItem3() != 32 || covidPojo.getItem4() != 42 || covidPojo.getItem5() != 52) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                throw new MzException("当前病人新型冠状病毒感染流行病学史问卷未通过,请挂发热门诊并告知病人"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        covidManage(mzyReqrec, mzPatientMi, mzyRequest); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //MzyReqrec lastMzyReqrec = mzyReqrecMapper.selectLastMzyReqrecByPatientId(mzyReqrec.getPatientId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         MzVisitTable lastMzVisitTable = mzVisitTableMapper.selectLastMzVisitTableByPatientId(mzyReqrec.getPatientId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int times = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (lastMzVisitTable != null && lastMzVisitTable.getTimes() != null && lastMzVisitTable.getTimes() > times) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -167,6 +152,32 @@ public class MzyReqrecServiceImpl implements MzyReqrecService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 新冠拦截手机挂号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param mzyReqrec 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param mzPatientMi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param mzyRequest 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @throws MzException 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private void covidManage(MzyReqrec mzyReqrec, MzPatientMi mzPatientMi, MzyRequest mzyRequest) throws MzException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //手机挂号 除了儿科与急诊科外都需要做新冠调查 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(Constants.BRZZJF_CODE.equals(mzyReqrec.getOpId()) && !notCovid.contains(mzyRequest.getUnitCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            CovidPojo covidPojo = covidPojoMapper.selectLastCovidPojoByIdcard(mzPatientMi.getSocialNo(), mzPatientMi.getPatientId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (covidPojo == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(),"{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"很抱歉,您的暂时无法进行挂号,详情如下:\"},\"keyword1\":{\"color\":\"#173177\",\"value\":\"\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"挂号失败\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"\"},\"keyword3\":{\"color\":\"#173177\",\"value\":\"您还未做新型冠状病毒感染流行病学史问卷,请前往填写\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\"\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"PEDh0niCG93uQsY5P6XS-J3haoB8sn4Pq-ZSrEZ6gGo\",\"touser\":\"\",\"url\":\""+lxbdcwjUrl+mzyReqrec.getPatientId()+"\"}",new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                throw new MzException("当前挂号的病人还未做新型冠状病毒感染流行病学史问卷,请告知病人及时前往填写!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            boolean temperature =false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(covidPojo.getTemperature()==2){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                BigDecimal feverNumber = new BigDecimal(covidPojo.getFeverNumber()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                temperature= feverNumber.compareTo(BigDecimal.valueOf(37.3)) >= 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (temperature|| covidPojo.getItem1() != 14 || covidPojo.getItem2() != 24 || covidPojo.getItem3() != 32 || covidPojo.getItem4() != 42 || covidPojo.getItem5() != 52) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                throw new MzException("当前病人新型冠状病毒感染流行病学史问卷未通过,请挂发热门诊并告知病人"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 发送号表剩余号数预警消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 
			 |