Merge remote-tracking branch 'origin/master'
This commit is contained in:
+3
-3
@@ -611,10 +611,10 @@ public class SysPermissionController {
|
||||
}
|
||||
/* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/
|
||||
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
meta.put("title", permission.getName());
|
||||
}else{
|
||||
if(CutEnum.EN.getValue().equals(cut)){
|
||||
meta.put("title", permission.getMenuEn());
|
||||
}else{
|
||||
meta.put("title", permission.getName());
|
||||
}
|
||||
|
||||
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
|
||||
+39
-32
@@ -21,6 +21,7 @@ import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.domain.service.DomainUserRelService;
|
||||
import com.jero.modules.log.entity.BussLogEO;
|
||||
import com.jero.modules.log.service.IBussLogEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -109,6 +110,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private DomainUserRelService domainUserRelService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -558,7 +561,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
|
||||
//代替标准不为空,需要向被替代标准的法规工程师发送站内通知和飞书信息,提醒内容:"新标准编号"已实施,请注意更新“替代标准编号”状态
|
||||
|
||||
String cut = (String) map.get("cut");
|
||||
map.remove("cut");
|
||||
map.remove("replace_standard_id");
|
||||
map.remove("corresponding_standard_id");
|
||||
@@ -568,6 +571,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<OnlCgformField> fieldDateList = fieldList.stream().filter(e -> FieldTypeEnum.DATE_SINGLE.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> fieldPullList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.PULL_SINGLE.getValue().equals(e.getFieldShowType())
|
||||
|| FieldTypeEnum.PULL_MORE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
|
||||
String mustFields = "id,create_by,create_time,update_by,update_time,sys_org_code";
|
||||
String mustValues = getMustValues();
|
||||
//字段
|
||||
@@ -619,6 +627,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String insertField = mustFields + fieldsBuilder.toString();
|
||||
String insertValue = mustValues + valuesBuilder.toString();
|
||||
bussDocumentLibraryEOMapper.insertInfo(insertField, insertValue);
|
||||
|
||||
String replaceStandard = (String) map.get("replace_standard");
|
||||
if(StringUtils.isNotBlank(replaceStandard)){
|
||||
//新增时如果填写代替标准,需要向填写的代替标准的负责人发消息
|
||||
replaceStandardSend(Arrays.asList(replaceStandard.split(",")));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -661,7 +675,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
|
||||
//处理修改代替标准,发送通知
|
||||
sendMessage(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList,cut);
|
||||
sendMessageUpdate(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList,cut);
|
||||
|
||||
|
||||
//字段
|
||||
@@ -895,7 +909,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
*
|
||||
* @param map
|
||||
*/
|
||||
private void sendMessage(Map<String, Object> map,
|
||||
private void sendMessageUpdate(Map<String, Object> map,
|
||||
List<Map<String, Object>> dataList,
|
||||
List<OnlCgformField> fieldList,
|
||||
List<OnlCgformField> fieldDateList,
|
||||
@@ -944,42 +958,35 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<String> listTemp = Arrays.asList(replaceStandardTemp.split(","));
|
||||
List<String> listNew = list.stream().filter(e -> !listTemp.contains(e)).collect(Collectors.toList());
|
||||
//向listNew对应的工程师发飞书通知
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> lambdaQueryWrapperTemp = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapperTemp.in(BussDocumentLibraryEO::getId,listNew);
|
||||
List<Map<String, Object>> mapList = this.listMaps(lambdaQueryWrapperTemp);
|
||||
|
||||
for (Map<String, Object> stringObjectMap : mapList) {
|
||||
userNameListTemp.add((String) stringObjectMap.get("create_by"));
|
||||
serialNumberList.add((String) stringObjectMap.get("serial_number"));
|
||||
}
|
||||
List<SysUser> userList = sysUserMapper.getUserListByNames(StringUtils.join(userNameListTemp, ","));
|
||||
List<String> userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
|
||||
String content = "新标准编号已实施,请注意更新替代标准编号:"+StringUtils.join(serialNumberList,",")+"的状态,"+"链接: http://localhost:3000/docManage/library";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, content);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
replaceStandardSend(listNew);
|
||||
} else if(StringUtils.isBlank(replaceStandardTemp) && StringUtils.isNotBlank(replaceStandard)) {
|
||||
//(2)此种情况为编辑前代替标准没有数据
|
||||
//向replaceStandard对应的工程师发飞书通知
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> lambdaQueryWrapperTemp = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapperTemp.in(BussDocumentLibraryEO::getId,Arrays.asList(replaceStandard.split(",")));
|
||||
List<Map<String, Object>> mapList = this.listMaps(lambdaQueryWrapperTemp);
|
||||
for (Map<String, Object> stringObjectMap : mapList) {
|
||||
userNameListTemp.add((String) stringObjectMap.get("create_by"));
|
||||
serialNumberList.add((String) stringObjectMap.get("serial_number"));
|
||||
}
|
||||
List<SysUser> userList = sysUserMapper.getUserListByNames(StringUtils.join(userNameListTemp, ","));
|
||||
List<String> userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
String content = "新标准编号已实施,请注意更新替代标准编号:"+StringUtils.join(serialNumberList,",")+"的状态";
|
||||
String contentInfo = "新标准编号已实施,请注意更新替代标准编号:"+StringUtils.join(serialNumberList,",")+"的状态,"+"链接: http://localhost:3000/docManage/library";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
replaceStandardSend(Arrays.asList(replaceStandard.split(",")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void replaceStandardSend(List<String> documentIdList) {
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> lambdaQueryWrapperTemp = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapperTemp.in(BussDocumentLibraryEO::getId, documentIdList);
|
||||
List<Map<String, Object>> mapList = this.listMaps(lambdaQueryWrapperTemp);
|
||||
List<String> userNameListTemp = new ArrayList<>();
|
||||
List<String> serialNumberList = new ArrayList<>();
|
||||
for (Map<String, Object> stringObjectMap : mapList) {
|
||||
userNameListTemp.add((String) stringObjectMap.get("create_by"));
|
||||
serialNumberList.add((String) stringObjectMap.get("serial_number"));
|
||||
}
|
||||
List<SysUser> userList = sysUserMapper.getUserListByNames(StringUtils.join(userNameListTemp, ","));
|
||||
List<String> userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
String content = "新标准编号已实施,请注意更新替代标准编号:" + StringUtils.join(serialNumberList, ",") + "的状态";
|
||||
String contentInfo = "新标准编号已实施,请注意更新替代标准编号:" + StringUtils.join(serialNumberList, ",") + "的状态," + "链接: http://localhost:3000/docManage/library";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
private SysAnnouncement getSysAnnouncement(List<String> userIdList, String content, String contentInfo) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
|
||||
Reference in New Issue
Block a user