Kaynağa Gözat

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

LAPTOP-KB9HII50\70708 11 ay önce
ebeveyn
işleme
571227a07e

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

@ -37,6 +37,7 @@ import com.yihu.jw.util.entity.ServiceException;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpUtils;
import com.yihu.jw.util.network.HttpUtils;
import lombok.Synchronized;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.Logger;
@ -797,6 +798,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @param orderNo
     * @param orderNo
     * @throws Exception
     * @throws Exception
     */
     */
    public JSONObject rechargeHis(String orderNo) throws Exception {
    public JSONObject rechargeHis(String orderNo) throws Exception {
        JSONObject jsonObject1 = new JSONObject();
        JSONObject jsonObject1 = new JSONObject();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
@ -835,6 +837,9 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                    businessOrderDO.setUploadStatus(1);
                    businessOrderDO.setUploadStatus(1);
                    businessOrderDao.save(businessOrderDO);
                    businessOrderDao.save(businessOrderDO);
                }
                }
            }else {
                businessOrderDO.setStatus(2);
                businessOrderDao.save(businessOrderDO);
            }
            }
        }
        }
@ -1994,7 +1999,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String operatorName = "互联网医院";
            String operatorName = "互联网医院";
            String termNo = "DSYYHLWYY";
            String termNo = "DSYYHLWYY";
            JSONObject rsObj = confirmPayGjybToHospital(ylzMedicalRelationDO.getCardNo(),ylzMedicalRelationDO.getLogNo(),depositAmount,outChargeNo, operatorId,operatorName,termNo);
            JSONObject rsObj = confirmPayGjybToHospital(ylzMedicalRelationDO.getCardNo(),ylzMedicalRelationDO.getLogNo(),depositAmount,outChargeNo, operatorId,operatorName,termNo);
            logger.info("");
            logger.info("rsObj");
            boolean flag = true;
            boolean flag = true;
            if (rsObj!=null){
            if (rsObj!=null){
                String retCode = rsObj.getString("retCode");
                String retCode = rsObj.getString("retCode");

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

@ -1908,7 +1908,7 @@ public class DsyyEntranceService {
        if (StringUtils.isNoneBlank(hismzlsh)){
        if (StringUtils.isNoneBlank(hismzlsh)){
            object.put("hismzlsh",hismzlsh);
            object.put("hismzlsh",hismzlsh);
        }
        }
//        object.put("trade_type","5");
        object.put("trade_type","5");
        object.put("accountType","01");
        object.put("accountType","01");
        object.put("sfxsjs","Y");
        object.put("sfxsjs","Y");
        condition = object.toJSONString();
        condition = object.toJSONString();
@ -2847,6 +2847,14 @@ public class DsyyEntranceService {
                    infoDO.getUsageName()+"|"+infoDO.getDays()+"|"+infoDO.getQuantity()+"|"+infoDO.getPackUnit()+"|";
                    infoDO.getUsageName()+"|"+infoDO.getDays()+"|"+infoDO.getQuantity()+"|"+infoDO.getPackUnit()+"|";
            info = info.substring(0,info.length()-1);
            info = info.substring(0,info.length()-1);
        }
        }
        BasePatientDO patientDO = patientDao.findById(prescriptionDO.getPatientCode()).get();
        String sexName="未知";
        if (patientDO.getSex()==1){
            sexName="男";
        }else if (patientDO.getSex()==2){
            sexName="女";
        }
        Integer age = DateUtil.getAgeForIdcard(patientDO.getIdcard());
        String condition = "<MESSAGE><PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>" +
        String condition = "<MESSAGE><PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>" +
                "<HIS_REGISTER_PK>"+outpatientDO.getRegisterNo()+"</HIS_REGISTER_PK>" +
                "<HIS_REGISTER_PK>"+outpatientDO.getRegisterNo()+"</HIS_REGISTER_PK>" +
                "<VISIT_ID>"+(visitId==0?"":visitId)+"</VISIT_ID>"+
                "<VISIT_ID>"+(visitId==0?"":visitId)+"</VISIT_ID>"+
@ -2855,12 +2863,12 @@ public class DsyyEntranceService {
                "<CREATE_USER_ID>"+doctorMappingDO.getMappingCode()+"</CREATE_USER_ID>" +
                "<CREATE_USER_ID>"+doctorMappingDO.getMappingCode()+"</CREATE_USER_ID>" +
                "<CREATE_USER_NAME>"+prescriptionDO.getDoctorName()+"</CREATE_USER_NAME>" +
                "<CREATE_USER_NAME>"+prescriptionDO.getDoctorName()+"</CREATE_USER_NAME>" +
                "<CREATE_DATE_TIME>"+DateUtil.dateToStrLong(prescriptionDO.getCreateTime())+"</CREATE_DATE_TIME>" +
                "<CREATE_DATE_TIME>"+DateUtil.dateToStrLong(prescriptionDO.getCreateTime())+"</CREATE_DATE_TIME>" +
                "<MR_CODE>EMR10.00.18_36</MR_CODE>" +
                "<MR_CODE>EMR02.00.01_1588</MR_CODE>" +
                "<TOPIC>互联网医院专用</TOPIC>" +
                "<TOPIC>互联网医院专用</TOPIC>" +
                "<HOSPITAL_NO>42661889-5</HOSPITAL_NO>" +
                "<HOSPITAL_NO>42661889-5</HOSPITAL_NO>" +
                "<DEPT_CODE>"+prescriptionDO.getDept()+"</DEPT_CODE>" +
                "<DEPT_CODE>"+prescriptionDO.getDept()+"</DEPT_CODE>" +
                "<DEPT_NAME>"+prescriptionDO.getDeptName()+"</DEPT_NAME>" +
                "<DEPT_NAME>"+prescriptionDO.getDeptName()+"</DEPT_NAME>" +
                "<FILE_FLAG>1</FILE_FLAG>" +
                "<FILE_FLAG>C</FILE_FLAG>" +
                "<SHCZZT_FLAG>"+doctorMappingDO.getMappingCode()+"</SHCZZT_FLAG>" +
                "<SHCZZT_FLAG>"+doctorMappingDO.getMappingCode()+"</SHCZZT_FLAG>" +
                "<CA_SIGN_PIC>"+stamp+"</CA_SIGN_PIC>" +
                "<CA_SIGN_PIC>"+stamp+"</CA_SIGN_PIC>" +
                "<Structured_medical>" +
                "<Structured_medical>" +
@ -2873,6 +2881,14 @@ public class DsyyEntranceService {
                "<门诊处置>"+info+"</门诊处置>" +
                "<门诊处置>"+info+"</门诊处置>" +
                "<检验></检验>" +
                "<检验></检验>" +
                "<检查></检查>" +
                "<检查></检查>" +
                "<姓名>"+outpatientDO.getPatientName()+"</姓名>" +
                "<性别>"+sexName+"</性别>" +
                "<年龄>"+age+"岁</年龄>" +
                "<科室>"+outpatientDO.getDeptName()+"</科室>" +
                "<ID号>"+outpatientDO.getRegisterNo()+"</ID号>" +
                "<就诊状态>复诊</就诊状态>" +
                "<就诊时间>"+DateUtil.dateToStrShort(outpatientDO.getRegisterDate())+"</就诊时间>" +
                "<起草医师>"+outpatientDO.getDoctorName()+"</起草医师>"+
                "</Structured_medical>" +
                "</Structured_medical>" +
                "</MESSAGE>";
                "</MESSAGE>";
        String str  = StringEscapeUtils.escapeXml(condition);
        String str  = StringEscapeUtils.escapeXml(condition);
@ -2885,7 +2901,6 @@ public class DsyyEntranceService {
            hashType = data.getString("hashType");
            hashType = data.getString("hashType");
        }
        }
        String baseSign="";
        String baseSign="";
        BasePatientDO patientDO = patientDao.findById(outpatientDO.getPatient()).get();
        if (patientDO!=null&&doctorDO!=null){
        if (patientDO!=null&&doctorDO!=null){
            String patientName = patientDO.getName();
            String patientName = patientDO.getName();
            Integer patientAge = IdCardUtil.getAgeForIdcard(patientDO.getIdcard());
            Integer patientAge = IdCardUtil.getAgeForIdcard(patientDO.getIdcard());
@ -2994,6 +3009,72 @@ public class DsyyEntranceService {
    }
    }
    /**
     * 通用查询检查、检验报告详情接口
     *
     * @param serverCode
     * @param patientId
     * @param visitNo
     * @return
     * @throws Exception
     */
    public JSONArray selectReportInfo(String serverCode,String patientId,String visitNo) throws Exception {
        String url = "HTTP://10.95.8.41:51221";
        String xml = "{\n" +
                "    \"serverCode\": \""+serverCode+"\",\n" +
                "    \"sysCode\": \"HLW\",\n" +
                "    \"pageSize\": \"10\",\n" +
                "    \"pageNo\": \"1\",\n" +
                "  \t\"orders\": [\n" +
                "\t\n" +
                "\t],\n" +
                "\t\"condition\": [\n" +
                "\t\t{\n" +
                "\t\t\t\"column\": \"PATIENT_ID\",\n" +
                "\t\t\t\"type\": \"eq\",\n" +
                "\t\t\t\"value\": \""+patientId+"\"\n" +
                "\t\t},\n" +
                "        \t{\n" +
                "\t\t\t\"column\": \"VISIT_ID\",\n" +
                "\t\t\t\"type\": \"eq\",\n" +
                "\t\t\t\"value\": \""+visitNo+"\"\n" +
                "\t\t}\n" +
                "\t]\n" +
                "}";
        logger.info("xml"+xml);
        String response = httpClientUtil.postHeadBodyText(url,xml);
        logger.info("response===="+response);
        JSONArray jsonArray =new JSONArray();
        Object json = JSON.parse(response);
        if (json instanceof JSONObject) {
            JSONObject jsonObject = (JSONObject) json;
            if (jsonObject.getString("code").equalsIgnoreCase("401")){
                throw new Exception(jsonObject.getString("message"));
            }
        } else if (json instanceof JSONArray) {
            JSONArray array = (JSONArray) json;
            array = JSONArray.parseArray(response);
            for (int i=0;i<array.size();i++){
                JSONObject object = array.getJSONObject(i);
                String EMRPDF=object.getString("EMRPDF");
                byte[] emrByte = Base64.decodeBase64(EMRPDF);
                String emrDecode = new String(emrByte, "GBK");
                object.put("EMRPDFHTMl", emrDecode);
            }
            jsonArray = array;
        }
        WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
        httpLogDO.setCode("selectEmrInfo");
        httpLogDO.setName("查下电子病历");
        httpLogDO.setRequest(xml);
        httpLogDO.setResponse(response);
        httpLogDO.setStatus("1");
        wlyyHttpLogDao.save(httpLogDO);
        return jsonArray;
    }
    public String dzblIcd10Save(String prescriptionId)throws Exception{
    public String dzblIcd10Save(String prescriptionId)throws Exception{
        WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).get();
        WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).get();
        if (prescriptionDO==null){
        if (prescriptionDO==null){
@ -3036,11 +3117,11 @@ public class DsyyEntranceService {
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>\n" +
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>\n" +
                "    <VISIT_ID>"+visitId+"</VISIT_ID>\n" +
                "    <VISIT_ID>"+visitId+"</VISIT_ID>\n" +
                "    <NAME>"+outpatientDO.getPatientName()+"</NAME>\n" +
                "    <NAME>"+outpatientDO.getPatientName()+"</NAME>\n" +
                "    <NAME_PHONETIC>CS</NAME_PHONETIC>\n" +
                "    <NAME_PHONETIC></NAME_PHONETIC>\n" +
                "    <SEX>"+sexName+"</SEX>\n" +
                "    <SEX>"+sexName+"</SEX>\n" +
                "    <ID_NO>"+patientDO.getIdcard()+"</ID_NO>\n" +
                "    <ID_NO>"+patientDO.getIdcard()+"</ID_NO>\n" +
                "    <CITIZENSHIP>中国</CITIZENSHIP>\n" +
                "    <CITIZENSHIP>中国</CITIZENSHIP>\n" +
                "    <DATE_OF_BIRTH>"+patientDO.getBirthday()+"</DATE_OF_BIRTH>\n" +
                "    <DATE_OF_BIRTH>"+DateUtil.dateToStrShort(patientDO.getBirthday())+"</DATE_OF_BIRTH>\n" +
                "    <CARD_NO>"+outpatientDO.getCardNo()+"</CARD_NO>\n" +
                "    <CARD_NO>"+outpatientDO.getCardNo()+"</CARD_NO>\n" +
                "    <CREATE_DATE></CREATE_DATE>\n" +
                "    <CREATE_DATE></CREATE_DATE>\n" +
                "    <AGE>"+DateUtil.getAgeForIdcard(patientDO.getIdcard())+"岁</AGE>\n" +
                "    <AGE>"+DateUtil.getAgeForIdcard(patientDO.getIdcard())+"岁</AGE>\n" +
@ -3112,6 +3193,14 @@ public class DsyyEntranceService {
                    infoDO.getUsageName()+"|"+infoDO.getDays()+"|"+infoDO.getQuantity()+"|"+infoDO.getPackUnit()+"|";
                    infoDO.getUsageName()+"|"+infoDO.getDays()+"|"+infoDO.getQuantity()+"|"+infoDO.getPackUnit()+"|";
            info = info.substring(0,info.length()-1);
            info = info.substring(0,info.length()-1);
        }
        }
        BasePatientDO patientDO = patientDao.findById(prescriptionDO.getPatientCode()).get();
        String sexName="未知";
        if (patientDO.getSex()==1){
            sexName="男";
        }else if (patientDO.getSex()==2){
            sexName="女";
        }
        Integer age = DateUtil.getAgeForIdcard(patientDO.getIdcard());
        String condition = "<MESSAGE>\n" +
        String condition = "<MESSAGE>\n" +
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>\n" +
                "    <PATIENT_ID>"+patientMappingDO.getMappingCode()+"</PATIENT_ID>\n" +
                "    <HIS_REGISTER_PK>"+outpatientDO.getRegisterNo()+"</HIS_REGISTER_PK>\n" +
                "    <HIS_REGISTER_PK>"+outpatientDO.getRegisterNo()+"</HIS_REGISTER_PK>\n" +
@ -3124,14 +3213,14 @@ public class DsyyEntranceService {
                "    <CREATE_USER_ID>"+doctorMappingDO.getMappingCode()+"</CREATE_USER_ID>\n" +
                "    <CREATE_USER_ID>"+doctorMappingDO.getMappingCode()+"</CREATE_USER_ID>\n" +
                "    <CREATE_USER_NAME>"+prescriptionDO.getDoctorName()+"</CREATE_USER_NAME>\n" +
                "    <CREATE_USER_NAME>"+prescriptionDO.getDoctorName()+"</CREATE_USER_NAME>\n" +
                "    <CREATE_DATE_TIME>"+DateUtil.dateToStrLong(prescriptionDO.getCreateTime())+"</CREATE_DATE_TIME>\n" +
                "    <CREATE_DATE_TIME>"+DateUtil.dateToStrLong(prescriptionDO.getCreateTime())+"</CREATE_DATE_TIME>\n" +
                "    <MR_CODE>EMR10.00.18_36</MR_CODE>\n" +
                "    <MR_CODE>EMR02.00.01_1588</MR_CODE>\n" +
                "    <TOPIC>互联网医院专用</TOPIC>\n" +
                "    <TOPIC>互联网医院专用</TOPIC>\n" +
                "    <HOSPITAL_NO>42661889-5</HOSPITAL_NO>\n" +
                "    <HOSPITAL_NO>42661889-5</HOSPITAL_NO>\n" +
                "    <DEPT_CODE>"+prescriptionDO.getDept()+"</DEPT_CODE>\n" +
                "    <DEPT_CODE>"+prescriptionDO.getDept()+"</DEPT_CODE>\n" +
                "    <DEPT_NAME>"+prescriptionDO.getDeptName()+"</DEPT_NAME>\n" +
                "    <DEPT_NAME>"+prescriptionDO.getDeptName()+"</DEPT_NAME>\n" +
                "    <FILE_FLAG>1</FILE_FLAG>\n" +
                "    <FILE_FLAG>C</FILE_FLAG>\n" +
                "    <SHCZZT_FLAG>"+doctorMappingDO.getMappingCode()+"</SHCZZT_FLAG>\n" +
                "    <SHCZZT_FLAG>"+doctorMappingDO.getMappingCode()+"</SHCZZT_FLAG>\n" +
                "    <CA_SIGN_PIC></CA_SIGN_PIC>\n" +
                "    <CA_SIGN_PIC>"+stamp+"</CA_SIGN_PIC>\n" +
                "    <Structured_medical>\n" +
                "    <Structured_medical>\n" +
                "      <主诉>"+prescriptionEmrDO.getComplaint()+"</主诉>\n" +
                "      <主诉>"+prescriptionEmrDO.getComplaint()+"</主诉>\n" +
                "      <流行病学史>"+prescriptionEmrDO.getPopularHistory()+"</流行病学史>\n" +
                "      <流行病学史>"+prescriptionEmrDO.getPopularHistory()+"</流行病学史>\n" +
@ -3142,6 +3231,14 @@ public class DsyyEntranceService {
                "      <门诊处置>"+info+"</门诊处置>\n" +
                "      <门诊处置>"+info+"</门诊处置>\n" +
                "      <检验></检验>\n" +
                "      <检验></检验>\n" +
                "      <检查></检查>\n" +
                "      <检查></检查>\n" +
                "      <姓名>"+outpatientDO.getPatientName()+"</姓名>\n" +
                "      <性别>"+sexName+"</性别>\n" +
                "      <年龄>"+age+"岁</年龄>\n" +
                "      <科室>"+outpatientDO.getDeptName()+"</科室>\n" +
                "      <ID号>"+outpatientDO.getRegisterNo()+"</ID号>\n" +
                "      <就诊状态>复诊</就诊状态>\n" +
                "      <就诊时间>"+DateUtil.dateToStrShort(outpatientDO.getRegisterDate())+"</就诊时间>\n" +
                "      <起草医师>"+outpatientDO.getDoctorName()+"</起草医师>"+
                "    </Structured_medical>\n" +
                "    </Structured_medical>\n" +
                "  </MESSAGE>";
                "  </MESSAGE>";
        String pInput=condition;
        String pInput=condition;

+ 87 - 13
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -15,6 +15,7 @@ import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.order.BusinessOrderRefundDO;
import com.yihu.jw.entity.order.BusinessOrderRefundDO;
@ -23,6 +24,7 @@ import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.DsyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.DsyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
@ -58,6 +60,10 @@ import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.dao.WxPayLogDao;
import com.yihu.jw.wechat.dao.WxPayLogDao;
import com.yihu.jw.wechat.enterprise.EnterpriseService;
import com.yihu.jw.wechat.enterprise.EnterpriseService;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpUtils;
import lombok.Synchronized;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.lang3.math.NumberUtils;
@ -157,6 +163,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    private DsyyPrescriptionService dsyyPrescriptionService;
    private DsyyPrescriptionService dsyyPrescriptionService;
    @Autowired
    @Autowired
    private DsyyEntranceService dsyyEntranceService;
    private DsyyEntranceService dsyyEntranceService;
    @Autowired
    private SystemMessageDao systemMessageDao;
@ -1435,6 +1443,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     * @param tradeType
     * @param tradeType
     * @return
     * @return
     */
     */
    @Transactional(rollbackFor = Exception.class)
    public JSONObject tradeQuery(String relationCode,String tradeType) throws Exception {
    public JSONObject tradeQuery(String relationCode,String tradeType) throws Exception {
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        String operatorId = "";
        String operatorId = "";
@ -1448,37 +1457,102 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (object.getString("respCode").equalsIgnoreCase("000000")){
        if (object.getString("respCode").equalsIgnoreCase("000000")){
            JSONObject param = object.getJSONObject("param");
            JSONObject param = object.getJSONObject("param");
            if (param.getString("result").equalsIgnoreCase("succ")){
            if (param.getString("result").equalsIgnoreCase("succ")){
                if(wechatId.equalsIgnoreCase("xm_dsyy_wx")){
                    logger.info("his充值开始");
                    dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                    logger.info("his充值结束");
                }
                if (businessOrderDO.getStatus()!=1){
                if (businessOrderDO.getStatus()!=1){
                    if(wechatId.equalsIgnoreCase("xm_dsyy_wx")){
                        logger.info("his充值开始");
                        dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                        logger.info("his充值结束");
                    }
                    WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
                    if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                    if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                        wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                        wlyyOutpatientDO.setPayStatus(1);
                        wlyyOutpatientDO.setPayStatus(1);
                        WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                        WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                    }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
                    }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                        wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                        wlyyOutpatientDO.setPayStatus(1);
                        wlyyOutpatientDO.setPayStatus(1);
                        WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                        WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                    }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
                    }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                        wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                        wlyyOutpatientDO.setPayStatus(1);
                        wlyyOutpatientDO.setPayStatus(1);
                        WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                        WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                    }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
                    }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
                        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findById(businessOrderDO.getRelationCode()).get();
                        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findById(businessOrderDO.getRelationCode()).get();
                        if (wechatId.equalsIgnoreCase("xm_dsyy_wx")){
                        if (wechatId.equalsIgnoreCase("xm_dsyy_wx")){
                            dsyyPrescriptionService.confirmSettlement(ylzMedicalRelationDO.getRelationCode());
                            if (businessOrderDO.getStatus()!=1){
                                try {
                                    dsyyPrescriptionService.confirmSettlement(ylzMedicalRelationDO.getRelationCode());
                                }catch (Exception e){
                                    e.printStackTrace();
                                }
                            }
                        }
                        }
                    }
                    }
                    if (wlyyOutpatientDO!=null){
                        String msg = "";
                        String sex = "";
                        String age="";
                        String date = "";
                        String title = "";
                        SystemMessageDO systemMessageDO = new SystemMessageDO();
                        if ("2".equals(wlyyOutpatientDO.getOutpatientType())) {
                            systemMessageDO.setTitle("协同门诊接诊消息提醒");
                            systemMessageDO.setType("63");
                        } else if ("3".equals(wlyyOutpatientDO.getOutpatientType())) {//专家咨询
                            //1.图文 2.视频 3家医
                            if ("1".equals(wlyyOutpatientDO.getType())) {
                                systemMessageDO.setTitle("图文咨询接诊消息提醒");
                                systemMessageDO.setType("68");
                                title = "图文咨询消息提醒";
                                msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文咨询,请您及时点击回复";
                            } else if ("3".equals(wlyyOutpatientDO.getType())) {
                                systemMessageDO.setTitle("家医咨询接诊消息提醒");
                                systemMessageDO.setType("65");
                            } else {
                                systemMessageDO.setTitle("视频咨询接诊消息提醒");
                                systemMessageDO.setType("67");
                                title = "视频咨询接诊消息提醒";
                                date = DateUtil.dateToStrLong(wlyyOutpatientDO.getRegisterDate());
                                msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)预约了"+date+"的视频咨询,点击查看";
                            }
                        } else if ("1".equals(wlyyOutpatientDO.getOutpatientType())) {//在线复诊
                            //1.图文 2.视频
                            if ("1".equals(wlyyOutpatientDO.getType())) {
                                systemMessageDO.setTitle("图文复诊接诊消息提醒");
                                systemMessageDO.setType("61");
                                title = "图文复诊接诊消息提醒";
                                msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文复诊,请您及时点击接诊";
                            } else {
                                systemMessageDO.setTitle("视频复诊接诊消息提醒");
                                systemMessageDO.setType("62");
                                title = "视频复诊接诊消息提醒";
                                date = DateUtil.dateToStrLong(wlyyOutpatientDO.getRegisterDate());
                                msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                            }
                        }
                        net.sf.json.JSONObject data = new net.sf.json.JSONObject();
                        data.put("name", wlyyOutpatientDO.getPatientName());
                        data.put("age", IdCardUtil.getAgeForIdcard(wlyyOutpatientDO.getIdcard()));
                        data.put("gender", IdCardUtil.getSexForIdcard_new(wlyyOutpatientDO.getIdcard()));
                        data.put("question", wlyyOutpatientDO.getDescription());
                        data.put("msg", systemMessageDO.getTitle());
                        systemMessageDO.setData(data.toString());
                        systemMessageDO.setReceiver(wlyyOutpatientDO.getDoctor());
                        systemMessageDO.setReceiverName(wlyyOutpatientDO.getDoctorName());
                        systemMessageDO.setRelationCode(wlyyOutpatientDO.getId());
                        systemMessageDO.setSender(wlyyOutpatientDO.getPatient());
                        systemMessageDO.setSenderName(wlyyOutpatientDO.getPatientName());
                        systemMessageDO.setRelationCode(wlyyOutpatientDO.getId());
                        systemMessageDO.setIsRead("0");
                        systemMessageDO.setDel("1");
                        systemMessageDO.setCreateTime(new Date());
                        systemMessageDao.save(systemMessageDO);
                    }
                }
                }
                businessOrderDO.setUpdateTime(new Date());
                businessOrderDO.setStatus(1);
                businessOrderDO.setPayTime(new Date());
                businessOrderDao.save(businessOrderDO);
                updatePayStatus(businessOrderDO.getOrderNo());
            }
            }
        }
        }
        return object;
        return object;

+ 5 - 1
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -20,7 +20,9 @@ import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationPatientInfoDO;
import com.yihu.jw.hospital.httplog.service.BaseOperateLogService;
import com.yihu.jw.hospital.httplog.service.BaseOperateLogService;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.DsyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.DsyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientDao;
@ -89,6 +91,8 @@ public class WlyyBusinessService {
    private XzzxEntranceService xzzxEntranceService;
    private XzzxEntranceService xzzxEntranceService;
    @Autowired
    @Autowired
    private BaseOperateLogService baseOperateLogService;
    private BaseOperateLogService baseOperateLogService;
    @Autowired
    private DsyyPrescriptionService dsyyPrescriptionService;
    /**
    /**
@ -282,7 +286,7 @@ public class WlyyBusinessService {
        
        
        String idcard = "";
        String idcard = "";
        String result = "";
        String result = "";
        BasePatientDO basePatientDO = basePatientDao.findById(patientId).orElse(null);
        BasePatientDO basePatientDO = basePatientDao.findById(patientId).get();
        if(basePatientDO != null){
        if(basePatientDO != null){
            idcard = basePatientDO.getIdcard();
            idcard = basePatientDO.getIdcard();
    
    

+ 1 - 1
common/common-util/src/main/java/com/yihu/jw/util/http/HttpClientUtil.java

@ -453,7 +453,7 @@ public class HttpClientUtil {
    public  static String postBodyStatic(String url, com.alibaba.fastjson.JSONObject params) {
    public  static String postBodyStatic(String url, com.alibaba.fastjson.JSONObject params) {
        RestTemplate restTemplate = new RestTemplate();
        RestTemplate restTemplate = new RestTemplate();
        HttpHeaders headers = new HttpHeaders();
        HttpHeaders headers = new HttpHeaders();
        MediaType type = MediaType.parseMediaType("application/json; charset=GBK");
        MediaType type = MediaType.parseMediaType("application/json; charset=utf-8");
        headers.setContentType(type);
        headers.setContentType(type);
        headers.add("Accept", MediaType.APPLICATION_JSON.toString());
        headers.add("Accept", MediaType.APPLICATION_JSON.toString());
        org.springframework.http.HttpEntity<String> formEntity = new org.springframework.http.HttpEntity<String>(params.toString(), headers);
        org.springframework.http.HttpEntity<String> formEntity = new org.springframework.http.HttpEntity<String>(params.toString(), headers);

+ 4 - 0
gateway/ag-basic/src/main/resources/application.yml

@ -22,6 +22,10 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    hikari:
      idle-timeout: 600000 # 10 minutes
      max-lifetime: 1800000 # 30 minutes
      health-check-properties: "select 1"
  redis:
  redis:
    database: 0 # Database index used by the connection factory.
    database: 0 # Database index used by the connection factory.
    timeout: 0 # Connection timeout in milliseconds.
    timeout: 0 # Connection timeout in milliseconds.

+ 25 - 24
server/svr-authentication/src/main/resources/application.yml

@ -4,30 +4,31 @@ server:
spring:
spring:
  datasource:
  datasource:
  hikari:
    registerMbeans: true
    driver-class-name: com.mysql.cj.jdbc.Driver
    max-active: 100
    max-idle: 100 #最大空闲连接
    min-idle: 10 #最小空闲连接
    validation-query-timeout: 20
    connection-timeout: 60000
    validation-timeout: 3000
    max-lifetime: 60000
    login-timeout: 5
    maximum-pool-size: 60
    minimum-idle: 10
    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: 60000
    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小
    hikari:
      idle-timeout: 600000 # 10 minutes
      max-lifetime: 1800000 # 30 minutes
      health-check-properties: "select 1"
      registerMbeans: true
      driver-class-name: com.mysql.cj.jdbc.Driver
      max-active: 100
      max-idle: 100 #最大空闲连接
      min-idle: 10 #最小空闲连接
      validation-query-timeout: 20
      connection-timeout: 60000
      validation-timeout: 3000
      login-timeout: 5
      maximum-pool-size: 60
      minimum-idle: 10
      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 参数必须设置为非空字符串
      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小
  main:
  main:
    allow-bean-definition-overriding: true
    allow-bean-definition-overriding: true
  redis:
  redis:

+ 11 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/DsyyController.java

@ -577,6 +577,17 @@ public class DsyyController extends EnvelopRestEndpoint {
        return success("请求成功",dsyyEntranceService.selectEmrInfoIdAndVisitNo(patientId,visitNo));
        return success("请求成功",dsyyEntranceService.selectEmrInfoIdAndVisitNo(patientId,visitNo));
    }
    }
    @PostMapping(value = "/selectReportInfo")
    @ApiOperation(value = "通用查询检查、检验报告详情接口")
    public ListEnvelop selectEmrInfoId(@ApiParam(name = "serviceCode", value = "接口编码", required = false)
                                           @RequestParam(value = "serviceCode",required = false)String serviceCode,
                                        @ApiParam(name = "patientId", value = "患者id", required = false)
                                       @RequestParam(value = "patientId",required = false)String patientId,
                                       @ApiParam(name = "visitNo", value = "就诊次数", required = false)
                                       @RequestParam(value = "visitNo",required = false)String visitNo) throws Exception {
        return success("请求成功",dsyyEntranceService.selectReportInfo(serviceCode,patientId,visitNo));
    }
    @PostMapping(value = "/selectEmrInfoIdJcpt")
    @PostMapping(value = "/selectEmrInfoIdJcpt")
    @ApiOperation(value = "病历查询-webservice")
    @ApiOperation(value = "病历查询-webservice")
    public ObjEnvelop<String> selectEmrInfoIdJcpt(@ApiParam(name = "patientId", value = "患者id", required = false)
    public ObjEnvelop<String> selectEmrInfoIdJcpt(@ApiParam(name = "patientId", value = "患者id", required = false)

+ 81 - 6
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -41,6 +41,7 @@ import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.service.WlyyHttpLogService;
import com.yihu.jw.hospital.httplog.service.WlyyHttpLogService;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.hospital.message.service.BaseBannerDoctorService;
import com.yihu.jw.hospital.message.service.BaseBannerDoctorService;
import com.yihu.jw.hospital.message.service.BaseUserMsgService;
import com.yihu.jw.hospital.message.service.BaseUserMsgService;
import com.yihu.jw.hospital.message.service.SystemMessageService;
import com.yihu.jw.hospital.message.service.SystemMessageService;
@ -75,6 +76,7 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.patient.PatientRequestMapping;
import com.yihu.jw.rm.patient.PatientRequestMapping;
import com.yihu.jw.sms.service.YkyyINSMSService;
import com.yihu.jw.sms.service.YkyyINSMSService;
import com.yihu.jw.util.common.FileUtil;
import com.yihu.jw.util.common.FileUtil;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.XMLUtil;
import com.yihu.jw.util.common.XMLUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
@ -269,6 +271,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @Autowired
    @Autowired
    private DsyyPrescriptionService dsyyPrescriptionService;
    private DsyyPrescriptionService dsyyPrescriptionService;
    @Autowired
    private SystemMessageDao systemMessageDao;
    @GetMapping(value = "orgInfo")
    @GetMapping(value = "orgInfo")
@ -713,7 +717,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
     * @throws IOException
     * @throws IOException
     * @throws PayException
     * @throws PayException
     */
     */
    @RequestMapping(value = "/ylzReceiveNotify")
    @RequestMapping(value = "/ylzReceiveNotify1")
    public String mmpReceiveNotify(HttpServletRequest request, HttpServletResponse response) throws IOException, PayException {
    public String mmpReceiveNotify(HttpServletRequest request, HttpServletResponse response) throws IOException, PayException {
        response.setContentType("text/html;charset=utf-8");
        response.setContentType("text/html;charset=utf-8");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
@ -752,12 +756,13 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                    String traceNo = param.getString("outChargeNo");
                    String traceNo = param.getString("outChargeNo");
                    //im处方发消息
                    //im处方发消息
                    BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(traceNo);
                    BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(traceNo);
                    if(wxId.equalsIgnoreCase("xm_dsyy_wx")){
                        logger.info("his充值开始");
                        dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                        logger.info("his充值结束");
                    }
                    if (businessOrderDO.getStatus()!=1){
                    if (businessOrderDO.getStatus()!=1){
                        if(wxId.equalsIgnoreCase("xm_dsyy_wx")){
                            logger.info("his充值开始");
                            dsyyPrescriptionService.rechargeHis(businessOrderDO.getOrderNo());
                            logger.info("his充值结束");
                        }
                        WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
                        if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("4")){
                        if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("4")){
                            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                            JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
                            JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
@ -774,11 +779,20 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                            prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
                            prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
                            prescriptionVO.setPayStatus(1);
                            prescriptionVO.setPayStatus(1);
                            imService.pushPrescriptionImMessage(prescriptionVO);
                            imService.pushPrescriptionImMessage(prescriptionVO);
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                            SystemMessageDO systemMessageDO = new SystemMessageDO();
                            systemMessageDO.setType("1");
                            systemMessageDO.setReceiver(businessOrderDO.getDoctor());
                            systemMessageDO.setSender(businessOrderDO.getPatient());
                            wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                            //发送IM消息
                            hospitalSystemMessageService.sendImMessage(systemMessageDO);
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
                            SystemMessageDO systemMessageDO = new SystemMessageDO();
                            SystemMessageDO systemMessageDO = new SystemMessageDO();
                            systemMessageDO.setType("1");
                            systemMessageDO.setType("1");
                            systemMessageDO.setReceiver(businessOrderDO.getDoctor());
                            systemMessageDO.setReceiver(businessOrderDO.getDoctor());
                            systemMessageDO.setSender(businessOrderDO.getPatient());
                            systemMessageDO.setSender(businessOrderDO.getPatient());
                            wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                            //发送IM消息
                            //发送IM消息
                            hospitalSystemMessageService.sendImMessage(systemMessageDO);
                            hospitalSystemMessageService.sendImMessage(systemMessageDO);
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
@ -786,6 +800,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                            systemMessageDO.setType("2");
                            systemMessageDO.setType("2");
                            systemMessageDO.setReceiver(businessOrderDO.getDoctor());
                            systemMessageDO.setReceiver(businessOrderDO.getDoctor());
                            systemMessageDO.setSender(businessOrderDO.getPatient());
                            systemMessageDO.setSender(businessOrderDO.getPatient());
                            wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).get();
                            //发送IM消息
                            //发送IM消息
                            hospitalSystemMessageService.sendImMessage(systemMessageDO);
                            hospitalSystemMessageService.sendImMessage(systemMessageDO);
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
                        }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
@ -794,6 +809,66 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                dsyyPrescriptionService.confirmSettlement(ylzMedicalRelationDO.getRelationCode());
                                dsyyPrescriptionService.confirmSettlement(ylzMedicalRelationDO.getRelationCode());
                            }
                            }
                        }
                        }
                        if (wlyyOutpatientDO!=null){
                            String msg = "";
                            String sex = "";
                            String age="";
                            String date = "";
                            String title = "";
                            SystemMessageDO systemMessageDO = new SystemMessageDO();
                            if ("2".equals(wlyyOutpatientDO.getOutpatientType())) {
                                systemMessageDO.setTitle("协同门诊接诊消息提醒");
                                systemMessageDO.setType("63");
                            } else if ("3".equals(wlyyOutpatientDO.getOutpatientType())) {//专家咨询
                                //1.图文 2.视频 3家医
                                if ("1".equals(wlyyOutpatientDO.getType())) {
                                    systemMessageDO.setTitle("图文咨询接诊消息提醒");
                                    systemMessageDO.setType("68");
                                    title = "图文咨询消息提醒";
                                    msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文咨询,请您及时点击回复";
                                } else if ("3".equals(wlyyOutpatientDO.getType())) {
                                    systemMessageDO.setTitle("家医咨询接诊消息提醒");
                                    systemMessageDO.setType("65");
                                } else {
                                    systemMessageDO.setTitle("视频咨询接诊消息提醒");
                                    systemMessageDO.setType("67");
                                    title = "视频咨询接诊消息提醒";
                                    date = DateUtil.dateToStrLong(wlyyOutpatientDO.getRegisterDate());
                                    msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)预约了"+date+"的视频咨询,点击查看";
                                }
                            } else if ("1".equals(wlyyOutpatientDO.getOutpatientType())) {//在线复诊
                                //1.图文 2.视频
                                if ("1".equals(wlyyOutpatientDO.getType())) {
                                    systemMessageDO.setTitle("图文复诊接诊消息提醒");
                                    systemMessageDO.setType("61");
                                    title = "图文复诊接诊消息提醒";
                                    msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文复诊,请您及时点击接诊";
                                } else {
                                    systemMessageDO.setTitle("视频复诊接诊消息提醒");
                                    systemMessageDO.setType("62");
                                    title = "视频复诊接诊消息提醒";
                                    date = DateUtil.dateToStrLong(wlyyOutpatientDO.getRegisterDate());
                                    msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                                }
                            }
                            net.sf.json.JSONObject data = new net.sf.json.JSONObject();
                            data.put("name", wlyyOutpatientDO.getPatientName());
                            data.put("age", IdCardUtil.getAgeForIdcard(wlyyOutpatientDO.getIdcard()));
                            data.put("gender", IdCardUtil.getSexForIdcard_new(wlyyOutpatientDO.getIdcard()));
                            data.put("question", wlyyOutpatientDO.getDescription());
                            data.put("msg", systemMessageDO.getTitle());
                            systemMessageDO.setData(data.toString());
                            systemMessageDO.setReceiver(wlyyOutpatientDO.getDoctor());
                            systemMessageDO.setReceiverName(wlyyOutpatientDO.getDoctorName());
                            systemMessageDO.setRelationCode(wlyyOutpatientDO.getId());
                            systemMessageDO.setSender(wlyyOutpatientDO.getPatient());
                            systemMessageDO.setSenderName(wlyyOutpatientDO.getPatientName());
                            systemMessageDO.setRelationCode(wlyyOutpatientDO.getId());
                            systemMessageDO.setIsRead("0");
                            systemMessageDO.setDel("1");
                            systemMessageDO.setCreateTime(new Date());
                            systemMessageDao.save(systemMessageDO);
                        }
                    }
                    }
                    businessOrderService.updatePayStatus(traceNo);
                    businessOrderService.updatePayStatus(traceNo);
                    return "SUCCESS";
                    return "SUCCESS";

+ 4 - 0
svr/svr-internet-hospital/src/main/resources/application.yml

@ -21,6 +21,10 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    hikari:
      idle-timeout: 600000 # 10 minutes
      max-lifetime: 1800000 # 30 minutes
      health-check-properties: "select 1"
  main:
  main:
    allow-bean-definition-overriding: true
    allow-bean-definition-overriding: true
  #      location: D:/work/soft_dev/IdeaWorkSpace/wlyy2.0/svr/svr-patient/temp_file/
  #      location: D:/work/soft_dev/IdeaWorkSpace/wlyy2.0/svr/svr-patient/temp_file/