Browse Source

互联网安全整改

wangzhinan 1 year ago
parent
commit
7c98da2f35

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

@ -2004,7 +2004,7 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                        "       CLR_WAY = '"+(StringUtils.isNoneBlank(ylzMedicalRelationDO.getClrWay())?ylzMedicalRelationDO.getClrWay():0)+"',\n" +
                        "       CLR_WAY = '"+(StringUtils.isNoneBlank(ylzMedicalRelationDO.getClrWay())?ylzMedicalRelationDO.getClrWay():0)+"',\n" +
                        "       CLR_OPTINS = '"+(StringUtils.isNoneBlank(ylzMedicalRelationDO.getClrOptins())?ylzMedicalRelationDO.getClrOptins():0)+"',\n" +
                        "       CLR_OPTINS = '"+(StringUtils.isNoneBlank(ylzMedicalRelationDO.getClrOptins())?ylzMedicalRelationDO.getClrOptins():0)+"',\n" +
                        "       CLR_TYPE = '"+(StringUtils.isNoneBlank(ylzMedicalRelationDO.getClrType())?ylzMedicalRelationDO.getClrType():0)+"',\n" +
                        "       CLR_TYPE = '"+(StringUtils.isNoneBlank(ylzMedicalRelationDO.getClrType())?ylzMedicalRelationDO.getClrType():0)+"',\n" +
                        "       FUND_PAY_SUMAMT = '"+ylzMedicalRelationDO.getFundPrice()+"',\n" +
                        "       FUND_PAY_SUMAMT = '"+ylzMedicalRelationDO.getMedicalPrice()+"',\n" +
                        "       SETL_TIME = '"+DateUtil.dateToStrShort(ylzMedicalRelationDO.getPayDate())+"',\n" +
                        "       SETL_TIME = '"+DateUtil.dateToStrShort(ylzMedicalRelationDO.getPayDate())+"',\n" +
                        "       OUTYBSFJSON = '"+ylzMedicalRelationDO.getOutJson()+"'\n" +
                        "       OUTYBSFJSON = '"+ylzMedicalRelationDO.getOutJson()+"'\n" +
                        " where 1 = 1\n" +
                        " where 1 = 1\n" +

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

@ -10145,14 +10145,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    Map<String, Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
                    Map<String, Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
                    //处方签名
                    //处方签名
                    logger.info("处方签名");
                    logger.info("处方签名");
                    SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);
                    try {
                        SOF_SignDataWithExtraInfo(wlyyPrescriptionDO,outpatientDO);
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    //同步电子病历
                    //同步电子病历
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    if (prescriptionEmrDO != null) {
                    if (prescriptionEmrDO != null) {
                        String doctorId = doctorMappingDO.getMappingCode();
                        String doctorId = doctorMappingDO.getMappingCode();
                        String doctorName = doctorMappingDO.getDoctorName();
                        String doctorName = doctorMappingDO.getDoctorName();
                        logger.info("电子病历签名");
                        logger.info("电子病历签名");
                        SOF_SignDataWithExtraInfoEmr(prescriptionEmrDO);
                        SOF_SignDataWithExtraInfoEmr(prescriptionEmrDO,outpatientDO);
                        writeOutPatient(outpatientDO.getRegisterNo(), prescriptionEmrDO.getComplaint(), prescriptionEmrDO.getMedicalHistory(), prescriptionEmrDO.getPastHistory(), prescriptionEmrDO.getPhysicalExamination(), prescriptionEmrDO.getAssistExamination(), doctorId, doctorName);
                        writeOutPatient(outpatientDO.getRegisterNo(), prescriptionEmrDO.getComplaint(), prescriptionEmrDO.getMedicalHistory(), prescriptionEmrDO.getPastHistory(), prescriptionEmrDO.getPhysicalExamination(), prescriptionEmrDO.getAssistExamination(), doctorId, doctorName);
                    }
                    }
                    if (map.get("code").toString().equalsIgnoreCase("1")) {
                    if (map.get("code").toString().equalsIgnoreCase("1")) {
@ -10206,8 +10210,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
                            ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
                        }
                        }
                        if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                        if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                            String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientDO.getId()+"&id="+prescriptionId;
                            sendZsMsgFlow("OL_JSTX",outpatientDO.getId(),prescriptionId,msgUrl,"结算提醒");
                        /*    String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientDO.getId()+"&id="+prescriptionId;
                            sendZsMsgFlow("OL_JSTX",outpatientDO.getId(),prescriptionId,msgUrl,"结算提醒");*/
                        }
                        }
                    }else {
                    }else {
                        throw new Exception(map.get("mes").toString());
                        throw new Exception(map.get("mes").toString());
@ -11581,15 +11585,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param prescriptionDO
     * @param prescriptionDO
     * @throws Exception
     * @throws Exception
     */
     */
    public void SOF_SignDataWithExtraInfo(WlyyPrescriptionDO prescriptionDO) throws Exception {
    public void SOF_SignDataWithExtraInfo(WlyyPrescriptionDO prescriptionDO,WlyyOutpatientDO outpatientDO) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
        BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
        BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
        BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
        BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
        //WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
        PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
        PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
        URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
        URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
        PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
        PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
        List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId(), 1);
        List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId(), 1);
        List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionDO.getId(), 1);
        List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionDO.getId(), 1);
