法规清单确认消息完毕
This commit is contained in:
+301
-196
@@ -19,7 +19,9 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
@@ -35,6 +37,7 @@ import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||
import com.jero.modules.dummy.util.DeepCopyListUtil;
|
||||
import com.jero.modules.dummy.util.ListDiff;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -229,6 +232,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
@Autowired
|
||||
private IProcessInfoDetailEOService processInfoDetailEOService;
|
||||
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -1384,6 +1390,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
//项目名称
|
||||
String projectVersion = (com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId()) && com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getProjectVersion())) ? "00" : projectLibraryBase.getProjectVersion();
|
||||
String projectName = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket() + "-" + projectVersion;
|
||||
//TODO 切换成枚举,不要在代码里出现魔数
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.INVENTORY_AFFIRM.getValue())){
|
||||
String ids = json.getString("ids");
|
||||
@@ -1484,21 +1494,25 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//消息内容
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ". The due date is " + inventoryAffirmDueDate+ ". Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation list confirmation task to complete";
|
||||
//String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ". The due date is " + inventoryAffirmDueDate+ ". Please check and address it in a timely manner.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a regulation list confirmation task to complete";
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(inventoryAffirmDueDate);
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
//feishuMsgVo.setDueDate(inventoryAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
@@ -1507,20 +1521,39 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_LIST_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_LIST_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,请及时查看处理此项任务,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + inventoryAffirmDueDate);
|
||||
feishuMsgVo.setEnContentUpper("Please check and address the task in a timely manner. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: "+ inventoryAffirmDueDate);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,currentUser.getUsername());
|
||||
//sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,currentUser.getUsername());
|
||||
|
||||
//往待办中心添加数据。
|
||||
ProcessInfoEO processInfoEO = new ProcessInfoEO();
|
||||
@@ -1621,24 +1654,24 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
//消息内容
|
||||
String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
//String msgContentEN = "";
|
||||
//String msgTitle = "";
|
||||
|
||||
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue()) || isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())){
|
||||
msgContentEN = "The regulation list confirmation" +" of "+projectLawsInventoryEO.getSerialNumber() +" for "
|
||||
+ projectNameInfoEO.getProjectName() +" is rejected by " +currentUser.getUsername() +". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket() +
|
||||
": You have a regulation list confirmation task to complete";
|
||||
//msgContentEN = "The regulation list confirmation" +" of "+projectLawsInventoryEO.getSerialNumber() +" for "
|
||||
// + projectNameInfoEO.getProjectName() +" is rejected by " +currentUser.getUsername() +". Please check and address it in a timely manner.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket() +
|
||||
// ": You have a regulation list confirmation task to complete";
|
||||
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! This task is rejected by " +currentUser.getUsername()+ ". Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! This task is rejected by " +currentUser.getUsername()+ ". Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
@@ -1648,38 +1681,62 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,studioUserInfo.getUsername());
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,studioUserInfo.getUsername());
|
||||
String dueDate = sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_LIST_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_LIST_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务被"+ currentUser.getUsername() +"拒绝,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + dueDate);
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task is rejected by "+ currentUser.getUsername() +". Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: "+ dueDate);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue()) || isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())){
|
||||
msgContentEN = "The regulation list confirmation of "+projectLawsInventoryEO.getSerialNumber() + " for "
|
||||
+ projectNameInfoEO.getProjectName() +" is rejected by " + currentUser.getUsername() +". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket() +
|
||||
": You have a regulation list confirmation task to complete";
|
||||
//msgContentEN = "The regulation list confirmation of "+projectLawsInventoryEO.getSerialNumber() + " for "
|
||||
// + projectNameInfoEO.getProjectName() +" is rejected by " + currentUser.getUsername() +". Please check and address it in a timely manner.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket() +
|
||||
// ": You have a regulation list confirmation task to complete";
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! This task is rejected by "+currentUser.getUsername()+". Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! This task is rejected by "+currentUser.getUsername()+". Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
@@ -1689,21 +1746,46 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,studioUserInfo.getUsername());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,studioUserInfo.getUsername());
|
||||
String dueDate = sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_LIST_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_LIST_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务被"+ currentUser.getUsername() +"拒绝,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + dueDate);
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task is rejected by "+ currentUser.getUsername() +". Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: "+ dueDate);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1714,7 +1796,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
this.updateProcessInfoDetail(projectLawsInventoryEO.getId());
|
||||
|
||||
//如果法规、认证工程师都提交通过,法规清单 清单确认状态为:接受, 并且给当前项目的studio发送消息
|
||||
if(StringUtils.equals(inventoryAffirmStatus,InventoryAffirmStatusEnum.ACCEPTED.getValue())){
|
||||
/*if(StringUtils.equals(inventoryAffirmStatus,InventoryAffirmStatusEnum.ACCEPTED.getValue())){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
//消息内容
|
||||
String msgContentEN = "The regulation list confirmation of "
|
||||
@@ -1755,7 +1837,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,studioUserInfo.getUsername());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}else {
|
||||
@@ -2334,7 +2416,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String id = jsonObject.getString("id"); //法规清单id
|
||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||
String taskAffirmDueDate = jsonObject.getString("taskAffirmDueDate"); //截止日期
|
||||
String serialNumber = jsonObject.getString("serialNumber"); //编号
|
||||
//String serialNumber = jsonObject.getString("serialNumber"); //编号
|
||||
String projectLibraryId = jsonObject.getString("projectLibraryId"); //项目库id
|
||||
String engineeringInterfacePerson = jsonObject.getString("engineeringInterfacePerson"); //工程接口人id
|
||||
|
||||
@@ -2359,115 +2441,124 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||
|
||||
String msgContentEN = "";
|
||||
//String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
String taskType = "";
|
||||
//MessageTypeEnum messageTypeEnum = null;
|
||||
//String taskType = "";
|
||||
String initiator = "";
|
||||
String initiatorLark = "";
|
||||
String cnContentUpper = "";//中文上部分
|
||||
String cnContentLower = "";//中文下部分
|
||||
String enContentUpper = "";//英文上部分
|
||||
String enContentLower = "";//英文下部分
|
||||
String color = "";//颜色
|
||||
|
||||
ProjectLibraryBase LibraryBase = projectLibraryBaseService.queryById(projectLibraryId, CutEnum.CN.getValue()).get(0);
|
||||
String PRN = LibraryBase.getProjectName();//项目名称
|
||||
String LAW = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is " + taskAffirmDueDate + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
|
||||
// + ". The due date is " + taskAffirmDueDate + ". Please check and address it in a timely manner.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a regulation task confirmation to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
//taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
|
||||
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
|
||||
userIdList.add(dreUserId);
|
||||
msgContentEN = sysUser.getUsername() + " has assigned the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ " to you. The due date is " +taskAffirmDueDate+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " has assigned the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
// + " to you. The due date is " +taskAffirmDueDate+ ". 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 assigned the task. Please check and and handle it in time.");
|
||||
//feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
//taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = 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()
|
||||
+ ". The due date is " +taskAffirmDueDate+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". The due date is " +taskAffirmDueDate+ ". 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.");
|
||||
//feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
//taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = 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()
|
||||
+ ". The due date is " +taskAffirmDueDate+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". The due date is " +taskAffirmDueDate+ ". 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 submitted the task. Please check and and handle it in time.");
|
||||
//feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has submitted the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
//taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = 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()
|
||||
+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
//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.");
|
||||
//feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
//taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = 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()
|
||||
+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation notification to check";
|
||||
//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.");
|
||||
//feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has accepted the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
//taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_START_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
msgContentEN = "You recieved the design compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is " + sdf.format(projectLawsInventoryEO.getDesignDueDate()) + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = "You recieved the design compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". The due date is " + sdf.format(projectLawsInventoryEO.getDesignDueDate()) + ". Please check and address it in a timely manner.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Design Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
@@ -2477,15 +2568,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_START_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
msgContentEN = "You recieved the Pre-Homo task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate()) + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = "You recieved the Pre-Homo task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". The due date is " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate()) + ". Please check and address it in a timely manner.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Pre-Homo Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
@@ -2496,36 +2587,50 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_START_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
msgContentEN = "You recieved the validation compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is " + sdf.format(projectLawsInventoryEO.getVerifyDueDate()) + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = "You recieved the validation compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". The due date is " + sdf.format(projectLawsInventoryEO.getVerifyDueDate()) + ". Please check and address it in a timely manner.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Validation Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
|
||||
msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||
cnContentLower = "项目: " + PRN +
|
||||
"\n法规: " + LAW +
|
||||
"\n发起人: " + initiatorLark +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Project: " + PRN +
|
||||
"\nRegulation No: " + LAW +
|
||||
"\nInitiator: " + initiatorLark +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
color = MsgColorEnum.GREEN.getValue();
|
||||
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String designInitiatorId = jsonObject.getString("designInitiatorId"); //设计符合性发起人id
|
||||
userIdList.add(designInitiatorId);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the design compliance confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and review it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " has submitted the design compliance confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". Please check and review it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Design Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
feishuMsgVo.setAssignee(sysUser.getUsername());
|
||||
//feishuMsgVo.setAssignee(sysUser.getUsername());
|
||||
// SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
// new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
|
||||
// );
|
||||
@@ -2533,18 +2638,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String prehomoInitiatorId = jsonObject.getString("prehomoInitiatorId"); //pre-Home发起人id
|
||||
userIdList.add(prehomoInitiatorId);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the Pre-Homo confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and review it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " has submitted the Pre-Homo confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". Please check and review it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Pre-Homo Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
feishuMsgVo.setAssignee(sysUser.getUsername());
|
||||
//feishuMsgVo.setAssignee(sysUser.getUsername());
|
||||
// SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
// new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
|
||||
// );
|
||||
@@ -2552,18 +2657,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String verifyInitiatorId = jsonObject.getString("verifyInitiatorId"); //验证符合性发起人id
|
||||
userIdList.add(verifyInitiatorId);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the validation compliance confirmation " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and review it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = sysUser.getUsername() + " has submitted the validation compliance confirmation " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + ". Please check and review it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
//feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Validation Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
feishuMsgVo.setAssignee(sysUser.getUsername());
|
||||
//feishuMsgVo.setAssignee(sysUser.getUsername());
|
||||
// SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
// new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
|
||||
// );
|
||||
@@ -2571,15 +2676,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
msgContentEN = "The design compliance information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ " you submitted has been approved.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = "The design compliance information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + " you submitted has been approved.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Design Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
@@ -2589,15 +2694,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
msgContentEN = "The Pre-Homo confirmation information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ " you submitted has been approved.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = "The Pre-Homo confirmation information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + " you submitted has been approved.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Pre-Homo Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
@@ -2607,15 +2712,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
msgContentEN = "The validation compliance information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ " you submitted has been approved.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = "The validation compliance information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
// + " you submitted has been approved.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//taskType = "Validation Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
@@ -2624,13 +2729,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgTitle)){
|
||||
|
||||
feishuMsgVo.setTaskType(taskType);
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(initiatorLark);
|
||||
feishuMsgVo.setDueDate(taskAffirmDueDate);
|
||||
//feishuMsgVo.setTaskType(taskType);
|
||||
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setInitiator(initiatorLark);
|
||||
//feishuMsgVo.setDueDate(taskAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = "";
|
||||
@@ -2671,13 +2776,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
+ "'>" + " View details" + "</a>";
|
||||
}
|
||||
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,initiator);
|
||||
//sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,initiator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user