wangjun преди 4 години
родител
ревизия
3c4c4369a6

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/WlyyHttpLogService.java

@ -64,7 +64,7 @@ public class WlyyHttpLogService  extends BaseJpaService<WlyyHttpLogDO, WlyyHttpL
        sql+=" a.name as \"patientName\"," +
                "b.name as \"doctorName\"" +
                " from wlyy_http_log t left join base_patient a on t.patient = a.id " +
                " left join base_doctor b on t.doctor = b.id where 1=1 and (t.code like '%Check%' or t.name = '合理用药审核接口')";
                " left join base_doctor b on t.doctor = b.id where 1=1 and ( t.name = '合理用药审核接口'  or t.code like '%Check%')";
        if (StringUtils.isNotBlank(startTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){

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

@ -32,6 +32,7 @@ import com.yihu.jw.entity.base.patient.BasePatientBusinessDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import com.yihu.jw.entity.base.wx.*;
import com.yihu.jw.entity.base.yx.YxTokenMappingDO;
import com.yihu.jw.entity.hospital.consult.WlyyDoctorClinicRoomDO;
@ -309,7 +310,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private BaseJpushTemplateDao baseJpushTemplateDao;
    @Autowired
    HikariDataSource dataSource;
    @Autowired
    private BaseSensitiveDao baseSensitiveDao;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -3935,6 +3937,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    }
                }*/
                List<com.alibaba.fastjson.JSONArray> waitinglist = new ArrayList<>();
                List<BaseSensitiveDO> listSensitive = (List<BaseSensitiveDO>) baseSensitiveDao.findAll();
                if (scoreList != null && scoreList.size() > 0) {
                    List<String> stringList = new ArrayList<>();
                    for (Map<String, Object> scorepatient : scoreList) {
@ -3948,7 +3951,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        }
                        String content = (String)scorepatient.get("content");
                        if (StringUtils.isNotEmpty(content)){
                            String replace = baseSensitiveFilterWordsService.filterSensitiveWords(content);
                            String replace = baseSensitiveFilterWordsService.filterSensitiveWords(content,listSensitive);
                            scorepatient.put("content",replace);
                        }
@ -5693,12 +5696,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " d.consult_status AS \"consultStatus\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " a.total AS \"consultTotal\"," +
                " d.twfz_charge_type AS \"twfz_charge_type\"," +
                " d.spfz_charge_type AS \"spfz_charge_type\"," +
                " d.spzx_charge_type AS \"spzx_charge_type\"," +
                " d.xtfz_charge_type AS \"xtfz_charge_type\"," +
                " d.twzx_charge_type AS \"twzx_charge_type\"," +
                " d.jyzx_charge_type AS \"jyzx_charge_type\"," +
                " d.twfz_charge_type AS \"TWFZ_CHARGE_TYPE\"," +
                " d.spfz_charge_type AS \"SPFZ_CHARGE_TYPE\"," +
                " d.spzx_charge_type AS \"SPZX_CHARGE_TYPE\"," +
                " d.xtfz_charge_type AS \"XTFZ_CHARGE_TYPE\"," +
                " d.twzx_charge_type AS \"TWZX_CHARGE_TYPE\"," +
                " d.jyzx_charge_type AS \"JYZX_CHARGE_TYPE\"," +
                " h.org_name AS \"orgName\"," +
                " h.org_code AS \"orgCode\" " ;
        if(StringUtils.isNoneBlank(patientid)){
@ -5999,7 +6002,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (pagesize <= 0) {
            pagesize = 10;
        }*/
        testHikar();
        long statr = new Date().getTime();
        String sql = "SELECT " +
                " d.id AS \"id\", " +
@ -7161,6 +7163,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            wlyyHttpLogDO.setCreateTime(new Date());
            wlyyHttpLogDao.save(wlyyHttpLogDO);
        }
        if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)&&StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
            String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+wlyyOutpatientDO.getId();
            sendZsMsgFlow("OL_PAY_SUCCESS",wlyyOutpatientDO.getId(),"",msgUrl,"已支付问诊费");
        }
    }
