Parcourir la source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
wangzhinan il y a 4 ans
Parent
commit
a092aa3ff7

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

@ -2087,7 +2087,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //保存挂号费用
            prescription.setRegFee(getChargeFee(outpatientDO.getDoctor()));
            prescription.setPrescribeTime(new Date());
            //保存费用
            prescriptionDao.save(prescription);
            if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
@ -4931,7 +4931,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "AND outpatient.status in (0,1) " +
                "AND outpatient.doctor='"+doctor+"' " +
                "AND outpatient.pay_status = 1 " +
                "AND outpatient.outpatient_type= '"+outpatient_type+"' ";
                "AND outpatient.outpatient_type= '"+outpatient_type+"'  ";
        if("1".equals(outpatient_type)){//复诊
            sql =  sql + " AND outpatient.type= '"+type+"' ";
            if("2".equals(type)){//视频复诊才需要判断时间,

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java

@ -112,6 +112,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                outpatientDO.setConNo(registerDO.getConNo());
                outpatientDO.setRegisterNo(registerDO.getRegisterNo());
                outpatientDO.setAdmDate(registerDO.getCreateTime());
                outpatientDO.setAdmNo(registerDO.getRegisterNo());
                outpatientDao.save(outpatientDO);
                return res;
            }
@ -132,6 +133,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String serialNo = object.getString("registerNo");
            outpatientDO.setRegisterNo(serialNo);
            outpatientDO.setAdmDate(new Date());
            outpatientDO.setAdmNo(serialNo);
            logger.info("挂号流水 registerNo: ");
            outpatientDao.save(outpatientDO);
@ -156,6 +158,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String serialNo = (String) res.get("registerNo");
            outpatientDO.setRegisterNo(serialNo);
            outpatientDO.setAdmDate(new Date());
            outpatientDO.setAdmNo(serialNo);
            logger.info("挂号流水 registerNo: " + serialNo );
            outpatientDao.save(outpatientDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -184,7 +184,6 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        }
        WlyyOutpatientDO outpatient = outpatientDao.save(outpatientDO);
        BusinessOrderDO businessOrderDO = new BusinessOrderDO();
        businessOrderDO.setRelationCode(outpatient.getId());
        businessOrderDO.setRelationName("复诊-诊查费");
@ -198,10 +197,11 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            businessOrderDO.setOrderCategory("2");
        } else if (outpatientDO.getType().equalsIgnoreCase("2")) {
            businessOrderDO.setOrderType(3);
            businessOrderDO.setOrderCategory("2");
            businessOrderDO.setOrderCategory("3");
        }
        businessOrderService.saveOrder(businessOrderDO);
        WlyyPatientRegisterTimeDO registerTimeDO = null;
        try {

+ 243 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -109,7 +109,7 @@ public class XzzxEntranceService{
    public static String sendMessageUrl ="http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
//    public static String entranceUrl = "http://localhost:10023/xzzx/";
    public static String entranceUrlLocal = "http://localhost:10023/xzzx/";
    public String getSelectUrl(){
@ -638,7 +638,7 @@ public class XzzxEntranceService{
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info("getCardInfo json:"+json);
        logger.info("FindOutpatientInfo json:"+json);
        return json;
    }
@ -1314,6 +1314,72 @@ public class XzzxEntranceService{
    }
    public Map<String,Object> updatePreStatusLocal(String admNo,String realOrder,String status) throws Exception {
        Map<String,Object> map = new HashedMap();
        logger.info("admNo"+admNo+"=========realOrder"+realOrder+"===========status"+status);
        List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByAdmNo(admNo);
        if (wlyyOutpatientDOList==null||wlyyOutpatientDOList.size()==0){
            throw new Exception("该就诊号查不到!");
        }
        for (WlyyOutpatientDO wlyyOutpatientDO:wlyyOutpatientDOList){
            String registerNo = wlyyOutpatientDO.getRegisterNo();
            if (!StringUtils.isNoneBlank(registerNo)){
                throw new Exception("挂号流水号为空!");
            }
            PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(wlyyOutpatientDO.getPatient());
            List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findByOutpatientId(wlyyOutpatientDO.getId());
            if (prescriptionDOList==null||prescriptionDOList.size()==0){
                List<WlyyPrescriptionVO> prescriptionVOList = selectOriginPrescriptionListLocal(registerNo,patientMappingDO.getMappingCode(),admNo,realOrder);
                logger.info("处方数据"+prescriptionVOList);
                for (WlyyPrescriptionVO prescriptionVO:prescriptionVOList){
                    WlyyPrescriptionDO prescriptionDO =JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(prescriptionVO)),WlyyPrescriptionDO.class);
                    prescriptionDO.setOutpatientId(wlyyOutpatientDO.getId());
                    if (status.equalsIgnoreCase("3")){
                        prescriptionDO.setStatus(30);
                    }
                    prescriptionDO.setPatientCode(wlyyOutpatientDO.getPatient());
                    prescriptionDO.setDoctor(wlyyOutpatientDO.getDoctor());
                    prescriptionDO.setHospital("350211A5010");
                    prescriptionDO= prescriptionDao.save(prescriptionDO);
                    //处方诊断表vo
                    List<WlyyPrescriptionDiagnosisVO> diagnosisVOS = prescriptionVO.getDiagnosisVOs();
                    if (diagnosisVOS!=null&&diagnosisVOS.size()!=0){
                        for (WlyyPrescriptionDiagnosisVO diagnosisVO:diagnosisVOS){
                            WlyyPrescriptionDiagnosisDO prescriptionDiagnosisDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(diagnosisVO)),WlyyPrescriptionDiagnosisDO.class);
                            prescriptionDiagnosisDO.setPrescriptionId(prescriptionDO.getId());
                            prescriptionDiagnosisDO.setDel(1);
                            diagnosisDao.save(prescriptionDiagnosisDO);
                        }
                    }
                    //药品表
                    List<WlyyPrescriptionInfoVO> infoVOList = prescriptionVO.getInfoVOs();
                    if (infoVOList!=null&&infoVOList.size()!=0){
                        for (WlyyPrescriptionInfoVO infoVO:infoVOList){
                            WlyyPrescriptionInfoDO infoDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(infoVO)),WlyyPrescriptionInfoDO.class);
                            infoDO.setPrescriptionId(prescriptionDO.getId());
                            infoDO.setDel(1);
                            prescriptionInfoDao.save(infoDO);
                        }
                    }
                    List<WlyyInspectionVO> inspectionVOList = prescriptionVO.getInspectionVOs();
                    if (inspectionVOList!=null&&inspectionVOList.size()!=0)
                    for (WlyyInspectionVO inspectionVO:inspectionVOList){
                        WlyyInspectionDO inspectionDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(inspectionVO)),WlyyInspectionDO.class);
                        BeanUtils.copyProperties(inspectionVO,inspectionDO);
                        inspectionDO.setPrescriptionId(prescriptionDO.getId());
                        inspectionDO.setDel(1);
                        wlyyInspectionDao.save(inspectionDO);
                    }
                }
            }
        }
        return map;
    }
    /**
     * 获取门诊下所有处方信息
     * @param registerSn 流水号
@ -1486,6 +1552,181 @@ public class XzzxEntranceService{
    }
    /**
     * 获取门诊下所有处方信息---内网调下
     * @param registerSn 流水号
     * @param patNo 居民id
     * @param admNo 住院唯一号
     * @param realOrder 处方号
     * @return
     */
    public List<WlyyPrescriptionVO> selectOriginPrescriptionListLocal(String registerSn,String patNo,String admNo,String realOrder){
        List<WlyyPrescriptionVO> prescriptionVOList = new ArrayList<>();
        String response="";
        String params = "";
        if (StringUtils.isNoneBlank(realOrder)){
            params +="&realOrder="+realOrder;
        }
        logger.info("处方request:"+registerSn+"=="+patNo+"==="+admNo+"===="+realOrder);
        String url = entranceUrlLocal+"getOriginPrescriptionList?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+params;
        response = httpClientUtil.get(url,"GBK");
        logger.info("处方response:"+response+"===="+url);
        JSONObject object = JSONObject.parseObject(response);
        if (object!=null&&object.getInteger("status")==200){
            JSONArray array = new JSONArray();
            array = JSONArray.parseArray(object.getString("obj")).getJSONArray(0);
            for (int i=0;i<array.size();i++){
                WlyyPrescriptionVO wlyyPrescriptionVO = new WlyyPrescriptionVO();
                JSONObject jsonObject = array.getJSONObject(i);
                wlyyPrescriptionVO.setCreateTime(DateUtil.strToDate(isEmty(jsonObject.getString("CREATETIME"))));
                wlyyPrescriptionVO.setCreateUser(isEmty(jsonObject.getString("CREATEUSER")));
                wlyyPrescriptionVO.setCreateUserName(isEmty(jsonObject.getString("CREATENAME")));
                wlyyPrescriptionVO.setUpdateTime(DateUtil.strToDate(isEmty(jsonObject.getString("UPDATETIME"))));
                wlyyPrescriptionVO.setUpdateUser(isEmty(jsonObject.getString("UPDATEUSER")));
                wlyyPrescriptionVO.setUpdateUserName(isEmty(jsonObject.getString("UPDATEUSERNAME")));
                wlyyPrescriptionVO.setRealOrder(isEmty(jsonObject.getString("REALORDER")));
                wlyyPrescriptionVO.setOriginRealOrder(isEmty(jsonObject.getString("ORIGINREALORDER")));
                wlyyPrescriptionVO.setAdmNo(isEmty(jsonObject.getString("ADMNO")));
                wlyyPrescriptionVO.setOriginAdmNo(isEmty(jsonObject.getString("ORIGINADMNO")));
                wlyyPrescriptionVO.setSerialNo(isEmty(jsonObject.getString("SERIALNO")));
                wlyyPrescriptionVO.setOriginSerialNo(isEmty(jsonObject.getString("ORIGINSERIALNO")));
                wlyyPrescriptionVO.setType(jsonObject.getInteger("TYPE"));
                wlyyPrescriptionVO.setPatientCode(isEmty(jsonObject.getString("PATIENTCODE")));
                wlyyPrescriptionVO.setPatientName(isEmty(jsonObject.getString("PATEINTNAME")));
                wlyyPrescriptionVO.setIdcard(isEmty(jsonObject.getString("IDCARD")));
                wlyyPrescriptionVO.setCardNo(isEmty(jsonObject.getString("CARDNO")));
                wlyyPrescriptionVO.setSsc(isEmty(jsonObject.getString("SSC")));
                wlyyPrescriptionVO.setDoctor(isEmty(jsonObject.getString("DOCTOR")));
                wlyyPrescriptionVO.setDoctorName(isEmty(jsonObject.getString("DOCTORNAME")));
                wlyyPrescriptionVO.setStatus(jsonObject.getInteger("STATUS"));
                wlyyPrescriptionVO.setMkFailReason(isEmty(jsonObject.getString("MKFAILREASON")));
                wlyyPrescriptionVO.setMkTime(DateUtil.strToDate(isEmty(jsonObject.getString("MKTIME"))));
                wlyyPrescriptionVO.setPrescribeTime(DateUtil.strToDate(isEmty(jsonObject.getString("PRESCRIBETIME"))));
                wlyyPrescriptionVO.setPrescribeReason(isEmty(jsonObject.getString("PRESCRIBEREASON")));
                wlyyPrescriptionVO.setPayTime(DateUtil.strToDate(isEmty(jsonObject.getString("PAYTIME"))));
                wlyyPrescriptionVO.setDosageTime(DateUtil.strToDate(isEmty(jsonObject.getString("DOSAGETIME"))));
                wlyyPrescriptionVO.setFinishTime(DateUtil.strToDate(isEmty(jsonObject.getString("FINISHTIME"))));
                wlyyPrescriptionVO.setDept(isEmty(jsonObject.getString("DEPT")));
                wlyyPrescriptionVO.setDeptName(isEmty(jsonObject.getString("DEPTNAME")));
                wlyyPrescriptionVO.setHospital(isEmty(jsonObject.getString("HOSPITAL")));
                wlyyPrescriptionVO.setHospitalName(isEmty(jsonObject.getString("HOSPITALNAME")));
                wlyyPrescriptionVO.setConsult(isEmty(jsonObject.getString("CONSULT")));
                wlyyPrescriptionVO.setDispensaryType(isEmty(jsonObject.getString("DISPENSARYTYPE"))!=null?Integer.parseInt(isEmty(jsonObject.getString("DISPENSARYTYPE"))):null);
                wlyyPrescriptionVO.setReason(isEmty(jsonObject.getString("REASON")));
                wlyyPrescriptionVO.setDiseaseImg(isEmty(jsonObject.getString("DISEASEIMG")));
                wlyyPrescriptionVO.setRemark(isEmty(jsonObject.getString("REMARK")));
                wlyyPrescriptionVO.setCancelReason(isEmty(jsonObject.getString("CANCELREASON")));
                wlyyPrescriptionVO.setCaCertData(isEmty(jsonObject.getString("CACERTDATA")));
                wlyyPrescriptionVO.setCaMessage(isEmty(jsonObject.getString("CAMESSAGE")));
                wlyyPrescriptionVO.setDigitalSignNo(isEmty(jsonObject.getString("DIGITALSIGNNO")));
                wlyyPrescriptionVO.setOriginalDataAbstract(isEmty(jsonObject.getString("ORIGINALDATAABSTRACT")));
                wlyyPrescriptionVO.setStrOriginalData(isEmty(jsonObject.getString("STRORIGINALDATA")));
                wlyyPrescriptionVO.setHisDeptCode(isEmty(jsonObject.getString("HISDEPTCODE")));
                wlyyPrescriptionVO.setHisDoctorCode(isEmty(jsonObject.getString("HISDOCTORCODE")));
                wlyyPrescriptionVO.setHisGisterTypeCode(isEmty(jsonObject.getString("HISGISTERTYPECODE")));
                wlyyPrescriptionVO.setHisRateTypeCode(isEmty(jsonObject.getString("HISRATETYPECODE")));
                wlyyPrescriptionVO.setHisHospital(isEmty(jsonObject.getString("HISHOSPITAL")));
                wlyyPrescriptionVO.setHisRegisterFee(isEmty(jsonObject.getString("HISREGISTERFEE"))!=null?Integer.parseInt(isEmty(jsonObject.getString("HISREGISTERFEE"))):null);
                wlyyPrescriptionVO.setPayStatus(isEmty(jsonObject.getString("PAYSTATUS"))!=null?Integer.parseInt(isEmty(jsonObject.getString("PAYSTATUS"))):null);
                //TODO 快递数据
                wlyyPrescriptionVO.setDispUser(isEmty(jsonObject.getString("DISPUSER")));
                wlyyPrescriptionVO.setDispUserName(isEmty(jsonObject.getString("DISPUSERNAME")));
                wlyyPrescriptionVO.setDispDate(DateUtil.strToDate(isEmty(jsonObject.getString("DISPDATE"))));
                //诊断
                String disagnosisUrl = entranceUrlLocal+"getOutpatientDiagnosis?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
                String disagnosisResponse = httpClientUtil.get(disagnosisUrl,"GBK");
                logger.info("诊断disagnosisResponse:"+disagnosisResponse);
                JSONObject object1 = JSONObject.parseObject(disagnosisResponse);
                if (object1.getString("status").equalsIgnoreCase("200")){
                    JSONArray jsonArray = JSONArray.parseArray(object1.getString("obj")).getJSONArray(0);
                    logger.info("诊断"+jsonArray.toJSONString());
                    List<WlyyPrescriptionDiagnosisVO> prescriptionDiagnosisVOS = new ArrayList<>();
                    for (int j=0;j<jsonArray.size();j++){
                        JSONObject disagnosisJson = jsonArray.getJSONObject(j);
                        WlyyPrescriptionDiagnosisVO prescriptionDiagnosisVO = new WlyyPrescriptionDiagnosisVO();
                        prescriptionDiagnosisVO.setCode(isEmty(disagnosisJson.getString("DIAGNOSECODE")));
                        prescriptionDiagnosisVO.setName(isEmty(disagnosisJson.getString("DIAGNOSENAME")));
                        prescriptionDiagnosisVO.setType(isEmty(disagnosisJson.getString("DIAGNOSETYPE"))==null?null:Integer.parseInt(disagnosisJson.getString("DIAGNOSETYPE")));
                        prescriptionDiagnosisVOS.add(prescriptionDiagnosisVO);
                    }
                    wlyyPrescriptionVO.setDiagnosisVOs(prescriptionDiagnosisVOS);
                }
                String infoUrl = entranceUrlLocal+"getOutpatientDrugInfo?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
                String infoResponse = httpClientUtil.get(infoUrl,"GBK");
                logger.info("药品infoResponse:"+infoResponse);
                JSONObject infoObject = JSONObject.parseObject(infoResponse);
                if (infoObject.getString("status").equalsIgnoreCase("200")) {
                    JSONArray infoArray = JSONArray.parseArray(infoObject.getString("obj")).getJSONArray(0);
                    //药品
                    List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOList = new ArrayList<>();
                    for (int j=0;j<infoArray.size();j++){
                        WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
                        JSONObject infoJson = infoArray.getJSONObject(j);
                        prescriptionInfoVO.setDrugNo(isEmty(infoJson.getString("DRUGNO")));
                        prescriptionInfoVO.setDrugName(isEmty(infoJson.getString("DRUGNAME")));
                        prescriptionInfoVO.setDispDeposite(isEmty(infoJson.getString("DISPDEPOSITE")));
                        prescriptionInfoVO.setDosage(isEmty(infoJson.getString("DOSAGE")));
                        prescriptionInfoVO.setQuantity(isEmty(infoJson.getString("QUANTITY")));
                        prescriptionInfoVO.setUnit(isEmty(infoJson.getString("UNIT")));
                        prescriptionInfoVO.setUnitName(isEmty(infoJson.getString("UNITNAME")));
                        prescriptionInfoVO.setPackUnitName(isEmty(infoJson.getString("PACKUNITNAME")));
                        prescriptionInfoVO.setPackUnit(isEmty(infoJson.getString("PACKUNIT")));
                        prescriptionInfoVO.setUsageCode(isEmty(infoJson.getString("USAGECODE")));
                        prescriptionInfoVO.setUsageName(isEmty(infoJson.getString("USAGENAME")));
                        prescriptionInfoVO.setSupplyCode(isEmty(infoJson.getString("SUPPLYCODE")));
                        prescriptionInfoVO.setSupplyName(isEmty(infoJson.getString("SUPPLYNAME")));
                        prescriptionInfoVO.setDays(isEmty(infoJson.getString("DAYS")));
                        prescriptionInfoVO.setFrequency(isEmty(infoJson.getString("FREQUENCY")));
                        prescriptionInfoVO.setSerial(isEmty(infoJson.getString("SERIAL")));
                    /*    prescriptionInfoVO.setGroupNo(isEmty(infoJson.getString("groupNo")));*/
                        prescriptionInfoVO.setSpecification(isEmty(infoJson.getString("SPECIFICATION")));
                        prescriptionInfoVO.setPackRetprice(isEmty(infoJson.getString("PACKRETPRICE"))!=null?Double.parseDouble(isEmty(infoJson.getString("PACKRETPRICE"))):null);
                        prescriptionInfoVO.setHerbalCount(isEmty(infoJson.getString("HERBALCOUNT")));
                        prescriptionInfoVO.setPostCount(isEmty(infoJson.getString("POSTCOUNT")));
                        prescriptionInfoVO.setDel(isEmty(infoJson.getString("DEL"))!=null?Integer.parseInt(infoJson.getString("DEL")):null);
                        prescriptionInfoVO.setComm(infoJson.getString("COMM"));
                        wlyyPrescriptionInfoVOList.add(prescriptionInfoVO);
                        wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOList);
                    }
                }
                //检查检验内容
                String inspectionUrl = entranceUrlLocal+"getOutpatientCheckTestInfo?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
                String inspectionResponse = httpClientUtil.get(inspectionUrl,"GBK");
                logger.info("检查检验内容inspectionResponse:"+inspectionResponse);
                JSONObject inspectionObject = JSONObject.parseObject(inspectionResponse);
                if (inspectionObject.getString("status").equalsIgnoreCase("200")) {
                    List<WlyyInspectionVO> wlyyInspectionVOList = new ArrayList<>();
                    JSONArray inspectionArray = JSONArray.parseArray(inspectionObject.getString("obj")).getJSONArray(0);
                    for (int j=0;j<inspectionArray.size();j++){
                        WlyyInspectionVO inspectionVO = new WlyyInspectionVO();
                        JSONObject inspectionJson = inspectionArray.getJSONObject(j);
                        inspectionVO.setGroupName(isEmty(inspectionJson.getString("GROUPNAME")));
                        inspectionVO.setQuantity(isEmty(inspectionJson.getString("QUANTITYS"))!=null?Integer.parseInt(isEmty(inspectionJson.getString("QUANTITYS"))):null);
                        inspectionVO.setFrequency(isEmty(inspectionJson.getString("FREQUENCYS")));
                        inspectionVO.setParentCode(isEmty(inspectionJson.getString("PARENTCODE")));
                        inspectionVO.setParentName(isEmty(inspectionJson.getString("PARENTCODENAME")));
                        inspectionVO.setCode(isEmty(inspectionJson.getString("CODES")));
                        inspectionVO.setName(isEmty(inspectionJson.getString("NAMES")));
                        inspectionVO.setInformation(isEmty(inspectionJson.getString("INFORMATION")));
                        inspectionVO.setCheckEquip(isEmty(inspectionJson.getString("CHECKEQUIP")));
                        inspectionVO.setCheckPartName(isEmty(inspectionJson.getString("CHECKPARTNAME")));
                        inspectionVO.setCheckPart(isEmty(inspectionJson.getString("CHECKPART")));
                        wlyyInspectionVOList.add(inspectionVO);
                    }
                    wlyyPrescriptionVO.setInspectionVOs(wlyyInspectionVOList);
                }
                prescriptionVOList.add(wlyyPrescriptionVO);
            }
        }
        return prescriptionVOList;
    }
    /**
     *
     * 挂号(调his后台包)

+ 20 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -660,6 +660,7 @@ public class YkyyEntranceService {
                        "\td.GYTJ as \"gytj\",\n" +
                        "\td.YCJL as \"ycjl\",\n" +
                        "\td.SBXH as \"sbxh\",\n" +
                        "\td.YYTS as \"yyts\",\n" +
                        "\td.YFGG as \"yfgg\"\n" +
                        "FROM\n" +
                        "\tV_MS_DD02 d\n" +
@ -680,15 +681,33 @@ public class YkyyEntranceService {
                    for (int i =0;i<array1.size();i++){
                        JSONObject object1 = array1.getJSONObject(i);
                        WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
                        String sql = "SELECT ypxh as \"ypxh\",ypmc2 as \"ypmc2\" from V_ZKSG_MZ_YPXX WHERE ypxh='"+object1.getString("ypxh")+"' ";
                        Map<String,Object> params4 = new HashedMap();
                        params4.put("sql",sql);
                        HttpResponse response4 = HttpUtils.doGet(url,params4);
                        String content4 = response4.getContent();
                        logger.info("response:"+content4);
                        JSONObject rs4 = JSON.parseObject(content4);
                        Integer status4 = rs4.getInteger("status");
                        if(status4!=null&&status4 == 200){
                            JSONArray array4 =  rs4.getJSONArray("detailModelList");
                            logger.info("info"+rs4.getJSONArray("detailModelList"));
                            if (array4!=null&&array4.size()!=0){
                                JSONObject jsonObject = array4.getJSONObject(0);
                                prescriptionInfoVO.setDrugName(jsonObject.getString("ypmc2"));
                            }
                        }
                        prescriptionInfoVO.setDrugNo(object1.getString("ypxh"));
                        prescriptionInfoVO.setDrugPlace(object1.getString("ypcd"));
                        prescriptionInfoVO.setQuantity(object1.getString("ypsl"));
                        prescriptionInfoVO.setPackRetprice(object1.getDouble("ypdj"));
                        prescriptionInfoVO.setPackUnitName(object1.getString("yfdw"));
                        prescriptionInfoVO.setUnitName(object1.getString("yfdw"));
                        prescriptionInfoVO.setDosage(object1.getString("mrcs"));
                        prescriptionInfoVO.setPackQuantity(object1.getInteger("yfbz"));
                        prescriptionInfoVO.setUsageCode(object1.getString("ypyf"));
                        prescriptionInfoVO.setYpyf(object1.getInteger("ypyf"));
                        prescriptionInfoVO.setDays(object1.getString("yyts"));
                     /*   prescriptionInfoVO.setYpyf(object1.getInteger("ypyf"));*/
                        prescriptionInfoVO.setHisCode(object1.getInteger("sbxh"));
                        prescriptionInfoVO.setSpecification(object1.getString("yfgg"));
                        wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);

