0027005599 2 лет назад
Родитель
Сommit
d98e5da5f3

+ 2 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/FactorEnchangeFactory.java

@@ -158,7 +158,7 @@ public class FactorEnchangeFactory {
     }
 
     public void insertWarningDetail(Map<String, Object> itemMap, MedicalInsRuleInfo medicalInsRuleInfo, Object audit, List<Map<String, Object>> itemList) {
-        if (null == audit || CollectionUtil.isEmpty(itemList)) {
+        if (null == audit || (CollectionUtil.isEmpty(itemList) && !(audit instanceof AdvanceWarningAudit))) {
             return;
         }
         if (audit instanceof AdvanceWarningAudit) {
@@ -189,6 +189,7 @@ public class FactorEnchangeFactory {
         advanceWarningAuditDetail.setTreatmentType(advanceWarningAudit.getTreatmentType());
         advanceWarningAuditDetail.setNoticeType(advanceWarningAudit.getNoticeType());
         advanceWarningAuditDetail.setDescription(medicalInsRuleInfo.getViolationDesc());
+        advanceWarningAuditDetail.setMedicalInsRuleInfoId(medicalInsRuleInfo.getId());
         advanceWarningAuditDetailService.save(advanceWarningAuditDetail);
     }
 

+ 2 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/RuleEngine.java

@@ -344,7 +344,7 @@ public class RuleEngine {
             }
             JSONObject sendJson = new JSONObject();
             sendJson.put("id", advanceWarningAudit.getId());
-            sendJson.put("type", "during");
+            sendJson.put("type", "before");
             webSocket.pushMessage(ipStr, sendJson.toJSONString());
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -395,7 +395,7 @@ public class RuleEngine {
             if (sendFlag) {
                 JSONObject sendJson = new JSONObject();
                 sendJson.put("id", midIncidentAudit.getId());
-                sendJson.put("type", "before");
+                sendJson.put("type", "during");
                 webSocket.pushMessage(ipStr, sendJson.toJSONString());
             } else {
                 log.error("无违规,事中审核无需提醒 门诊/住院号:{}", midIncidentWarningVO.getVisit_no());

+ 4 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/SPELUtil.java

@@ -133,6 +133,7 @@ public class SPELUtil {
         ctx.setVariables(contentMap);
         Expression expression = parser.parseExpression(condStr);
         Object defResult = expression.getValue(ctx);
+        log.info("执行语句:{} 执行结果:{} 对象数据:{} ", condStr, defResult, contentMap);
 //        Object defResult = expression.getValue(ctx, Object.class);
 
         return defResult;
@@ -299,6 +300,9 @@ public class SPELUtil {
     }
 
     public static Boolean isMemberListAndList(List<Object> lList, List<Object> rList) {
+        if (CollectionUtil.isEmpty(rList) || CollectionUtil.isEmpty(lList)) {
+            return false;
+        }
         for (Object value : rList) {
             boolean flag = isMemberLeftObject(value, lList);
             if (flag) {