@ -12494,5 +12500,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
    }
    public String findDomainUrlInDict(){
        try {
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("domainUrl");
            if (wlyyHospitalSysDictDO!=null){
                return wlyyHospitalSysDictDO.getDictValue();
            }else {
                return "";
            }
        }catch (Exception e){
            e.printStackTrace();
            return "";
        }
    }
}

+ 14 - 11
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -280,12 +280,13 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        }
        businessOrderDO.setUploadStatus(0);
        businessOrderDO.setPayType(1);
        String baseUrl = prescriptionService.findDomainUrlInDict();
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
            businessOrderDO.setAppCallbackUrl("https://intel.yanketong.com/ims-app-web/#/yk/consult/record?consultCode="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setPcCallbackUrl("https://intel.yanketong.com/ims-web/#/yk/consult/record?consultCode="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setAppCallbackUrl(baseUrl+"/ims-app-web/#/yk/consult/record?consultCode="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setPcCallbackUrl(baseUrl+"/ims-web/#/yk/consult/record?consultCode="+businessOrderDO.getRelationCode()+"&verifyCode=");
        }else {
            businessOrderDO.setAppCallbackUrl("https://intel.yanketong.com/ims-app-web/#/yk/consult/record?outpatientId="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setPcCallbackUrl("https://intel.yanketong.com/ims-web/#/yk/consult/record?outpatientId="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setAppCallbackUrl(baseUrl+"/ims-app-web/#/yk/consult/record?outpatientId="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setPcCallbackUrl(baseUrl+"/ims-web/#/yk/consult/record?outpatientId="+businessOrderDO.getRelationCode()+"&verifyCode=");
        }
        List<WlyyHospitalSysDictDO> hospitalSysDictDOS = hospitalSysDictDao.findByDictName("WX_MONEY");
        if (businessOrderDO!=null&&businessOrderDO.getPayPrice()==null){
@ -1349,6 +1350,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     */
    public BusinessOrderDO updatePayStatus(String orderNo) throws Exception {
        logger.info("入参:"+orderNo);
        String baseUrl = prescriptionService.findDomainUrlInDict();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay");
        String changeflag="0";
@ -1397,7 +1399,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                }else if(wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                    String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    String url=baseUrl+"/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
                }else if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                    String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
@ -1419,7 +1421,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
           wlyyOutpatientDO.setPayStatus(1);
           WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
           try {
               if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
               if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)&&StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
                   String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+wlyyOutpatientDO.getId();
                   prescriptionService.sendZsMsgFlow("OL_PAY_SUCCESS",wlyyOutpatientDO.getId(),"",msgUrl,"已支付问诊费");
               }
@ -1457,7 +1459,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                       String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
               }else if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                   String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   String url=baseUrl+"/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
               }else if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                   String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
@ -1495,6 +1497,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     */
    public BusinessOrderDO updatePayStatusByRelation(String relationCode,String wxId) throws Exception {
        logger.info("入参:"+relationCode);
        String baseUrl = prescriptionService.findDomainUrlInDict();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay");
        String changeflag="0";
@ -1544,10 +1547,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                        String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                        enterpriseService.sendTWMesByDoctor("xm_xzzx_wx",outpatientDO.getDoctor(),title,msg,url);
                    }else if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
                        String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                        String url=baseUrl+"/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                        enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
                    }
                    if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                    if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)&&StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
                        String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+wlyyOutpatientDO.getId();
                        prescriptionService.sendZsMsgFlow("OL_PAY_SUCCESS",wlyyOutpatientDO.getId(),"",msgUrl,"已支付问诊费");
                    }
