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