文档库--新增处理日期格式字段
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> 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> 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();
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
//普通数据字典
|
//普通数据字典
|
||||||
@@ -999,14 +1002,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
//es全文新增数据(数据转换)
|
//es全文新增数据(数据转换)
|
||||||
esFullText(cut, fieldList, categoryList, dictItemList, mapList, sb, entry);
|
esFullText(cut, fieldList, categoryList, dictItemList, mapList, sb, entry);
|
||||||
|
|
||||||
//处理发布日期,标准实施日期
|
//处理日期格式
|
||||||
if ("issue_time".equals(key) || "implement_time".equals(key)) {
|
if(fieldDateList.contains(key)){
|
||||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
if (ObjectUtils.isNotEmpty(value)) {
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
value = "str_to_date('" + value + "','%Y-%m-%d')";
|
value = "str_to_date('" + value + "','%Y-%m-%d')";
|
||||||
}
|
}
|
||||||
valuesBuilder.append("," + value);
|
valuesBuilder.append("," + value);
|
||||||
} else {
|
}else {
|
||||||
//处理文件类型
|
//处理文件类型
|
||||||
List<OnlCgformField> fieldFile = null;
|
List<OnlCgformField> fieldFile = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user