@ -1590,10 +1593,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_xzzx_wx",outpatientDO.getDoctor(),title,msg,url);
                }else if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
                    String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    String url=baseUrl+"/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
                }
                if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)&&StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
                    String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+wlyyOutpatientDO.getId();
                    prescriptionService.sendZsMsgFlow("OL_PAY_SUCCESS",wlyyOutpatientDO.getId(),"",msgUrl,"已支付问诊费");
                }

+ 2 - 5
business/base-service/src/main/java/com/yihu/jw/wechat/service/BaseSensitiveFilterWordsService.java

@ -19,8 +19,6 @@ import java.util.*;
@Service
public class BaseSensitiveFilterWordsService extends BaseJpaService<BaseSensitiveDO, BaseSensitiveDao> {
    @Autowired
    private BaseSensitiveDao baseSensitiveDao;
    @Autowired
@ -34,14 +32,13 @@ public class BaseSensitiveFilterWordsService extends BaseJpaService<BaseSensitiv
     * @param txt
     * @return
     */
    public String filterSensitiveWords(String txt){
        List<BaseSensitiveDO> list = (List<BaseSensitiveDO>) baseSensitiveDao.findAll();
    public String filterSensitiveWords(String txt, List<BaseSensitiveDO> list){
        HashSet<String> set = new HashSet<>();
        for (BaseSensitiveDO one : list) {
            set.add(one.getSensitiveWord());
        }
        SensitivewordFilter filter = new SensitivewordFilter(set);
        Set<String> words = filter.getSensitiveWord(txt, 1);
        /*Set<String> words = filter.getSensitiveWord(txt, 1);*/
        String replaceTxt = filter.replaceSensitiveWord(txt, 1, "***");
        return replaceTxt;
    }

+ 1 - 1
svr/svr-base/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name: svr-base-ysj
    name: svr-base
  cloud:
    config:
      failFast: true

+ 8 - 5
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/wechat/WeiXinEventProcess.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.service.wechat;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.util.wechat.WeiXinMessageReplyUtils;
import com.yihu.jw.util.wechat.WeiXinMessageUtils;
import org.apache.commons.lang3.StringUtils;
@ -31,7 +32,8 @@ public class WeiXinEventProcess {
    private String wechatId;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private PrescriptionService prescriptionService;
    /**
     * 微信推送事件处理
     *
@ -75,6 +77,7 @@ public class WeiXinEventProcess {
    private String scanEventProcess(Map<String, String> message) throws Exception {
        String result = "";
        // 场景值
        String baseUrl = prescriptionService.findDomainUrlInDict();
        String eventKey = message.get("EventKey");
        if (StringUtils.isNotEmpty(eventKey) && (eventKey.startsWith("doctor_"))) {
@ -93,8 +96,8 @@ public class WeiXinEventProcess {
            }
            // 医生二维码跳转URL
            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
                url = "https://intel.yanketong.com/ims-wx/#/doctorInfo?doctorCode="+keys[0];
                picUrl = "https://intel.yanketong.com/"+picUrl;
                url = baseUrl+"/ims-wx/#/doctorInfo?doctorCode="+keys[0];
                picUrl =baseUrl+ "/"+picUrl;
                article.put("Url", url);
                article.put("Title", keys[1] + "医生个人诊间");
                article.put("Description", "厦门眼科中心医院互联网医院");
@ -130,8 +133,8 @@ public class WeiXinEventProcess {
            String url = null;
            // 医生二维码跳转URL
            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
                url = "https://intel.yanketong.com/ims-wx/redirect.html";
                picUrl = "https://intel.yanketong.com/group1/M00/00/13/wKghxmAZD-iAEyHgAAA-zHpYNyg537.png";
                url =baseUrl+"/ims-wx/redirect.html";
                picUrl = baseUrl+"/group1/M00/00/13/wKghxmAZD-iAEyHgAAA-zHpYNyg537.png";
                article.put("Url", url);
                article.put("Title", "核酸检测预约");
                article.put("Description", "厦门眼科中心医院互联网医院");