Browse Source

Merge branch 'develop' into innerDevelop

# Conflicts:
#	pom.xml
gaodm 5 years ago
parent
commit
b3b1d13070
100 changed files with 1579 additions and 904 deletions
  1. 1 1
      admin-service/pom.xml
  2. 2 0
      admin-service/src/main/java/com/diagbot/AdminServiceApplication.java
  3. 4 4
      aipt-service/pom.xml
  4. 2 0
      aipt-service/src/main/java/com/diagbot/AiptServiceApplication.java
  5. 15 0
      aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java
  6. 41 76
      aipt-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  7. 4 0
      aipt-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  8. 48 0
      aipt-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java
  9. 6 0
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java
  10. 1 1
      icss-service/src/main/java/com/diagbot/entity/DictionaryInfo.java
  11. 0 196
      aipt-service/src/main/java/com/diagbot/entity/SysLog.java
  12. 2 1
      data-service/src/main/java/com/diagbot/enums/StaticSearchTypeEnum.java
  13. 27 9
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  14. 37 0
      aipt-service/src/main/java/com/diagbot/facade/DictionaryFacade.java
  15. 0 0
      aipt-service/src/main/java/com/diagbot/mapper/DictionaryInfoMapper.java
  16. 1 1
      aipt-service/src/main/java/com/diagbot/rabbit/MySender.java
  17. 0 0
      aipt-service/src/main/java/com/diagbot/service/DictionaryInfoService.java
  18. 0 0
      aipt-service/src/main/java/com/diagbot/service/impl/DictionaryInfoServiceImpl.java
  19. 2 1
      aipt-service/src/main/java/com/diagbot/vo/GetStaticKnowledgeVO.java
  20. 2 1
      aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java
  21. 44 0
      aipt-service/src/main/java/com/diagbot/web/DictionaryInfoController.java
  22. 2 2
      aipt-service/src/main/java/com/diagbot/web/PushController.java
  23. 181 6
      aipt-service/src/main/resources/mapper/ConceptMapper.xml
  24. 0 0
      aipt-service/src/main/resources/mapper/DictionaryInfoMapper.xml
  25. 4 4
      bi-service/pom.xml
  26. 2 0
      bi-service/src/main/java/com/diagbot/BiServiceApplication.java
  27. 6 41
      bi-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  28. 4 0
      bi-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  29. 1 1
      bi-service/src/main/java/com/diagbot/rabbit/MySender.java
  30. 14 8
      common/pom.xml
  31. 19 0
      common/src/main/java/com/diagbot/annotation/BiLogger.java
  32. 19 0
      common/src/main/java/com/diagbot/annotation/BiLoggerResult.java
  33. 101 0
      common/src/main/java/com/diagbot/biz/log/entity/BiRecord.java
  34. 82 0
      common/src/main/java/com/diagbot/biz/log/entity/SysLog.java
  35. 49 0
      common/src/main/java/com/diagbot/enums/BiSourceEnum.java
  36. 2 1
      common/src/main/java/com/diagbot/enums/ProductTypeEnum.java
  37. 330 0
      common/src/main/java/com/diagbot/util/AopUtil.java
  38. 24 0
      common/src/main/java/com/diagbot/vo/BaseBiVO.java
  39. 2 0
      config-server/src/main/java/com/diagbot/ConfigServerApplication.java
  40. 7 1
      config-server/src/main/resources/shared/application-dev.yml
  41. 7 1
      config-server/src/main/resources/shared/application-local.yml
  42. 7 1
      config-server/src/main/resources/shared/application-pre.yml
  43. 7 1
      config-server/src/main/resources/shared/application-pro.yml
  44. 7 1
      config-server/src/main/resources/shared/application-test.yml
  45. 2 0
      config-server/src/main/resources/shared/data-service-dev.yml
  46. 2 0
      config-server/src/main/resources/shared/data-service-local.yml
  47. 2 0
      config-server/src/main/resources/shared/data-service-pre.yml
  48. 2 0
      config-server/src/main/resources/shared/data-service-pro.yml
  49. 2 1
      config-server/src/main/resources/shared/data-service-test.yml
  50. 2 0
      config-server/src/main/resources/shared/icss-service-dev.yml
  51. 2 0
      config-server/src/main/resources/shared/icss-service-local.yml
  52. 2 0
      config-server/src/main/resources/shared/icss-service-pre.yml
  53. 2 0
      config-server/src/main/resources/shared/icss-service-pro.yml
  54. 2 0
      config-server/src/main/resources/shared/icss-service-test.yml
  55. 5 0
      config-server/src/main/resources/shared/logger-service-dev.yml
  56. 5 0
      config-server/src/main/resources/shared/logger-service-local.yml
  57. 5 0
      config-server/src/main/resources/shared/logger-service-pre.yml
  58. 5 0
      config-server/src/main/resources/shared/logger-service-pro.yml
  59. 5 0
      config-server/src/main/resources/shared/logger-service-test.yml
  60. 2 0
      config-server/src/main/resources/shared/ltapi-service-dev.yml
  61. 2 0
      config-server/src/main/resources/shared/ltapi-service-local.yml
  62. 2 0
      config-server/src/main/resources/shared/ltapi-service-pre.yml
  63. 2 0
      config-server/src/main/resources/shared/ltapi-service-pro.yml
  64. 2 0
      config-server/src/main/resources/shared/ltapi-service-test.yml
  65. 2 0
      config-server/src/main/resources/shared/prec-service-dev.yml
  66. 2 0
      config-server/src/main/resources/shared/prec-service-local.yml
  67. 2 0
      config-server/src/main/resources/shared/prec-service-pre.yml
  68. 2 0
      config-server/src/main/resources/shared/prec-service-pro.yml
  69. 2 0
      config-server/src/main/resources/shared/prec-service-test.yml
  70. 2 0
      config-server/src/main/resources/shared/triage-service-dev.yml
  71. 2 0
      config-server/src/main/resources/shared/triage-service-local.yml
  72. 2 0
      config-server/src/main/resources/shared/triage-service-pre.yml
  73. 2 0
      config-server/src/main/resources/shared/triage-service-pro.yml
  74. 2 0
      config-server/src/main/resources/shared/triage-service-test.yml
  75. 4 4
      data-service/pom.xml
  76. 2 0
      data-service/src/main/java/com/diagbot/DataServiceApplication.java
  77. 55 0
      data-service/src/main/java/com/diagbot/aop/BiLoggerAspect.java
  78. 55 0
      data-service/src/main/java/com/diagbot/aop/BiLoggerResultAspect.java
  79. 6 41
      data-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  80. 9 0
      data-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  81. 12 0
      data-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  82. 48 0
      data-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java
  83. 0 192
      data-service/src/main/java/com/diagbot/entity/SysLog.java
  84. 34 0
      data-service/src/main/java/com/diagbot/facade/DictionaryFacade.java
  85. 1 19
      data-service/src/main/java/com/diagbot/facade/SearchFacade.java
  86. 9 0
      data-service/src/main/java/com/diagbot/rabbit/MyProcessor.java
  87. 10 1
      data-service/src/main/java/com/diagbot/rabbit/MySender.java
  88. 43 0
      data-service/src/main/java/com/diagbot/web/DictionaryInfoController.java
  89. 2 2
      data-service/src/main/java/com/diagbot/web/PushController.java
  90. 1 1
      data-service/src/main/java/com/diagbot/web/SearchController.java
  91. 4 4
      diagbotman-service/pom.xml
  92. 2 0
      diagbotman-service/src/main/java/com/diagbot/DiagbotmanServiceApplication.java
  93. 6 41
      diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  94. 4 42
      diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerExprotAspect.java
  95. 4 0
      diagbotman-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  96. 0 196
      diagbotman-service/src/main/java/com/diagbot/entity/SysLog.java
  97. 1 1
      diagbotman-service/src/main/java/com/diagbot/rabbit/MySender.java
  98. 61 0
      docs/024.20191203BI日志框架新增表/init_log.sql
  99. 15 0
      docs/025.20191203静态知识检索的修改/init_static.sql
  100. 0 0
      docs/025.20191203静态知识检索的修改/tran_sys_set-Del.sql

+ 1 - 1
admin-service/pom.xml

@@ -49,7 +49,7 @@
         <dependency>
             <groupId>de.codecentric</groupId>
             <artifactId>spring-boot-admin-starter-server</artifactId>
-            <version>2.1.6</version>
+            <version>2.2.0</version>
         </dependency>
 
         <dependency>

+ 2 - 0
admin-service/src/main/java/com/diagbot/AdminServiceApplication.java

@@ -5,6 +5,7 @@ import de.codecentric.boot.admin.server.config.AdminServerProperties;
 import de.codecentric.boot.admin.server.config.EnableAdminServer;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.hystrix.EnableHystrix;
 import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
@@ -27,6 +28,7 @@ import org.springframework.security.web.authentication.SavedRequestAwareAuthenti
 @EnableAdminServer
 @Configuration
 @RefreshScope
