Ver código fonte

解决规则跑数据插件入参数问题

0027005599 1 ano atrás
pai
commit
a5f0b9c1aa

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/plugin/GroupbyProjectCodeNumPlugin.java

@@ -32,6 +32,7 @@ public class GroupbyProjectCodeNumPlugin implements PluginInterface {
                 Object srcProjectUseTime = localMap.get(SystemEventAttrConstant.PROJECT_USE_TIME);
                 Object srcProjectUseDay = CommonUtil.getProjectUseDay(srcProjectUseTime);
                 Object srcProjectCode = localMap.getOrDefault(SystemEventAttrConstant.MEDICAL_PROJECT_CODE_KEY, "").toString();
+                log.info("项目编码:{} 项目使用时间:{}", srcProjectCode, srcProjectUseDay);
                 if (null == srcProjectCode || null == srcProjectUseTime) {
                     localMap.put(SystemEventAttrConstant.SAME_TIME_SAME_CODE_NUM, 0);
                     return;
@@ -40,9 +41,13 @@ public class GroupbyProjectCodeNumPlugin implements PluginInterface {
                     String projectCode = adviceMap.getOrDefault(SystemEventAttrConstant.MEDICAL_PROJECT_CODE_KEY, "").toString();
                     Object projectUseTime = adviceMap.get(SystemEventAttrConstant.PROJECT_USE_TIME);
                     String projectUseDay = CommonUtil.getProjectUseDay(projectUseTime);
+                    log.info("同批其他项目编码:{} 项目使用时间:{}", projectCode, srcProjectUseDay);
                     Integer quaity = (Integer) adviceMap.getOrDefault(SystemEventAttrConstant.QUANTITY, 1);
                     if (StringUtils.isNotBlank(projectCode) && null != projectUseTime && projectCode.equals(srcProjectCode) && srcProjectUseDay.equals(projectUseDay)) {
                         projectNum = projectNum + quaity;
+                    }
+                    if (StringUtils.isNotBlank(projectCode) && null != projectUseTime  && srcProjectUseDay.equals(projectUseDay)) {
+                        projectNum = projectNum + quaity;
                         projectCodeList.add(projectCode);
                     }
                     if (StringUtils.isNotBlank(projectCode) && projectCode.equals(srcProjectCode)) {