编辑es
This commit is contained in:
+1
@@ -95,6 +95,7 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/sys/common/download/**", "anon");//文件预览
|
||||
filterChainDefinitionMap.put("/sys/split/file/**", "anon");//图片预览
|
||||
filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件
|
||||
filterChainDefinitionMap.put("/document/bussDocumentLibraryEO/updateES", "anon");//编辑ES数据
|
||||
filterChainDefinitionMap.put("/", "anon");
|
||||
filterChainDefinitionMap.put("/doc.html", "anon");
|
||||
filterChainDefinitionMap.put("/**/*.js", "anon");
|
||||
|
||||
+29
-14
@@ -2250,7 +2250,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
try {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String issueTime = (String) map.get("issue_time");
|
||||
String issueTime = "";
|
||||
if(ObjectUtils.isNotEmpty(map.get("es_update_flag")) && ObjectUtils.isNotEmpty(map.get("issue_time"))){
|
||||
map.put("issue_time",df.format(map.get("issue_time")));
|
||||
}else{
|
||||
issueTime = (String) map.get("issue_time");
|
||||
}
|
||||
Date issueTimeDate = null;
|
||||
if(StringUtils.isNotBlank(issueTime)){
|
||||
issueTimeDate = df.parse(issueTime);
|
||||
@@ -2311,13 +2316,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
mapCopy(stringObjectMap, mapT);
|
||||
dataListTemp.add(mapT);
|
||||
}
|
||||
//编辑ES(更新搜索中心的历史数据,不需要发消息)
|
||||
if(ObjectUtils.isEmpty(map.get("es_update_flag"))){
|
||||
//更新log
|
||||
updateLog(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, cut);
|
||||
//处理修改代替标准,发送通知
|
||||
sendMessageUpdate(mapTemp, dataListTemp, fieldList, fieldDateList, fieldFileList, fieldPullList, cut);
|
||||
}
|
||||
|
||||
//更新log
|
||||
updateLog(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, cut);
|
||||
//判断该条数据是否订阅
|
||||
|
||||
//处理修改代替标准,发送通知
|
||||
sendMessageUpdate(mapTemp, dataListTemp, fieldList, fieldDateList, fieldFileList, fieldPullList, cut);
|
||||
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
@@ -2360,8 +2366,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (ObjectUtils.isNotEmpty(value)) {
|
||||
//处理修改人和修改时间
|
||||
if ("update_by".equals(key)) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
value = sysUser.getUsername();
|
||||
//编辑ES时不处理(修改搜索中心历史数据)
|
||||
if(ObjectUtils.isEmpty(map.get("es_update_flag"))){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
value = sysUser.getUsername();
|
||||
}
|
||||
}
|
||||
List<OnlCgformField> fieldDate = fieldDateList.stream().filter(e -> entry.getKey().equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
//处理时间类型
|
||||
@@ -5737,11 +5746,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = (String) entry.getValue();
|
||||
if (dbFieldName.equals(key)) {
|
||||
List<OSSFile> files = oSSFileAll.stream().filter(e -> StringUtils.isNotBlank(value) && value.equals(e.getConnectId())).collect(Collectors.toList());
|
||||
if (files.size() != 0) {
|
||||
result.addAll(files);
|
||||
if(!"create_time".equals(key)
|
||||
&& !"update_time".equals(key)
|
||||
&& !"issue_time".equals(key)
|
||||
&& !"implement_time".equals(key)
|
||||
&& !"xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(key)){
|
||||
String value = (String) entry.getValue();
|
||||
if (dbFieldName.equals(key)) {
|
||||
List<OSSFile> files = oSSFileAll.stream().filter(e -> StringUtils.isNotBlank(value) && value.equals(e.getConnectId())).collect(Collectors.toList());
|
||||
if (files.size() != 0) {
|
||||
result.addAll(files);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user