소스 검색

互斥项提示语不提示本身

zhoutg 3 년 전
부모
커밋
e581483daa

+ 9 - 9
src/main/java/com/diagbot/dto/IndicationExportDTO.java

@@ -17,22 +17,22 @@ public class IndicationExportDTO implements Serializable {
 
     @Excel(name="开单名称", width = 25, orderNum = "10")
     private String parName = "";
-    @Excel(name="开单类型", width = 15, orderNum = "20")
+    @Excel(name="开单类型", width = 17, orderNum = "20")
     private String parType = "";
     @Excel(name="规则名称", width = 25, orderNum = "30")
     private String baseName = "";
-    @Excel(name="规则类型", width = 15, orderNum = "35")
+    @Excel(name="规则类型", width = 17, orderNum = "35")
     private String baseType;
-    @Excel(name="禁忌类型", width = 15, orderNum = "40")
+    @Excel(name="规则条件", width = 17, orderNum = "40")
     private String tabooType;
-    @Excel(name="最大值", width = 10, orderNum = "50")
-    private String maxValue;
-    @Excel(name="最大值符号", width = 10, orderNum = "60")
-    private String maxOperator;
-    @Excel(name="最小值", width = 10, orderNum = "70")
+    @Excel(name="最小值", width = 10, orderNum = "50")
     private String minValue;
-    @Excel(name="最小值符号", width = 10, orderNum = "80")
+    @Excel(name="最小值符号", width = 10, orderNum = "60")
     private String minOperator;
+    @Excel(name="最大值", width = 10, orderNum = "70")
+    private String maxValue;
+    @Excel(name="最大值符号", width = 10, orderNum = "80")
+    private String maxOperator;
     @Excel(name="原因及建议", width = 15, orderNum = "90")
     private String msg;
     @Excel(name="ruleId", width = 10, orderNum = "100")

+ 11 - 5
src/main/java/com/diagbot/rule/CommonRule.java

@@ -391,7 +391,7 @@ public class CommonRule {
     /**
      * 互斥开单项
      *
-     * @param orderList      开单列表
+     * @param orderList     开单列表
      * @param ruleBaseDTO
      * @param billMsgList
      * @param ruleSimpleDTO
@@ -399,16 +399,22 @@ public class CommonRule {
      */
     public <T> void exclusionBill(List<T> orderList, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
         if (ListUtil.isNotEmpty(orderList) && orderList.size() > 1) {
+            String baseLibName = ruleBaseDTO.getBaseLibName(); // 互斥名称
+            String libName = ruleSimpleDTO.getLibName(); // 标准名称
+            // 加入集合后,会出现自己与自己互斥的数据,这些数据不提示
+            if (libName.equals(baseLibName)) {
+                return;
+            }
             // 不同的项目可能对应同一个uniqueName,提示显示多条
             Map<String, List<T>> map = EntityUtil.makeEntityListMap(orderList, "uniqueName");
-            List<T> orginNameList = map.get(ruleBaseDTO.getBaseLibName());
+            List<T> orginNameList = map.get(baseLibName);
             if (map.get(ruleBaseDTO.getBaseLibName()) != null) {
                 for (T bean : orginNameList) {
                     String orginName = ReflectUtil.getProperty(bean, "name");
                     // A与B不宜同时进行, B与A不宜同时进行 只能提示一个
-                    if (!set.contains(ruleSimpleDTO.getLibName() + "******" + orginName)) {
-                        set.add(ruleSimpleDTO.getLibName() + "******" + orginName);
-                        set.add(orginName + "******" + ruleSimpleDTO.getLibName());
+                    if (!set.contains(libName + "******" + orginName)) {
+                        set.add(libName + "******" + orginName);
+                        set.add(orginName + "******" + libName);
                         ruleSimpleDTO.setContent(orginName);
                         ruleSimpleDTO.setConType(conType);
                         BillMsg billMsg = msgNewUtil.getCommonBillMsg(ruleSimpleDTO);

+ 7 - 4
src/main/resources/mapper/KlRuleMapper.xml

@@ -235,10 +235,13 @@
             tt2.lib_name base_name,
             xx2.NAME base_type,
             CASE
-                when tt1.type = '4' and xx2.`name` in ('药品通用名','药品化学物质类别','药品治疗学类别','药品药理学类别','药品解剖学类别') then '药物过敏原'
-                when tt1.type = '1' and xx2.`name` in ('药品通用名','药品化学物质类别','药品治疗学类别','药品药理学类别','药品解剖学类别') then '服用药品'
+                when tt1.type = '1' then '等于术语'
+                when tt1.type = '2' then '比较'
+                when tt1.type = '3' then '不等于术语'
+                when tt1.type = '4' then '过敏'
                 when tt1.type = '5' then '开单项互斥'
-                else xx2.name
+                when tt1.type = '6' then '正则'
+                else '错误类型'
 			end taboo_type,
             tt1.eq_value,
             tt1.min_value,
@@ -294,7 +297,7 @@
         LEFT JOIN kl_concept tt2 ON tt2.is_deleted = 'N'
         AND tt2.`status` = 1
         AND tt1.base_id = tt2.id
-        LEFT JOIN kl_lexicon xx2 ON tt2.lib_type = xx2. CODE
+        LEFT JOIN kl_lexicon xx2 ON tt2.lib_type = xx2.CODE
         ORDER BY par_name, rule_id
     </select>