文档库--新增处理日期格式字段
This commit is contained in:
+6
-4
@@ -974,6 +974,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<OnlCgformField> searchFieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(e.getIsShowSearch())).collect(Collectors.toList());
|
||||
//文件类型字段
|
||||
List<OnlCgformField> fieldFileList = fieldList.stream().filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
//日期类型字段
|
||||
List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> FieldTypeEnum.DATE_SINGLE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
List<String> fieldDateList = onlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
//普通数据字典
|
||||
@@ -999,14 +1002,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//es全文新增数据(数据转换)
|
||||
esFullText(cut, fieldList, categoryList, dictItemList, mapList, sb, entry);
|
||||
|
||||
//处理发布日期,标准实施日期
|
||||
if ("issue_time".equals(key) || "implement_time".equals(key)) {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
//处理日期格式
|
||||
if(fieldDateList.contains(key)){
|
||||
if (ObjectUtils.isNotEmpty(value)) {
|
||||
value = "str_to_date('" + value + "','%Y-%m-%d')";
|
||||
}
|
||||
valuesBuilder.append("," + value);
|
||||
} else {
|
||||
}else {
|
||||
//处理文件类型
|
||||
List<OnlCgformField> fieldFile = null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user