+@ConfigurationPropertiesScan
 public class AdminServiceApplication {
 
     public static void main(String[] args) {

+ 4 - 4
aipt-service/pom.xml

@@ -75,10 +75,10 @@
         </dependency>
 
         <!-- zipkin-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zipkin</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
 
         <!--swagger-->
         <dependency>

+ 2 - 0
aipt-service/src/main/java/com/diagbot/AiptServiceApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -26,6 +27,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCircuitBreaker
 @RefreshScope
+@ConfigurationPropertiesScan
 public class AiptServiceApplication {
 
     public static void main(String[] args) {

+ 15 - 0
aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java

@@ -1,7 +1,9 @@
 package com.diagbot.aggregate;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.TranServiceClient;
+import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.FeatureRate;
 import com.diagbot.client.bean.HosCodeVO;
 import com.diagbot.client.bean.MedicalIndication;
@@ -14,6 +16,7 @@ import com.diagbot.entity.Concept;
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.FeatureTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.facade.ClinicalFacade;
 import com.diagbot.facade.ConceptFacade;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.FastJsonUtils;
@@ -49,6 +52,8 @@ public class PushItemAggregate {
     private ConceptFacade conceptFacade;
     @Autowired
     private TranServiceClient tranServiceClient;
+    @Autowired
+    private ClinicalFacade clinicalFacade;
 
     @DataProvider("setAll")
     public PushDTO setAll(
@@ -317,6 +322,16 @@ public class PushItemAggregate {
                                     }
                                     detail.setContent(scaleJson);
                                 }
+                            } else if (detail.getType().equals(2)) {
+                                JSONObject calcJson = detail.getContent();
+                                CalculateData calcData = new CalculateData();
+                                calcData.setData(JSON.parseObject(FastJsonUtils.getBeanToJson(detail)));
+                                calcData.setType(2);
+                                Map<String, Object> resultMap = clinicalFacade.scaleCalc(calcData);
+                                if (resultMap.containsKey("result") && calcJson != null) {
+                                    calcJson.put("result", resultMap.get("result"));
+                                    detail.setContent(calcJson);
+                                }
                             }
                         }
                     }

+ 41 - 76
aipt-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,76 +1,41 @@
-//package com.diagbot.aop;
-//
-//import com.diagbot.annotation.SysLogger;
-//import com.diagbot.entity.SysLog;
-//import com.diagbot.enums.SysTypeEnum;
-//import com.diagbot.rabbit.MySender;
-//import com.diagbot.util.GsonUtil;
-//import com.diagbot.util.HttpUtils;
-//import com.diagbot.util.StringUtil;
-//import com.diagbot.util.UserUtils;
-//import org.aspectj.lang.JoinPoint;
-//import org.aspectj.lang.annotation.Aspect;
-//import org.aspectj.lang.annotation.Before;
-//import org.aspectj.lang.annotation.Pointcut;
-//import org.aspectj.lang.reflect.MethodSignature;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Component;
-//
-//import java.lang.reflect.Method;
-//import java.util.Date;
-//
-///**
-// * @Description: 日志拦截切面
-// * @author: gaodm
-// * @time: 2018/8/2 13:36
-// */
-//@Aspect
-//@Component
-//public class SysLoggerAspect {
-//    @Autowired
-//    private MySender mySender;
-//
-//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
-//    public void loggerPointCut() {
-//
-//    }
-//
-//    @Before("loggerPointCut()")
-//    public void saveSysLog(JoinPoint joinPoint) {
-//        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-//        Method method = signature.getMethod();
-//
-//        SysLog sysLog = new SysLog();
-//        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-//        if (sysLogger != null) {
-//            //注解上的描述
-//            sysLog.setOperation(sysLogger.value());
-//        }
-//        //请求的方法名
-//        String className = joinPoint.getTarget().getClass().getName();
-//        String methodName = signature.getName();
-//        sysLog.setMethod(className + "." + methodName + "()");
-//        //请求的参数
-//        Object[] args = joinPoint.getArgs();
-//        String params = "";
-//        for (Object o : args) {
-//            params += GsonUtil.toJson(o);
-//        }
-//        if (!StringUtil.isEmpty(params)) {
-//            sysLog.setParams(params);
-//        }
-//        //设置IP地址
-//        sysLog.setIp(HttpUtils.getIpAddress());
-//        //用户名
-//        String username = UserUtils.getCurrentPrinciple();
-//        if (!StringUtil.isEmpty(username)) {
-//            sysLog.setUsername(username);
-//        }
-//        sysLog.setGmtCreate(new Date());
-//        sysLog.setSysType(SysTypeEnum.AIPT_SERVICE.getKey());
-//        //保存系统日志
-//        mySender.outputLogSend(sysLog);
-//    }
-//
-//}
-//
+package com.diagbot.aop;
+
+import com.diagbot.biz.log.entity.SysLog;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.AopUtil;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 日志拦截切面
+ * @author: gaodm
+ * @time: 2018/8/2 13:36
+ */
+@Aspect
+@Component
+@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
+public class SysLoggerAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+    public void loggerPointCut() {
+
+    }
+
+    @Before("loggerPointCut()")
+    public void saveSysLog(JoinPoint joinPoint) {
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.AIPT_SERVICE.getKey());
+        //保存系统日志
+        mySender.outputLogSend(sysLog);
+    }
+
+}
+

