Pārlūkot izejas kodu

第三医院版本开发

wangzhinan 1 gadu atpakaļ
vecāks
revīzija
4be41678dc

+ 18 - 6
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java

@ -802,7 +802,10 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        if (businessOrderDO.getUploadStatus()==null||businessOrderDO.getStatus()==0){
            String cardNo = "";
            if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
             if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                WlyyOutpatientDO outpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                cardNo = outpatientDO.getCardNo();
            }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
                WlyyOutpatientDO outpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                cardNo = outpatientDO.getCardNo();
            }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
@ -822,12 +825,18 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            logger.info("发起预缴金充值接口开始======");
            JSONObject jsonObject = startRechargeToHospital("01",cardNo,depositType,channelType,amount,outChargeNo,extra,notes,traceNo,"");
            logger.info("发起预缴金充值接口结束======");
            //response:{"message":"请求成功","status":200,"obj":"{\"function_name\":\"start_recharge\",\"retCode\":\"99\",\"retMsg\":\"系统中已经存在交易流水号[HLWYY1710423577816808100]\"}"}
            if (jsonObject.getString("status").equalsIgnoreCase("200")){
                JSONObject res = jsonObject.getJSONObject("obj");
                if (!res.getString("retCode").equalsIgnoreCase("99")){
                    logger.info("确认预缴金充值接口开始======");
                    jsonObject1 = rechargeToHospital("01",cardNo,depositType,channelType,amount,outChargeNo,extra,notes,traceNo,"");
                    logger.info("确认预缴金充值接口结束======");
                    businessOrderDO.setUploadStatus(1);
                    businessOrderDao.save(businessOrderDO);
                }
            }
            logger.info("确认预缴金充值接口开始======");
            jsonObject1 = rechargeToHospital("01",cardNo,depositType,channelType,amount,outChargeNo,extra,notes,traceNo,"");
            logger.info("确认预缴金充值接口结束======");
            businessOrderDO.setUploadStatus(1);
            businessOrderDao.save(businessOrderDO);
        }
        return jsonObject1;
    }
@ -1616,6 +1625,9 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        JSONObject resObj = new JSONObject();
        if (resStatus==200){
            resObj = rs3.getJSONObject("obj");
            if (resObj.getString("retCode").equalsIgnoreCase("99")){
                throw  new Exception(resObj.getString("retMsg"));
            }
        }
        //获取his结算基本信息表
        String basicSql ="select * from SST_JSDP_JBXX_GJYB where CARD_NO ='"+cardno+"'";

