浏览代码

Merge branch 'dev/neo2mysql20210120' into dev/diagnose20210315

zhoutg 4 年之前
父节点
当前提交
96c1a144ba

+ 16 - 15
src/main/java/com/diagbot/facade/KlRuleFacade.java

@@ -105,6 +105,7 @@ public class KlRuleFacade extends KlRuleServiceImpl {
                     .set(StringUtil.isNotBlank(klRuleInfoSaveVO.getParHasSub().toString()), "has_sub_cond", klRuleInfoSaveVO.getParHasSub())
                     .set(StringUtil.isNotBlank(klRuleInfoSaveVO.getParStatus().toString()), "status", klRuleInfoSaveVO.getParStatus())
                     .set(StringUtil.isNotBlank(klRuleInfoSaveVO.getParMsg()), "msg", klRuleInfoSaveVO.getParMsg())
+                    .set("modifier", klRuleInfoSaveVO.getModifier())
                     .set("gmt_modified", now);
             res = this.update(klRuleUpdate);
 
@@ -118,6 +119,8 @@ public class KlRuleFacade extends KlRuleServiceImpl {
             //先保存主表rule
             KlRule klRule = new KlRule();
             klRule.setConceptId(klRuleInfoSaveVO.getParConceptId());
+            klRule.setCreator(klRuleInfoSaveVO.getModifier());
+            klRule.setModifier(klRuleInfoSaveVO.getModifier());
             klRule.setDescription(klRuleInfoSaveVO.getParDescription());
             klRule.setHasSubCond(klRuleInfoSaveVO.getParHasSub());
             klRule.setRuleType(klRuleInfoSaveVO.getParRuleType());
@@ -182,8 +185,10 @@ public class KlRuleFacade extends KlRuleServiceImpl {
             //先保存数据到kl_rule_base表里
             List<KlRuleBase> klRuleBaseList = new ArrayList<>();
             for (KlRuleInfoSaveSubVO list : klRuleInfoSaveSub) {
+                KlRuleCondition klRuleCondition = new KlRuleCondition();
                 KlRuleBase klRuleBase = new KlRuleBase();
                 klRuleBase.setGmtModified(now);
+                klRuleBase.setModifier(klRuleInfoSaveVO.getModifier());
                 klRuleBase.setConceptId(list.getSubConceptId());
                 klRuleBase.setType(list.getSubType());
                 klRuleBase.setDescription(list.getSubDescription());
@@ -197,23 +202,18 @@ public class KlRuleFacade extends KlRuleServiceImpl {
                 klRuleBase.setEqValue(list.getSubEqValue());
                 klRuleBase.setEqOperator(list.getSubEqOperator());
                 klRuleBase.setEqUnit(list.getSubEqUnit());
-                klRuleBaseList.add(klRuleBase);
-            }
-            res = klRuleBaseFacade.saveBatchAll(klRuleBaseList);
-            List<KlRuleCondition> klRuleConditionList = new ArrayList<>();
-            for (KlRuleBase data1 : klRuleBaseList) {
-                for (KlRuleInfoSaveSubVO data2 : klRuleInfoSaveSub) {
-                    KlRuleCondition klRuleCondition = new KlRuleCondition();
-                    if (data1.getDescription().equals(data2.getSubDescription())) {
-                        klRuleCondition.setGmtCreate(now);
-                        klRuleCondition.setGroupType(data2.getGroupType());
-                        klRuleCondition.setRuleBaseId(data1.getId());
-                        klRuleCondition.setRuleId(klRuleInfoSaveVO.getParId());
-                        klRuleConditionList.add(klRuleCondition);
-                    }
+                res = klRuleBaseFacade.save(klRuleBase);
+                //再把数据保存在kl_rule_condition
+                if (res) {
+                    klRuleCondition.setGmtCreate(now);
+                    klRuleCondition.setModifier(klRuleInfoSaveVO.getModifier());
+                    klRuleCondition.setGroupType(list.getGroupType());
+                    klRuleCondition.setRuleBaseId(klRuleBase.getId());
+                    klRuleCondition.setRuleId(klRuleInfoSaveVO.getParId());
+                    res = klRuleConditionFacade.save(klRuleCondition);
                 }
+
             }
-            res = klRuleConditionFacade.saveBatchAll(klRuleConditionList);
         }
 
         return res;
@@ -231,6 +231,7 @@ public class KlRuleFacade extends KlRuleServiceImpl {
         klRuleUpdate.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("id", klRuleSatartOrdisaVO.getId())
                 .set("status", start)
+                .set("modifier", klRuleSatartOrdisaVO.getModifier())
                 .set("gmt_modified", now);
         return this.update(klRuleUpdate);
     }

+ 2 - 1
src/main/java/com/diagbot/process/BillProcess.java

@@ -123,7 +123,8 @@ public class BillProcess {
                                     case Vital: // 体格检查项目
                                         vitalRule.bill(wordCrfDTO.getVitalLabel(), ruleBaseDTO, billMsgList, ConEnum.vitals.getName(), ruleSimpleDTO);
                                         break;
-                                    case PacsName: // 辅检项目
+                                    case PacsName: // 辅助检查项目
+                                    case PacsSubName: // 辅助检查子项目
                                         if (ruleBaseDTO.getBaseType() != null && ruleBaseDTO.getBaseType().equals(BaseTypeEnum.B5.getKey())) {
                                             // 开单项互斥
                                             commonRule.exclusionBill(wordCrfDTO, ruleBaseDTO, billMsgList, ConEnum.exclusion.getName(), ruleSimpleDTO, set);

+ 1 - 0
src/main/java/com/diagbot/vo/KlRuleInfoSaveVO.java

@@ -32,5 +32,6 @@ public class KlRuleInfoSaveVO {
 /*    private String parlibName;
     private String parLenName;
     private String parLenCode;*/
+    private String modifier;
     private List<KlRuleInfoSaveSubVO> klRuleInfoSaveSub;
 }

+ 1 - 0
src/main/java/com/diagbot/vo/KlRuleSatartOrdisaVO.java

@@ -15,4 +15,5 @@ import javax.validation.constraints.NotNull;
 public class KlRuleSatartOrdisaVO {
     @NotNull(message = "请输id")
     private Long id;
+    private String modifier;
 }