| 
					
				 | 
			
			
				@ -12613,7 +12613,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setPatientId(patientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setIsSuccess("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setCardNoType(cardNoType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setPayStatus("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(itemPrice.equalsIgnoreCase("0")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    baseNatAppointmentDO.setPayStatus("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    baseNatAppointmentDO.setPayStatus("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setMobile(mobile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setInspectionCode(chargeCode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -12631,61 +12635,84 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                baseNatAppointmentDO= baseNatAppointmentDao.save(baseNatAppointmentDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("BaseNatAppointmentDO保存结束"+baseNatAppointmentDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //添加订单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                BusinessOrderDO businessDO = new BusinessOrderDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setPatient(consumer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setPatientName(basePatientDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setStatus(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setRelationCode(baseNatAppointmentDO.getId()+""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setRelationName("核酸检测订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setOrderCategory("6"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setOrderType(12); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setPayPrice(natFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setRematk("核酸检测订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setDescription("核酸检测订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setPayType(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                businessDO=businessOrderDao.save(businessDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String openId=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<BasePatientWechatDo> basePatientWechatDo = basePatientWechatDao.findByWechatIdAndPatientId(wechatId,consumer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (basePatientWechatDo!=null&&basePatientWechatDo.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    openId=basePatientWechatDo.get(0).getOpenid(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //亿同支付创建订单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                com.alibaba.fastjson.JSONObject orderObj= new com.alibaba.fastjson.JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("payType",1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("tradeNo",businessDO.getOrderNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("openId",openId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("name",name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("idNo",cardNo.trim()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Map mapHis=tasyNatService.getPatientHisId(cardNo.trim(),mediaCard.trim()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("patientId",mapHis.get("Patientid").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("mobile",mapHis.get("MobilePhone").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //orderObj.put("socialCard",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("icCard",mediaCard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                BigDecimal b = new BigDecimal(itemPrice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                b=b.setScale(2, BigDecimal.ROUND_DOWN); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                System.out.println("amount"+b); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orderObj.put("amount",b); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String orderRes=tasyNatService.placeOrder(orderObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNoneBlank(orderRes)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject jsonObject= JSON.parseObject(orderRes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (jsonObject!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if("0".equalsIgnoreCase(jsonObject.getString("code"))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            com.alibaba.fastjson.JSONObject dataObj= com.alibaba.fastjson.JSONObject.parseObject(jsonObject.getString("data")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            businessDO.setTraceNo(dataObj.getString("orderNo")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            businessDO.setRematk(dataObj.toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            businessDO=businessOrderDao.save(businessDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!itemPrice.equalsIgnoreCase("0")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //添加订单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    BusinessOrderDO businessDO = new BusinessOrderDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setPatient(consumer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setPatientName(basePatientDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setStatus(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setRelationCode(baseNatAppointmentDO.getId()+""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setRelationName("核酸检测订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setOrderCategory("6"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setOrderType(12); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setPayPrice(natFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setRematk("核酸检测订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setDescription("核酸检测订单"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setPayType(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    businessDO=businessOrderDao.save(businessDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String openId=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    List<BasePatientWechatDo> basePatientWechatDo = basePatientWechatDao.findByWechatIdAndPatientId(wechatId,consumer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (basePatientWechatDo!=null&&basePatientWechatDo.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        openId=basePatientWechatDo.get(0).getOpenid(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //亿同支付创建订单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject orderObj= new com.alibaba.fastjson.JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("payType",1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("tradeNo",businessDO.getOrderNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("openId",openId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("name",name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("idNo",cardNo.trim()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Map mapHis=tasyNatService.getPatientHisId(cardNo.trim(),mediaCard.trim()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("patientId",mapHis.get("Patientid").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("mobile",mapHis.get("MobilePhone").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //orderObj.put("socialCard",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("icCard",mediaCard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    BigDecimal b = new BigDecimal(itemPrice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    b=b.setScale(2, BigDecimal.ROUND_DOWN); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("amount"+b); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orderObj.put("amount",b); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String orderRes=tasyNatService.placeOrder(orderObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (StringUtils.isNoneBlank(orderRes)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        com.alibaba.fastjson.JSONObject jsonObject= JSON.parseObject(orderRes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if (jsonObject!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if("0".equalsIgnoreCase(jsonObject.getString("code"))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                com.alibaba.fastjson.JSONObject dataObj= com.alibaba.fastjson.JSONObject.parseObject(jsonObject.getString("data")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                businessDO.setTraceNo(dataObj.getString("orderNo")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                businessDO.setRematk(dataObj.toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                businessDO=businessOrderDao.save(businessDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),baseNatAppointmentDO.getName(),"hszftx",baseNatAppointmentDO.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),baseNatAppointmentDO.getName(),"hsyycg",baseNatAppointmentDO.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),baseNatAppointmentDO.getName(),"hszftx",baseNatAppointmentDO.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),baseNatAppointmentDO.getName(),"hsyycg",baseNatAppointmentDO.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject chargeObj=new com.alibaba.fastjson.JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeObj.put("hisTradeNo",baseNatAppointmentDO.getRealOrder()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeObj.put("icCardNo",baseNatAppointmentDO.getMedicare().trim()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeObj.put("patientName",baseNatAppointmentDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //调用扣费接口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String feeRes=tasyNatService.ChargenucleicBill(chargeObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject feeObj = com.alibaba.fastjson.JSONObject.parseObject(feeRes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (feeObj!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if ("1".equalsIgnoreCase(feeObj.getString("ReturnCode"))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            com.alibaba.fastjson.JSONObject ApplyInfoObj = JSON.parseObject(feeObj.getString("ApplyInfo")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if (ApplyInfoObj!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                String voucherNo = ApplyInfoObj.getString("ApplyNo"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                if(org.apache.commons.lang3.StringUtils.isNoneBlank(voucherNo)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    System.out.println("ApplyNo:"+voucherNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    baseNatAppointmentDO.setVoucherNo(voucherNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),baseNatAppointmentDO.getName(),"hszfcgtx",baseNatAppointmentDO.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("开单结束"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                returnMap.put("msg","预约成功"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -14496,10 +14523,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNoneBlank(hospitalSysDictDO2.getDictValue())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(hospitalSysDictDO2.getDictValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String startPm2 = jsonObject.getString("startPm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String endPm2 = jsonObject.getString("endPm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date startPmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+startPm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date endPmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+endPm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String startAm2 = jsonObject.getString("startAm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String endAm2 = jsonObject.getString("endAm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date startPmDate2 = DateUtil.strToDateLong(DateUtil.getStringDatePre("yyyy-MM-dd","1")+" "+startPm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date startAmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+startAm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date endAmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+endAm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (now.getTime()>=startPmDate2.getTime()&&now.getTime()<=endAmDate2.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (now.getTime()>=startPmDate2.getTime()&&now.getTime()<=endPmDate2.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        object.put("isAllow","0");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else if (now.getTime()>=startAmDate2.getTime()&&now.getTime()<=endAmDate2.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        object.put("isAllow","0");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        object.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -14523,6 +14556,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String isOpen = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "SELECT COUNT(1) as count FROM `base_nat_appointment` where is_success = 1 and pay_status=1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (hospitalSysDictDO!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String dictValue = hospitalSysDictDO.getDictValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(dictValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String startAm = jsonObject.getString("startAm"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -14539,6 +14573,33 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Date startPmDate = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+startPm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Date endPmDate = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+endPm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyHospitalSysDictDO hospitalSysDictDO2 = hospitalSysDictDao.findById("natTimeConfig2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (hospitalSysDictDO2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNoneBlank(hospitalSysDictDO2.getDictValue())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(hospitalSysDictDO2.getDictValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String startPm2 = object.getString("startPm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String endPm2 = object.getString("endPm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date startPmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+startPm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date endPmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+endPm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String startAm2 = object.getString("startAm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String endAm2 = object.getString("endAm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date startAmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+startAm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date endAmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+endAm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (now.getTime()>=startPmDate2.getTime()&&now.getTime()<=endPmDate2.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        jsonObject.put("isAllow","0");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else if (now.getTime()>=startAmDate2.getTime()&&now.getTime()<=endAmDate2.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        jsonObject.put("isAllow","0");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        jsonObject.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jsonObject.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (i==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (now.getTime()>=startAmDate.getTime()&&now.getTime()<=endAmDate.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sql += " and create_time >= '"+DateUtil.dateToStrLong(startAmDate)+"' and create_time <='"+DateUtil.dateToStrLong(endAmDate)+"' "; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -14585,26 +14646,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    return envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyHospitalSysDictDO hospitalSysDictDO2 = hospitalSysDictDao.findById("natTimeConfig2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (hospitalSysDictDO2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNoneBlank(hospitalSysDictDO2.getDictValue())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(hospitalSysDictDO2.getDictValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String startPm2 = object.getString("startPm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String endAm2 = object.getString("endAm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date startPmDate2 = DateUtil.strToDateLong(DateUtil.getStringDatePre("yyyy-MM-dd","1")+" "+startPm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date endAmDate2 = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" "+endAm2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (now.getTime()>=startPmDate2.getTime()&&now.getTime()<=endAmDate2.getTime()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        jsonObject.put("isAllow","0");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        jsonObject.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jsonObject.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("isAllow","1");//混采1展示0不展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            envelop.setStatus(200); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            envelop.setMessage("获取号源成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            envelop.setObj(jsonObject); 
			 |