清单确认、任务确认流程:增加消息发起人 为'该项目的studio'
设计、prehomo、验证符合性流程:增加消息发起人 为'系统通知'
This commit is contained in:
+2
-2
@@ -170,7 +170,7 @@ public class InventoryAffirmJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -208,7 +208,7 @@ public class InventoryAffirmJob implements Job {
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -170,7 +170,7 @@ public class PrehomoJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -207,7 +207,7 @@ public class PrehomoJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -167,7 +167,7 @@ public class VerifyComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -204,7 +204,7 @@ public class VerifyComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -163,7 +163,7 @@ public class designComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -199,7 +199,7 @@ public class designComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
*/
|
||||
Result<?> updateStatusBatch(JSONObject json);
|
||||
|
||||
void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType);
|
||||
void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType,String initiator);
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
|
||||
+42
-12
@@ -1340,8 +1340,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
@@ -1377,7 +1375,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,currentUser.getUsername());
|
||||
}
|
||||
|
||||
result = "发起清单确认";
|
||||
@@ -1465,6 +1463,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
|
||||
}*/
|
||||
}
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
//只要有一个人拒绝,就改为拒绝。
|
||||
if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){
|
||||
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
|
||||
@@ -1513,7 +1516,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
|
||||
}
|
||||
|
||||
@@ -1554,7 +1557,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1604,7 +1607,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_NOTIFICATION);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_NOTIFICATION,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1627,7 +1630,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
* @param projectLibraryId
|
||||
*/
|
||||
@Override
|
||||
public void sendMessage(String msgTitle, String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType){
|
||||
public void sendMessage(String msgTitle, String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType,String initiator){
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -1641,7 +1644,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo, messageType);
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo, messageType,initiator);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
@@ -1661,8 +1664,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType) {
|
||||
private SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType,String initiator) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
@@ -2074,6 +2078,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
|
||||
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
|
||||
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
@@ -2092,6 +2101,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
String taskType = "";
|
||||
String initiator = "";
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
@@ -2104,6 +2114,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
|
||||
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
|
||||
userIdList.add(dreUserId);
|
||||
@@ -2116,6 +2128,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2127,6 +2140,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2138,6 +2152,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())){
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2149,6 +2164,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue())){
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
msgContentEN = sysUser.getUsername() + " has accepted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2160,6 +2176,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_NOTIFICATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_START_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
@@ -2172,6 +2189,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_TASK;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_START_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
@@ -2184,6 +2202,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_TASK;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_START_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
@@ -2196,6 +2215,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_TASK;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String designInitiatorId = jsonObject.getString("designInitiatorId"); //设计符合性发起人id
|
||||
userIdList.add(designInitiatorId);
|
||||
@@ -2208,6 +2228,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_TASK;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String prehomoInitiatorId = jsonObject.getString("prehomoInitiatorId"); //pre-Home发起人id
|
||||
userIdList.add(prehomoInitiatorId);
|
||||
@@ -2220,6 +2241,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_TASK;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String verifyInitiatorId = jsonObject.getString("verifyInitiatorId"); //验证符合性发起人id
|
||||
userIdList.add(verifyInitiatorId);
|
||||
@@ -2232,6 +2254,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_TASK;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
@@ -2244,6 +2267,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_NOTIFICATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
@@ -2256,6 +2280,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_NOTIFICATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
@@ -2268,6 +2293,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_COMPLIANCE_NOTIFICATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
@@ -2290,7 +2316,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,initiator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6595,6 +6621,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
libraryBaseQueryWrapper.lambda().eq(ProjectLibraryBase::getId,projectLibraryId);
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseMapper.selectOne(libraryBaseQueryWrapper);
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
projectLawsInventoryEOList.forEach(projectLawsInventoryEO -> {
|
||||
|
||||
//如果清单确认状态为待确认的,进行催办
|
||||
@@ -6656,7 +6686,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6712,7 +6742,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -372,7 +372,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -425,7 +425,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
return new Result<>().success("提醒办理成功!");
|
||||
}
|
||||
@@ -992,7 +992,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -218,7 +218,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-3
@@ -54,7 +54,14 @@ public class SendMessageUtils {
|
||||
SendMessageUtils.webSocket = webSocket;
|
||||
}
|
||||
|
||||
public static void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType) {
|
||||
public static void sendMessage(String msgTitle,
|
||||
String msgContent,
|
||||
List<String> userIdList,
|
||||
String projectLibraryId,
|
||||
Map<String,Object> sendMessageMap,
|
||||
FeishuMsgVo feishuMsgVo,
|
||||
MessageTypeEnum messageType,
|
||||
String initiator) {
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -69,7 +76,7 @@ public class SendMessageUtils {
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo,messageType);
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo,messageType,initiator);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
@@ -89,8 +96,9 @@ public class SendMessageUtils {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType) {
|
||||
private static SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType,String initiator) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
|
||||
Reference in New Issue
Block a user