任务确认流程-责任人接受、拒绝给studio发消息

This commit is contained in:
wangzhijiang
2022-07-11 09:50:57 +08:00
parent 3dc91f6e16
commit cf190e37dc
2 changed files with 29 additions and 1 deletions
@@ -8,6 +8,8 @@ public enum MsgTypeEnum {
TASK_AFFIRM_ISSUE_DRE_MSG("任务确认分配dre消息","taskAffirmIssueDreMsg"),
TASK_AFFIRM_DRE_ACCEPTED("任务确认DRE通过消息","taskAffirmDreAccepted"),
TASK_AFFIRM_DRE_REJECTED("任务确认DRE退回消息","taskAffirmDreRejected"),
TASK_AFFIRM_ACCEPTED_MSG("任务确认责任人通过消息","taskAffirmAcceptedMsg"),
TASK_AFFIRM_REJECTED_MSG("任务确认责任人拒绝消息","taskAffirmRejectedMsg"),
DESIGN_ISSUE_DRE_MSG("设计符合性确认分配dre消息","designIssueDreMsg"),
DESIGN_REMIND_MSG("设计符合性提醒办理","designRemindMsg"),
@@ -2090,6 +2090,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
MessageTypeEnum messageTypeEnum = null;
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
@@ -2099,6 +2101,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
userIdList.add(dreUserId);
@@ -2109,6 +2112,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task. Please check and and handle it in time.");
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
} 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()
@@ -2118,6 +2122,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
} 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()
@@ -2127,6 +2132,27 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has submitted the task. Please check and and handle it in time.");
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
} 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()
+ ". Please check and handle it in time.";
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ ": You have a regulation task confirmation to complete";
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
} 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()
+ ". Please check and handle it in time.";
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ ": You have a regulation task confirmation notification to check";
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has accepted the task. Please check and and handle it in time.");
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_NOTIFICATION;
}
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
@@ -2149,7 +2175,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK);
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum);
}
}