+ 4 - 0
aipt-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -23,6 +23,10 @@ public class MybatisPlusConfigurer {
     @Bean
     public PaginationInterceptor paginationInterceptor() {
         PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(500L);
         return paginationInterceptor;
     }
 

+ 48 - 0
aipt-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java

@@ -0,0 +1,48 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * icss字典表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@Getter
+@Setter
+public class DictionaryInfoDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分组(值自定义)
+     */
+    private Long groupType;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 值
+     */
+    private String val;
+
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 6 - 0
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -121,6 +121,12 @@ public class GetTopPatientInfoDTO {
 	@ApiModelProperty(value="病人证件号码")
     private String patientIdNo;
 
+	/**
+	 * 患者身份证号
+	 */
+	@ApiModelProperty(value = "患者身份证号")
+	private String patientIdentityNum;
+
 	/**
 	 * 系统时间
 	 */

+ 1 - 1
icss-service/src/main/java/com/diagbot/entity/DictionaryInfo.java

@@ -17,7 +17,7 @@ import java.util.Date;
  * @author zhoutg
  * @since 2018-12-25
  */
-@TableName("icss_dictionary_info")
+@TableName("kl_dictionary_info")
 @Getter
 @Setter
 public class DictionaryInfo implements Serializable {

+ 0 - 196
aipt-service/src/main/java/com/diagbot/entity/SysLog.java

@@ -1,196 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统操作日志表
- * </p>
- *
- * @author gaodm
- * @since 2018-09-14
- */
-public class SysLog implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 日志ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 访问者的IP
-     */
-    private String ip;
-
-    /**
-     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
-     */
-    private Integer sysType;
-
-    /**
-     * 方法
-     */
-    private String method;
-
-    /**
-     * 操作名
-     */
-    private String operation;
-
-    /**
-     * 参数
-     */
-    private String params;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public Integer getSysType() {
-        return sysType;
-    }
-
-    public void setSysType(Integer sysType) {
-        this.sysType = sysType;
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getParams() {
-        return params;
-    }
-
-    public void setParams(String params) {
-        this.params = params;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "SysLog{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", ip=" + ip +
-                ", sysType=" + sysType +
-                ", method=" + method +
-                ", operation=" + operation +
-                ", params=" + params +
-                ", username=" + username +
-                "}";
-    }
-}

+ 2 - 1
data-service/src/main/java/com/diagbot/enums/StaticSearchTypeEnum.java

@@ -14,7 +14,8 @@ public enum StaticSearchTypeEnum implements KeyedNamed {
     LIS_PACKAGE(12, "化验"),
     PACS_ITEMS(16, "辅检"),
     DIAGNOSIS(18, "诊断"),
-    OPERATION(25, "手术");
+    OPERATION(25, "手术"),
+    GAUGE(48, "量表");
 
     @Setter
     private int key;

+ 27 - 9
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -11,6 +11,7 @@ import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.LexiconRSTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.enums.StaticSearchTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.ConceptServiceImpl;
@@ -365,18 +366,35 @@ public class ConceptFacade extends ConceptServiceImpl {
         RetrievalVO retrievalVO = new RetrievalVO();
         BeanUtil.copyProperties(getStaticKnowledgeVO, retrievalVO);
         List<Integer> types = retrievalVO.getTypes();
+        if (ListUtil.isEmpty(types)) {
+            // 添加词库搜索类型
+            types.add(StaticSearchTypeEnum.DIAGNOSIS.getKey());
+            types.add(StaticSearchTypeEnum.DRUGS.getKey());
+            types.add(StaticSearchTypeEnum.SYMPTOM.getKey());
+            types.add(StaticSearchTypeEnum.LIS_PACKAGE.getKey());
+            types.add(StaticSearchTypeEnum.PACS_ITEMS.getKey());
+            types.add(StaticSearchTypeEnum.OPERATION.getKey());
+            types.add(StaticSearchTypeEnum.GAUGE.getKey());
+            getStaticKnowledgeVO.setTypes(types);
+        }
+        List<Integer> typesIn = new ArrayList<>();
+        // 是否包含化验
         if (types.contains(LexiconTypeEnum.LIS_PACKAGE.getKey())) {
-            retrievalVO.setHasLis(true);
-            List<Integer> typesNoLis = new ArrayList<>();
-            for (Integer type : types) {
-                if (LexiconTypeEnum.LIS_PACKAGE.getKey() != type.intValue()) {
-                    typesNoLis.add(type);
-                }
+            retrievalVO.setHasLis(true); //
+        }
+        // 是否包含量表
+        if (types.contains(LexiconTypeEnum.GAUGE.getKey())) {
+            retrievalVO.setHasGauge(true); // 包含量表
+        }
+        for (Integer type : types) {
+            // 化验和量表单独处理,不需要遍历
+            if (LexiconTypeEnum.LIS_PACKAGE.getKey() != type.intValue()
+                    && LexiconTypeEnum.GAUGE.getKey() != type.intValue()) {
+                typesIn.add(type);
             }
-            retrievalVO.setTypesNoLis(typesNoLis);
-        } else {
-            retrievalVO.setTypesNoLis(types);
         }
+        retrievalVO.setTypesIn(typesIn);
+
         List<RetrievalDTO> staticRetrievalList = this.staticKnowledge(retrievalVO);
         for (RetrievalDTO retrievalDTO : staticRetrievalList) {
             retrievalDTO.setType(ParamConvertUtil.libConvert2Concept(retrievalDTO.getLibTypeId().intValue()));

+ 37 - 0
aipt-service/src/main/java/com/diagbot/facade/DictionaryFacade.java

@@ -0,0 +1,37 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.entity.DictionaryInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.DictionaryInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class DictionaryFacade extends DictionaryInfoServiceImpl {
+
+    /**
+     * 返回字典信息
+     *
+     * @return
+     */
+    public Map<Long, List<DictionaryInfoDTO>> getList() {
+        List<DictionaryInfo> list = this.list(new QueryWrapper<DictionaryInfo>()
+                .in("return_type", ListUtil.arrayToList(new Long[] { 0L, 2L }))
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByAsc("group_type", "order_no"));
+        List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
+        return EntityUtil.makeEntityListMap(listRes, "groupType");
+    }
+}

icss-service/src/main/java/com/diagbot/mapper/DictionaryInfoMapper.java → aipt-service/src/main/java/com/diagbot/mapper/DictionaryInfoMapper.java


+ 1 - 1
aipt-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -1,6 +1,6 @@
 package com.diagbot.rabbit;
 
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.util.GsonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;

icss-service/src/main/java/com/diagbot/service/DictionaryInfoService.java → aipt-service/src/main/java/com/diagbot/service/DictionaryInfoService.java


icss-service/src/main/java/com/diagbot/service/impl/DictionaryInfoServiceImpl.java → aipt-service/src/main/java/com/diagbot/service/impl/DictionaryInfoServiceImpl.java


+ 2 - 1
aipt-service/src/main/java/com/diagbot/vo/GetStaticKnowledgeVO.java

@@ -4,6 +4,7 @@ import lombok.Getter;
 import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -20,5 +21,5 @@ public class GetStaticKnowledgeVO {
     //需要去重的id
     private List<Long> inputIds;
     //指定类型
-    private List<Integer> types;
+    private List<Integer> types = new ArrayList<>();
 }

+ 2 - 1
aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -31,5 +31,6 @@ public class RetrievalVO {
     private Integer isSonShow = 0;
     private List<Integer> types; // 指定类型
     private boolean hasLis = false; // 是否搜索化验
-    private List<Integer> typesNoLis; // 除去化验外的类型
+    private boolean hasGauge = false; // 是否有量表
+    private List<Integer> typesIn; // 共用需要遍历的类型
 }

+ 44 - 0
aipt-service/src/main/java/com/diagbot/web/DictionaryInfoController.java

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DictionaryInfo;
+import com.diagbot.facade.DictionaryFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * icss字典表 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@RequestMapping("/dictionaryInfo")
+@RestController
+@SuppressWarnings("unchecked")
+@Api(value = "字典信息", tags = { "字典信息" })
+public class DictionaryInfoController {
+
+
+    @Autowired
+    DictionaryFacade dictionaryFacade;
+
+    @ApiOperation(value = "返回字典信息[by:zhoutg]",
+            notes = "")
+    @PostMapping("/getList")
+    @SysLogger("getList")
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getList() {
+        Map<Long, List<DictionaryInfoDTO>> data = dictionaryFacade.getList();
+        return RespDTO.onSuc(data);
+    }
+}

+ 2 - 2
aipt-service/src/main/java/com/diagbot/web/PushController.java

@@ -61,7 +61,7 @@ public class PushController {
                     "lisOrder:下单化验项,多项用分号隔开,String<br>" +
                     "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
                     "otherOrder:其他下单项,多项用分号隔开,String<br>" +
-                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐,多项用分号隔开,String<br>")
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
     @PostMapping("/treatment")
     @SysLogger("treatment")
     public RespDTO<Treat> getTreatment(@Valid @RequestBody SearchVo searchVo) {
@@ -100,7 +100,7 @@ public class PushController {
                     "lisOrder:下单化验项,多项用分号隔开,String<br>" +
                     "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
                     "otherOrder:其他下单项,多项用分号隔开,String<br>" +
-                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐,多项用分号隔开,String<br>")
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
     @PostMapping("/pushInner")
     @SysLogger("pushInner")
     public RespDTO<PushDTO> pushInner(@Valid @RequestBody SearchVo searchVo) {

+ 181 - 6
aipt-service/src/main/resources/mapper/ConceptMapper.xml

@@ -421,7 +421,7 @@
         FROM
             (
                 -- 除化验外其他类型标签
-                <if test="typesNoLis != null and typesNoLis.size() > 0">
+                <if test="typesIn != null and typesIn.size() > 0">
                 (
                     SELECT
                         b1.*, 0 uniqueId,
@@ -466,7 +466,7 @@
                             AND t6.is_deleted = 'N'
                             AND t7.is_deleted = 'N'
                             AND t1.lib_type IN
-                            <foreach collection="typesNoLis" item="item" open="(" close=")"
+                            <foreach collection="typesIn" item="item" open="(" close=")"
                                      separator=",">
                                 #{item}
                             </foreach>
@@ -521,7 +521,7 @@
                                 AND t6.is_deleted = 'N'
                                 AND t7.is_deleted = 'N'
                                 AND t1.lib_type IN
-                                <foreach collection="typesNoLis" item="item" open="(" close=")"
+                                <foreach collection="typesIn" item="item" open="(" close=")"
                                          separator=",">
                                     #{item}
                                 </foreach>
@@ -576,7 +576,7 @@
                                 AND t6.is_deleted = 'N'
                                 AND t7.is_deleted = 'N'
                                 AND t1.lib_type IN
-                                <foreach collection="typesNoLis" item="item" open="(" close=")"
+                                <foreach collection="typesIn" item="item" open="(" close=")"
                                          separator=",">
                                     #{item}
                                 </foreach>
@@ -588,7 +588,7 @@
                     )
                 </if>
                 -- 化验本体标签公表项匹配静态知识
-                <if test="typesNoLis != null and typesNoLis.size() > 0 and hasLis == true">
+                <if test="typesIn != null and typesIn.size() > 0 and hasLis == true">
                 UNION
                 </if>
                 <if test="hasLis == true">
@@ -1066,6 +1066,179 @@
                         AND b2.id = b3.concept_id
                     )
                 </if>
+
+                -- 量表匹配静态知识同时搜索诊断有关的量表;
+                <if test="hasGauge == true">
+                    <if test="typesIn != null and typesIn.size() > 0 or hasLis == true">
+                    union
+                    </if>
+                    (
+                    SELECT
+                    b1.selfId conceptId,
+                    b1.selfName `name`,
+                    71 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    b1.showType showType,
+                    b1.libTypeId libTypeId,
+                    b1.libTypeName libTypeName,
+                    b1.selfId uniqueId,
+                    b1.selfName uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 48
+                    AND (
+                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+                    )
+                    ) b1,
+                    kl_scale b2
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b1.selfId = b2.concept_id
+                    )
+                    UNION
+                    (
+                    SELECT
+                    b1.selfId conceptId,
+                    b1.selfName `name`,
+                    72 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    b1.showType showType,
+                    b1.libTypeId libTypeId,
+                    b1.libTypeName libTypeName,
+                    b1.selfId uniqueId,
+                    b1.selfName uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 48
+                    AND (
+                    UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                    OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                    )
+                    ) b1,
+                    kl_scale b2
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b1.selfId = b2.concept_id
+                    )
+                    UNION
+                    (
+                    SELECT
+                    b1.selfId conceptId,
+                    b1.selfName `name`,
+                    73 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    b1.showType showType,
+                    b1.libTypeId libTypeId,
+                    b1.libTypeName libTypeName,
+                    b1.selfId uniqueId,
+                    b1.selfName uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 48
+                    AND (
+                    UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+                    OR UPPER(t2. NAME) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})), '%')
+                    )
+                    ) b1
+                    ,kl_scale b2
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b1.selfId = b2.concept_id
+                    )
+
+
+                    UNION
+                    (
+                    SELECT distinct
+                    b2.id conceptId,
+                    b2.lib_name `name`,
+                    74 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    0 showType,
+                    b2.lib_type libTypeId,
+                    '量表' libTypeName,
+                    b2.id uniqueId,
+                    b2.lib_name uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 18
+                    AND (
+                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+                    )
+                    ) b1
+                    , kl_concept b2, kl_relation b3, kl_scale b4
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b3.is_deleted = 'N'
+                    AND b4.is_deleted = 'N'
+                    AND b1.selfId = b3.start_id
+                    AND b2.id = b3.end_id
+                    AND b2.id = b4.concept_id
+                    )
+                </if>
+
             ) a1
         ORDER BY
             a1.orderNo ASC,
@@ -1110,7 +1283,9 @@
         SELECT DISTINCT b.id concept_id,b.lib_name name  FROM `kl_library_info` a, kl_concept b
         where a.is_deleted = 'N' and b.is_deleted = 'N'
         and a.concept_id = b.id
-        and UPPER(TRIM(a.`name`)) like concat('%',UPPER(TRIM(#{name})),'%') and a.type_id = #{libType} and b.lib_type = #{libType}
+        and (UPPER(TRIM(a.`name`)) like concat('%',UPPER(TRIM(#{name})),'%')
+        or UPPER(TRIM(a.`spell`)) like concat('%',UPPER(TRIM(#{name})),'%'))
+        and a.type_id = #{libType} and b.lib_type = #{libType}
     </select>
 
 </mapper>

icss-service/src/main/resources/mapper/DictionaryInfoMapper.xml → aipt-service/src/main/resources/mapper/DictionaryInfoMapper.xml


+ 4 - 4
bi-service/pom.xml

@@ -75,10 +75,10 @@
         </dependency>
 
         <!-- zipkin-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zipkin</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
 
         <!--swagger-->
         <dependency>

+ 2 - 0
bi-service/src/main/java/com/diagbot/BiServiceApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -26,6 +27,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCircuitBreaker
 @RefreshScope
+@ConfigurationPropertiesScan
 public class BiServiceApplication {
 
     public static void main(String[] args) {

+ 6 - 41
bi-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,24 +1,17 @@
 package com.diagbot.aop;
 
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.rabbit.MySender;
-import com.diagbot.util.GsonUtil;
-import com.diagbot.util.HttpUtils;
-import com.diagbot.util.StringUtil;
-import com.diagbot.util.UserUtils;
+import com.diagbot.util.AopUtil;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
 import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.stereotype.Component;
 
-import java.lang.reflect.Method;
-import java.util.Date;
-
 /**
  * @Description: 日志拦截切面
  * @author: gaodm
@@ -26,6 +19,7 @@ import java.util.Date;
  */
 @Aspect
 @Component
+@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
 public class SysLoggerAspect {
     @Autowired
     private MySender mySender;
@@ -37,37 +31,8 @@ public class SysLoggerAspect {
 
     @Before("loggerPointCut()")
     public void saveSysLog(JoinPoint joinPoint) {
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        Method method = signature.getMethod();
-
-        SysLog sysLog = new SysLog();
-        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-        if (sysLogger != null) {
-            //注解上的描述
-            sysLog.setOperation(sysLogger.value());
-        }
-        //请求的方法名
-        String className = joinPoint.getTarget().getClass().getName();
-        String methodName = signature.getName();
-        sysLog.setMethod(className + "." + methodName + "()");
-        //请求的参数
-        Object[] args = joinPoint.getArgs();
-        String params = "";
-        for (Object o : args) {
-            params += GsonUtil.toJson(o);
-        }
-        if (!StringUtil.isEmpty(params)) {
-            sysLog.setParams(params);
-        }
-        //设置IP地址
-        sysLog.setIp(HttpUtils.getIpAddress());
-        //用户名
-        String username = UserUtils.getCurrentPrinciple();
-        if (!StringUtil.isEmpty(username)) {
-            sysLog.setUsername(username);
-        }
-        sysLog.setGmtCreate(new Date());
-        sysLog.setSysType(SysTypeEnum.BI_SERVICE.getKey());
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.BI_SERVICE.getKey());
         //保存系统日志
         mySender.outputLogSend(sysLog);
     }

+ 4 - 0
bi-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -23,6 +23,10 @@ public class MybatisPlusConfigurer {
     @Bean
     public PaginationInterceptor paginationInterceptor() {
         PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(500L);
         return paginationInterceptor;
     }
 

+ 1 - 1
bi-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -1,6 +1,6 @@
 package com.diagbot.rabbit;
 
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.util.GsonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;

+ 14 - 8
common/pom.xml

@@ -39,7 +39,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-webmvc</artifactId>
-            <version>5.1.9.RELEASE</version>
+            <version>5.2.1.RELEASE</version>
             <scope>provided</scope>
         </dependency>
 
@@ -53,35 +53,35 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
-            <version>5.1.6.RELEASE</version>
+            <version>5.2.1.RELEASE</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.springframework.security.oauth</groupId>
             <artifactId>spring-security-oauth2</artifactId>
-            <version>2.3.6.RELEASE</version>
+            <version>2.4.0.RELEASE</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>1.7.28</version>
+            <version>1.7.29</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
-            <version>2.8.5</version>
+            <version>2.8.6</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>1.2.61</version>
+            <version>1.2.62</version>
             <scope>compile</scope>
         </dependency>
 
@@ -89,14 +89,14 @@
         <dependency>
             <groupId>org.apache.poi</groupId>
             <artifactId>poi</artifactId>
-            <version>4.1.0</version>
+            <version>4.1.1</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.poi</groupId>
             <artifactId>poi-ooxml</artifactId>
-            <version>4.1.0</version>
+            <version>4.1.1</version>
             <scope>provided</scope>
         </dependency>
 
@@ -114,6 +114,12 @@
             <scope>compile</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>1.9.5</version>
+        </dependency>
+
         <!--<dependency>-->
             <!--<groupId>com.fasterxml.jackson.core</groupId>-->
             <!--<artifactId>jackson-core</artifactId>-->

+ 19 - 0
common/src/main/java/com/diagbot/annotation/BiLogger.java

@@ -0,0 +1,19 @@
+package com.diagbot.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @Description: BI统计注解
+ * @author: gaodm
+ * @time: 2019/11/11 11:46
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface BiLogger {
+    String value() default "";
+}

+ 19 - 0
common/src/main/java/com/diagbot/annotation/BiLoggerResult.java

@@ -0,0 +1,19 @@
+package com.diagbot.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @Description: BI统计注解结果太大需特殊处理
+ * @author: gaodm
+ * @time: 2019/11/11 11:46
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface BiLoggerResult {
+    String value() default "";
+}

+ 101 - 0
common/src/main/java/com/diagbot/biz/log/entity/BiRecord.java

@@ -0,0 +1,101 @@
+package com.diagbot.biz.log.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description: BI记录实体类
+ * @author: gaodm
+ * @time: 2019/11/11 14:27
+ */
+@Getter
+@Setter
+public class BiRecord {
+
+    /**
+     * 日志ID
+     */
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * 医院医生编码
+     */
+    private String doctorCode;
+
+    /**
+     * 医院科室编码
+     */
+    private String deptCode;
+
+    /**
+     * 医院患者编码
+     */
+    private String patientCode;
+
+    /**
+     * 产品类型(1:云平台内部;2:云平台外部;3:icss;4:智能分诊;5:页面推送模式;6:智能预问诊;7:数据引擎模式)
+     */
+    private Integer productType;
+
+    /**
+     * 功能编码
+     */
+    private String code;
+
+    /**
+     * 输入参数
+     */
+    private String params;
+
+    /**
+     * 返回参数
+     */
+    private String result;
+
+    /**
+     * 响应时间
+     */
+    private String execTime;
+
+    /**
+     * 调用是否成功(0:失败;1:成功)
+     */
+    private Integer successFlag;
+
+    /**
+     * 来源(1:后台接口-无处理;2:后台接口-结果特殊处理;3:前端)
+     */
+    private Integer source;
+}

+ 82 - 0
common/src/main/java/com/diagbot/biz/log/entity/SysLog.java

@@ -0,0 +1,82 @@
+package com.diagbot.biz.log.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统操作日志表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-14
+ */
+@Getter
+@Setter
+public class SysLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日志ID
+     */
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 访问者的IP
+     */
+    private String ip;
+
+    /**
+     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
+     */
+    private Integer sysType;
+
+    /**
+     * 方法
+     */
+    private String method;
+
+    /**
+     * 操作名
+     */
+    private String operation;
+
+    /**
+     * 参数
+     */
+    private String params;
+
+    /**
+     * 用户名
+     */
+    private String username;
+}

+ 49 - 0
common/src/main/java/com/diagbot/enums/BiSourceEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description: 产品类型
+ * @author: gaodm
+ * @time: 2018/9/14 9:15
+ */
+public enum BiSourceEnum implements KeyedNamed {
+    BI_NORMAL(1, "后台接口-无处理"),
+    BI_RESULT(2, "后台接口-结果特殊处理"),
+    FRONT(3, "前端");
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    BiSourceEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static BiSourceEnum getEnum(int key) {
+        for (BiSourceEnum item : BiSourceEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        BiSourceEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 2 - 1
common/src/main/java/com/diagbot/enums/ProductTypeEnum.java

@@ -14,7 +14,8 @@ public enum ProductTypeEnum implements KeyedNamed {
     ICSS(3, "ICSS"),
     TRIAGE(4, "智能分诊"),
     DATA(5, "页面推送模式"),
-    PREC(6, "智能预问诊");
+    PREC(6, "智能预问诊"),
+    LTAPI(7, "数据引擎模式");
     @Setter
     private int key;
 

+ 330 - 0
common/src/main/java/com/diagbot/util/AopUtil.java

@@ -0,0 +1,330 @@
+package com.diagbot.util;
+
+import com.diagbot.annotation.BiLogger;
+import com.diagbot.annotation.BiLoggerResult;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.annotation.SysLoggerExport;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.enums.BiSourceEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.biz.log.entity.BiRecord;
+import com.diagbot.biz.log.entity.SysLog;
+import com.diagbot.vo.BaseBiVO;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.validation.BindException;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/11/12 18:17
+ */
+public class AopUtil {
+    /**
+     * SysLoggerAspect入参设置
+     *
+     * @param joinPoint
+     * @param sysType
+     */
+    public static SysLog sysLoggerAspect(JoinPoint joinPoint, Integer sysType) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += FastJsonUtils.getBeanToJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(sysType);
+        return sysLog;
+    }
+
+    /**
+     * SysLoggerExprotAspect入参设置
+     *
+     * @param joinPoint
+     * @param sysType
+     */
+    public static SysLog sysLoggerExprotAspect(JoinPoint joinPoint, Integer sysType) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLoggerExport sysLogger = method.getAnnotation(SysLoggerExport.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += FastJsonUtils.getBeanToJson(o);
+            break;
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(sysType);
+        return sysLog;
+    }
+
+    /**
+     * Bi日志有返回值处理(普通)
+     *
+     * @param biRecord
+     * @param joinPoint
+     * @param productType
+     * @return
+     * @throws Throwable
+     */
+    public static Object biLoggerAspect(BiRecord biRecord, ProceedingJoinPoint joinPoint,
+                                        Integer productType) throws Throwable {
+        long start = System.currentTimeMillis();
+        Object object = joinPoint.proceed();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_NORMAL.getKey())) {
+            biRecord = null;
+            return object;
+        }
+        //出参设置
+        String result = "";
+        result = FastJsonUtils.getBeanToJson(object);
+        if (!StringUtil.isEmpty(result)) {
+            biRecord.setResult(result);
+        }
+        biRecord.setSuccessFlag(1);
+        long execTime = System.currentTimeMillis() - start;
+        biRecord.setExecTime(String.valueOf(execTime));
+        return object;
+    }
+
+    /**
+     * Bi日志异常统一处理(普通)
+     *
+     * @param joinPoint
+     * @param ex
+     * @param productType
+     * @return
+     */
+    public static BiRecord biLoggerAspectThrow(JoinPoint joinPoint, Throwable ex, Integer productType) {
+        BiRecord biRecord = new BiRecord();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_NORMAL.getKey())) {
+            return null;
+        }
+        //出参设置
+        String result = "";
+        result = FastJsonUtils.getBeanToJson(handleException((Exception) ex));
+        biRecord.setResult(result);
+        biRecord.setSuccessFlag(0);
+        return biRecord;
+    }
+
+    /**
+     * Bi日志有返回值处理(特殊)
+     *
+     * @param biRecord
+     * @param joinPoint
+     * @param productType
+     * @return
+     * @throws Throwable
+     */
+    public static Object biLoggerResultAspect(BiRecord biRecord, ProceedingJoinPoint joinPoint,
+                                              Integer productType) throws Throwable {
+        long start = System.currentTimeMillis();
+        Object object = joinPoint.proceed();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_RESULT.getKey())) {
+            biRecord = null;
+            return object;
+        }
+        //出参设置
+        String result = "";
+        if (object instanceof RespDTO) {
+            RespDTO respDTO = (RespDTO) object;
+            RespDTO rs = new RespDTO();
+            rs.code = respDTO.code;
+            rs.msg = respDTO.msg;
+            rs.data = new Object();
+            result = FastJsonUtils.getBeanToJson(rs);
+        } else {
+            result = FastJsonUtils.getBeanToJson(object);
+        }
+        if (!StringUtil.isEmpty(result)) {
+            biRecord.setResult(result);
+        }
+        biRecord.setSuccessFlag(1);
+        long execTime = System.currentTimeMillis() - start;
+        biRecord.setExecTime(String.valueOf(execTime));
+        return object;
+    }
+
+    /**
+     * Bi日志异常统一处理(特殊)
+     *
+     * @param joinPoint
+     * @param ex
+     * @param productType
+     * @return
+     */
+    public static BiRecord biLoggerResultAspectThrow(JoinPoint joinPoint, Throwable ex, Integer productType) {
+        BiRecord biRecord = new BiRecord();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_RESULT.getKey())) {
+            return null;
+        }
+        //出参设置
+        String result = "";
+        result = FastJsonUtils.getBeanToJson(handleException((Exception) ex));
+        biRecord.setResult(result);
+        biRecord.setSuccessFlag(0);
+        return biRecord;
+    }
+
+    /**
+     * 消息设定
+     *
+     * @param biRecord
+     * @param joinPoint
+     * @return 是否可以继续下去
+     */
+    private static Boolean biRecordSet(BiRecord biRecord, JoinPoint joinPoint,
+                                       Integer productType, Integer biSourceType) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            if (o instanceof BaseBiVO) {
+                BaseBiVO baseBiVO = (BaseBiVO) o;
+                if (StringUtil.isBlank(baseBiVO.getHospitalCode())) {
+                    if (StringUtil.isNotBlank(baseBiVO.getHosCode())) {
+                        BeanUtil.copyProperties(baseBiVO, biRecord);
+                        biRecord.setHospitalCode(baseBiVO.getHosCode());
+                    } else {
+                        return false;
+                    }
+                } else {
+                    BeanUtil.copyProperties(baseBiVO, biRecord);
+                }
+            }
+            params += FastJsonUtils.getBeanToJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            biRecord.setParams(params);
+        }
+
+        //设置功能编码
+        if (biSourceType.equals(BiSourceEnum.BI_NORMAL.getKey())) {
+            BiLogger biLogger = method.getAnnotation(BiLogger.class);
+            if (biLogger != null) {
+                //注解上的描述
+                biRecord.setCode(biLogger.value());
+            }
+        } else if (biSourceType.equals(BiSourceEnum.BI_RESULT.getKey())) {
+            BiLoggerResult biLoggerResult = method.getAnnotation(BiLoggerResult.class);
+            if (biLoggerResult != null) {
+                //注解上的描述
+                biRecord.setCode(biLoggerResult.value());
+            }
+        } else {
+            return false;
+        }
+        biRecord.setGmtCreate(new Date());
+        biRecord.setProductType(productType);
+        biRecord.setSource(biSourceType);
+        return true;
+    }
+
+    /**
+     * 抛错信息处理
+     *
+     * @param e
+     * @return 结果参数
+     */
+    private static RespDTO handleException(Exception e) {
+        RespDTO resp = new RespDTO();
+        if (e instanceof BindException) {
+            BindException ex = (BindException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = FastJsonUtils.getBeanToJson(stringMap);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return resp;
+        }
+        if (e instanceof MethodArgumentNotValidException) {
+            MethodArgumentNotValidException ex = (MethodArgumentNotValidException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = FastJsonUtils.getBeanToJson(stringMap);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return resp;
+        }
+        if (e instanceof MissingServletRequestParameterException) {
+            MissingServletRequestParameterException ex = (MissingServletRequestParameterException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            stringMap.put(ex.getParameterName(), "不能为null");
+            String msg = FastJsonUtils.getBeanToJson(stringMap);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return resp;
+        }
+        if (e instanceof CommonException) {
+            CommonException taiChiException = (CommonException) e;
+            resp.code = taiChiException.getCode();
+            resp.msg = e.getMessage();
+            return resp;
+        }
+        resp.code = CommonErrorCode.FAIL.getCode();
+        resp.msg = e.getMessage();
+        return resp;
+    }
+}

+ 24 - 0
common/src/main/java/com/diagbot/vo/BaseBiVO.java

@@ -0,0 +1,24 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: BI统计基础VO
+ * @author: gaodm
+ * @time: 2019/11/11 11:42
+ */
+@Getter
+@Setter
+public class BaseBiVO {
+    //医院编码
+    private String hospitalCode;
+    //医生编码
+    private String doctorCode;
+    //科室编码
+    private String deptCode;
+    //医院患者编码
+    private String patientCode;
+    //医院编码(不用传)
+    private String hosCode;
+}

+ 2 - 0
config-server/src/main/java/com/diagbot/ConfigServerApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.config.server.EnableConfigServer;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 
@@ -18,6 +19,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
         JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
 @EnableConfigServer
 @EnableEurekaClient
+@ConfigurationPropertiesScan
 public class ConfigServerApplication {
 
     public static void main(String[] args) {

+ 7 - 1
config-server/src/main/resources/shared/application-dev.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 7 - 1
config-server/src/main/resources/shared/application-local.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 7 - 1
config-server/src/main/resources/shared/application-pre.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 7 - 1
config-server/src/main/resources/shared/application-pro.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 7 - 1
config-server/src/main/resources/shared/application-test.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 2 - 0
config-server/src/main/resources/shared/data-service-dev.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/data-service-local.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/data-service-pre.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/data-service-pro.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+      outputBiLog:
+        destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 1
config-server/src/main/resources/shared/data-service-test.yml

@@ -9,7 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
-
+        outputBiLog:
+          destination: myBiLog
   #mq
   rabbitmq:
     host: 192.168.2.241

+ 2 - 0
config-server/src/main/resources/shared/icss-service-dev.yml

@@ -59,6 +59,8 @@ spring:
         outputPoint:
           destination: myPoint
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
         inputPoint:
           destination: myPoint
           group: pointReceiveGroup

+ 2 - 0
config-server/src/main/resources/shared/icss-service-local.yml

@@ -59,6 +59,8 @@ spring:
         outputPoint:
           destination: myPoint
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
         inputPoint:
           destination: myPoint
           group: pointReceiveGroup

+ 2 - 0
config-server/src/main/resources/shared/icss-service-pre.yml

@@ -59,6 +59,8 @@ spring:
         outputPoint:
           destination: myPoint
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
         inputPoint:
           destination: myPoint
           group: pointReceiveGroup

+ 2 - 0
config-server/src/main/resources/shared/icss-service-pro.yml

@@ -59,6 +59,8 @@ spring:
         outputPoint:
           destination: myPoint
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
         inputPoint:
           destination: myPoint
           group: pointReceiveGroup

+ 2 - 0
config-server/src/main/resources/shared/icss-service-test.yml

@@ -59,6 +59,8 @@ spring:
         outputPoint:
           destination: myPoint
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
         inputPoint:
           destination: myPoint
           group: pointReceiveGroup

+ 5 - 0
config-server/src/main/resources/shared/logger-service-dev.yml

@@ -55,10 +55,15 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
         inputLog:
           destination: myLog
           group: logReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
+        inputBiLog:
+          destination: myBiLog
+          group: biLogReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
 
   #mq
   rabbitmq:

+ 5 - 0
config-server/src/main/resources/shared/logger-service-local.yml

@@ -55,10 +55,15 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
         inputLog:
           destination: myLog
           group: logReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
+        inputBiLog:
+          destination: myBiLog
+          group: biLogReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
 
   #mq
   rabbitmq:

+ 5 - 0
config-server/src/main/resources/shared/logger-service-pre.yml

@@ -55,10 +55,15 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
         inputLog:
           destination: myLog
           group: logReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
+        inputBiLog:
+          destination: myBiLog
+          group: biLogReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
 
   #mq
   rabbitmq:

+ 5 - 0
config-server/src/main/resources/shared/logger-service-pro.yml

@@ -55,10 +55,15 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
         inputLog:
           destination: myLog
           group: logReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
+        inputBiLog:
+          destination: myBiLog
+          group: biLogReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
 
   #mq
   rabbitmq:

+ 5 - 0
config-server/src/main/resources/shared/logger-service-test.yml

@@ -55,10 +55,15 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
         #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
         inputLog:
           destination: myLog
           group: logReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
+        inputBiLog:
+          destination: myBiLog
+          group: biLogReceiveGroup     # 具体分组 对应 MQ 是 队列名称 并且持久化队列
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/ltapi-service-dev.yml

@@ -8,6 +8,8 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
 
   #mq

+ 2 - 0
config-server/src/main/resources/shared/ltapi-service-local.yml

@@ -8,6 +8,8 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
 
   #mq

+ 2 - 0
config-server/src/main/resources/shared/ltapi-service-pre.yml

@@ -8,6 +8,8 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
 
   #mq

+ 2 - 0
config-server/src/main/resources/shared/ltapi-service-pro.yml

@@ -8,6 +8,8 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
 
   #mq

+ 2 - 0
config-server/src/main/resources/shared/ltapi-service-test.yml

@@ -8,6 +8,8 @@ spring:
       bindings:
         outputLog:
           destination: myLog
+        outputBiLog:
+          destination: myBiLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
 
   #mq

+ 2 - 0
config-server/src/main/resources/shared/prec-service-dev.yml

@@ -56,6 +56,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/prec-service-local.yml

@@ -56,6 +56,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/prec-service-pre.yml

@@ -56,6 +56,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/prec-service-pro.yml

@@ -56,6 +56,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/prec-service-test.yml

@@ -56,6 +56,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/triage-service-dev.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/triage-service-local.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/triage-service-pre.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/triage-service-pro.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 2 - 0
config-server/src/main/resources/shared/triage-service-test.yml

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 4 - 4
data-service/pom.xml

@@ -75,10 +75,10 @@
         </dependency>
 
         <!-- zipkin-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zipkin</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
 
         <!--swagger-->
         <dependency>

+ 2 - 0
data-service/src/main/java/com/diagbot/DataServiceApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -26,6 +27,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCircuitBreaker
 @RefreshScope
+@ConfigurationPropertiesScan
 public class DataServiceApplication {
 
     public static void main(String[] args) {

+ 55 - 0
data-service/src/main/java/com/diagbot/aop/BiLoggerAspect.java

@@ -0,0 +1,55 @@
+package com.diagbot.aop;
+
+import com.diagbot.enums.ProductTypeEnum;
+import com.diagbot.biz.log.entity.BiRecord;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.AopUtil;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: BI日志拦截切面
+ * @author: gaodm
+ * @time: 2019/11/12 17:26
+ */
+@Aspect
+@Component
+@ConditionalOnProperty(prefix = "bilog", value = { "enable" }, havingValue = "true")
+public class BiLoggerAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.BiLogger)")
+    public void biPointCut() {
+    }
+
+    @Around(value = "biPointCut()")
+    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+        BiRecord biRecord = new BiRecord();
+        Object object = AopUtil.biLoggerAspect(biRecord, joinPoint, ProductTypeEnum.DATA.getKey());
+        if (null == biRecord) {
+            return object;
+        }
+        //保存BI日志
+        mySender.outputBiLogSend(biRecord);
+        return object;
+    }
+
+    @AfterThrowing(pointcut = "biPointCut()", throwing = "ex")
+    public void saveBiRecordThrow(JoinPoint joinPoint, Throwable ex) {
+        BiRecord biRecord = AopUtil.biLoggerAspectThrow(joinPoint, ex, ProductTypeEnum.DATA.getKey());
+        if (null == biRecord) {
+            return;
+        }
+        //保存BI日志
+        mySender.outputBiLogSend(biRecord);
+    }
+}
+

+ 55 - 0
data-service/src/main/java/com/diagbot/aop/BiLoggerResultAspect.java

@@ -0,0 +1,55 @@
+package com.diagbot.aop;
+
+import com.diagbot.enums.ProductTypeEnum;
+import com.diagbot.biz.log.entity.BiRecord;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.AopUtil;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: BI日志结果特殊处理拦截切面
+ * @author: gaodm
+ * @time: 2019/11/12 17:26
+ */
+@Aspect
+@Component
+@ConditionalOnProperty(prefix = "bilog", value = { "enable" }, havingValue = "true")
+public class BiLoggerResultAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.BiLoggerResult)")
+    public void biResultPointCut() {
+    }
+
+    @Around(value = "biResultPointCut()")
+    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+        BiRecord biRecord = new BiRecord();
+        Object object = AopUtil.biLoggerResultAspect(biRecord, joinPoint, ProductTypeEnum.DATA.getKey());
+        if (null == biRecord) {
+            return object;
+        }
+        //保存BI日志
+        mySender.outputBiLogSend(biRecord);
+        return object;
+    }
+
+    @AfterThrowing(pointcut = "biResultPointCut()", throwing = "ex")
+    public void saveBiRecordThrow(JoinPoint joinPoint, Throwable ex) {
+        BiRecord biRecord = AopUtil.biLoggerResultAspectThrow(joinPoint, ex, ProductTypeEnum.DATA.getKey());
+        if (null == biRecord) {
+            return;
+        }
+        //保存BI日志
+        mySender.outputBiLogSend(biRecord);
+    }
+}
+

+ 6 - 41
data-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,24 +1,17 @@
 package com.diagbot.aop;
 
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.rabbit.MySender;
-import com.diagbot.util.GsonUtil;
-import com.diagbot.util.HttpUtils;
-import com.diagbot.util.StringUtil;
-import com.diagbot.util.UserUtils;
+import com.diagbot.util.AopUtil;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
 import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.stereotype.Component;
 
-import java.lang.reflect.Method;
-import java.util.Date;
-
 /**
  * @Description: 日志拦截切面
  * @author: gaodm
@@ -26,6 +19,7 @@ import java.util.Date;
  */
 @Aspect
 @Component
+@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
 public class SysLoggerAspect {
     @Autowired
     private MySender mySender;
@@ -37,37 +31,8 @@ public class SysLoggerAspect {
 
     @Before("loggerPointCut()")
     public void saveSysLog(JoinPoint joinPoint) {
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        Method method = signature.getMethod();
-
-        SysLog sysLog = new SysLog();
-        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-        if (sysLogger != null) {
-            //注解上的描述
-            sysLog.setOperation(sysLogger.value());
-        }
-        //请求的方法名
-        String className = joinPoint.getTarget().getClass().getName();
-        String methodName = signature.getName();
-        sysLog.setMethod(className + "." + methodName + "()");
-        //请求的参数
-        Object[] args = joinPoint.getArgs();
-        String params = "";
-        for (Object o : args) {
-            params += GsonUtil.toJson(o);
-        }
-        if (!StringUtil.isEmpty(params)) {
-            sysLog.setParams(params);
-        }
-        //设置IP地址
-        sysLog.setIp(HttpUtils.getIpAddress());
-        //用户名
-        String username = UserUtils.getCurrentPrinciple();
-        if (!StringUtil.isEmpty(username)) {
-            sysLog.setUsername(username);
-        }
-        sysLog.setGmtCreate(new Date());
-        sysLog.setSysType(SysTypeEnum.DATA_SERVICE.getKey());
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.DATA_SERVICE.getKey());
         //保存系统日志
         mySender.outputLogSend(sysLog);
     }

+ 9 - 0
data-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -6,6 +6,7 @@ import com.diagbot.client.bean.SearchData;
 import com.diagbot.client.bean.Treat;
 import com.diagbot.client.hystrix.AiptServiceHystrix;
 import com.diagbot.dto.ConceptIntroduceDTO;
+import com.diagbot.dto.DictionaryInfoDTO;
 import com.diagbot.dto.DisclaimerInformationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
@@ -112,4 +113,12 @@ public interface AiptServiceClient {
      */
     @PostMapping(value = "/scale/index")
     RespDTO<List<ScaleIndexDTO>> index(@RequestBody ScaleIndexVO scaleIndexVO);
+
+    /**
+     * 获取字典信息
+     *
+     * @return
+     */
+    @PostMapping(value = "/dictionaryInfo/getList")
+    RespDTO<Map<Long, List<DictionaryInfoDTO>>> getList();
 }

+ 12 - 0
data-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -6,6 +6,7 @@ import com.diagbot.client.bean.ScaleContent;
 import com.diagbot.client.bean.SearchData;
 import com.diagbot.client.bean.Treat;
 import com.diagbot.dto.ConceptIntroduceDTO;
+import com.diagbot.dto.DictionaryInfoDTO;
 import com.diagbot.dto.DisclaimerInformationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
@@ -142,4 +143,15 @@ public class AiptServiceHystrix implements AiptServiceClient {
         log.error("【hystrix】调用{}异常", "index");
         return null;
     }
+
+    /**
+     * 获取字典信息
+     *
+     * @return
+     */
+    @Override
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getList() {
+        log.error("【hystrix】调用{}异常", "getList");
+        return null;
+    }
 }

+ 48 - 0
data-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java

@@ -0,0 +1,48 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * icss字典表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@Getter
+@Setter
+public class DictionaryInfoDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分组(值自定义)
+     */
+    private Long groupType;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 值
+     */
+    private String val;
+
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 0 - 192
data-service/src/main/java/com/diagbot/entity/SysLog.java

@@ -1,192 +0,0 @@
-package com.diagbot.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统操作日志表
- * </p>
- *
- * @author gaodm
- * @since 2018-09-14
- */
-public class SysLog implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 日志ID
-     */
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 访问者的IP
-     */
-    private String ip;
-
-    /**
-     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
-     */
-    private Integer sysType;
-
-    /**
-     * 方法
-     */
-    private String method;
-
-    /**
-     * 操作名
-     */
-    private String operation;
-
-    /**
-     * 参数
-     */
-    private String params;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public Integer getSysType() {
-        return sysType;
-    }
-
-    public void setSysType(Integer sysType) {
-        this.sysType = sysType;
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getParams() {
-        return params;
-    }
-
-    public void setParams(String params) {
-        this.params = params;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "SysLog{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", ip=" + ip +
-                ", sysType=" + sysType +
-                ", method=" + method +
-                ", operation=" + operation +
-                ", params=" + params +
-                ", username=" + username +
-                "}";
-    }
-}

+ 34 - 0
data-service/src/main/java/com/diagbot/facade/DictionaryFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class DictionaryFacade {
+
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
+
+    /**
+     * 返回字典信息
+     *
+     * @return
+     */
+    public Map<Long, List<DictionaryInfoDTO>> getList() {
+        RespDTO<Map<Long, List<DictionaryInfoDTO>>> res = aiptServiceClient.getList();
+        RespDTOUtil.respNGDealCover(res, "获取字典信息失败");
+        return res.data;
+    }
+}

+ 1 - 19
data-service/src/main/java/com/diagbot/facade/SearchFacade.java

@@ -4,9 +4,7 @@ import com.diagbot.client.AiptServiceClient;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.ScaleIndexDTO;
-import com.diagbot.enums.StaticSearchTypeEnum;
 import com.diagbot.util.BeanUtil;
-import com.diagbot.util.ListUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.GetStaticVO;
@@ -14,7 +12,6 @@ import com.diagbot.vo.ScaleIndexVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -36,22 +33,7 @@ public class SearchFacade {
     public List<RetrievalDTO> getStaticKnowledge(GetStaticVO getStaticVO) {
         GetStaticKnowledgeVO getStaticKnowledgeVO = new GetStaticKnowledgeVO();
         BeanUtil.copyProperties(getStaticVO, getStaticKnowledgeVO);
-        List<Integer> types = getStaticKnowledgeVO.getTypes();
-        if (null == types) {
-            types = new ArrayList<>();
-        }
-        if (ListUtil.isEmpty(types)) {
-            // 添加词库搜索类型
-            types.add(StaticSearchTypeEnum.DIAGNOSIS.getKey());
-            types.add(StaticSearchTypeEnum.DRUGS.getKey());
-            types.add(StaticSearchTypeEnum.SYMPTOM.getKey());
-            types.add(StaticSearchTypeEnum.LIS_PACKAGE.getKey());
-            types.add(StaticSearchTypeEnum.PACS_ITEMS.getKey());
-            types.add(StaticSearchTypeEnum.OPERATION.getKey());
-            getStaticKnowledgeVO.setTypes(types);
-        }
-        RespDTO<List<RetrievalDTO>> res
-                = aiptServiceClient.getStaticKnowledge(getStaticKnowledgeVO);
+        RespDTO<List<RetrievalDTO>> res = aiptServiceClient.getStaticKnowledge(getStaticKnowledgeVO);
         RespDTOUtil.respNGDeal(res, "获取静态知识失败");
         return res.data;
     }

+ 9 - 0
data-service/src/main/java/com/diagbot/rabbit/MyProcessor.java

@@ -20,4 +20,13 @@ public interface MyProcessor {
 
     @Output(OUTPUT_LOG)
     MessageChannel outputLog();
+
+    String INPUT_BI_LOG = "inputBiLog";
+    String OUTPUT_BI_LOG = "outputBiLog";
+
+    @Input(INPUT_BI_LOG)
+    SubscribableChannel inputBiLog();
+
+    @Output(OUTPUT_BI_LOG)
+    MessageChannel outputBiLog();
 }

+ 10 - 1
data-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -1,6 +1,7 @@
 package com.diagbot.rabbit;
 
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.BiRecord;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.util.GsonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -21,7 +22,15 @@ public class MySender {
     @Qualifier("outputLog")
     MessageChannel outputLog;
 
+    @Autowired
+    @Qualifier("outputBiLog")
+    MessageChannel outputBiLog;
+
     public void outputLogSend(SysLog sysLog) {
         outputLog.send(MessageBuilder.withPayload(GsonUtil.toJson(sysLog)).build());
     }
+
+    public void outputBiLogSend(BiRecord biRecord) {
+        outputBiLog.send(MessageBuilder.withPayload(GsonUtil.toJson(biRecord)).build());
+    }
 }

+ 43 - 0
data-service/src/main/java/com/diagbot/web/DictionaryInfoController.java

@@ -0,0 +1,43 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.DictionaryFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * icss字典表 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@RequestMapping("/dictionaryInfo")
+@RestController
+@SuppressWarnings("unchecked")
+@Api(value = "字典信息", tags = { "字典信息" })
+public class DictionaryInfoController {
+
+
+    @Autowired
+    DictionaryFacade dictionaryFacade;
+
+    @ApiOperation(value = "返回字典信息[by:zhoutg]",
+            notes = "")
+    @PostMapping("/getList")
+    @SysLogger("getList")
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getList() {
+        Map<Long, List<DictionaryInfoDTO>> data = dictionaryFacade.getList();
+        return RespDTO.onSuc(data);
+    }
+}

+ 2 - 2
data-service/src/main/java/com/diagbot/web/PushController.java

@@ -95,7 +95,7 @@ public class PushController {
                     "lisOrder:下单化验项,多项用分号隔开,String<br>" +
                     "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
                     "otherOrder:其他下单项,多项用分号隔开,String<br>" +
-                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐,多项用分号隔开,String<br>")
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
     @PostMapping("/pushTreatment")
     @SysLogger("pushTreatment")
     public RespDTO<Treat> pushTreatment(@RequestBody @Valid PushVO pushVO) {
@@ -132,7 +132,7 @@ public class PushController {
                     "lisOrder:下单化验项,多项用分号隔开,String<br>" +
                     "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
                     "otherOrder:其他下单项,多项用分号隔开,String<br>" +
-                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐,多项用分号隔开,String<br>")
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
     @PostMapping("/pushScale")
     @SysLogger("pushScale")
     public RespDTO<Map<String, Object>> pushScale(@RequestBody @Valid PushVO pushVO) {

+ 1 - 1
data-service/src/main/java/com/diagbot/web/SearchController.java

@@ -42,7 +42,7 @@ public class SearchController {
      */
     @ApiOperation(value = "静态知识检索[by:zhoutg]",
             notes = "inputStr:检索内容,必填<br>" +
-                    "types:指定类型,1:症状,10:药品,12:化验,16:辅检,18:诊断,25:手术; 不指定:以上全部")
+                    "types:指定类型,1:症状,10:药品,12:化验,16:辅检,18:诊断,25:手术,48:量表; 不指定:以上全部")
     @PostMapping("/getStaticKnowledge")
     @SysLogger("getStaticKnowledge")
     public RespDTO<List<RetrievalDTO>> getStaticKnowledge(@Valid @RequestBody GetStaticVO getStaticVO){

+ 4 - 4
diagbotman-service/pom.xml

@@ -75,10 +75,10 @@
         </dependency>
 
         <!-- zipkin-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zipkin</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
 
         <!--swagger-->
         <dependency>

+ 2 - 0
diagbotman-service/src/main/java/com/diagbot/DiagbotmanServiceApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -26,6 +27,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCircuitBreaker
 @RefreshScope
+@ConfigurationPropertiesScan
 public class DiagbotmanServiceApplication {
 
     public static void main(String[] args) {

+ 6 - 41
diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,24 +1,17 @@
 package com.diagbot.aop;
 
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.rabbit.MySender;
-import com.diagbot.util.GsonUtil;
-import com.diagbot.util.HttpUtils;
-import com.diagbot.util.StringUtil;
-import com.diagbot.util.UserUtils;
+import com.diagbot.util.AopUtil;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
 import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.stereotype.Component;
 
-import java.lang.reflect.Method;
-import java.util.Date;
-
 /**
  * @Description: 日志拦截切面
  * @author: gaodm
@@ -26,6 +19,7 @@ import java.util.Date;
  */
 @Aspect
 @Component
+@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
 public class SysLoggerAspect {
     @Autowired
     private MySender mySender;
@@ -37,37 +31,8 @@ public class SysLoggerAspect {
 
     @Before("loggerPointCut()")
     public void saveSysLog(JoinPoint joinPoint) {
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        Method method = signature.getMethod();
-
-        SysLog sysLog = new SysLog();
-        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-        if (sysLogger != null) {
-            //注解上的描述
-            sysLog.setOperation(sysLogger.value());
-        }
-        //请求的方法名
-        String className = joinPoint.getTarget().getClass().getName();
-        String methodName = signature.getName();
-        sysLog.setMethod(className + "." + methodName + "()");
-        //请求的参数
-        Object[] args = joinPoint.getArgs();
-        String params = "";
-        for (Object o : args) {
-            params += GsonUtil.toJson(o);
-        }
-        if (!StringUtil.isEmpty(params)) {
-            sysLog.setParams(params);
-        }
-        //设置IP地址
-        sysLog.setIp(HttpUtils.getIpAddress());
-        //用户名
-        String username = UserUtils.getCurrentPrinciple();
-        if (!StringUtil.isEmpty(username)) {
-            sysLog.setUsername(username);
-        }
-        sysLog.setGmtCreate(new Date());
-        sysLog.setSysType(SysTypeEnum.DIAGBOTMAN_SERVICE.getKey());
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.DIAGBOTMAN_SERVICE.getKey());
         //保存系统日志
         mySender.outputLogSend(sysLog);
     }

+ 4 - 42
diagbotman-service/src/main/java/com/diagbot/aop/SysLoggerExprotAspect.java

@@ -1,24 +1,16 @@
 package com.diagbot.aop;
 
-import com.diagbot.annotation.SysLoggerExport;
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.rabbit.MySender;
-import com.diagbot.util.GsonUtil;
-import com.diagbot.util.HttpUtils;
-import com.diagbot.util.StringUtil;
-import com.diagbot.util.UserUtils;
+import com.diagbot.util.AopUtil;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
 import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.lang.reflect.Method;
-import java.util.Date;
-
 /**
  * @Description: 日志拦截切面(Excel导出用)
  * @author: gaodm
@@ -37,38 +29,8 @@ public class SysLoggerExprotAspect {
 
     @Before("loggerPointCut()")
     public void saveSysLog(JoinPoint joinPoint) {
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        Method method = signature.getMethod();
-
-        SysLog sysLog = new SysLog();
-        SysLoggerExport sysLogger = method.getAnnotation(SysLoggerExport.class);
-        if (sysLogger != null) {
-            //注解上的描述
-            sysLog.setOperation(sysLogger.value());
-        }
-        //请求的方法名
-        String className = joinPoint.getTarget().getClass().getName();
-        String methodName = signature.getName();
-        sysLog.setMethod(className + "." + methodName + "()");
-        //请求的参数
-        Object[] args = joinPoint.getArgs();
-        String params = "";
-        for (Object o : args) {
-            params += GsonUtil.toJson(o);
-            break;
-        }
-        if (!StringUtil.isEmpty(params)) {
-            sysLog.setParams(params);
-        }
-        //设置IP地址
-        sysLog.setIp(HttpUtils.getIpAddress());
-        //用户名
-        String username = UserUtils.getCurrentPrinciple();
-        if (!StringUtil.isEmpty(username)) {
-            sysLog.setUsername(username);
-        }
-        sysLog.setGmtCreate(new Date());
-        sysLog.setSysType(SysTypeEnum.DIAGBOTMAN_SERVICE.getKey());
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerExprotAspect(joinPoint, SysTypeEnum.DIAGBOTMAN_SERVICE.getKey());
         //保存系统日志
         mySender.outputLogSend(sysLog);
     }

+ 4 - 0
diagbotman-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -23,6 +23,10 @@ public class MybatisPlusConfigurer {
     @Bean
     public PaginationInterceptor paginationInterceptor() {
         PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(-1);
         return paginationInterceptor;
     }
 

+ 0 - 196
diagbotman-service/src/main/java/com/diagbot/entity/SysLog.java

@@ -1,196 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统操作日志表
- * </p>
- *
- * @author gaodm
- * @since 2018-09-14
- */
-public class SysLog implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 日志ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 访问者的IP
-     */
-    private String ip;
-
-    /**
-     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
-     */
-    private Integer sysType;
-
-    /**
-     * 方法
-     */
-    private String method;
-
-    /**
-     * 操作名
-     */
-    private String operation;
-
-    /**
-     * 参数
-     */
-    private String params;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public Integer getSysType() {
-        return sysType;
-    }
-
-    public void setSysType(Integer sysType) {
-        this.sysType = sysType;
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getParams() {
-        return params;
-    }
-
-    public void setParams(String params) {
-        this.params = params;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "SysLog{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", ip=" + ip +
-                ", sysType=" + sysType +
-                ", method=" + method +
-                ", operation=" + operation +
-                ", params=" + params +
-                ", username=" + username +
-                "}";
-    }
-}

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -1,6 +1,6 @@
 package com.diagbot.rabbit;
 
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.util.GsonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;

+ 61 - 0
docs/024.20191203BI日志框架新增表/init_log.sql

@@ -0,0 +1,61 @@
+use `sys-log`;
+
+/*
+Navicat MySQL Data Transfer
+
+Source Server         : 2.236平台开发环境
+Source Server Version : 50725
+Source Host           : 192.168.2.236:3306
+Source Database       : sys-log
+
+Target Server Type    : MYSQL
+Target Server Version : 50725
+File Encoding         : 65001
+
+Date: 2019-12-03 13:24:14
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for log_bi_record
+-- ----------------------------
+DROP TABLE IF EXISTS `log_bi_record`;
+CREATE TABLE `log_bi_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志ID',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `hospital_code` varchar(16) NOT NULL DEFAULT '' COMMENT '医院编码',
+  `doctor_code` varchar(16) NOT NULL DEFAULT '' COMMENT '医院医生编码',
+  `dept_code` varchar(16) NOT NULL DEFAULT '' COMMENT '医院科室编码',
+  `patient_code` varchar(16) NOT NULL DEFAULT '' COMMENT '医院患者编码',
+  `product_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '产品类型(1:云平台内部;2:云平台外部;3:icss;4:智能分诊;5:页面推送模式;6:智能预问诊;7:数据引擎模式)',
+  `code` varchar(50) NOT NULL DEFAULT '' COMMENT '功能编码',
+  `params` text COMMENT '输入参数',
+  `result` text COMMENT '返回参数',
+  `exec_time` varchar(16) NOT NULL DEFAULT '0' COMMENT '响应时间',
+  `success_flag` int(11) NOT NULL DEFAULT '1' COMMENT '调用是否成功(0:失败;1:成功)',
+  `source` int(11) NOT NULL DEFAULT '1' COMMENT '来源(1:后台接口-无处理;2:后台接口-结果特殊处理;3:前端)',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='BI日志表';
+
+-- ----------------------------
+-- Table structure for log_dictionary_info
+-- ----------------------------
+DROP TABLE IF EXISTS `log_dictionary_info`;
+CREATE TABLE `log_dictionary_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `product_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '产品类型(1:云平台内部;2:云平台外部;3:icss;4:智能分诊;5:页面推送模式;6:智能预问诊;7:数据引擎模式)',
+  `code` varchar(50) NOT NULL DEFAULT '' COMMENT '功能编码',
+  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
+  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='BI字典表';

+ 15 - 0
docs/025.20191203静态知识检索的修改/init_static.sql

@@ -0,0 +1,15 @@
+use `sys-icss`;
+-- 删除icss库的静态知识字典信息
+DELETE FROM `icss_dictionary_info` WHERE group_type = 7;
+
+-- 增加知识库的静态知识字典信息
+use `med`;
+
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '全部', '0', '2', '1', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '症状', '1', '2', '30', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '诊断', '18', '2', '10', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '化验', '12', '2', '40', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '辅检', '16', '2', '50', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '药品', '10', '2', '20', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '手术', '25', '2', '60', '静态知识检索类型');
+INSERT INTO `med`.`kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '量表', '48', '2', '70', '静态知识检索类型');

+ 0 - 0
docs/025.20191203静态知识检索的修改/tran_sys_set-Del.sql


Some files were not shown because too many files changed in this diff