+ 2 - 1
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -264,7 +264,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                }
            }
        }else {
            throw new Exception("医生映射表不存在!");
            /*throw new Exception("医生映射表不存在!");*/
            yktDoctor="hlwyymrys001";
        }
        String remark = businessOrderDO.getRematk();
        String response=ykyyService.addYktOrder(orderNo,patientId,orderAmout,remark,state,orderType,yktDoctor,payType,null,patientTel,orderCatagrate,pcCallBack,appCallBack);

+ 4 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1201,6 +1201,8 @@ public class ImService {
			consult.setGuidance(ct.getGuidance());
			//关联业务code
			consult.setRelationCode(outpatientCode);
			//支付状态为1
			consult.setPayStatus(1);
			// 设置咨询标识
			ct.setConsult(consult.getId());
			
@ -2605,7 +2607,7 @@ public class ImService {
					"wlyy_consult_team b," +
					"base_patient d  " +
					"WHERE a.id=b.consult " +
					"AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (" + type + ") and b.status = 0  " +
					"AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (" + type + ") and b.status = 0 and a.pay_status=1 " +
					"ORDER BY a.czrq desc ";
		}
		if("9".equals(type) || "16".equals(type)|| "12".equals(type)){
@ -2640,7 +2642,7 @@ public class ImService {
						" left join wlyy_prescription p on p.outpatient_id = op.id "+
					"WHERE op.patient=patient.id " +
					"AND op.doctor='"+doctorCode+"' " +
					"AND op.status in ('0','1') ";
					"AND op.status in ('0','1') and  op.pay_status=1 ";
			if("9".equals(type)){
				//图文复诊
				sql =sql +"AND op.type=1 AND op.outpatient_type=1 ";

+ 1 - 1
gateway/ag-basic/pom.xml

@ -12,7 +12,7 @@
    <artifactId>ag-basic</artifactId>
    <version>${parent.version}</version>
    <packaging>jar</packaging>
    <packaging>war</packaging>
    <dependencies>
        <!-- 支持Tomcat启动 -->

+ 3 - 3
server/svr-authentication/pom.xml

@ -75,11 +75,11 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
       <!-- <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <!-- <scope>runtime</scope> -->
        </dependency>
            &lt;!&ndash; <scope>runtime</scope> &ndash;&gt;
        </dependency>-->
        <!-- Redis  -->
        <dependency>

+ 2 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java

@ -83,7 +83,8 @@ public class RegisterService {
            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO();
            medicareCardDO.setDel("1");
            medicareCardDO.setType(PatientMedicareCardDO.Type.MedicareCard.getType());
            medicareCardDO.setParentType("A");
            medicareCardDO.setType("A_01");
            medicareCardDO.setCode(ssc);
            medicareCardDO.setPatientCode(temp.getId());

+ 15 - 17
server/svr-authentication/src/main/resources/application.yml

@ -5,23 +5,21 @@ server:
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    hikari:
      registerMbeans: true
      max-active: 100
      max-idle: 100 #最大空闲连接
      min-idle: 10 #最小空闲连接
      validation-query-timeout: 20
      log-validation-errors: true
      validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
      validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
      test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
      test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
      idle-timeout: 20000
      connection-test-query: SELECT 1
      num-tests-per-eviction-run: 100 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
      test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
      min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
      time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    max-active: 100
    max-idle: 100 #最大空闲连接
    min-idle: 10 #最小空闲连接
    validation-query-timeout: 20
    log-validation-errors: true
    validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
    validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
    test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
    test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
    idle-timeout: 20000
    connection-test-query: SELECT 1
    num-tests-per-eviction-run: 100 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  redis:
    database: 0 # Database index used by the connection factory.
    timeout: 0 # Connection timeout in milliseconds.

+ 1 - 1
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java

@ -241,7 +241,7 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
                                      @RequestParam(value = "realOrder",required = false)String realOrder,
                                      @ApiParam(name = "status", value = "处方状态:3结算完成", required = false)
                                      @RequestParam(value = "status",required = false)String status)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.updatePreStatus(admNo,realOrder,status));
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.updatePreStatusLocal(admNo,realOrder,status));
    }

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

@ -1105,13 +1105,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                        consult.put("session_id", consult.get("patientId").toString()+"_"+ consult.get("generalDoctor").toString()+"_"+ consult.get("doctorCode").toString()+"_15");
                    }else{}
                }else if("9".equals(type)){//图文复诊
                    consult.put("session_id", consult.get("patientId")!=null?consult.get("patientId").toString():null+"_"+consult.get("outpatientId")!=null?consult.get("outpatientId").toString():null+"_9");
                    consult.put("session_id", consult.get("patientId").toString()+"_"+consult.get("outpatientId").toString()+"_9");
                    consult.put("type",type);
                }else if("16".equals(type)){//视频复诊
                    consult.put("session_id", consult.get("patientId")!=null?consult.get("patientId").toString():null+"_"+consult.get("outpatientId")!=null?consult.get("outpatientId").toString():null+"_16");
                    consult.put("session_id", consult.get("patientId").toString()+"_"+consult.get("outpatientId").toString()+"_16");
                    consult.put("type",type);
                }else if("12".equals(type)){//协同门诊
                    consult.put("session_id", consult.get("patientId")!=null?consult.get("patientId").toString():null+"_"+consult.get("outpatientId")!=null?consult.get("outpatientId").toString():null+"_12");
                    consult.put("session_id", consult.get("patientId").toString()+"_"+consult.get("outpatientId").toString()+"_12");
                    consult.put("type",type);
                }else{}