|  | @ -85,6 +85,7 @@ import java.util.*;
 | 
	
		
			
				|  |  |  * 业务订单
 | 
	
		
			
				|  |  |  */
 | 
	
		
			
				|  |  | @Service
 | 
	
		
			
				|  |  | @Transactional
 | 
	
		
			
				|  |  | public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,BusinessOrderDao> {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private Logger logger = LoggerFactory.getLogger(BusinessOrderService.class);
 | 
	
	
		
			
				|  | @ -183,7 +184,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         List<BusinessOrderDO> businessOrderDOS = new ArrayList<>();
 | 
	
		
			
				|  |  |         if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
 | 
	
		
			
				|  |  |             WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
 | 
	
		
			
				|  |  |             WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
 | 
	
		
			
				|  |  |             WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).get();
 | 
	
		
			
				|  |  |             BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(wlyyPrescriptionDO.getId());
 | 
	
		
			
				|  |  |             if (businessOrderDO==null) {
 | 
	
		
			
				|  |  |                 businessOrderDO = new BusinessOrderDO();
 | 
	
	
		
			
				|  | @ -221,7 +222,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                 JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |                 List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(code, 1);
 | 
	
		
			
				|  |  |                 if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
 | 
	
		
			
				|  |  |                     WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
 | 
	
		
			
				|  |  |                     WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").get();
 | 
	
		
			
				|  |  |                     for (WlyyPrescriptionInfoDO prescriptionInfoDO : wlyyPrescriptionInfoDOS) {
 | 
	
		
			
				|  |  |                         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |                         //{"commodityName":"","commodityPrice":"","DrugUnit":"","MedicineDoctor":""}
 | 
	
	
		
			
				|  | @ -250,7 +251,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                         object.put("MedicineDoctor", yktDoctor);
 | 
	
		
			
				|  |  |                         array.add(object);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |                     BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).get();
 | 
	
		
			
				|  |  |                     String userId = null;
 | 
	
		
			
				|  |  |                     if (patientDO != null) {
 | 
	
		
			
				|  |  |                         userId = patientDO.getUserId();
 | 
	
	
		
			
				|  | @ -333,10 +334,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         businessOrderDO = businessOrderDao.save(businessOrderDO);
 | 
	
		
			
				|  |  |         String patient = businessOrderDO.getPatient();
 | 
	
		
			
				|  |  |         BasePatientDO basePatientDO = patientDao.findById(patient).orElse(null);
 | 
	
		
			
				|  |  |         BasePatientDO basePatientDO = patientDao.findById(patient).get();
 | 
	
		
			
				|  |  |         String orderNo = businessOrderDO.getOrderNo();
 | 
	
		
			
				|  |  |         String patientId = "";
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").get();
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(basePatientDO.getYktId())){
 | 
	
		
			
				|  |  |             patientId = basePatientDO.getYktId();
 | 
	
		
			
				|  |  |         }else {
 | 
	
	
		
			
				|  | @ -432,7 +433,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |             throw new Exception("can't find wechat:the wxId is "+wechatId);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String patient = businessOrderDO.getPatient();
 | 
	
		
			
				|  |  |         BasePatientDO basePatientDO = patientDao.findById(patient).orElse(null);
 | 
	
		
			
				|  |  |         BasePatientDO basePatientDO = patientDao.findById(patient).get();
 | 
	
		
			
				|  |  |         String orderNo = businessOrderDO.getOrderNo();
 | 
	
		
			
				|  |  |         String patientId = basePatientDO.getYktId();
 | 
	
		
			
				|  |  |         String orderAmout = businessOrderDO.getPayPrice()/100+"";
 | 
	
	
		
			
				|  | @ -459,7 +460,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                 doctorId="hlwyymrys001";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").get();
 | 
	
		
			
				|  |  |         if (null != hospitalSysDictDO && "0".equalsIgnoreCase(hospitalSysDictDO.getDictValue())) {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         } else {
 | 
	
	
		
			
				|  | @ -492,7 +493,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |     public String refund(Map<String,String> par,String appKey) throws Exception {
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("REFUND").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("REFUND").get();
 | 
	
		
			
				|  |  |         if(StringUtils.isNoneBlank(hospitalSysDictDO.getImgUrl())){
 | 
	
		
			
				|  |  |             //公网域名必须为https
 | 
	
		
			
				|  |  |             par.put("notify_url",hospitalSysDictDO.getImgUrl());
 | 
	
	
		
			
				|  | @ -525,7 +526,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         WxWechatDO wxWechatDO = wechatDao.findByIdAndStatus(wechatId);
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
 | 
	
		
			
				|  |  |         if (NumberUtils.isDigits(relationCode) ){
 | 
	
		
			
				|  |  |             BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(Integer.valueOf(relationCode)).orElse(null);
 | 
	
		
			
				|  |  |             BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(Integer.valueOf(relationCode)).get();
 | 
	
		
			
				|  |  |             if (baseNatAppointmentDO!=null&&"-1".equalsIgnoreCase(baseNatAppointmentDO.getIsSuccess())){
 | 
	
		
			
				|  |  |                 throw new Exception("订单已取消");
 | 
	
		
			
				|  |  |             }
 | 
	
	
		
			
				|  | @ -533,7 +534,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                 throw new Exception("订单已支付");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(relationCode).orElse(null);
 | 
	
		
			
				|  |  |         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(relationCode).get();
 | 
	
		
			
				|  |  |         if (wlyyOutpatientDO!=null){
 | 
	
		
			
				|  |  |             if ("-1".equalsIgnoreCase(wlyyOutpatientDO.getStatus())){
 | 
	
		
			
				|  |  |                 throw new Exception("订单已取消");
 | 
	
	
		
			
				|  | @ -929,8 +930,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |             //更改业务状态,做日志保存等操作
 | 
	
		
			
				|  |  |             BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(seqNo);
 | 
	
		
			
				|  |  |             businessOrderDO.setPayTime(DateUtil.strToDate(timeEnd,DateUtil.YYYY_MM_DD_HH_MM_SS));
 | 
	
		
			
				|  |  |             WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
 | 
	
		
			
				|  |  |             WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").orElse(null);
 | 
	
		
			
				|  |  |             WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").get();
 | 
	
		
			
				|  |  |             WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").get();
 | 
	
		
			
				|  |  |             String changeflag="0";
 | 
	
		
			
				|  |  |             String type="";
 | 
	
		
			
				|  |  |             if(null!=changeMethod){
 | 
	
	
		
			
				|  | @ -939,11 +940,11 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |             if (businessOrderDO!=null){
 | 
	
		
			
				|  |  |                 if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
 | 
	
		
			
				|  |  |                     if ("0".equalsIgnoreCase(changeflag)){
 | 
	
		
			
				|  |  |                         ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                         ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                         consultDo.setPayStatus(1);
 | 
	
		
			
				|  |  |                         consultOrderDao.save(consultDo);
 | 
	
		
			
				|  |  |                     }else {
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                         wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                         outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |                         prescriptionService.wxTempalteJPush("outpatient_remind",wlyyOutpatientDO,null,"","","","");
 | 
	
	
		
			
				|  | @ -958,7 +959,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                     wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                     outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |                     if (StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
 | 
	
	
		
			
				|  | @ -1018,7 +1019,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                                                 " where "+condition+" t.CFSB ='"+wlyyPrescriptionDO.getRealOrder()+"'";
 | 
	
		
			
				|  |  |                                         ykyyEntranceService.updateHisStatus(updatesql);
 | 
	
		
			
				|  |  |                                         logger.info("自取写入更新his");
 | 
	
		
			
				|  |  |                                         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
 | 
	
		
			
				|  |  |                                         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).get();
 | 
	
		
			
				|  |  |                                         ykyySMSService.sendSmsByTempcode("oneself_pick",wlyyOutpatientDO,wlyyPrescriptionDO,"");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                                     }else {
 | 
	
	
		
			
				|  | @ -1074,7 +1075,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
 | 
	
		
			
				|  |  |                     String price = Integer.parseInt(totalFee)/100+"";
 | 
	
		
			
				|  |  |                     BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(Integer.parseInt(businessOrderDO.getRelationCode())).orElse(null);
 | 
	
		
			
				|  |  |                     BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(Integer.parseInt(businessOrderDO.getRelationCode())).get();
 | 
	
		
			
				|  |  |                     baseNatAppointmentDO.setPayStatus("1");
 | 
	
		
			
				|  |  |                     baseNatAppointmentDao.save(baseNatAppointmentDO);
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1123,7 +1124,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |     public String sendDataToYkt(String orderNo){
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
 | 
	
		
			
				|  |  |         String patient = businessOrderDO.getPatient();
 | 
	
		
			
				|  |  |         BasePatientDO basePatientDO = patientDao.findById(patient).orElse(null);
 | 
	
		
			
				|  |  |         BasePatientDO basePatientDO = patientDao.findById(patient).get();
 | 
	
		
			
				|  |  |         String patientId = basePatientDO.getYktId();
 | 
	
		
			
				|  |  |         String orderAmout = businessOrderDO.getPayPrice()/100+"";
 | 
	
		
			
				|  |  |         String description = businessOrderDO.getDescription();
 | 
	
	
		
			
				|  | @ -1236,10 +1237,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         if(wxWechatDO==null){
 | 
	
		
			
				|  |  |             throw new Exception("can't find wechat:the wxId is "+wechatId);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").get();
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
 | 
	
		
			
				|  |  |         if (businessOrderDO!=null){
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).get();
 | 
	
		
			
				|  |  |             String idcard = "";
 | 
	
		
			
				|  |  |             String ssc = "";
 | 
	
		
			
				|  |  |             if (patientDO!=null){
 | 
	
	
		
			
				|  | @ -1297,10 +1298,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         if(wxWechatDO==null){
 | 
	
		
			
				|  |  |             throw new Exception("can't find wechat:the wxId is "+wechatId);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").get();
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
 | 
	
		
			
				|  |  |         if (businessOrderDO!=null){
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).get();
 | 
	
		
			
				|  |  |             String idcard = "";
 | 
	
		
			
				|  |  |             String ssc = "";
 | 
	
		
			
				|  |  |             if (patientDO!=null){
 | 
	
	
		
			
				|  | @ -1347,7 +1348,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         return businessOrderDO;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     public BusinessOrderDO selectStatusById(Integer id){
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.findById(id).orElse(null);
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.findById(id).get();
 | 
	
		
			
				|  |  |         return businessOrderDO;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1382,7 +1383,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         if (businessOrderDO==null){
 | 
	
		
			
				|  |  |             throw new Exception("this orderId not exit");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = patientDao.findById(patient).get();
 | 
	
		
			
				|  |  |         if (patientDO==null){
 | 
	
		
			
				|  |  |             throw new Exception("this patient not exit");
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -1422,7 +1423,6 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 易联众查询交易订单
 | 
	
		
			
				|  |  |      *
 | 
	
		
			
				|  |  |      * @param orderNo
 | 
	
		
			
				|  |  |      * @param tradeType
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
	
		
			
				|  | @ -1445,7 +1445,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                     logger.info("his充值结束");
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (businessOrderDO.getStatus()!=1){
 | 
	
		
			
				|  |  |                    if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
 | 
	
		
			
				|  |  |                     if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                         wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                         wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
	
		
			
				|  | @ -1455,7 +1460,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                         wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                         WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |                     }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
 | 
	
		
			
				|  |  |                         YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                         YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                         if (wechatId.equalsIgnoreCase("xm_dsyy_wx")){
 | 
	
		
			
				|  |  |                             dsyyPrescriptionService.confirmSettlement(ylzMedicalRelationDO.getRelationCode());
 | 
	
		
			
				|  |  |                         }
 | 
	
	
		
			
				|  | @ -1483,23 +1488,23 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |             throw new Exception("查不到订单!");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String newPayFlag = "0";
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("consultPay").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("consultPay").get();
 | 
	
		
			
				|  |  |         if (null!=wlyyHospitalSysDictDO){
 | 
	
		
			
				|  |  |             newPayFlag = wlyyHospitalSysDictDO.getDictValue();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
 | 
	
		
			
				|  |  |             if ("0".equalsIgnoreCase(newPayFlag)){
 | 
	
		
			
				|  |  |                 ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                 ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                 consultDo.setPayStatus(2);
 | 
	
		
			
				|  |  |                 consultOrderDao.save(consultDo);
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                 wlyyOutpatientDO.setPayStatus(2);
 | 
	
		
			
				|  |  |                 outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |             WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |             WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |             wlyyOutpatientDO.setPayStatus(2);
 | 
	
		
			
				|  |  |             outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -1515,11 +1520,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |      * @param orderNo
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |     public BusinessOrderDO updatePayStatus(String orderNo) throws Exception {
 | 
	
		
			
				|  |  |         logger.info("入参:"+orderNo);
 | 
	
		
			
				|  |  |         String baseUrl = prescriptionService.findDomainUrlInDict();
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").get();
 | 
	
		
			
				|  |  |         String changeflag="0";
 | 
	
		
			
				|  |  |         if(null!=changeMethod){
 | 
	
		
			
				|  |  |             changeflag = changeMethod.getDictValue();
 | 
	
	
		
			
				|  | @ -1529,16 +1535,16 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")&&businessOrderDO.getStatus()==0){
 | 
	
		
			
				|  |  |             if ("0".equalsIgnoreCase(changeflag)){
 | 
	
		
			
				|  |  |                 ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                 ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                 consultDo.setPayStatus(1);
 | 
	
		
			
				|  |  |                 consultOrderDao.save(consultDo);
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                 wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |                 //发送企业模板消息给医生
 | 
	
		
			
				|  |  |                 BasePatientDO patientDO = new BasePatientDO();
 | 
	
		
			
				|  |  |                 patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |                 patientDO = patientDao.findById(outpatientDO.getPatient()).get();
 | 
	
		
			
				|  |  |                 String msg = "";
 | 
	
		
			
				|  |  |                 String name=outpatientDO.getPatientName();
 | 
	
		
			
				|  |  |                 String sex = "";
 | 
	
	
		
			
				|  | @ -1586,7 +1592,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")||businessOrderDO.getOrderCategory().equalsIgnoreCase("5")){
 | 
	
		
			
				|  |  |            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |            wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |            WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |            try {
 | 
	
	
		
			
				|  | @ -1600,7 +1606,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |            if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
 | 
	
		
			
				|  |  |                //发送企业模板消息给医生
 | 
	
		
			
				|  |  |                BasePatientDO patientDO = new BasePatientDO();
 | 
	
		
			
				|  |  |                patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |                patientDO = patientDao.findById(outpatientDO.getPatient()).get();
 | 
	
		
			
				|  |  |                String msg = "";
 | 
	
		
			
				|  |  |                String name=outpatientDO.getPatientName();
 | 
	
		
			
				|  |  |                String sex = "";
 | 
	
	
		
			
				|  | @ -1888,7 +1894,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         logger.info("进入无需支付");
 | 
	
		
			
				|  |  |         String baseUrl = prescriptionService.findDomainUrlInDict();
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").get();
 | 
	
		
			
				|  |  |         String changeflag="0";
 | 
	
		
			
				|  |  |         if(null!=changeMethod){
 | 
	
		
			
				|  |  |             changeflag = changeMethod.getDictValue();
 | 
	
	
		
			
				|  | @ -1898,17 +1904,17 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")&&0==businessOrderDO.getStatus()){
 | 
	
		
			
				|  |  |             if ("0".equalsIgnoreCase(changeflag)){
 | 
	
		
			
				|  |  |                 ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                 ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                 consultDo.setPayStatus(1);
 | 
	
		
			
				|  |  |                 consultOrderDao.save(consultDo);
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |                 wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |                 WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |                 if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
 | 
	
		
			
				|  |  |                     //发送企业模板消息给医生
 | 
	
		
			
				|  |  |                     BasePatientDO patientDO = new BasePatientDO();
 | 
	
		
			
				|  |  |                     patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |                     patientDO = patientDao.findById(outpatientDO.getPatient()).get();
 | 
	
		
			
				|  |  |                     String msg = "";
 | 
	
		
			
				|  |  |                     String name=outpatientDO.getPatientName();
 | 
	
		
			
				|  |  |                     String sex = "";
 | 
	
	
		
			
				|  | @ -1950,13 +1956,13 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")||businessOrderDO.getOrderCategory().equalsIgnoreCase("5")&&0==businessOrderDO.getStatus()){
 | 
	
		
			
				|  |  |             WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
 | 
	
		
			
				|  |  |             WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
 | 
	
		
			
				|  |  |             wlyyOutpatientDO.setPayStatus(1);
 | 
	
		
			
				|  |  |             WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |             if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
 | 
	
		
			
				|  |  |                 //发送企业模板消息给医生
 | 
	
		
			
				|  |  |                 BasePatientDO patientDO = new BasePatientDO();
 | 
	
		
			
				|  |  |                 patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |                 patientDO = patientDao.findById(outpatientDO.getPatient()).get();
 | 
	
		
			
				|  |  |                 String msg = "";
 | 
	
		
			
				|  |  |                 String name=outpatientDO.getPatientName();
 | 
	
		
			
				|  |  |                 String sex = "";
 | 
	
	
		
			
				|  | @ -2021,7 +2027,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public JSONObject selectOrderTime(String relationCode){
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("PAY_TIME").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("PAY_TIME").get();
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
 | 
	
		
			
				|  |  |         if (businessOrderDO!=null){
 | 
	
		
			
				|  |  |             Date createDate = businessOrderDO.getCreateTime();
 | 
	
	
		
			
				|  | @ -2221,7 +2227,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |             throw new Exception("can't find wechat:the wxId is "+wechatId);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").get();
 | 
	
		
			
				|  |  |         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(code).orElse(null);
 | 
	
		
			
				|  |  |         WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(code).get();
 | 
	
		
			
				|  |  |         YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(code);
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(ylzMedicalRelationDO.getId());
 | 
	
		
			
				|  |  |         BigDecimal b1 = new BigDecimal(ylzMedicalRelationDO.getBcwkje());//总金额
 | 
	
	
		
			
				|  | @ -2230,7 +2236,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Double fee = b1.subtract(b2).subtract(b3).doubleValue();
 | 
	
		
			
				|  |  |         if (businessOrderDO!=null){
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).get();
 | 
	
		
			
				|  |  |             String idcard = "";
 | 
	
		
			
				|  |  |             if (patientDO!=null){
 | 
	
		
			
				|  |  |                 idcard = patientDO.getIdcard();
 | 
	
	
		
			
				|  | @ -2310,7 +2316,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             businessOrderDO = new BusinessOrderDO();
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(wlyyOutpatientDO.getPatient()).orElse(null);
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = patientDao.findById(wlyyOutpatientDO.getPatient()).get();
 | 
	
		
			
				|  |  |             String idcard = "";
 | 
	
		
			
				|  |  |             if (patientDO!=null){
 | 
	
		
			
				|  |  |                 idcard = patientDO.getIdcard();
 | 
	
	
		
			
				|  | @ -2438,14 +2444,14 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String yktAppPayJson(String relationCode) throws UnknownHostException {
 | 
	
		
			
				|  |  |         String serverIp = getServerIp();
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKT_NOTIFY_URL").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKT_NOTIFY_URL").get();
 | 
	
		
			
				|  |  |         String url = hospitalSysDictDO.getDictCode();
 | 
	
		
			
				|  |  |         String notifyUrl =url;
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
 | 
	
		
			
				|  |  |         businessOrderDO.setPayType(5);
 | 
	
		
			
				|  |  |         businessOrderDao.save(businessOrderDO);
 | 
	
		
			
				|  |  |         String totalFee =(int)(businessOrderDO.getPayPrice()*100)+"";
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysD2ictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO hospitalSysD2ictDO = hospitalSysDictDao.findById("YKTCONTROL").get();
 | 
	
		
			
				|  |  |         if (null != hospitalSysD2ictDO && "0".equalsIgnoreCase(hospitalSysD2ictDO.getDictValue())) {
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         } else {
 | 
	
	
		
			
				|  | @ -2542,13 +2548,13 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                     logger.info("price"+prie);
 | 
	
		
			
				|  |  |                     map.put("payPrice",prie);
 | 
	
		
			
				|  |  |                 }if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).get();
 | 
	
		
			
				|  |  |                     map.put("doctorName",outpatientDO.getDoctorName());
 | 
	
		
			
				|  |  |                     map.put("consumerName",outpatientDO.getConsumerName());
 | 
	
		
			
				|  |  |                     map.put("patientName",outpatientDO.getPatientName());
 | 
	
		
			
				|  |  |                 }else if (orderCategoryFlag.equalsIgnoreCase("4")){
 | 
	
		
			
				|  |  |                     WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).get();
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).get();
 | 
	
		
			
				|  |  |                     map.put("doctorName",outpatientDO.getDoctorName());
 | 
	
		
			
				|  |  |                     map.put("consumerName",outpatientDO.getConsumerName());
 | 
	
		
			
				|  |  |                     map.put("patientName",outpatientDO.getPatientName());
 | 
	
	
		
			
				|  | @ -2665,7 +2671,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                     map.put("payPrice",prie);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).get();
 | 
	
		
			
				|  |  |                     if (outpatientDO!=null){
 | 
	
		
			
				|  |  |                         map.put("doctorName",outpatientDO.getDoctorName());
 | 
	
		
			
				|  |  |                         map.put("consumerName",outpatientDO.getPatientName());
 | 
	
	
		
			
				|  | @ -2675,8 +2681,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 }else if (orderCategoryFlag.equalsIgnoreCase("4")){
 | 
	
		
			
				|  |  |                     WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).orElse(null);
 | 
	
		
			
				|  |  |                     WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).get();
 | 
	
		
			
				|  |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).get();
 | 
	
		
			
				|  |  |                     if (outpatientDO!=null){
 | 
	
		
			
				|  |  |                         map.put("doctorName",outpatientDO.getDoctorName());
 | 
	
		
			
				|  |  |                         map.put("consumerName",outpatientDO.getPatientName());
 | 
	
	
		
			
				|  | @ -2727,7 +2733,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |     ,String geetestValidate,String geetestSeccode) throws Exception {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String isNeedGeet= "0";//1需要 0不需要
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO1= hospitalSysDictDao.findById("isCardNeedGeet").orElse(null);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO1= hospitalSysDictDao.findById("isCardNeedGeet").get();
 | 
	
		
			
				|  |  |         if (wlyyHospitalSysDictDO1!=null){
 | 
	
		
			
				|  |  |             isNeedGeet=wlyyHospitalSysDictDO1.getDictValue();
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -2737,7 +2743,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
	
		
			
				|  |  |                 throw new  Exception("验证失败");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = patientDao.findById(patientId).orElse(null);
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = patientDao.findById(patientId).get();
 | 
	
		
			
				|  |  |         BusinessOrderDO businessOrderDO = new BusinessOrderDO();
 | 
	
		
			
				|  |  |         businessOrderDO.setPatient(patientId);
 | 
	
		
			
				|  |  |         businessOrderDO.setPatientName(patientDO.getName());
 |