Merge branch 'feature_dev_20230222_FJDSS' into dev_2nd_LCYH
# Conflicts: # jero-boot/db/蔚来标准sql/dev_2nd_period.sql # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java
This commit is contained in:
+24
@@ -1,5 +1,6 @@
|
||||
package com.jero.common.util;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
@@ -8,6 +9,7 @@ import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 类描述:时间操作定义类
|
||||
@@ -614,6 +616,28 @@ public class DateUtils extends PropertyEditorSupport {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期数据转换字符串
|
||||
* @param dateList
|
||||
* @return
|
||||
*/
|
||||
public static String formatDateList(List<Date> dateList) {
|
||||
StringBuilder strSb = new StringBuilder();
|
||||
|
||||
if(CollectionUtils.isNotEmpty(dateList)){
|
||||
dateList = dateList.stream().distinct().sorted().collect(Collectors.toList());
|
||||
for (Date date : dateList) {
|
||||
strSb.append(date_sdf.get().format(date)).append(",");
|
||||
}
|
||||
}
|
||||
|
||||
String result = "";
|
||||
if(!StringUtils.isEmpty(strSb.toString())){
|
||||
result = strSb.substring(0,strSb.length()-1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* String类型 转换为Date, 如果参数长度为10 转换格式”yyyy-MM-dd“ 如果参数长度为19 转换格式”yyyy-MM-dd
|
||||
* HH:mm:ss“ * @param text String类型的时间值
|
||||
|
||||
Reference in New Issue
Block a user