Forráskód Böngészése

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

wangjun 4 éve
szülő
commit
71eee6e129

+ 1 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/dao/word/BaseSensitiveDao.java

@ -1,6 +1,5 @@
package com.yihu.jw.base.dao.word;
package com.yihu.jw.hospital.prescription.dao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

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

@ -18,8 +18,6 @@ import com.yihu.jw.entity.base.org.BaseDoctorPatientFollowDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.base.sync.BaseSyncDataDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import com.yihu.jw.entity.base.wx.*;
import com.yihu.jw.entity.hospital.consult.WlyyDoctorClinicRoomDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
@ -82,6 +80,7 @@ import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.dao.WxPushLogDao;
import com.yihu.jw.wechat.dao.WxTemplateConfigDao;
import com.yihu.jw.wechat.service.BaseSensitiveFilterWordsService;
import com.yihu.jw.wechat.service.WxAccessTokenService;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
@ -244,6 +243,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    @Autowired
    private DictDeptDescDao dictDeptDescDao;
    @Autowired
    private BaseSensitiveFilterWordsService baseSensitiveFilterWordsService;
@ -3204,9 +3205,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "LEFT JOIN wlyy_consult_team c ON c.consult=b.relation_code AND c.doctor='" + doctor + "' " +
                    "WHERE a.relation_code=b.id AND b.doctor='" + doctor + "' order by b.create_time DESC ";
            List<Map<String, Object>> scoreList = jdbcTemplate.queryForList(sqlScoreList);
            if (scoreList != null && scoreList.size() > 0) {
//                Set<String> datelist = new HashSet<>();
               /* HashMap<String, List<Map<String, Object>>> waitinglist = new HashMap<>();
@ -3240,6 +3239,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        if (!stringList.contains(id)){
                            stringList.add(id);
                        }
                        String content = (String)scorepatient.get("content");
                        if (StringUtils.isNotEmpty(content)){
                            String replace = baseSensitiveFilterWordsService.filterSensitiveWords(content);
                            scorepatient.put("content",replace);
                        }
                    }
                    for (String str:stringList){
                        com.alibaba.fastjson.JSONArray array = new com.alibaba.fastjson.JSONArray();
@ -3699,16 +3704,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice_jz", scene, 1);
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName()));
                    newConfig.setFirst(config.getFirst().replace("key2", doctorDO.getJobTitleName()));
                    newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getDoctorName()).replace("key2", doctorDO.getJobTitleName()));
                    newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getDoctorName());
                    newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getAdmDate());
                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDeptName());
                    newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getIcd10Name());
                    if ("16".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊"));
                        newConfig.setRemark(config.getRemark().replace("key1", "视频复诊"));
                    } else if ("17".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询"));
                        newConfig.setRemark(config.getRemark().replace("key1", "视频咨询"));
                    }
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
@ -3719,25 +3723,21 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice_zx", scene, 1);
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1", consPatientDO.getName()));
                    newConfig.setFirst(config.getFirst().replace("key2", consDoctorDO.getJobTitleName()));
                    newConfig.setFirst(config.getFirst().replace("key1", consPatientDO.getName()).replace("key2", consDoctorDO.getJobTitleName()));
                    newConfig.setKeyword1(config.getKeyword1() + consDoctorDO.getName());
                    newConfig.setKeyword2(config.getKeyword2() + consultTeam.getCzrq());//咨询暂无挂号时间
                    newConfig.setKeyword3(config.getKeyword3() + hospitalDO.getDeptName());
                    newConfig.setKeyword4(config.getKeyword4() + consultTeam.getSymptoms());
                    if ("16".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊"));
                        newConfig.setRemark(config.getRemark().replace("key1", "视频复诊"));
                    } else if ("17".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询"));
                        newConfig.setRemark(config.getRemark().replace("key1", "视频咨询"));
                    }
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                    logger.info("眼科微信消息模板推送 视频咨询接诊提醒开始");
                }
            } else if ("videoOrderRemind".equalsIgnoreCase(titelType)) {
                scene = "spwzyytx";
@ -3778,8 +3778,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_evaluate_notice", scene, 1);
                BeanUtils.copyProperties(config, newConfig);
                newConfig.setFirst(config.getFirst().replaceFirst("key1", consPatientDO.getName()));
                newConfig.setKeyword1(config.getKeyword1() + hospitalDO.getOrgName());
                newConfig.setKeyword2(config.getKeyword2() + consDoctorDO.getName());
                newConfig.setKeyword2(config.getKeyword2() + hospitalDO.getOrgName());
                newConfig.setKeyword3(config.getKeyword3() + consDoctorDO.getName());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                logger.info("眼科微信消息模板推送 服务评价提醒开始");
@ -3788,7 +3788,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            logger.info("=======setUrl========" + newConfig.getUrl());
            WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
            for (BasePatientWechatDo one : ps) {
                logger.info("发送的消息="+ com.alibaba.fastjson.JSONObject.toJSONString(newConfig));
                try {

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

@ -462,7 +462,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    public JSONArray findPatientCard(String patient)throws Exception{
        BasePatientDO patientDO = basePatientDao.findById(patient);
        if (patientDO!=null){
            JSONArray res = ykyyEntranceService.findHisCard(patientDO.getIdcard());
            JSONArray res = ykyyEntranceService.findHisCard(patientDO.getIdcard(),demoFlag);
            JSONArray rs = new JSONArray();
            if(res !=null){
                for (int i =0;i<res.size();i++){

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

@ -680,7 +680,7 @@ public class YkyyEntranceService {
            jsonObject.put("cfsb","X155245");
            jsonObject.put("cfhm","2524863258522");
            jsonObject.put("fkzt","0");
            jsonObject.put("cflx","其他");
            jsonObject.put("cflx",1100);
            jsonObject.put("kfrq","2020-06-23 15:25:58");
            jsonObject.put("scddh","SH2856545254");
            jsonObject.put("brid","25318532");
@ -1545,19 +1545,24 @@ public class YkyyEntranceService {
     * @return
     * @throws Exception
     */
    public JSONArray findHisCard(String idcard) throws Exception {
    public JSONArray findHisCard(String idcard,boolean demoFlag) throws Exception {
        String sql = "select o.pat_no as \"pat_no\",o.card_no as \"card_no\",o.card_stat as \"card_stat\",o.op_date as \"op_date\",o.card_type as \"card_type\",o.card_type_name as \"card_type_name\" from v_zksg_brcx x,V_HLW_CARDINFO o where  o.pat_no = x.mzhm and x.sfzh = '"+idcard+"'";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("idcard:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            array = rs.getJSONArray("detailModelList");
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
        }else {
            HttpResponse response = HttpUtils.doGet(url,params);
            String content = response.getContent();
            logger.info("response:"+content);
            JSONObject rs = JSON.parseObject(content);
            Integer status = rs.getInteger("status");
            if (status==200){
                array = rs.getJSONArray("detailModelList");
            }
        }
        return array;
    }

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/util/SensitiveWordInit.java

@ -1,4 +1,4 @@
package com.yihu.jw.base.util;
package com.yihu.jw.utils;
import java.io.*;
import java.util.HashMap;

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/util/SensitivewordFilter.java

@ -1,4 +1,4 @@
package com.yihu.jw.base.util;
package com.yihu.jw.utils;
import java.util.HashSet;
import java.util.Iterator;

+ 56 - 0
business/base-service/src/main/java/com/yihu/jw/wechat/service/BaseSensitiveFilterWordsService.java

@ -0,0 +1,56 @@
package com.yihu.jw.wechat.service;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.prescription.dao.BaseSensitiveDao;
import com.yihu.jw.utils.SensitivewordFilter;
import com.yihu.mysql.query.BaseJpaService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
/**
 * @author HZY
 * @vsrsion 1.0
 * Created at 2020/7/6
 */
@Service
public class BaseSensitiveFilterWordsService extends BaseJpaService<BaseSensitiveDO, BaseSensitiveDao> {
    @Autowired
    private BaseSensitiveDao baseSensitiveDao;
    @Autowired
    FileUploadService fileUploadService;
    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(BaseSensitiveFilterWordsService.class);
    /**
     * 敏感词过滤
     * @param txt
     * @return
     */
    public String filterSensitiveWords(String txt){
        List<BaseSensitiveDO> list = (List<BaseSensitiveDO>) baseSensitiveDao.findAll();
        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);
        logger.info("语句中包含敏感词的个数为:" + words.size() + "。包含:" + words);
        logger.info("过滤前="+txt);
        String replaceTxt = filter.replaceSensitiveWord(txt, 1, "*");
        logger.info("过滤后="+replaceTxt);
        return replaceTxt;
    }
}

+ 1 - 0
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -904,6 +904,7 @@ public class ImService {
	 */
	public JSONObject addTeamConsult(ConsultTeamDo ct, String patient, String doctor) throws Exception {
		JSONObject re = new JSONObject();
		boolean boo = StringUtils.isEmpty(getUnfinishedConsult(patient, doctor));
		if (!StringUtils.isEmpty(getUnfinishedConsult(patient, doctor))) {//判断是否有未结束的咨询移到同步方法中
//			re.put("status", -3);
//			return re;

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/word/BaseSensitiveWordDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.dao.word;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author HZY
 * @vsrsion 1.0
 * Created at 2020/7/6
 */
public interface BaseSensitiveWordDao extends PagingAndSortingRepository<BaseSensitiveDO, String>, JpaSpecificationExecutor<BaseSensitiveDO> {
    BaseSensitiveDO findBySensitiveWord(String sensitive);
}

+ 0 - 10
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/word/BaseSensitiveEndpoint.java

@ -168,14 +168,4 @@ public class BaseSensitiveEndpoint extends EnvelopRestEndpoint {
        return failed("导入失败");
    }
    @GetMapping(value = BaseRequestMapping.BaseSensitive.filterSensitiveWords)
    @ApiOperation(value = "导出日志")
    public MixEnvelop filterSensitiveWords (
            @ApiParam(name = "txt", value = "txt")
            @RequestParam(value = "txt", required = false) String txt
    ) throws Exception {
        return baseSensitiveService.filterSensitiveWords(txt);
    }
}

+ 0 - 5
svr/svr-base/src/main/java/com/yihu/jw/base/service/word/BaseSensitiveExcelReader.java

@ -1,17 +1,12 @@
package com.yihu.jw.base.service.word;
import com.yihu.jw.base.dao.word.BaseSensitiveDao;
import com.yihu.jw.base.endpoint.common.excel.AExcelReader;
import com.yihu.jw.base.service.doctor.excelImport.BaseDoctorExcelDO;
import com.yihu.jw.base.service.word.excelImport.BaseSensitiveExcelDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashSet;
import java.util.Iterator;
/**
 * @author HZY

+ 24 - 46
svr/svr-base/src/main/java/com/yihu/jw/base/service/word/BaseSensitiveService.java

@ -1,47 +1,25 @@
package com.yihu.jw.base.service.word;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.dao.word.BaseImportSensitiveDao;
import com.yihu.jw.base.dao.word.BaseSensitiveDao;
import com.yihu.jw.base.service.doctor.excelImport.BaseDoctorExcelDO;
import com.yihu.jw.base.dao.word.BaseSensitiveWordDao;
import com.yihu.jw.base.service.word.excelImport.BaseSensitiveExcelDO;
import com.yihu.jw.base.useragent.UserAgent;
import com.yihu.jw.base.util.SensitiveWordInit;
import com.yihu.jw.base.util.SensitivewordFilter;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.sync.BaseSyncDataDO;
import com.yihu.jw.utils.SensitivewordFilter;
import com.yihu.jw.entity.base.words.BaseImportSensitiveDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.health.house.HealthyHouseMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import jxl.Workbook;
import jxl.write.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Service;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.*;
import java.util.logging.Logger;
/**
 * @author HZY
@ -49,10 +27,10 @@ import java.util.logging.Logger;
 * Created at 2020/7/6
 */
@Service
public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSensitiveDao> {
public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSensitiveWordDao> {
    @Autowired
    private BaseSensitiveDao baseSensitiveDao;
    private BaseSensitiveWordDao baseSensitiveWordDao;
    @Autowired
@ -63,7 +41,7 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
    FileUploadService fileUploadService;
    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(BaseSensitiveService.class);
    /**
     * 创建敏感词汇
     * @param words
@ -77,7 +55,7 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
        baseSensitiveDO.setAddTime(DateUtil.getNowDate());
        baseSensitiveDO.setOperatorCode(operatorCode);
        baseSensitiveDO.setOperator(name);
        baseSensitiveDao.save(baseSensitiveDO);
        baseSensitiveWordDao.save(baseSensitiveDO);
    }
    /**
@ -87,14 +65,14 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
     * @param explanation
     */
    public void updateSensitiveWords(String id, String words, String explanation,String status,String operatorCode,String name) {
        BaseSensitiveDO baseSensitiveDO = baseSensitiveDao.findOne(id);
        BaseSensitiveDO baseSensitiveDO = baseSensitiveWordDao.findOne(id);
        baseSensitiveDO.setSensitiveWord(words);
        baseSensitiveDO.setExplanation(explanation);
        baseSensitiveDO.setUpdateTime(DateUtil.getNowDate());
        baseSensitiveDO.setOperatorCode(operatorCode);
        baseSensitiveDO.setOperator(name);
        baseSensitiveDO.setStatus(status);
        baseSensitiveDao.save(baseSensitiveDO);
        baseSensitiveWordDao.save(baseSensitiveDO);
    }
    /**
@ -105,7 +83,7 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
        String[] list = ids.split(",");
        for (String id : list) {
            if (StringUtils.isNotEmpty(id)){
                baseSensitiveDao.delete(id);
                baseSensitiveWordDao.delete(id);
            }
        }
    }
@ -119,12 +97,12 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
        String[] list = ids.split(",");
        for (String id : list) {
            if (StringUtils.isNotEmpty(id)){
                BaseSensitiveDO baseSensitiveDO = baseSensitiveDao.findOne(id);
                BaseSensitiveDO baseSensitiveDO = baseSensitiveWordDao.findOne(id);
                baseSensitiveDO.setStatus(status);
                baseSensitiveDO.setUpdateTime(DateUtil.getNowDate());
                baseSensitiveDO.setOperatorCode(operatorCode);
                baseSensitiveDO.setOperator(name);
                baseSensitiveDao.save(baseSensitiveDO);
                baseSensitiveWordDao.save(baseSensitiveDO);
            }
        }
@ -150,7 +128,7 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
            countSql.append(" AND (s.sensitive_word like'%").append(words).append("%'").append(" or ").append("s.explanation like'%").append(words).append("%')");
        }
        sql.append(" ORDER BY s.update_time desc LIMIT ").append((page-1)*pageSize).append(",").append(pageSize);
        Logger.getAnonymousLogger().info("sql="+sql.toString());
        logger.info("sql="+sql.toString());
        List<BaseSensitiveDO> list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(BaseSensitiveDO.class));
        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(countSql.toString());
        long count = (long)mapList.get(0).get("count");
@ -201,7 +179,7 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
//        UploadVO uploadVO = fileUploadService.uploadStream(in, "sentitiveLog.xls", path);
        //拼接字符串
        StringBuffer text = new StringBuffer();
            text.append("序号").append("   ").append("原因");
            text.append("序号").append("   ").append("原因").append("\r\n");
        for(BaseImportSensitiveDO one:list){
            text.append("第");
            text.append(one.getRow());
@ -246,7 +224,7 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
        rs.put("total",total);
        Date nowDate = DateUtil.getNowDate();
        for (BaseSensitiveExcelDO one : correctLs) {
            BaseSensitiveDO sensitive = baseSensitiveDao.findBySensitiveWord(one.getSensitiveWord());
            BaseSensitiveDO sensitive = baseSensitiveWordDao.findBySensitiveWord(one.getSensitiveWord());
            if (sensitive!=null){
                BaseImportSensitiveDO importSensitiveDO = new BaseImportSensitiveDO();
                importSensitiveDO.setRow(one.getId());
@ -277,18 +255,18 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
            baseSensitiveDO.setOperatorCode(operatorCode);
            baseSensitiveDO.setOperator(name);
            baseSensitiveDO.setAddTime(nowDate);
            baseSensitiveDao.save(baseSensitiveDO);
            baseSensitiveWordDao.save(baseSensitiveDO);
        }
        //
        try {
            String url = exportSensitiveWordsLog(os, operatorCode, fastdfs_file_url);
            rs.put("downloadLogUrl",url);
            Logger.getGlobal().info("downloadLogUrl="+url);
            logger.info("downloadLogUrl="+url);
        } catch (Exception e) {
            e.printStackTrace();
            rs.put("downloadLogUrl","导出日志失败");
            Logger.getGlobal().info("Logerror="+e.getMessage());
            logger.info("Logerror="+e.getMessage());
        }
        rs.put("success",total);
        return rs;
@ -300,19 +278,19 @@ public class BaseSensitiveService extends BaseJpaService<BaseSensitiveDO, BaseSe
     * @param txt
     * @return
     */
    public MixEnvelop filterSensitiveWords(String txt){
        List<BaseSensitiveDO> list = (List<BaseSensitiveDO>) baseSensitiveDao.findAll();
    public String filterSensitiveWords(String txt){
        List<BaseSensitiveDO> list = (List<BaseSensitiveDO>) baseSensitiveWordDao.findAll();
        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);
        Logger.getGlobal().info("语句中包含敏感词的个数为:" + words.size() + "。包含:" + words);
        Logger.getAnonymousLogger().info("过滤前="+txt);
        logger.info("语句中包含敏感词的个数为:" + words.size() + "。包含:" + words);
        logger.info("过滤前="+txt);
        String replaceTxt = filter.replaceSensitiveWord(txt, 1, "*");
        Logger.getGlobal().info("过滤后="+replaceTxt);
        return MixEnvelop.getSuccess("过滤成功",replaceTxt);
        logger.info("过滤后="+replaceTxt);
        return replaceTxt;
    }
}

+ 3 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -175,6 +175,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			ConsultTeamDo consult = new ConsultTeamDo();
			if(2 == type){
				consult.setType(16);//视频复诊
				if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
					prescriptionService.sendWxTemplateMsg(wxId,outpatientCode,null,"16","outpatientMsgRemind","");
				}
			}else{
				consult.setType(9);//图文复诊
			}