+ 43 - 94
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -10453,107 +10453,56 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    e.printStackTrace();
                }
            }else if (wxId.equalsIgnoreCase("xm_dsyy_wx")){
                try {
                    if (prescriptionDiagnosisDOS!=null&&prescriptionDiagnosisDOS.size()!=0){
                        String diagnosisName = prescriptionDiagnosisDOS.get(0).getName();
                        String diagnosisCode = prescriptionDiagnosisDOS.get(0).getCode();
                        //同步诊断
                        com.alibaba.fastjson.JSONObject jsonObject2 = dsyyPrescriptionService.saveDiagnosis(outpatientDO.getRegisterNo(),diagnosisName,diagnosisCode);
                        logger.info("上传诊断返回参数"+jsonObject2);
                        //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                        if (jsonObject2!=null){
                            if (jsonObject2.getString("returnCode").equalsIgnoreCase("0")){
                                String HISTradeNo = jsonObject2.getString("HISTradeNo");
                                logger.info("上传诊断成功"+jsonObject2);
                            }else {
                                throw new Exception(jsonObject2.getString("msg"));
                            }
                        }
                    }
                    //同步处方
                    String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
                    com.alibaba.fastjson.JSONObject object = dsyyPrescriptionService.savePrescriptionToHospital("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50105",infoDOS);
                    logger.info("成功上传处方"+object);
                if (prescriptionDiagnosisDOS!=null&&prescriptionDiagnosisDOS.size()!=0){
                    String diagnosisName = prescriptionDiagnosisDOS.get(0).getName();
                    String diagnosisCode = prescriptionDiagnosisDOS.get(0).getCode();
                    //同步诊断
                    com.alibaba.fastjson.JSONObject jsonObject2 = dsyyPrescriptionService.saveDiagnosis(outpatientDO.getRegisterNo(),diagnosisName,diagnosisCode);
                    logger.info("上传诊断返回参数"+jsonObject2);
                    //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                    if (object!=null){
                        if (object.getString("returnCode").equalsIgnoreCase("0")){
                            com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                            com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                            String realOrder = jsonObject1.getString("PresNo");
                            wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setRealOrder(realOrder);
                    if (jsonObject2!=null){
                        if (jsonObject2.getString("returnCode").equalsIgnoreCase("0")){
                            String HISTradeNo = jsonObject2.getString("HISTradeNo");
                            logger.info("上传诊断成功"+jsonObject2);
                        }else {
                            throw new Exception(object.getString("msg"));
                            throw new Exception(jsonObject2.getString("msg"));
                        }
                    }
                    logger.info("进入处方签名开始");
                    try {
                        String baseSign=dsyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO.getId());
                        logger.info("进入处方签名结束"+baseSign);
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    //电子病例签名
                    String baseSign=dsyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO.getId());
                    try {
                        logger.info("ca签名后病历保存开始“"+baseSign);
                        String res= dsyyPrescriptionService.dzblSave(wlyyPrescriptionDO.getId());
                        logger.info("ca签名后病历保存结束“"+res);
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (object!=null){
                            if (object.getString("code").equalsIgnoreCase("0")){
                                //  * @param applyDepaName @param applyDoctorName
                                WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).orElse(null);
                                String patientCode = outpatientDO.getConsumer();
                                String realerOrder = prescriptionDO.getRealOrder();
                                String recipeTime = DateUtil.dateToStr(prescriptionDO.getCreateTime(), "yyyyMMddHHmmss");
                                List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(prescriptionDO.getDoctor());
                                String applyDepaName = null;
                                if (doctorHospitalDOS != null && doctorHospitalDOS.size() != 0) {
                                    applyDepaName = doctorHospitalDOS.get(0).getDeptName();
                                }
                                String voucherNo = outpatientDO.getRegisterNo();
                                String applyDoctorName = prescriptionDO.getDoctorName();
                                BasePatientDO patientDO = basePatientDao.findById(patientCode).orElse(null);
                                String userName = null;
                                String idcard = null;
                                if (patientDO != null) {
                                    userName = patientDO.getName();
                                    idcard = patientDO.getIdcard();
                                }
                                PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientCode);
                                String userNo = null;
                                if (patientMappingDO != null) {
                                    userNo = patientMappingDO.getMappingCode();
                                }
                                String cardNo = null;
                                if (StringUtils.isNoneBlank(outpatientDO.getCardNo())) {
                                    cardNo = outpatientDO.getCardNo();
                                }
                                logger.info("cardNo:" + cardNo);
                               /* JSONObject jsonObject =entranceService.BS15054(patientMappingDO.getMappingCode(),prescriptionDO.getRealOrder(),demoFlag);
                                net.sf.json.JSONObject res = jsonObject.getJSONObject("resquest");
                                logger.info("获取待结算数据 res: " + res.toString());
                                String rsCode = res.getString("@RESULT");
                                String free= 0+"";
                                if ("0".equals(rsCode)) {
                                    free = res.getString("@total_charge");
                                }*/
                                /*ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, "", "","WX_PUB");
                                 */}
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                }
                //同步处方
                String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
                com.alibaba.fastjson.JSONObject object = dsyyPrescriptionService.savePrescriptionToHospital("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50105",infoDOS);
                logger.info("成功上传处方"+object);
                //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                if (object!=null){
                    if (object.getString("returnCode").equalsIgnoreCase("0")){
                        com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                        com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                        String realOrder = jsonObject1.getString("PresNo");
                        wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                        wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                        wlyyPrescriptionDO.setRealOrder(realOrder);
                    }else {
                        throw new Exception(object.getString("msg"));
                    }
                } catch (Exception e) {
                }
                logger.info("进入处方签名开始");
                try {
                    String baseSign=dsyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO.getId());
                    logger.info("进入处方签名结束"+baseSign);
                }catch (Exception e){
                    e.printStackTrace();
                }
                //电子病例签名
                String baseSign=dsyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO.getId());
                try {
                    logger.info("ca签名后病历保存开始“"+baseSign);
                    String res= dsyyPrescriptionService.dzblSave(wlyyPrescriptionDO.getId());
                    logger.info("ca签名后病历保存结束“"+res);
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
            prescriptionLogService.addPrescriptionLog(prescriptionId, 20, 2, operate, operateName, reason, new Date());
            wlyyPrescriptionDO.setCheckStatus(2);

+ 103 - 260
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -1533,9 +1533,13 @@ public class DsyyEntranceService {
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        wlyyHttpLogDO.setRequest(params.toString());
        logger.info("registered params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("Registered");
        wlyyHttpLogDO.setName("挂号");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        return json;
@ -1611,9 +1615,16 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("savePrescriptionToHospital params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("savePrescriptionToHospital");
        wlyyHttpLogDO.setName("保存处方");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info(" savePrescriptionToHospital json:"+json);
        return json;
    }
@ -1666,12 +1677,16 @@ public class DsyyEntranceService {
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        wlyyHttpLogDO.setRequest(params.toString());
        logger.info("delHisPrescriptionByHisNo params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("delHisPrescriptionByHisNo");
        wlyyHttpLogDO.setName("删除处方");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info("delHisPrescriptionByHisNo json:"+json);
@ -1713,13 +1728,18 @@ public class DsyyEntranceService {
        condition+="<ChnDiagnosisName>"+"</ChnDiagnosisName>";
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        wlyyHttpLogDO.setRequest(params.toString());
        logger.info("saveDiagnosis params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("saveDiagnosis");
        wlyyHttpLogDO.setName("保存诊断");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info(" saveDiagnosis json:"+json);
@ -1752,13 +1772,17 @@ public class DsyyEntranceService {
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        wlyyHttpLogDO.setRequest(params.toString());
        logger.info("refundConsultation params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("refundConsultation");
        wlyyHttpLogDO.setName("退号");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info("refundConsultation json:"+json);
@ -1819,6 +1843,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("saveInspectToHospital params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("saveInspectToHospital");
        wlyyHttpLogDO.setName("保存诊断");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info(" saveInspectToHospital json:"+json);
@ -1881,6 +1911,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("getSettlement params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("query_recipe_gjyb");
        wlyyHttpLogDO.setName("查询待扣费处方信息");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" getSettlement json:"+xml);
        return xml;
@ -1941,6 +1977,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("confirm_pay_gjyb params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("confirm_pay_gjyb");
        wlyyHttpLogDO.setName("结算结果确认");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" confirm_pay_gjyb json:"+xml);
        return xml;
@ -1980,6 +2022,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("op_query_card_list params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("op_query_card_list");
        wlyyHttpLogDO.setName("查询院内卡列表");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" op_query_card_list json:"+xml);
        return xml;
@ -2032,6 +2080,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("build_account params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("build_account");
        wlyyHttpLogDO.setName("账户建档接口");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" build_account json:"+xml);
        return xml;
@ -2117,6 +2171,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("SendHospitalizedCard params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("SendHospitalizedCard");
        wlyyHttpLogDO.setName("住院申请单保存(门诊收入住院)");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" SendHospitalizedCard json:"+xml);
        return xml;
@ -2183,6 +2243,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("query_day_detail_list params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("query_day_detail_list");
        wlyyHttpLogDO.setName("查询住院病人日清单");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" query_day_detail_list json:"+xml);
        return xml;
@ -2241,6 +2307,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("sendDispensingToHis params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("sendDispensingToHis");
        wlyyHttpLogDO.setName("互联网医院通知院内摆药");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info(" sendDispensingToHis json:"+json);
@ -2330,6 +2402,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("startRecharge params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("start_recharge");
        wlyyHttpLogDO.setName("发起充值接口");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" startRecharge json:"+xml);
        return xml;
@ -2419,6 +2497,12 @@ public class DsyyEntranceService {
        params.put("msgBody",msgBody);
        logger.info("recharge params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("recharge");
        wlyyHttpLogDO.setName("充值确认接口");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" recharge json:"+xml);
        return xml;
@ -2438,6 +2522,12 @@ public class DsyyEntranceService {
        String condition ="{\"clientId\":\""+oauthCaConfigDO.getClientId()+"\",\"responseType\":\"code\"}";
        WritebackCvalueInterfaceLocator locator = new WritebackCvalueInterfaceLocator();
        String returnStr = locator.getWritebackCvalueInterfaceSoap().authorize(condition);
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(condition);
        wlyyHttpLogDO.setCode("authorize");
        wlyyHttpLogDO.setName("OAuth认证请求接口");
        wlyyHttpLogDO.setResponse(returnStr);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        return returnStr;
    }
@ -2479,6 +2569,12 @@ public class DsyyEntranceService {
        requestJosn.put("body",body);
        WritebackCvalueInterfaceLocator locator = new WritebackCvalueInterfaceLocator();
        String returnStr = locator.getWritebackCvalueInterfaceSoap().synDoctorSearch(requestJosn.toJSONString());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(requestJosn.toJSONString());
        wlyyHttpLogDO.setCode("synDoctorSearch");
        wlyyHttpLogDO.setName("同步医师结果查询接口");
        wlyyHttpLogDO.setResponse(returnStr);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        return returnStr;
    }
@ -2930,259 +3026,6 @@ public class DsyyEntranceService {
    //========================集成平台调用结束===========================
    public String replaceHtml(String demoData,String oldChar,String newChar){
        return demoData.replace(oldChar,null==newChar?"无":newChar);
    }
    /**
     * 同步门诊病历
     * @return
     */
    public String returnEmrHtmlByHLW(JSONObject jsonObject,WlyyPrescriptionEmrDO prescriptionEmrDO)throws Exception{
        String api = "returnEmrHtmlByHLW";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        String htmlDeo = "";
        if (null!=prescriptionEmrDO){
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne("EMRHTMLDEMO");
            if (null!=wlyyHospitalSysDictDO){
                htmlDeo = wlyyHospitalSysDictDO.getDictValue();
                htmlDeo = replaceHtml(htmlDeo,"@patientName@",jsonObject.getString("patientName"));
                htmlDeo = replaceHtml(htmlDeo,"@patientAge@",jsonObject.getString("patientAge"));
                htmlDeo = replaceHtml(htmlDeo,"@patientsex@",jsonObject.getString("patientsex"));
                htmlDeo = replaceHtml(htmlDeo,"@deptCode@",jsonObject.getString("deptCode"));
                htmlDeo = replaceHtml(htmlDeo,"@baseSign@",jsonObject.getString("baseSign"));
                htmlDeo = replaceHtml(htmlDeo,"@r+outpatientCode@",jsonObject.getString("outpatientCode"));
                htmlDeo = replaceHtml(htmlDeo,"@patientClan@",jsonObject.getString("patientClan"));
                htmlDeo = replaceHtml(htmlDeo,"@Special@",prescriptionEmrDO.getSpecialHistory());
                SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                htmlDeo = replaceHtml(htmlDeo,"@createTime@",sf.format(prescriptionEmrDO.getCreateTime()));
                htmlDeo = replaceHtml(htmlDeo,"@complaint@",prescriptionEmrDO.getComplaint());
                htmlDeo = replaceHtml(htmlDeo,"@medicalHistory@",prescriptionEmrDO.getMedicalHistory());
                htmlDeo = replaceHtml(htmlDeo,"@popularHistory@",prescriptionEmrDO.getPopularHistory());
                htmlDeo = replaceHtml(htmlDeo,"@pastHistory@",prescriptionEmrDO.getPastHistory());
                htmlDeo = replaceHtml(htmlDeo,"@allergicHistory@",prescriptionEmrDO.getAllergicHistory());
                htmlDeo = replaceHtml(htmlDeo,"@physicalExamination@",prescriptionEmrDO.getPhysicalExamination());
                htmlDeo = replaceHtml(htmlDeo,"@assistExamination@",prescriptionEmrDO.getAssistExamination());
                condition+="<content>"+htmlDeo+"</content>";
            }
        }
        if ( null!=jsonObject.get("patientid")) {
            condition+="<patientid>"+jsonObject.getString("patientid")+"</patientid>";
        }
        if ( null!=jsonObject.get("eventno")) {
            condition+="<eventno>"+jsonObject.getString("eventno")+"</eventno>";
        }
        if ( null!=jsonObject.get("type")) {
            condition+="<type>"+jsonObject.getString("type")+"</type>";
        }
        if ( null!=jsonObject.get("templateid")) {
            condition+="<templateid>"+jsonObject.getString("templateid")+"</templateid>";
        }
        if ( null!=jsonObject.get("emrtitle")) {
            condition+="<emrtitle>"+jsonObject.getString("emrtitle")+"</emrtitle>";
        }
        if (null!=jsonObject.get("catalogid")){
            condition += "<catalogid>"+jsonObject.getString("catalogid")+"</catalogid>";
        }
        if (null!=jsonObject.get("operatorname")){
            condition += "<operatorname>"+jsonObject.getString("operatorname")+"</operatorname>";
        }
        if (null!=jsonObject.get("operatorid")){
            condition += "<operatorid>"+jsonObject.getString("operatorid")+"</operatorid>";
        }
        if (null!=jsonObject.get("emrtype")){
            condition += "<emrtype>"+jsonObject.getString("emrtype")+"</emrtype>";
        }
        if (null!=jsonObject.get("id")){
            condition += "<id>"+jsonObject.getString("id")+"</id>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(msgBody);
        wlyyHttpLogDO.setName("保存电子病历");
        wlyyHttpLogDO.setCreateTime(new Date());
        logger.info("returnEmrHtmlByHLW params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        logger.info("returnEmrHtmlByHLW json:"+xml);
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        return xml;
    }
    /**
     *
     *  获取历史病历
     *
     * @param patientId
     * @param eventNo
     * @return
     * @throws Exception
     */
    public String SelectEmrInfo(String patientId,String eventNo)throws Exception{
        String api = "SelectEmrInfo";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(patientId)){
            condition += "<patientId>"+patientId+"</patientId>";
        }
        if (StringUtils.isNotBlank(eventNo)&&!"null".equalsIgnoreCase(eventNo)){
            condition += "<eventNo>"+eventNo+"</eventNo>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("SelectEmrInfo params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getSelectUrl());
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info("SelectEmrInfo json:"+json);
        return json;
    }
    /**
     *
     *  获取历史病历
     *
     * @param patientId
     * @param eventNo
     * @return
     * @throws Exception
     */
    public String SelectEmrDispRecord(String templateId,String patientId,String eventNo)throws Exception{
        String api = "SelectEmrDispRecord";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(templateId)){
            condition += "<template_id>"+templateId+"</template_id>";
        }
        if (!StringUtils.isEmpty(patientId)){
            condition += "<patientId>"+patientId+"</patientId>";
        }
        if (!StringUtils.isEmpty(eventNo)){
            condition += "<eventNo>"+eventNo+"</eventNo>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("SelectEmrDispRecord params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getSelectUrl());
       /* XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();*/
        logger.info("SelectEmrDispRecord json:"+xml);
        return xml;
    }
    /**
     *
     *  查询病历文书列表
     *
     * @param patientId
     * @param eventNo
     * @return
     * @throws Exception
     */
    public String GetEMRList(String patientId,String eventNo)throws Exception{
        String api = "GetEMRList";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(patientId)){
            condition += "<patientId>"+patientId+"</patientId>";
        }
        if (!StringUtils.isEmpty(eventNo)){
            condition += "<eventNo>"+eventNo+"</eventNo>";
        }
        condition +="<lngCatalogID>50</lngCatalogID>";
        condition +="<lngEMRType>93</lngEMRType>";
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("GetEMRList params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getSelectUrl());
       /* XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();*/
        logger.info("GetEMRList json:"+xml);
        return xml;
    }
    /**
     *
     *  查询病历文书列表
     *
     * @return
     * @throws Exception
     */
    public String BrowseSingleEMR(String bstrEmrID)throws Exception{
        String api = "BrowseSingleEMR";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(bstrEmrID)){
            condition += "<bstrEmrID>"+bstrEmrID+"</bstrEmrID>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("BrowseSingleEMR params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getSelectUrl());
      /*  XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();*/
        logger.info("BrowseSingleEMR json:"+xml);
        return xml;
    }
    //===========================杭州逸曜合理用药======================================

+ 63 - 57
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -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());

+ 2 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -519,7 +519,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        baseLoginLogService.save(baseLoginLogDO);
        logger.info("login:登录进入10");
        WxWechatDO wxWechatDO = wechatDao.findById(wechatId).get();
     /*   WxWechatDO wxWechatDO = wechatDao.findById(wechatId).get();
        String appletOpenid = null;
        if (!StringUtils.isEmpty(appletCode)){
            Map<String,Object> objectMap = checkApplets(appletCode,wxWechatDO.getApplets(),wxWechatDO.getAppletsSecret());
@ -527,7 +527,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                appletOpenid = objectMap.get("openid").toString();
                userDetailsService.updateOpenId(appletOpenid, wlyyUserSimple.getId());
            }
        }
        }*/
        //个推 clientId
        String clientId = parameters.get("getuiClientId");

+ 1 - 7
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -2433,13 +2433,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "prescriptionId", value = "prescriptionId", required = true)
            @RequestParam(required = true) String prescriptionId,HttpServletRequest request) throws Exception {
        WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO = null;
        wlyyPrescriptionCheckDO = prescriptionService.saveCheck(operate, operateName, reason, status, prescriptionId, wxId,getIpAddress(request));
        try {
            wlyyPrescriptionCheckDO = prescriptionService.saveCheck(operate, operateName, reason, status, prescriptionId, wxId,getIpAddress(request));
        }catch (Exception e){
            e.printStackTrace();
        }
        try {
            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionService.findPrescriptionDo(prescriptionId);
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
            if (status == 1) {
@ -2478,7 +2473,6 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            System.out.println("发送诊断消息失败:" + e.getMessage());
//            e.printStackTrace();
        }
        return ObjEnvelop.getSuccess("ok", wlyyPrescriptionCheckDO);
    }