ソースを参照

同一时间数据匹配插件问题修复

0027005599 1 年間 前
コミット
73bdbe4b60

+ 5 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/common/CommonUtil.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.medical.common;
 
 import cn.hutool.core.date.DateUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.SpringContextUtils;
 import org.jeecg.modules.medical.Constant;
 import org.jeecg.modules.medical.ruleengine.RuleEngine;
@@ -11,6 +12,7 @@ import org.springframework.stereotype.Component;
 
 import java.util.Date;
 
+@Slf4j
 public class CommonUtil {
     @Autowired
     static RedisTemplate redisTemplate = (RedisTemplate) SpringContextUtils.getBean("redisTemplate");
@@ -57,9 +59,11 @@ public class CommonUtil {
             if(projectUseTimeStr.length()>15){
                 return projectUseTimeStr.substring(0, 10);
             }
-        }else if(projectUseTime instanceof Date){
+        }else if(projectUseTime instanceof java.util.Date || projectUseTime instanceof java.sql.Date){
             Date projectUseTimeDate = (Date) projectUseTime;
             return DateUtil.formatDate(projectUseTimeDate);
+        }else{
+            log.error("时间类型匹配不上:{}", projectUseTime.getClass());
         }
         return projectUseTime.toString();
     }

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

@@ -41,7 +41,7 @@ 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);
+                    log.info("同批其他项目编码:{} 项目使用时间:{}", projectCode, projectUseDay);
                     Integer quaity = (Integer) adviceMap.getOrDefault(SystemEventAttrConstant.QUANTITY, 1);
                     if (StringUtils.isNotBlank(projectCode) && null != projectUseTime && projectCode.equals(srcProjectCode) && srcProjectUseDay.equals(projectUseDay)) {
                         projectNum = projectNum + quaity;