文档库--es编辑修改
This commit is contained in:
+14
-1
@@ -1491,6 +1491,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//时间类型字段
|
||||
List<OnlCgformField> fieldDateList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.DATE_SINGLE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
List<String> dateSingleList = fieldDateList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//文件类型字段
|
||||
List<OnlCgformField> fieldFileList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
@@ -1715,7 +1716,19 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
bussDocumentLibraryEOMapper.deleteById((String) map.get("id"));
|
||||
bussDocumentLibraryEOMapper.insertInfo(insertField, insertValue);
|
||||
map.put("module_type", "文档库");
|
||||
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(map));
|
||||
Map<String,Object> objectMapTemp = new HashMap<>();
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
Object value = entry.getValue();
|
||||
if(ObjectUtils.isNotEmpty(entry.getValue())){
|
||||
if(dateSingleList.contains(entry.getKey())){
|
||||
value = value.toString().split(" ")[0];
|
||||
}else if("create_time".equals(entry.getKey()) || "update_time".equals(entry.getKey())){
|
||||
value = value.toString().split(" ")[0];
|
||||
}
|
||||
objectMapTemp.put(entry.getKey(),value);
|
||||
}
|
||||
}
|
||||
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(objectMapTemp));
|
||||
JSONArray array = JSONArray.parseArray(JSON.toJSONString(mapListTemp));
|
||||
// JSONObject jsonObjectAll = JSON.parseObject(JSON.toJSONString(mapFullText));
|
||||
//修改es
|
||||
|
||||
Reference in New Issue
Block a user