@ -11616,9 +11619,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        extInfoMap.put("deptName", "部门");
        extInfoMap.put("deptName", "部门");
        extInfoMap.put("patientName", patientDO!=null?patientDO.getName():null);
        extInfoMap.put("patientName", patientDO!=null?patientDO.getName():null);
        extInfoMap.put("patientSex", patientDO!=null?IdCardUtil.getSexForIdcard(patientDO.getIdcard()):null);
        extInfoMap.put("patientSex", patientDO!=null?IdCardUtil.getSexForIdcard(patientDO.getIdcard()):null);
        extInfoMap.put("hospitalNo", wlyyOutpatientDO!=null?wlyyOutpatientDO.getOriginAdmNo():null);
        extInfoMap.put("hospitalNumber",  wlyyOutpatientDO!=null?wlyyOutpatientDO.getOriginConNo():null);
        extInfoMap.put("diagnostic", wlyyOutpatientDO!=null?wlyyOutpatientDO.getIcd10Name():null);
        extInfoMap.put("hospitalNo", outpatientDO!=null?outpatientDO.getOriginAdmNo():null);
        extInfoMap.put("hospitalNumber",  outpatientDO!=null?outpatientDO.getOriginConNo():null);
        extInfoMap.put("diagnostic", outpatientDO!=null?outpatientDO.getIcd10Name():null);
        String extInfo = org.apache.commons.codec.binary.Base64.encodeBase64String(JSON.toJSONString(extInfoMap).getBytes("GBK"));
        String extInfo = org.apache.commons.codec.binary.Base64.encodeBase64String(JSON.toJSONString(extInfoMap).getBytes("GBK"));
        String result = service.SOF_SignDataWithExtraInfo(idCardNo, inData, extInfo);
        String result = service.SOF_SignDataWithExtraInfo(idCardNo, inData, extInfo);
        logger.info("请求返参"+result);
        logger.info("请求返参"+result);
@ -11649,12 +11652,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param prescriptionEmrDO
     * @param prescriptionEmrDO
     * @throws Exception
     * @throws Exception
     */
     */
    public void SOF_SignDataWithExtraInfoEmr(WlyyPrescriptionEmrDO prescriptionEmrDO) throws Exception {
    public void SOF_SignDataWithExtraInfoEmr(WlyyPrescriptionEmrDO prescriptionEmrDO,WlyyOutpatientDO wlyyOutpatientDO) throws Exception {
        WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionEmrDO.getPrescriptionId());
        WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionEmrDO.getPrescriptionId());
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
        BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
        BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
        BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
        BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
        PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
        PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
        URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
        URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
        PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
        PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);

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

@ -1107,7 +1107,7 @@ es:
  tHost: 192.168.120.103:6006
  tHost: 192.168.120.103:6006
  securityUser: elastic:elastic
  securityUser: elastic:elastic
  clusterName: jkzl
  clusterName: jkzl
  user: lion
  user: jkzl
  password: jkzlehr
  password: jkzlehr

+ 34 - 0
svr/svr-iot/src/main/resources/application.yml

@ -352,6 +352,40 @@ spring:
    appsecret: 915d0345-5b1d-11e6-8344-fa163e8aee62
    appsecret: 915d0345-5b1d-11e6-8344-fa163e8aee62
#hlw:
#hlw:
#  baseUrl: https://zb.xmtyw.cn/medicine/cityihealth/base
#  baseUrl: https://zb.xmtyw.cn/medicine/cityihealth/base
es:
  pwflag: 1 # 1需要密码,2不需要密码
  host: http://10.95.91.4:9200
  tHost: 10.95.91.4:9300
  clusterName: jkzl
  securityUser: zjxl:6Dbq&fHg
  user: zjxl
  password: 6Dbq&fHg
fast-dfs:
  tracker-server: 10.95.22.139:22122 #服务器地址
fastDFS:
  fastdfs_file_url: http://10.95.22.140:23000/
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
---
spring:
  profiles: hzprod
  datasource:
    url: jdbc:mysql://10.18.43.40:3306/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: '0XxS3W*!cRj'
  #  elasticsearch:
  #    cluster-name: jkzl #默认即为elasticsearch  集群名
  #    cluster-nodes: 10.90.32.3:20011,10.90.32.3:20011 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
  #    jest:
  #      uris: http://10.90.32.3:20011,http://10.90.32.3:20012
  wlyy:
    url: http://10.95.22.10:8011/wlyy/
    appid: 915d0345-5b1d-11e6-8344-fa163e8aee62
    appsecret: 915d0345-5b1d-11e6-8344-fa163e8aee62
#hlw:
#  baseUrl: https://zb.xmtyw.cn/medicine/cityihealth/base
es:
es:
  pwflag: 1 # 1需要密码,2不需要密码
  pwflag: 1 # 1需要密码,2不需要密码
  host: http://10.95.91.4:9200
  host: http://10.95.91.4:9200

+ 9 - 1
svr/svr-iot/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
spring:
  application:
  application:
    name:  svr-iot111
    name:  svr-iot
  cloud:
  cloud:
    config:
    config:
      failFast: true
      failFast: true
@ -107,6 +107,14 @@ spring:
---
---
spring:
spring:
  profiles: iotprodIn
  profiles: iotprodIn
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: hzprod
  cloud:
  cloud:
    config:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}

+ 0 - 3
svr/svr-patient/src/main/java/com/yihu/jw/patient/config/SpringSecurityAuditorAware.java

@ -2,9 +2,6 @@ package com.yihu.jw.patient.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
import org.springframework.data.domain.AuditorAware;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import java.util.Optional;
import java.util.Optional;