合并分支 'feature_dev_20221025_message' 到 'dev_2nd_period_test'
Feature dev 20221025 message 查看合并请求 laws-nio/laws-weilai!220
This commit is contained in:
+4
@@ -157,4 +157,8 @@ public class SysAnnouncement implements Serializable {
|
||||
* 发起人
|
||||
*/
|
||||
private java.lang.String initiator;
|
||||
|
||||
private java.lang.String msgContentCn;//消息的中文(不带标签)
|
||||
|
||||
private java.lang.String msgContentInfoCn;//消息的中文(带标签)
|
||||
}
|
||||
|
||||
+5
-1
@@ -18,6 +18,8 @@
|
||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||
<result column="document_id" property="documentId" jdbcType="VARCHAR"/>
|
||||
<result column="initiator" property="initiator" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content_cn" property="msgContentCn" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content_info_cn" property="msgContentInfoCn" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryByUserId" parameterType="String" resultType="String">
|
||||
@@ -43,7 +45,9 @@
|
||||
sa.open_page as open_page,
|
||||
sa.msg_abstract,
|
||||
sa.document_id as document_id,
|
||||
sa.initiator as initiator
|
||||
sa.initiator as initiator,
|
||||
sa.msg_content_cn as msg_content_cn,
|
||||
sa.msg_content_info_cn as msg_content_info_cn
|
||||
from sys_announcement_send sas
|
||||
left join sys_announcement sa ON sas.annt_id = sa.id
|
||||
where sa.del_flag = '0'
|
||||
|
||||
+4
@@ -87,4 +87,8 @@ public class AnnouncementSendModel implements Serializable {
|
||||
*/
|
||||
private java.lang.String initiator;
|
||||
|
||||
private java.lang.String msgContentCn;//消息的中文(不带标签)
|
||||
|
||||
private java.lang.String msgContentInfoCn;//消息的中文(带标签)
|
||||
|
||||
}
|
||||
|
||||
+23
-15
@@ -1310,14 +1310,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||
//认证工程师
|
||||
String[] engThirdIds = new String[1];
|
||||
//String[] engThirdIds = new String[1];
|
||||
List<String> engThirdIds = new ArrayList<>();
|
||||
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseMapper.queryById(paramsManifestEO.getProjectId());
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBases)) {
|
||||
SysUser engineer = sysUserService.getById(projectLibraryBases.get(0).getCertificationEngineer());
|
||||
if (ObjectUtils.isNotEmpty(engineer)) {
|
||||
engThirdIds[0] = engineer.getThirdId();
|
||||
String[] ids = projectLibraryBases.get(0).getCertificationEngineer().split(",");
|
||||
if (ObjectUtils.isNotEmpty(ids)) {
|
||||
for (String id : ids) {
|
||||
SysUser engineer = sysUserService.getById(id);
|
||||
if (ObjectUtils.isNotEmpty(engineer)) {
|
||||
engThirdIds.add(engineer.getThirdId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
//通知认证工程师
|
||||
@@ -1334,14 +1339,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
"\nDue Date: " + deadline);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||
feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
} else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
|
||||
//通知认证工程师
|
||||
try {
|
||||
/*try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
|
||||
@@ -1354,16 +1359,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
"\nDue Date: " + deadline);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||
feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}*/
|
||||
//通知工程接口人
|
||||
SysUser sdtUser = sysUserService.getUserByName(paramsCollectManifestEO.getSdt());
|
||||
String[] SdtThirdIds = new String[1];
|
||||
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
||||
SdtThirdIds[0] = sdtUser.getThirdId();
|
||||
List<String> SdtThirdIds = new ArrayList<>();
|
||||
for (String sdt : paramsCollectManifestEO.getSdt().split(",")) {
|
||||
SysUser sdtUser = sysUserService.getUserByName(sdt);
|
||||
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
||||
SdtThirdIds.add(sdtUser.getThirdId());
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||
@@ -1377,7 +1385,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
"\nDue Date: " + deadline);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||
feishuService.sendCard(SdtThirdIds.toArray(new String[SdtThirdIds.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -4086,7 +4094,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
String title = MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn();
|
||||
String cnContentLower = "项目: " + projectInfo.getProjectName() +
|
||||
"\n发起人: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
"\n发起人: 系统通知";
|
||||
String enContentLower = "Project: " + projectInfo.getProjectName() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
if (!seven.isEmpty()) {
|
||||
|
||||
+107
-27
@@ -316,7 +316,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfo =content;
|
||||
String title = content;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
title,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
|
||||
}
|
||||
@@ -2201,8 +2208,39 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
+ " technical field you subscribed to, the "
|
||||
+ href +" has been updated.";
|
||||
String msgTitle = "The " + technologyTerritoryName + " technical field you subscribed to has been updated";
|
||||
|
||||
|
||||
String hrefYes = category + " " + "<a href='/docManage/library/detail?id=" + idTemp +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
|
||||
//消息英文--不带标签
|
||||
String contentNo = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, the "+
|
||||
category + " " + serialNumber +" has been updated.";;
|
||||
|
||||
//消息英文--带标签
|
||||
String contentYes = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, the "+
|
||||
category + " " + hrefYes +" has been updated.";;
|
||||
|
||||
//消息中文--不带标签
|
||||
String contentInfoNo = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;;
|
||||
|
||||
//消息中文--带标签
|
||||
|
||||
String contentInfoYes = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + hrefYes;;
|
||||
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
contentNo,
|
||||
contentYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentInfoNo,
|
||||
contentInfoYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
@@ -2210,7 +2248,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, the "+
|
||||
category + " " + serialNumber +" has been updated.";
|
||||
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;;
|
||||
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||
@@ -3368,11 +3406,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
mapTemp.put("domainId", map.get("technology_territory"));
|
||||
mapTemp.put("documentId", map.get("id"));
|
||||
//订阅技术领域的人和订阅该条标准的人
|
||||
// List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
||||
//订阅技术领域发消息
|
||||
List<DomainUserRel> domainUserRelList = domainManageService.list();
|
||||
// List<String> thirdIdListAll = new ArrayList<>();
|
||||
// List<String> userListAll = new ArrayList<>();
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<String> userList = new ArrayList<>();
|
||||
String technologyTerritoryNameEn = "";
|
||||
@@ -3388,12 +3423,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if(sysUsersFeishu.size() != 0){
|
||||
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
userList = sysUsersFeishu.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
// if(thirdIdList.size() != 0){
|
||||
// thirdIdListAll.addAll(thirdIdList);
|
||||
// }
|
||||
// if(userList.size() != 0){
|
||||
// userListAll.addAll(userList);
|
||||
// }
|
||||
}
|
||||
}
|
||||
if(domainIdList.size() != 0){
|
||||
@@ -3429,19 +3458,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
|
||||
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
// if(userIdListUpdate.size() != 0){
|
||||
// userListAll.addAll(userIdListUpdate);
|
||||
// }
|
||||
// if(userIdListUpdateFeishu.size() != 0){
|
||||
// thirdIdListAll.addAll(userIdListUpdateFeishu);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//订阅管理
|
||||
if(thirdIdList.size() != 0){
|
||||
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
|
||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
category + " " + serialNumber+" has been updated.";
|
||||
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
||||
@@ -3472,8 +3494,30 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//您订阅的XXX已被修改
|
||||
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
String msgTitle = "The " + technologyTerritoryNameEn + " technical field you subscribed to has been updated";
|
||||
//消息英文--不带标签
|
||||
String contentNo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
category + " " + serialNumber+" has been updated.";;
|
||||
|
||||
//消息英文--带标签
|
||||
String contentYes = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
category + " " + href+" has been updated.";;
|
||||
|
||||
//消息中文--不带标签
|
||||
String contentInfoNo = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;;
|
||||
|
||||
//消息中文--带标签
|
||||
String contentInfoYes = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + href;;
|
||||
|
||||
|
||||
// 封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList, msgTitle, contentInfoFei, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList,
|
||||
msgTitle,
|
||||
contentNo,
|
||||
contentYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentInfoNo,
|
||||
contentInfoYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket((String) map.get("id"), contentInfo);
|
||||
}
|
||||
@@ -3487,17 +3531,36 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
String content = "";
|
||||
if (StringUtils.isNotBlank(sbStr.toString())) {
|
||||
if (StringUtils.isNotBlank(sbStr.toString()) && StringUtils.isNotBlank(sbStrCn)) {
|
||||
//去掉a标签
|
||||
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||
//您订阅的XXX已被修改
|
||||
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
||||
String contentInfo = "In the "+category + " " + href+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
//内容详情--英文(不带标签)
|
||||
String contentInfoNo = "In the "+category + " " + serialNumber+" you subscribed to, "+ sbStr.toString();
|
||||
|
||||
//内容详情--英文(带标签)
|
||||
String contentInfoYes = "In the "+category + " " + href+" you subscribed to, "+ sbStr.toString();
|
||||
|
||||
String msgTitle = serialNumber + " you subscribed to has been updated";
|
||||
//内容详情-中文(不带标签)
|
||||
String sbStrCnTemp = sbStrCn.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||
String contentCnNo = "您所订阅的"+categoryCn+serialNumber+","+sbStrCnTemp;
|
||||
|
||||
//内容详情--中文(带标签)
|
||||
String contentInfoCnReplace = sbStrCn.replaceAll("<text class='highlight-class'>","").replaceAll("</text>","");
|
||||
String contentInfoCnYes ="您所订阅的"+categoryCn+href+","+contentInfoCnReplace;;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate,
|
||||
msgTitle,
|
||||
contentInfoNo,
|
||||
contentInfoYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCnNo,
|
||||
contentInfoCnYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket((String) map.get("id"), contentInfo);
|
||||
sendWebsocket((String) map.get("id"), contentInfoYes);
|
||||
}
|
||||
//订阅文档的飞书消息
|
||||
try {
|
||||
@@ -3593,7 +3656,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr;
|
||||
String msgTitle = contentInfo;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
content,
|
||||
contentInfo,MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
|
||||
//飞书
|
||||
@@ -3621,7 +3690,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String content,
|
||||
String contentInfo,
|
||||
String messageType,
|
||||
String initiator) {
|
||||
String initiator,
|
||||
String contentCn,
|
||||
String contentInfoCn) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
@@ -3633,6 +3704,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
sysAnnouncement.setTitile(title);
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
sysAnnouncement.setMsgContentCn(contentCn);
|
||||
sysAnnouncement.setMsgContentInfoCn(contentInfoCn);
|
||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||
return sysAnnouncement;
|
||||
}
|
||||
@@ -5193,7 +5266,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
// String title = StringUtils.join(serialNumberList, ",") + " has been pushed to you, please check";
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
title,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.PUSH.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
|
||||
+30
-4
@@ -442,7 +442,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if(userIdList.size() != 0){
|
||||
//封装消息的实体类
|
||||
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated.";
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, title, contentLog,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
title,
|
||||
contentLog,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
|
||||
}
|
||||
@@ -492,7 +499,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
||||
//Please note that the XX virtual list you subscribed to has been withdrawn.
|
||||
String contentLog = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, title, contentLog,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
title,
|
||||
contentLog,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
|
||||
}
|
||||
@@ -1371,7 +1384,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
|
||||
msgTitle = "The " + baseName + " virtual list you subscribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
@@ -1385,7 +1405,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentInfo = "Please note that the "+baseName+" virtual list you subscribed to has been withdrawn.";
|
||||
msgTitle = "The " + baseName + " virtual list you subscribed to has been withdrawn";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
|
||||
+25
-6
@@ -512,9 +512,19 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
contentSb.append("\"tag\": \"div\",");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"" + "编号: " + feishuMsgVo.getRegulationNo() + "\n")
|
||||
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n")
|
||||
.append("新车型实施日期: "+feishuMsgVo.getNewTypeExecutionDate()+ "\n")
|
||||
.append("在产车实施日期: "+feishuMsgVo.getNewVehicleExecutionDate()+ "\",");
|
||||
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n");
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
|
||||
contentSb.append("新车型实施日期: " + feishuMsgVo.getNewTypeExecutionDate() + "\n");
|
||||
} else {
|
||||
contentSb.append("新车型实施日期: "+ "\n");
|
||||
}
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewVehicleExecutionDate())) {
|
||||
contentSb.append("在产车实施日期: " + feishuMsgVo.getNewVehicleExecutionDate());
|
||||
} else {
|
||||
contentSb.append("在产车实施日期: ");
|
||||
}
|
||||
contentSb.append("\",");
|
||||
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("},");
|
||||
@@ -535,9 +545,18 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
contentSb.append("\"tag\": \"div\",");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"" + "Regulation No: " + feishuMsgVo.getRegulationNo() + "\n")
|
||||
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n")
|
||||
.append("New Type Execution Date: " + feishuMsgVo.getNewTypeExecutionDate() + "\n")
|
||||
.append("New Vehicle Execution Date: " + feishuMsgVo.getNewVehicleExecutionDate() + "\",");
|
||||
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n");
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
|
||||
contentSb.append("New Type Execution Date: " + feishuMsgVo.getNewTypeExecutionDate() + "\n");
|
||||
} else {
|
||||
contentSb.append("New Type Execution Date: "+ "\n");
|
||||
}
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewVehicleExecutionDate())) {
|
||||
contentSb.append("New Vehicle Execution Date: " + feishuMsgVo.getNewVehicleExecutionDate());
|
||||
} else {
|
||||
contentSb.append("New Vehicle Execution Date: ");
|
||||
}
|
||||
contentSb.append("\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("},");
|
||||
|
||||
+40
-34
@@ -10,6 +10,8 @@ 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.vo.LoginUser;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
@@ -85,6 +87,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -296,12 +300,15 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
//String msgTitle = "";
|
||||
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = queryById(lawsOpinionGatherId);
|
||||
Map<String, String> lawsOpinionGatherPrcInfo = this.workFlowFeignClient.getLawsOpinionGatherPrcInfo(lawsOpinionGatherId);
|
||||
//英文标题
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(lawsOpinionGatherEO.getStandId());
|
||||
|
||||
//Map<String, String> lawsOpinionGatherPrcInfo = this.workFlowFeignClient.getLawsOpinionGatherPrcInfo(lawsOpinionGatherId);
|
||||
String initiator = "";
|
||||
String title = MessageType2Enum.REGULATION_OPINION_COLLECTION.getCn() + "/" + MessageType2Enum.REGULATION_OPINION_COLLECTION.getEn();
|
||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsOpinionGatherEO.getEndTime());//截止日期
|
||||
String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
|
||||
String prcName = lawsOpinionGatherPrcInfo.get("prcName");
|
||||
//String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
|
||||
//String prcName = lawsOpinionGatherPrcInfo.get("prcName");
|
||||
String cnContentUpper = "";
|
||||
String cnContentLower = "";
|
||||
String enContentUpper = "";
|
||||
@@ -317,13 +324,13 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No: " + prcNum +
|
||||
"\nTitle: " + prcName +
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
|
||||
@@ -335,58 +342,57 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the collection process of Collection of Legislative Comments of "+serialNumber+", please check it in time.";
|
||||
//msgTitle = "You have a Collection of Legislative Comments task completed";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交反馈意见,请查看";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the comments. Please check it";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
"\n发起人: " + initiator +
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: 系统通知" +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
"\nInitiator: " + initiator +
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
|
||||
"\nDue Date: " + endTime;
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: 系统通知";
|
||||
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) {
|
||||
userIdList.add((String) jsonObject.get("initiatorUserId"));
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
cnContentUpper = "您好,该任务已完成,请查看";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: 系统通知"+
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! The task is completed. Please check it.";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
|
||||
"\nDue Date: " + endTime;
|
||||
}
|
||||
/*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
@@ -402,7 +408,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.FGPG_TODO_CENTER_LINK.getLink();
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
|
||||
+43
-39
@@ -11,6 +11,7 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
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.impl.BussDocumentLibraryEOServiceImpl;
|
||||
@@ -628,11 +629,14 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
String initiator = "";
|
||||
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
||||
String number = flowDetailEO.getPrcNum();
|
||||
String name = flowDetailEO.getPrcName();
|
||||
//LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
||||
//String number = flowDetailEO.getPrcNum();
|
||||
//String name = flowDetailEO.getPrcName();
|
||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsTechnologyEvaluationEO.getEndTime());
|
||||
|
||||
//英文标题
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(lawsTechnologyEvaluationEO.getStandId());
|
||||
|
||||
String title = MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getCn() + "/" + MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getEn();
|
||||
String cnContentUpper = "";
|
||||
String cnContentLower = "";
|
||||
@@ -650,13 +654,13 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
|
||||
@@ -668,15 +672,15 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the collection process of Regulatory and technical assessment of "+serialNumber+", Please check and address it in time.";
|
||||
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
|
||||
@@ -684,16 +688,17 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//您提交的GB 7258 的法规技术评估流程已通过。
|
||||
//msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
|
||||
//msgTitle = "You have a Regulatory and technical assessment task completed";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,您提交的评估结果已通过";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! The assessment result you submitted has passed";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
|
||||
@@ -701,40 +706,39 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
|
||||
//msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
|
||||
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: 系统通知";
|
||||
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) {
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: 系统通知";
|
||||
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
|
||||
} /*else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())) {
|
||||
@@ -752,7 +756,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.FGPG_TODO_CENTER_LINK.getLink();
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
|
||||
+2
@@ -18,6 +18,8 @@ public enum JumpLinkEnum {
|
||||
VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"),
|
||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||
FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""),
|
||||
XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""),
|
||||
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
|
||||
|
||||
PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""),
|
||||
|
||||
+7
-1
@@ -421,7 +421,13 @@ public class LawsWarnService {
|
||||
String title = content;
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.PUSH.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
|
||||
+79
-7
@@ -4,6 +4,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
@@ -133,6 +134,18 @@ public class TimedTaskWarn implements Job {
|
||||
String msgTitle = content;
|
||||
sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSixTen)){
|
||||
//发送飞书消息(提前一年)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1");
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSix)){
|
||||
//发送飞书消息(提前6个月)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6");
|
||||
}
|
||||
if(currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||
//发送飞书消息(当天)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0");
|
||||
}
|
||||
}
|
||||
|
||||
//在产车实施日期
|
||||
@@ -154,23 +167,82 @@ public class TimedTaskWarn implements Job {
|
||||
String msgTitle = content;
|
||||
sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSixTen)){
|
||||
//发送飞书消息(提前一年)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1");
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSix)){
|
||||
//发送飞书消息(提前6个月)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6");
|
||||
}
|
||||
if(currentTime.equals(implementTimeStr)){
|
||||
//发送飞书消息(当天)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendFeishu(SimpleDateFormat sdf,
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
String url,
|
||||
List<String> thirdIdList,
|
||||
String flag) {
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.WARN.getNameCn()+"/"+MessageTypeEnum.WARN.getName());
|
||||
feishuMsgVo.setUrl(url);
|
||||
String contentCn = "";
|
||||
String contentEn = "";
|
||||
if("1".equals(flag)){
|
||||
contentCn = "您所订阅的法规将于1年后实施.";
|
||||
contentEn = "The regulation you subscribed to will be implemented in one year.";
|
||||
}
|
||||
if("6".equals(flag)){
|
||||
contentCn = "您所订阅的法规将于6个月后实施.";
|
||||
contentEn = "The regulation you subscribed to will be implemented in six months.";
|
||||
}
|
||||
if("0".equals(flag)){
|
||||
contentCn = "您所订阅的法规已实施.";
|
||||
contentEn = "The regulation you subscribed to is implemented.";
|
||||
}
|
||||
feishuMsgVo.setContent(contentCn);
|
||||
feishuMsgVo.setContentEn(contentEn);
|
||||
feishuMsgVo.setRegulationNo(bussDocumentLibraryEO.getSerialNumber());
|
||||
feishuMsgVo.setDocumentTitleCn(bussDocumentLibraryEO.getTitle());
|
||||
feishuMsgVo.setDocumentTitleEn(bussDocumentLibraryEO.getTitleEn());
|
||||
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
|
||||
feishuMsgVo.setNewTypeExecutionDate(sdf.format(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1()));
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getImplementTime())){
|
||||
feishuMsgVo.setNewVehicleExecutionDate(sdf.format(bussDocumentLibraryEO.getImplementTime()));
|
||||
}
|
||||
|
||||
try {
|
||||
iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}),feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void sendMessage(String title, String content,String contentInfo,String contentFeiShu, String url, List<String> userIdList, List<String> thirdIdList) {
|
||||
//站内消息
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.WARN.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.WARN.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// //飞书消息
|
||||
// try {
|
||||
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
private String beforeTime (int month,Date date){
|
||||
|
||||
Reference in New Issue
Block a user