浏览代码

Merge remote-tracking branch 'origin/master'

XU 5 月之前
父节点
当前提交
2197f99078

+ 6 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>12.6.4</version>
+    <version>12.6.5</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>
@@ -234,6 +234,11 @@
             <artifactId>itextpdf</artifactId>
             <version>5.5.13.3</version>
         </dependency>
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+            <version>7.0.1</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 0 - 254
src/main/java/thyyxxk/webserver/dao/his/medicine/YpDictDao.java

@@ -243,260 +243,6 @@ public interface YpDictDao extends BaseMapper<YpZdDict> {
             " from yp_zd_dict where code = #{code} and serial = #{serial}")
     int insertYpBaseSync(@Param("code") String code, @Param("serial") String serial, @Param("groupNo") String groupNo);
 
-    @Update("<script> " +
-            " update yp_zd_dict " +
-            "<trim prefix=\"set\" suffixOverrides=\",\">" +
-            "<if test=\" name != null and name != '' \">" +
-            " name = #{name}, " +
-            "</if>" +
-            "<if test=\"classCode != null and classCode != '' \">" +
-            " class_code = #{classCode}, " +
-            "</if>" +
-            "<if test=\"dosage != null and dosage != '' \">" +
-            " dosage = #{dosage}, " +
-            "</if>" +
-            "<if test=\"concentration != null and concentration != '' \">" +
-            " concentration = #{concentration}, " +
-            "</if>" +
-            "<if test=\"weight != null and weight != '' \">" +
-            " weight = #{weight}, " +
-            "</if>" +
-            "<if test=\"weighUnit != null and weighUnit != '' \">" +
-            " weigh_unit = #{weighUnit}, " +
-            "</if>" +
-            "<if test=\"volum != null and volum != '' \">" +
-            " volum = #{volum}, " +
-            "</if>" +
-            "<if test=\"volUnit != null and volUnit != '' \">" +
-            " vol_unit = #{volUnit}, " +
-            "</if>" +
-            "<if test=\"miniUnit != null and miniUnit != '' \">" +
-            " mini_unit = #{miniUnit}, " +
-            "</if>" +
-            "<if test=\"packSize != null and packSize != '' \">" +
-            " pack_size = #{packSize}, " +
-            "</if>" +
-            "<if test=\"packUnit != null and packUnit != '' \">" +
-            " pack_unit = #{packUnit}, " +
-            "</if>" +
-            "<if test=\"specification != null and specification != '' \">" +
-            " specification = #{specification}, " +
-            "</if>" +
-            "<if test=\"specification2 != null and specification2 != '' \">" +
-            " specification2 = #{specification2}, " +
-            "</if>" +
-            "<if test=\"packRetprice != null and packRetprice != '' \">" +
-            " pack_retprice = #{packRetprice}, " +
-            "</if>" +
-            "<if test=\"retprice != null and retprice != '' \">" +
-            " retprice = #{retprice}, " +
-            "</if>" +
-            "<if test=\"buyPrice != null and buyPrice != '' \">" +
-            " buy_price = #{buyPrice}, " +
-            "</if>" +
-            "<if test=\"ybxjPrice != null and ybxjPrice != '' \">" +
-            " ybxj_price = #{ybxjPrice}, " +
-            "</if>" +
-            "<if test=\"percentGroupMz != null and percentGroupMz != '' \">" +
-            " percent_group_mz = #{percentGroupMz}, " +
-            "</if>" +
-            "<if test=\"percentGroupZy != null and percentGroupZy != '' \">" +
-            " percent_group_zy = #{percentGroupZy}, " +
-            "</if>" +
-            "<if test=\"selfFlag != null and selfFlag != '' \">" +
-            " self_flag = #{selfFlag}, " +
-            "</if>" +
-            "<if test=\"supriceFlag != null and supriceFlag != '' \">" +
-            " suprice_flag = #{supriceFlag}, " +
-            "</if>" +
-            "<if test=\"drugFlag != null and drugFlag != '' \">" +
-            " drug_flag = #{drugFlag}, " +
-            "</if>" +
-            "<if test=\"pyCode != null and pyCode != '' \">" +
-            " py_code = #{pyCode}, " +
-            "</if>" +
-            "<if test=\"dcode != null and dcode != '' \">" +
-            " d_code = #{dcode}, " +
-            "</if>" +
-            "<if test=\"infusionFlag != null and infusionFlag != '' \">" +
-            " infusion_flag = #{infusionFlag}, " +
-            "</if>" +
-            "<if test=\"visibleFlag != null and visibleFlag != '' \">" +
-            " visible_flag = #{visibleFlag}, " +
-            "</if>" +
-            "<if test=\"delFlag != null and delFlag != '' \">" +
-            " del_flag = #{delFlag}, " +
-            "</if>" +
-            "<if test=\"countryFlag != null and countryFlag != '' \">" +
-            " country_flag = #{countryFlag}, " +
-            "</if>" +
-            "<if test=\"manuCode != null and manuCode != '' \">" +
-            " manu_code = #{manuCode}, " +
-            "</if>" +
-            "<if test=\"coldFlag != null and coldFlag != '' \">" +
-            " cold_flag = #{coldFlag}, " +
-            "</if>" +
-            "<if test=\"chemRemark != null and chemRemark != '' \">" +
-            " chem_remark = #{chemRemark}, " +
-            "</if>" +
-            "<if test=\"drugKind != null and drugKind != '' \">" +
-            " drug_kind = #{drugKind}, " +
-            "</if>" +
-            "<if test=\"zbFlag != null and zbFlag != '' \">" +
-            " zb_flag = #{zbFlag}, " +
-            "</if>" +
-            "<if test=\"zbSupplyer != null and zbSupplyer != '' \">" +
-            " zb_supplyer = #{zbSupplyer}, " +
-            "</if>" +
-            "<if test=\"ncode != null and ncode != '' \">" +
-            " n_code = #{ncode}, " +
-            "</if>" +
-            "<if test=\"billItemMz != null and billItemMz != '' \">" +
-            " bill_item_mz = #{billItemMz}, " +
-            "</if>" +
-            "<if test=\"billItemZy != null and billItemZy != '' \">" +
-            " bill_item_zy = #{billItemZy}, " +
-            "</if>" +
-            "<if test=\"supplyType != null and supplyType != '' \">" +
-            " supply_type = #{supplyType}, " +
-            "</if>" +
-            "<if test=\"frequency != null and frequency != '' \">" +
-            " frequency = #{frequency}, " +
-            "</if>" +
-            "<if test=\"psFlag != null and psFlag != '' \">" +
-            " ps_flag = #{psFlag}, " +
-            "</if>" +
-            "<if test=\"exCode != null and exCode != '' \">" +
-            " ex_code = #{exCode}, " +
-            "</if>" +
-            "<if test=\"kssFlag != null and kssFlag != '' \">" +
-            " kss_flag = #{kssFlag}, " +
-            "</if>" +
-            "<if test=\"ypLevel != null and ypLevel != '' \">" +
-            " yp_level = #{ypLevel}, " +
-            "</if>" +
-            "<if test=\"selfFlagYb != null and selfFlagYb != '' \">" +
-            " self_flag_yb = #{selfFlagYb}, " +
-            "</if>" +
-            "<if test=\"orderDosage != null and orderDosage != '' \">" +
-            " order_dosage = #{orderDosage}, " +
-            "</if>" +
-            "<if test=\"dosageUnit != null and dosageUnit != '' \">" +
-            " dosage_unit = #{dosageUnit}, " +
-            "</if>" +
-            "<if test=\"jbFlag != null and jbFlag != '' \">" +
-            " jb_flag = #{jbFlag}, " +
-            "</if>" +
-            "<if test=\"location != null and location != '' \">" +
-            " location = #{location}, " +
-            "</if>" +
-            "<if test=\"auditCode != null and auditCode != '' \">" +
-            " audit_code = #{auditCode}, " +
-            "</if>" +
-            "<if test=\"fatherFlag != null and fatherFlag != '' \">" +
-            " father_flag = #{fatherFlag}, " +
-            "</if>" +
-            "<if test=\"ybCode2 != null and ybCode2 != '' \">" +
-            " yb_code2 = #{ybCode2}, " +
-            "</if>" +
-            "<if test=\"ybComment2 != null and ybComment2 != '' \">" +
-            " yb_comment2 = #{ybComment2}, " +
-            "</if>" +
-            "<if test=\"byjFlag != null and byjFlag != '' \">" +
-            " byj_flag = #{byjFlag}, " +
-            "</if>" +
-            "<if test=\"antitumorLevel != null and antitumorLevel != '' \">" +
-            " antitumor_level = #{antitumorLevel}, " +
-            "</if>" +
-            "<if test=\"categoriesFlag != null and categoriesFlag != '' \">" +
-            " categories_flag = #{categoriesFlag}, " +
-            "</if>" +
-            "<if test=\"purchaseCode != null and purchaseCode != '' \">" +
-            " purchase_code = #{purchaseCode}, " +
-            "</if>" +
-            "<if test=\"fzFlag != null and fzFlag != '' \">" +
-            " fz_flag = #{fzFlag}, " +
-            "</if>" +
-            "<if test=\"clFlag != null and clFlag != '' \">" +
-            " cl_flag = #{clFlag}, " +
-            "</if>" +
-            "<if test=\"jsFlag != null and jsFlag != '' \">" +
-            " js_flag = #{jsFlag}, " +
-            "</if>" +
-            "<if test=\"qjFlag != null and qjFlag != '' \">" +
-            " qj_flag = #{qjFlag}, " +
-            "</if>" +
-            "<if test=\"ymFlag != null and ymFlag != '' \">" +
-            " ym_flag = #{ymFlag}, " +
-            "</if>" +
-            "<if test=\"dpymFlag != null and dpymFlag != '' \">" +
-            " dpym_flag = #{dpymFlag}, " +
-            "</if>" +
-            "<if test=\"isCentralPurchase != null and isCentralPurchase != '' \">" +
-            " is_central_purchase = #{isCentralPurchase}, " +
-            "</if>" +
-            "<if test=\"kjywFlag != null and kjywFlag != '' \">" +
-            " kjyw_flag = #{kjywFlag}, " +
-            "</if>" +
-            "<if test=\"dddValue != null and dddValue != '' \">" +
-            " ddd_value = #{dddValue}, " +
-            "</if>" +
-            "<if test=\"dddUnit != null and dddUnit != '' \">" +
-            " ddd_unit = #{dddUnit}, " +
-            "</if>" +
-            "<if test=\"pzwh != null and pzwh != '' \">" +
-            " pzwh = #{pzwh}, " +
-            "</if>" +
-            "<if test=\"comment != null and comment != '' \">" +
-            " comment = #{comment}, " +
-            "</if>" +
-            "<if test=\"xtppName != null and xtppName != '' \">" +
-            " xtpp_name = #{xtppName}, " +
-            "</if>" +
-            "<if test=\"spName != null and spName != '' \">" +
-            " sp_name = #{spName}, " +
-            "</if>" +
-            "<if test=\"fhName != null and fhName != '' \">" +
-            " fh_name = #{fhName}, " +
-            "</if>" +
-            "<if test=\"ybFlagNew != null and ybFlagNew != '' \">" +
-            " yb_flag_new = #{ybFlagNew}, " +
-            "</if>" +
-            "<if test=\"ybBlNew != null and ybBlNew != '' \">" +
-            " yb_bl_new = #{ybBlNew}, " +
-            "</if>" +
-            "<if test=\"wgType != null and wgType != '' \">" +
-            " wg_type = #{wgType}, " +
-            "</if>" +
-            "<if test=\"ybCommentNew != null and ybCommentNew != '' \">" +
-            " yb_comment_new = #{ybCommentNew}, " +
-            "</if>" +
-            "<if test=\"wjwYpid != null and wjwYpid != '' \">" +
-            " wjw_ypid = #{wjwYpid}, " +
-            "</if>" +
-            "<if test=\"yjjYpid != null and yjjYpid != '' \">" +
-            " yjj_ypid = #{yjjYpid}, " +
-            "</if>" +
-            "<if test=\"rsbYpid != null and rsbYpid != '' \">" +
-            " rsb_ypid = #{rsbYpid}, " +
-            "</if>" +
-            "<if test=\"drugControlCode != null and drugControlCode != '' \">" +
-            " drug_control_code = #{drugControlCode}, " +
-            "</if>" +
-            "<if test=\"nationalCode != null and nationalCode != '' \">" +
-            " national_code = #{nationalCode}" +
-            "</if>" +
-            "<if test=\"operDate != null and operDate != '' \">" +
-            " oper_date = #{operDate}, " +
-            "</if>" +
-            "<if test=\"operId != null and operId != '' \">" +
-            " oper_id = #{operId}, " +
-            "</if>" +
-            "</trim>" +
-            " where code = #{code} and serial = #{serial}" +
-            "</script>")
-    int updateYpZdDictSync(YpZdDictVo ypZdDictVo);
-
     @Update({"<script>" +
             "update yp_zd_dict set" +
             "  yp_zd_dict.name =b.name, py_code =b.py_code, d_code =b.d_code, specification =b.specification2, specification2 =b.specification2, " +

+ 6 - 7
src/main/java/thyyxxk/webserver/entity/medicine/YpZdDictVo.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * @ClassName YpZdDictVo
@@ -24,9 +23,9 @@ public class YpZdDictVo {
     private String classCode; // 药性
     private String dosage; // 剂型
     private String concentration; // 浓度
-    private BigDecimal weight; // 重量
+    private Double weight; // 重量
     private String weighUnit; // 重量单位
-    private BigDecimal volum; // 体积
+    private Double volum; // 体积
     private String volUnit; // 体积单位
     private String miniUnit; // 最小单位
     private BigDecimal packSize; // 包装量
@@ -69,7 +68,7 @@ public class YpZdDictVo {
     private String kssFlag; // 抗生素标志:1 抗生素
     private String ypLevel; // 药品级别
     private String selfFlagYb; // 医保自费
-    private String orderDosage; // 常用剂量
+    private Double orderDosage; // 常用剂量
     private String dosageUnit; // 常用计量单位
     private String jbFlag; // 国家基本药物
     private String location; // 货位号
@@ -89,8 +88,8 @@ public class YpZdDictVo {
     private String dpymFlag; // 搭配溶媒:1 是
     private String isCentralPurchase; // 统一采购:1 是
     private String kjywFlag; // 抗菌药物(类型)
-    private BigDecimal dddValue; // DDD值
-    private BigDecimal dddUnit; // DDD值消耗单位
+    private Double dddValue; // DDD值
+    private Double dddUnit; // DDD值消耗单位
     private String pzwh; // 批准文号
     private String comment; // 备注
     private String xtppName; // 系统匹配名
@@ -105,7 +104,7 @@ public class YpZdDictVo {
     private String rsbYpid; // 社会保险药品编码
     private String drugControlCode; // 药管平台码
     private String nationalCode; // 国家医保编码
-    private Date operDate;
+    private String operDate;
     private String operId;
     private String tempPurchaseFlag; // 临时购药标志(1:临时购药)
     @TableField(exist = false)

+ 24 - 7
src/main/java/thyyxxk/webserver/service/medicine/YpDictService.java

@@ -1,5 +1,7 @@
 package thyyxxk.webserver.service.medicine;
 
+import cn.hutool.core.convert.Convert;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import io.micrometer.core.instrument.util.StringUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
@@ -779,7 +781,11 @@ public class YpDictService {
             if(null == ypDict){
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, code + "没有需要更新的药品账页字典信息!");
             }
-            num = dao.updateYpZdDictSync(ypZdDictVo);
+            YpZdDict zdDict = callYpVoChargeDict(ypZdDictVo);
+            UpdateWrapper<YpZdDict> updateWrapper = new UpdateWrapper<>();
+            updateWrapper.eq("code",zdDict.getCode());
+            updateWrapper.eq("serial",zdDict.getSerial());
+            num = dao.update(zdDict, updateWrapper);
             if(num == 0){
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "更新药品账页字典失败!");
             }
@@ -806,13 +812,8 @@ public class YpDictService {
             ypZdDictVo.setCode(maxCode);
             String serial = ypZdDictVo.getMiniUnit().equals(ypZdDictVo.getPackUnit()) ? "01" : "99";
             ypZdDictVo.setSerial(serial);
-            // 根据名称生成新的拼音码和五笔码
-            ypZdDictVo.setPyCode(PingYinUtils.pyShouZiMuDaXie(ypZdDictVo.getName()));
-            ypZdDictVo.setDcode(PingYinUtils.getWBCode(ypZdDictVo.getName()));
-            ypZdDictVo.setOperDate(new Date());
             ypZdDictVo.setOperId("");
-            YpZdDict copyVo = new YpZdDict();
-            BeanUtils.copyProperties(ypZdDictVo, copyVo, YpZdDict.class);
+            YpZdDict copyVo = callYpVoChargeDict(ypZdDictVo);
             copyVo.setDrugId(copyVo.getCode());
             num = dao.insert(copyVo);
             if(num == 0){
@@ -846,6 +847,22 @@ public class YpDictService {
         return ResultVoUtil.success(resultMap);
     }
 
+    private YpZdDict callYpVoChargeDict(YpZdDictVo ypZdDictVo) {
+        YpZdDict copyVo = new YpZdDict();
+        BeanUtils.copyProperties(ypZdDictVo, copyVo, YpZdDict.class);
+        copyVo.setOperDate(new Date());
+        // 根据名称生成新的拼音码和五笔码
+        copyVo.setPyCode(PingYinUtils.pyShouZiMuDaXie(ypZdDictVo.getName()));
+        copyVo.setDCode(PingYinUtils.getWBCode(ypZdDictVo.getName()));
+        copyVo.setNCode(ypZdDictVo.getNcode());
+        copyVo.setPackSize(Convert.toDouble(ypZdDictVo.getPackSize()));
+        copyVo.setPackRetprice(Convert.toDouble(ypZdDictVo.getPackRetprice()));
+        copyVo.setRetprice(Convert.toDouble(ypZdDictVo.getRetprice()));
+        copyVo.setBuyPrice(Convert.toDouble(ypZdDictVo.getBuyPrice()));
+        copyVo.setYbxjPrice(Convert.toDouble(ypZdDictVo.getBuyPrice()));
+        return copyVo;
+    }
+
     private YpPrintName callYpPrintName(YpZdDictVo ypZdDictVo, String ypFlag) {
         YpPrintName name = new YpPrintName();
         name.setChargeCode(ypZdDictVo.getCode());

+ 2 - 0
src/main/resources/application-dev.yml

@@ -8,6 +8,8 @@ server:
     accept-count: 200
     max-connections: 10000
 spring:
+  application:
+    name: web-server-dev
   thymeleaf:
     cache: false
   datasource:

+ 2 - 0
src/main/resources/application-prod.yml

@@ -8,6 +8,8 @@ server:
     accept-count: 200
     max-connections: 10000
 spring:
+  application:
+    name: web-server
   thymeleaf:
     cache: false
   datasource:

+ 159 - 0
src/main/resources/application-prod2.yml

@@ -0,0 +1,159 @@
+server:
+  port: 9706
+  tomcat:
+    uri-encoding: utf-8
+    threads:
+      min-spare: 20
+      max: 800
+    accept-count: 200
+    max-connections: 10000
+spring:
+  thymeleaf:
+    cache: false
+  datasource:
+    dynamic:
+      primary: his
+      strict: false
+      datasource:
+        his:
+          url: "jdbc:sqlserver://172.16.32.168:1433;databaseName=thxyhisdb"
+          username: "sa"
+          password:
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        lis:
+          url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
+          username: "sa"
+          password: "hnthxyyy"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        adicon:
+          url: "jdbc:sqlserver://172.16.32.100:1433;databaseName=CYYFCheckUPV5_HNTHYY"
+          username: "sa"
+          password: "*ThyyHis2018#"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+    druid:
+      #type: com.alibaba.druid.pool.DruidDataSource
+      #初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
+      initial-size: 40
+      #最大连接池数量
+      max-active: 100
+      #最小连接池数量
+      min-idle: 40
+      #获取连接时最大等待时间,单位毫秒
+      max-wait: 60000
+      #使用非公平锁。
+      use-unfair-lock: true
+      #用来检测连接是否有效的sql,要求是一个查询语句。
+      validation-query: SELECT 1
+      #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      test-while-idle: true
+      #申请连接时执行validationQuery检测连接是否有效,
+      test-on-borrow: true
+      #归还连接时执行validationQuery检测连接是否有效,
+      test-on-return: false
+      #Destroy线程会检测连接的间隔时间,testWhileIdle的判断依据,详细看testWhileIdle属性的说明
+      time-between-eviction-runs-millis: 60000
+      #配置一个连接在池中最小生存的时间,单位是毫秒
+      min-evictable-idle-time-millis: 300000
+      #监控统计用的filter:stat  日志用的filter:log4j    防御sql注入的filter:wall
+      filters: stat
+      #是否缓存preparedStatement,也就是PSCache,在mysql5.5以下的版本中没有PSCache功能,建议关闭掉
+      pool-prepared-statements: false
+      #要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。
+      max-pool-prepared-statement-per-connection-size: 200
+      #对于长时间不使用的连接强制关闭
+      remove-abandoned: true
+      #数据库链接超过180秒开始关闭空闲连接 秒为单位
+      remove-abandoned-timeout: 180
+      #将当前关闭动作记录到日志  此配置项会影响性能,只在排查的时候打开,系统运行时最好关闭。
+      log-abandoned: true
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 去除druid配置
+  jackson:
+    time-zone: Asia/Shanghai
+    date-format: yyyy-MM-dd HH:mm:ss
+  mvc:
+    format:
+      date: yyyy-MM-dd
+      date-time: yyyy-MM-dd HH:mm:ss
+  redis:
+    host: 172.16.32.167
+    port: 6379
+    database: 0
+    password: thyy@2018
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+logging:
+  level:
+    thyyxxk.webserver.dao: info
+forest:
+  timeout: 0
+  read-timeout: 0
+  log-enabled: true
+  log-request: true
+  log-response-status: true
+  connect-timeout: 1500
+  variables:
+    socketCenter: http://172.16.32.160:8707/socketApi
+    emrUrl: "http://172.16.32.125:8001/emr/runtime/api/v1"
+
+management:
+  server:
+    port: 9092
+  endpoints:
+    web:
+      base-path: /actuator
+      exposure:
+        include: '*'
+  metrics:
+    export:
+      simple:
+        enabled: true
+      jmx:
+        enabled: true
+      prometheus:
+        enabled: true
+    distribution:
+      percentiles-histogram:
+        http:
+          server:
+            requests: false
+      minimum-expected-value:
+        http:
+          server:
+            requests: 20ms
+      maximum-expected-value:
+        http:
+          server:
+            requests: 200ms
+  endpoint:
+    metrics:
+      enabled: true
+    health:
+      show-details: always
+      probes:
+        enabled: true
+    prometheus:
+      enabled: true
+
+execute-scheduled: true
+is-prod: true
+
+si-api-url: http://webhis.thyy.cn:8077/ybjkdz
+si-access-key: 04eMGRg7beAO6vqwrZiLacV8Uy3jNn7QGDUcBO
+si-secret-key: SK3Oip3a2R3NLz2xm58Mpmi69oFu96KrdKNRKglN
+si-zy-fee-url: http://172.16.32.166:1000
+si-mz-fee-url: http://172.16.32.166:1100/mzFee
+si-injury-fee-url: http://172.16.32.163:2100/siInjury
+si-injury-systm-url: http://172.16.32.163:2000/siInjury
+thmz-api-url: http://172.16.32.160:81/thmz
+rmHkUserApi: http://172.16.32.167:20923/thyy/api/haikang/door/destructionUser
+
+thyy:
+  archive:
+    path: "/mnt/archive"
+    archive-url: http://172.16.32.167:20921/thyy/api/archive
+  other:
+    mobile-address: "https://emr.hnthyy.cn:8080"
+    mobile-agentid: 1000050
+    socket-v2-url: "http://172.16.32.160:20922/thyy/api/socket"

+ 2 - 0
src/main/resources/application-show.yml

@@ -11,6 +11,8 @@ server:
     encoding:
       charset: utf-8
 spring:
+  application:
+    name: web-server-show
   thymeleaf:
     cache: false
   datasource:

+ 13 - 128
src/main/resources/logback-spring.xml

@@ -1,132 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
-
-    <springProperty scope="context" name="LOG_HOME" source="logging.path"
-                    defaultValue="serverlog"/>
-
-    <!-- 日志级别 -->
-    <springProperty scope="context" name="LOG_ROOT_LEVEL" source="logging.level.root" defaultValue="INFO"/>
-
-    <!--  标识这个"STDOUT" 将会添加到这个logger -->
-    <springProperty scope="context" name="STDOUT" source="log.stdout" defaultValue="STDOUT"/>
-
-    <!-- 日志文件名称-->
-    <property name="LOG_PREFIX" value="spring-boot-logback"/>
-
-    <!-- 日志文件编码-->
-    <property name="LOG_CHARSET" value="UTF-8"/>
-
-    <!-- 日志文件路径+日期-->
-    <property name="LOG_DIR" value="${LOG_HOME}/%d{yyyy-MM-dd}"/>
-
-    <!--对日志进行格式化-->
-    <property name="LOG_MSG" value="- [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%level] [%thread] [%logger{16}] --> %msg%n "/>
-
-    <!--文件大小,默认10MB-->
-    <property name="MAX_FILE_SIZE" value="30MB"/>
-
-    <!-- 配置日志的滚动时间 ,value表示保留日志的天数,0表示永久保存 -->
-    <property name="MAX_HISTORY" value="0"/>
-
-
-    <!-- 彩色日志 -->
-    <!-- 彩色日志依赖的渲染类 -->
-    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
-    <conversionRule conversionWord="wex"
-                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
-    <conversionRule conversionWord="wEx"
-                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
-    <!-- 彩色日志格式 -->
-    <property name="CONSOLE_LOG_PATTERN"
-              value="-[%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){blue}] [%clr(%level)] [%clr(%thread)] [%clr(%logger{16}){cyan}] %clr(-->){red} %clr(%msg%n){yellow}"/>
-
-    <!--输出到控制台-->
-    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-        <!-- 输出的日志内容格式化-->
-        <layout class="ch.qos.logback.classic.PatternLayout">
-            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
-        </layout>
-    </appender>
-
-    <!--输出到文件-->
-    <appender name="0" class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <include resource="org/springframework/boot/logging/logback/base.xml" />
+    <springProperty scope="context" name="serviceName" source="spring.application.name" defaultValue="web-server"/>
+    <appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>172.16.32.134:5044</destination>
+
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"service":"${serviceName}"}</customFields>
+            <includeContext>false</includeContext>
+        </encoder>
     </appender>
-
-    <!-- 定义 ALL 日志的输出方式:-->
-    <appender name="FILE_ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <!--日志文件路径,日志文件名称-->
-        <File>${LOG_HOME}/all_${LOG_PREFIX}.log</File>
-
-        <!-- 设置滚动策略,当天的日志大小超过 ${MAX_FILE_SIZE} 文件大小时候,新的内容写入新的文件, 默认10MB -->
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-
-            <!--日志文件路径,新的 ALL 日志文件名称,“ i ” 是个变量 -->
-            <FileNamePattern>${LOG_DIR}/all_${LOG_PREFIX}%i.log</FileNamePattern>
-
-            <!-- 配置日志的滚动时间 ,表示只保留最近 10 天的日志-->
-            <MaxHistory>${MAX_HISTORY}</MaxHistory>
-
-            <!--当天的日志大小超过 ${MAX_FILE_SIZE} 文件大小时候,新的内容写入新的文件, 默认10MB-->
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-
-        </rollingPolicy>
-
-        <!-- 输出的日志内容格式化-->
-        <layout class="ch.qos.logback.classic.PatternLayout">
-            <pattern>${LOG_MSG}</pattern>
-        </layout>
-    </appender>
-
-    <!-- 定义 ERROR 日志的输出方式:-->
-    <appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <!-- 下面为配置只输出error级别的日志 -->
-        <filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <level>ERROR</level>
-            <OnMismatch>DENY</OnMismatch>
-            <OnMatch>ACCEPT</OnMatch>
-        </filter>
-        <!--日志文件路径,日志文件名称-->
-        <File>${LOG_HOME}/err_${LOG_PREFIX}.log</File>
-
-        <!-- 设置滚动策略,当天的日志大小超过 ${MAX_FILE_SIZE} 文件大小时候,新的内容写入新的文件, 默认10MB -->
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-
-            <!--日志文件路径,新的 ERR 日志文件名称,“ i ” 是个变量 -->
-            <FileNamePattern>${LOG_DIR}/err_${LOG_PREFIX}%i.log</FileNamePattern>
-
-            <!-- 配置日志的滚动时间 ,表示只保留最近 10 天的日志-->
-            <MaxHistory>${MAX_HISTORY}</MaxHistory>
-
-            <!--当天的日志大小超过 ${MAX_FILE_SIZE} 文件大小时候,新的内容写入新的文件, 默认10MB-->
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-        </rollingPolicy>
-
-        <!-- 输出的日志内容格式化-->
-        <layout class="ch.qos.logback.classic.PatternLayout">
-            <Pattern>${LOG_MSG}</Pattern>
-        </layout>
-    </appender>
-
-    <!-- additivity 设为false,则logger内容不附加至root ,配置以配置包下的所有类的日志的打印,级别是 ERROR-->
-
-    <logger name="org.springframework" level="ERROR"/>
-    <logger name="org.apache.commons" level="ERROR"/>
-    <!--    <logger name="th.itcenter.apps.controller.logger.LoggingController" level="WARN"/>-->
-    <!-- ${LOG_ROOT_LEVEL} 日志级别 -->
-    <root level="${LOG_ROOT_LEVEL}">
-
-        <!-- 标识这个"${STDOUT}"将会添加到这个logger -->
-        <appender-ref ref="${STDOUT}"/>
-
-        <!-- FILE_ALL 日志输出添加到 logger -->
-        <appender-ref ref="FILE_ALL"/>
-
-        <!-- FILE_ERROR 日志输出添加到 logger -->
-        <appender-ref ref="FILE_ERROR"/>
+    <root level="INFO">
+        <!-- 配置哪个级别使用该appender -->
+        <appender-ref ref="LOGSTASH" />
     </root>
-
-</configuration>
+</configuration>