合并分支 'feature_dev_20221025_message' 到 'dev_2nd_period_test'

Feature dev 20221025 message

查看合并请求 laws-nio/laws-weilai!220
This commit is contained in:
高嵩
2022-10-28 16:35:53 +08:00
15 changed files with 416 additions and 154 deletions
@@ -157,4 +157,8 @@ public class SysAnnouncement implements Serializable {
* 发起人 * 发起人
*/ */
private java.lang.String initiator; private java.lang.String initiator;
private java.lang.String msgContentCn;//消息的中文(不带标签)
private java.lang.String msgContentInfoCn;//消息的中文(带标签)
} }
@@ -18,6 +18,8 @@
<result column="open_page" property="openPage" jdbcType="VARCHAR"/> <result column="open_page" property="openPage" jdbcType="VARCHAR"/>
<result column="document_id" property="documentId" jdbcType="VARCHAR"/> <result column="document_id" property="documentId" jdbcType="VARCHAR"/>
<result column="initiator" property="initiator" 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> </resultMap>
<select id="queryByUserId" parameterType="String" resultType="String"> <select id="queryByUserId" parameterType="String" resultType="String">
@@ -43,7 +45,9 @@
sa.open_page as open_page, sa.open_page as open_page,
sa.msg_abstract, sa.msg_abstract,
sa.document_id as document_id, 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 from sys_announcement_send sas
left join sys_announcement sa ON sas.annt_id = sa.id left join sys_announcement sa ON sas.annt_id = sa.id
where sa.del_flag = '0' where sa.del_flag = '0'
@@ -87,4 +87,8 @@ public class AnnouncementSendModel implements Serializable {
*/ */
private java.lang.String initiator; private java.lang.String initiator;
private java.lang.String msgContentCn;//消息的中文(不带标签)
private java.lang.String msgContentInfoCn;//消息的中文(带标签)
} }
@@ -1310,14 +1310,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
String urlParamsStr = parseUrlParams(paramsManifestEO); String urlParamsStr = parseUrlParams(paramsManifestEO);
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr; 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()); List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseMapper.queryById(paramsManifestEO.getProjectId());
if (ObjectUtils.isNotEmpty(projectLibraryBases)) { if (ObjectUtils.isNotEmpty(projectLibraryBases)) {
SysUser engineer = sysUserService.getById(projectLibraryBases.get(0).getCertificationEngineer()); String[] ids = projectLibraryBases.get(0).getCertificationEngineer().split(",");
if (ObjectUtils.isNotEmpty(engineer)) { if (ObjectUtils.isNotEmpty(ids)) {
engThirdIds[0] = engineer.getThirdId(); 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())) { if (CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
//通知认证工程师 //通知认证工程师
@@ -1334,14 +1339,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
"\nDue Date: " + deadline); "\nDue Date: " + deadline);
feishuMsgVo.setUrl(hrefFeishu); feishuMsgVo.setUrl(hrefFeishu);
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色 feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
feishuService.sendCard(engThirdIds, feishuMsgVo); feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
} else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) { } else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
//通知认证工程师 //通知认证工程师
try { /*try {
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo(); FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn()); feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理"); feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
@@ -1354,16 +1359,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
"\nDue Date: " + deadline); "\nDue Date: " + deadline);
feishuMsgVo.setUrl(hrefFeishu); feishuMsgVo.setUrl(hrefFeishu);
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色 feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
feishuService.sendCard(engThirdIds, feishuMsgVo); feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }*/
//通知工程接口人 //通知工程接口人
SysUser sdtUser = sysUserService.getUserByName(paramsCollectManifestEO.getSdt()); List<String> SdtThirdIds = new ArrayList<>();
String[] SdtThirdIds = new String[1]; for (String sdt : paramsCollectManifestEO.getSdt().split(",")) {
if (ObjectUtils.isNotEmpty(sdtUser)) { SysUser sdtUser = sysUserService.getUserByName(sdt);
SdtThirdIds[0] = sdtUser.getThirdId(); if (ObjectUtils.isNotEmpty(sdtUser)) {
SdtThirdIds.add(sdtUser.getThirdId());
}
} }
try { try {
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo(); FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn()); 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); "\nDue Date: " + deadline);
feishuMsgVo.setUrl(hrefFeishu); feishuMsgVo.setUrl(hrefFeishu);
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色 feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
feishuService.sendCard(engThirdIds, feishuMsgVo); feishuService.sendCard(SdtThirdIds.toArray(new String[SdtThirdIds.size()]), feishuMsgVo);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); 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 title = MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn();
String cnContentLower = "项目: " + projectInfo.getProjectName() + String cnContentLower = "项目: " + projectInfo.getProjectName() +
"\n发起人: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); "\n发起人: 系统通知";
String enContentLower = "Project: " + projectInfo.getProjectName() + String enContentLower = "Project: " + projectInfo.getProjectName() +
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
if (!seven.isEmpty()) { if (!seven.isEmpty()) {
@@ -316,7 +316,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String contentInfo =content; String contentInfo =content;
String title = 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo); sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
} }
@@ -2201,8 +2208,39 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
+ " technical field you subscribed to, the " + " technical field you subscribed to, the "
+ href +" has been updated."; + href +" has been updated.";
String msgTitle = "The " + technologyTerritoryName + " technical field you subscribed to 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(idTemp, contentInfo); sendWebsocket(idTemp, contentInfo);
//飞书 //飞书
@@ -2210,7 +2248,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String contentInfoFeiShu = "In the "+ technologyTerritoryName String contentInfoFeiShu = "In the "+ technologyTerritoryName
+ " technical field you subscribed to, the "+ + " technical field you subscribed to, the "+
category + " " + serialNumber +" has been updated."; category + " " + serialNumber +" has been updated.";
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;; String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); 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("domainId", map.get("technology_territory"));
mapTemp.put("documentId", map.get("id")); mapTemp.put("documentId", map.get("id"));
//订阅技术领域的人和订阅该条标准的人 //订阅技术领域的人和订阅该条标准的人
// List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
//订阅技术领域发消息 //订阅技术领域发消息
List<DomainUserRel> domainUserRelList = domainManageService.list(); List<DomainUserRel> domainUserRelList = domainManageService.list();
// List<String> thirdIdListAll = new ArrayList<>();
// List<String> userListAll = new ArrayList<>();
List<String> thirdIdList = new ArrayList<>(); List<String> thirdIdList = new ArrayList<>();
List<String> userList = new ArrayList<>(); List<String> userList = new ArrayList<>();
String technologyTerritoryNameEn = ""; String technologyTerritoryNameEn = "";
@@ -3388,12 +3423,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if(sysUsersFeishu.size() != 0){ if(sysUsersFeishu.size() != 0){
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList()); thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
userList = sysUsersFeishu.stream().map(SysUser::getId).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){ if(domainIdList.size() != 0){
@@ -3429,19 +3458,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) { if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList()); userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).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){ if(thirdIdList.size() != 0){
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " + String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
category + " " + serialNumber+" has been updated."; category + " " + serialNumber+" has been updated.";
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber; String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
@@ -3472,8 +3494,30 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//您订阅的XXX已被修改 //您订阅的XXX已被修改
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString(); 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 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket((String) map.get("id"), contentInfo); sendWebsocket((String) map.get("id"), contentInfo);
} }
@@ -3487,17 +3531,36 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
"&title=" + title + "&title=" + title +
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>"; "&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
String content = ""; String content = "";
if (StringUtils.isNotBlank(sbStr.toString())) { if (StringUtils.isNotBlank(sbStr.toString()) && StringUtils.isNotBlank(sbStrCn)) {
//去掉a标签 //去掉a标签
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", ""); sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
//您订阅的XXX已被修改 //您订阅的XXX已被修改
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check."; 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 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket((String) map.get("id"), contentInfo); sendWebsocket((String) map.get("id"), contentInfoYes);
} }
//订阅文档的飞书消息 //订阅文档的飞书消息
try { 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 contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr;
String msgTitle = contentInfo; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo); sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
//飞书 //飞书
@@ -3621,7 +3690,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String content, String content,
String contentInfo, String contentInfo,
String messageType, String messageType,
String initiator) { String initiator,
String contentCn,
String contentInfoCn) {
SysAnnouncement sysAnnouncement = new SysAnnouncement(); SysAnnouncement sysAnnouncement = new SysAnnouncement();
sysAnnouncement.setInitiator(initiator); sysAnnouncement.setInitiator(initiator);
sysAnnouncement.setDelFlag("0"); sysAnnouncement.setDelFlag("0");
@@ -3633,6 +3704,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
sysAnnouncement.setTitile(title); sysAnnouncement.setTitile(title);
sysAnnouncement.setMsgContent(content); sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo); sysAnnouncement.setMsgContentInfo(contentInfo);
sysAnnouncement.setMsgContentCn(contentCn);
sysAnnouncement.setMsgContentInfoCn(contentInfoCn);
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ",")); sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
return sysAnnouncement; return sysAnnouncement;
} }
@@ -5193,7 +5266,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
// String title = StringUtils.join(serialNumberList, ",") + " has been pushed to you, please check"; // 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo); sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
//飞书 //飞书
@@ -442,7 +442,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if(userIdList.size() != 0){ if(userIdList.size() != 0){
//封装消息的实体类 //封装消息的实体类
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated."; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title); 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."; 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. //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."; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title); 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"; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo); 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."; 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"; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo); bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
//飞书 //飞书
@@ -512,9 +512,19 @@ public class FeishuServiceImpl implements IFeishuService {
contentSb.append("\"tag\": \"div\","); contentSb.append("\"tag\": \"div\",");
contentSb.append("\"text\": {"); contentSb.append("\"text\": {");
contentSb.append("\"content\": \"" + "编号: " + feishuMsgVo.getRegulationNo() + "\n") contentSb.append("\"content\": \"" + "编号: " + feishuMsgVo.getRegulationNo() + "\n")
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n") .append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n");
.append("新车型实施日期: "+feishuMsgVo.getNewTypeExecutionDate()+ "\n") if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
.append("在产车实施日期: "+feishuMsgVo.getNewVehicleExecutionDate()+ "\","); 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("\"tag\": \"lark_md\"");
contentSb.append("}"); contentSb.append("}");
contentSb.append("},"); contentSb.append("},");
@@ -535,9 +545,18 @@ public class FeishuServiceImpl implements IFeishuService {
contentSb.append("\"tag\": \"div\","); contentSb.append("\"tag\": \"div\",");
contentSb.append("\"text\": {"); contentSb.append("\"text\": {");
contentSb.append("\"content\": \"" + "Regulation No: " + feishuMsgVo.getRegulationNo() + "\n") contentSb.append("\"content\": \"" + "Regulation No: " + feishuMsgVo.getRegulationNo() + "\n")
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n") .append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n");
.append("New Type Execution Date: " + feishuMsgVo.getNewTypeExecutionDate() + "\n") if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
.append("New Vehicle Execution Date: " + feishuMsgVo.getNewVehicleExecutionDate() + "\","); 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("\"tag\": \"lark_md\"");
contentSb.append("}"); contentSb.append("}");
contentSb.append("},"); contentSb.append("},");
@@ -10,6 +10,8 @@ import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.MsgColorEnum; import com.jero.common.constant.enums.MsgColorEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser; 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.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsg2Vo; import com.jero.modules.feishu.vo.FeishuMsg2Vo;
import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.feishu.vo.FeishuMsgVo;
@@ -85,6 +87,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
private IProcessInfoEOService processInfoEOService; private IProcessInfoEOService processInfoEOService;
@Autowired @Autowired
private IFeishuService feishuService; private IFeishuService feishuService;
@Autowired
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
/** /**
* 保存 * 保存
@@ -296,12 +300,15 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
//String msgTitle = ""; //String msgTitle = "";
LawsOpinionGatherEO lawsOpinionGatherEO = queryById(lawsOpinionGatherId); 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 initiator = "";
String title = MessageType2Enum.REGULATION_OPINION_COLLECTION.getCn() + "/" + MessageType2Enum.REGULATION_OPINION_COLLECTION.getEn(); String title = MessageType2Enum.REGULATION_OPINION_COLLECTION.getCn() + "/" + MessageType2Enum.REGULATION_OPINION_COLLECTION.getEn();
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsOpinionGatherEO.getEndTime());//截止日期 String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsOpinionGatherEO.getEndTime());//截止日期
String prcNum = lawsOpinionGatherPrcInfo.get("prcNum"); //String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
String prcName = lawsOpinionGatherPrcInfo.get("prcName"); //String prcName = lawsOpinionGatherPrcInfo.get("prcName");
String cnContentUpper = ""; String cnContentUpper = "";
String cnContentLower = ""; String cnContentLower = "";
String enContentUpper = ""; String enContentUpper = "";
@@ -317,13 +324,13 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
initiator = currentUser.getUsername(); initiator = currentUser.getUsername();
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!"; cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
cnContentLower = "编号: " + prcNum + cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
"\n标题: " + prcName + "\n标题: " + lawsOpinionGatherEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: " + initiator +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!"; enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
enContentLower = "Regulation No: " + prcNum + enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
"\nTitle: " + prcName + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + initiator +
"\nDue Date: " + endTime; "\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."; //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"; //msgTitle = "You have a Collection of Legislative Comments task completed";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = currentUser.getUsername();
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交反馈意见,请查看"; cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交反馈意见,请查看";
cnContentLower = "编号: " + prcNum + cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
"\n标题: " + prcName + "\n标题: " + lawsOpinionGatherEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: " + initiator +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the comments. Please check it"; enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the comments. Please check it";
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") + enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + initiator +
"\nDue Date: " + endTime; "\nDue Date: " + endTime;
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
userIdList = (List<String>) jsonObject.get("userIdList"); userIdList = (List<String>) jsonObject.get("userIdList");
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!"; cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
cnContentLower = "编号: " + prcNum + cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
"\n标题: " + prcName + "\n标题: " + lawsOpinionGatherEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: 系统通知" +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!"; 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") + enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
"\nDue Date: " + endTime; "\nDue Date: " + endTime;
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){ } else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList"); userIdList = (List<String>) jsonObject.get("userIdList");
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!"; cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
cnContentLower = "编号: " + prcNum + cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
"\n标题: " + prcName + "\n标题: " + lawsOpinionGatherEO.getTitle() +
"\n发起人: " + initiator; "\n发起人: 系统通知";
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!"; enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") + enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator; "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) {
userIdList.add((String) jsonObject.get("initiatorUserId")); userIdList.add((String) jsonObject.get("initiatorUserId"));
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
cnContentUpper = "您好,该任务已完成,请查看"; cnContentUpper = "您好,该任务已完成,请查看";
cnContentLower = "编号: " + prcNum + cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
"\n标题: " + prcName + "\n标题: " + lawsOpinionGatherEO.getTitle() +
"\n发起人: " + initiator; "\n发起人: 系统通知"+
"\n截止时间: " + endTime;
enContentUpper = "Hello! The task is completed. Please check it."; enContentUpper = "Hello! The task is completed. Please check it.";
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") + enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator; "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
"\nDue Date: " + endTime;
} }
/*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){ /*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList"); 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()); 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 { try {
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo(); FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
feishuMsgVo.setTitle(title); feishuMsgVo.setTitle(title);
@@ -11,6 +11,7 @@ import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; 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.enums.FieldTypeEnum;
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper; import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
@@ -628,11 +629,14 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
String initiator = ""; String initiator = "";
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId"); String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId); LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId); //LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
String number = flowDetailEO.getPrcNum(); //String number = flowDetailEO.getPrcNum();
String name = flowDetailEO.getPrcName(); //String name = flowDetailEO.getPrcName();
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsTechnologyEvaluationEO.getEndTime()); 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 title = MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getCn() + "/" + MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getEn();
String cnContentUpper = ""; String cnContentUpper = "";
String cnContentLower = ""; String cnContentLower = "";
@@ -650,13 +654,13 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
initiator = currentUser.getUsername(); initiator = currentUser.getUsername();
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!"; cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
cnContentLower = "编号:" + number + cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\n标题: " + name + "\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: " + initiator +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!"; enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
enContentLower = "Regulation No :" + number + enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\nTitle: " + name + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + initiator +
"\nDue Date: " + endTime; "\nDue Date: " + endTime;
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){ }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."; //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"; //msgTitle = "You have a Regulatory and technical assessment task to complete";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = currentUser.getUsername();
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核"; cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核";
cnContentLower = "编号:" + number + cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\n标题: " + name + "\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: " + initiator +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it"; enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it";
enContentLower = "Regulation No :" + number + enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\nTitle: " + name + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + initiator +
"\nDue Date: " + endTime; "\nDue Date: " + endTime;
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){ }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 的法规技术评估流程已通过。 //您提交的GB 7258 的法规技术评估流程已通过。
//msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed."; //msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
//msgTitle = "You have a Regulatory and technical assessment task completed"; //msgTitle = "You have a Regulatory and technical assessment task completed";
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
initiator = currentUser.getUsername();
cnContentUpper = "您好,您提交的评估结果已通过"; cnContentUpper = "您好,您提交的评估结果已通过";
cnContentLower = "编号:" + number + cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\n标题: " + name + "\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: " + initiator +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! The assessment result you submitted has passed"; enContentUpper = "Hello! The assessment result you submitted has passed";
enContentLower = "Regulation No :" + number + enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\nTitle: " + name + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + initiator +
"\nDue Date: " + endTime; "\nDue Date: " + endTime;
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){ }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 的法规技术评估流程已被退回,请及时查看处理。 //您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
//msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time."; //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"; //msgTitle = "You have a Regulatory and technical assessment task to complete";
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
initiator = currentUser.getUsername();
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理"; cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
cnContentLower = "编号:" + number + cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\n标题: " + name + "\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
"\n发起人: " + initiator + "\n发起人: " + initiator +
"\n截止时间: " + endTime; "\n截止时间: " + endTime;
enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner"; enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner";
enContentLower = "Regulation No :" + number + enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\nTitle: " + name + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator + "\nInitiator: " + initiator +
"\nDue Date: " + endTime; "\nDue Date: " + endTime;
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!"; cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
cnContentLower = "编号:" + number + cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\n标题: " + name + "\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
"\n发起人: " + initiator; "\n发起人: 系统通知";
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!"; 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 + enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\nTitle: " + name + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator; "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
userIdList = (List<String>) jsonObject.get("userIdList"); userIdList = (List<String>) jsonObject.get("userIdList");
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) {
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!"; cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
cnContentLower = "编号:" + number + cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\n标题: " + name + "\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
"\n发起人: " + initiator; "\n发起人: 系统通知";
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!"; enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
enContentLower = "Regulation No :" + number + enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
"\nTitle: " + name + "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator; "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
userIdList = (List<String>) jsonObject.get("userIdList"); userIdList = (List<String>) jsonObject.get("userIdList");
} /*else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())) { } /*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()); 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 { try {
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo(); FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
feishuMsgVo.setTitle(title); feishuMsgVo.setTitle(title);
@@ -18,6 +18,8 @@ public enum JumpLinkEnum {
VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"), VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"),
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"), DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""), TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""),
XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""),
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""), COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""), PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""),
@@ -421,7 +421,13 @@ public class LawsWarnService {
String title = content; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo); bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
//飞书 //飞书
@@ -4,6 +4,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.document.entity.BussDocumentLibraryEO; import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.feishu.service.IFeishuService; 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.entity.OnlCgformSubscribe;
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService; import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysAnnouncement;
@@ -133,6 +134,18 @@ public class TimedTaskWarn implements Job {
String msgTitle = content; String msgTitle = content;
sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList); 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; String msgTitle = content;
sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList); 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) { 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content); bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
//飞书消息 // //飞书消息
try { // try {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url); // iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
} catch (IOException e) { // } catch (IOException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
} }
private String beforeTime (int month,Date date){ private String beforeTime (int month,Date date){
+11 -2
View File
@@ -15,7 +15,10 @@
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4"> <a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
<div style="margin-left: 5%;width: 80%;"> <div style="margin-left: 5%;width: 80%;">
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE"> <p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
<a :title="record.msgContent" @click="showAnnouncement(record)">{{ record.msgContent }}</a> <a :title="language == 'zh-cn'?record.msgContentCn:record.msgContent"
@click="showAnnouncement(record)">
{{ language == 'zh-cn'?record.msgContentCn:record.msgContent }}
</a>
</p> </p>
</div> </div>
</a-list-item> </a-list-item>
@@ -50,6 +53,7 @@
data() { data() {
return { return {
loadding: false, loadding: false,
language: '',
url: { url: {
listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList', listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList',
editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId', editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId',
@@ -91,6 +95,7 @@
}, },
created() { created() {
this.loadData() this.loadData()
this.language = localStorage.getItem('language') || ''
// this.initWebSocket() // this.initWebSocket()
if (store.getters.userInfo) { if (store.getters.userInfo) {
this.$socketPublic.dispatch('webSocketInit')//初始化ws this.$socketPublic.dispatch('webSocketInit')//初始化ws
@@ -139,7 +144,11 @@
showAnnouncement(record) { showAnnouncement(record) {
getAction(this.url.readAllMsg, { ids: record.id }).then((res) => { getAction(this.url.readAllMsg, { ids: record.id }).then((res) => {
}) })
localStorage.setItem('msgContent', record.msgContent) if (this.language == 'zh-cn') {
localStorage.setItem('msgContent', record.msgContentCn)
} else {
localStorage.setItem('msgContent', record.msgContent)
}
this.$router.push({ this.$router.push({
path: '/isps/userAnnouncement', path: '/isps/userAnnouncement',
query: { query: {
@@ -11,8 +11,8 @@
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)"> <div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
<img src="../../../assets/wdxx.png" alt=""> <img src="../../../assets/wdxx.png" alt="">
<div class="content-box"> <div class="content-box">
<div class="top" :title="item.msgContent"> <div class="top" :title="language == 'zh-cn'?item.msgContentCn:item.msgContent">
{{item.msgContent}} {{language == 'zh-cn'?item.msgContentCn:item.msgContent}}
</div> </div>
<div class="botton"> <div class="botton">
{{item.sendTime}} {{item.sendTime}}
@@ -44,11 +44,13 @@
loading: false, loading: false,
pageNo: 1, pageNo: 1,
pageSize: 4, pageSize: 4,
dataSource: [] dataSource: [],
language: ''
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.language = localStorage.getItem('language') || ''
}, },
methods: { methods: {
getList() { getList() {
@@ -69,7 +71,11 @@
magClick(row) { magClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => { getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
}) })
localStorage.setItem('msgContent', row.msgContent) if (this.language == 'zh-cn'){
localStorage.setItem('msgContent', row.msgContentCn)
}else{
localStorage.setItem('msgContent', row.msgContent)
}
this.$router.push({ this.$router.push({
path: '/isps/userAnnouncement', path: '/isps/userAnnouncement',
query: { query: {
@@ -71,8 +71,9 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="msgTitile" slot-scope="text,scope"> <span slot="msgTitile" slot-scope="text,scope">
<!-- @click="msgContentClick(scope)"--> <!-- @click="msgContentClick(scope)"-->
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text"> <a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}"
{{text}} :title="language == 'zh-cn' ? scope.msgContentCn : scope.msgContent">
{{language == 'zh-cn' ? scope.msgContentCn : scope.msgContent}}
</a> </a>
</span> </span>
<span slot="msgCategory" slot-scope="text,scope"> <span slot="msgCategory" slot-scope="text,scope">
@@ -82,7 +83,7 @@
</span> </span>
</span> </span>
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;"> <p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
<span v-html="record.msgContentInfo"> <span v-html="language == 'zh-cn' ? record.msgContentInfoCn : record.msgContentInfo">
</span> </span>
</p> </p>
</a-table> </a-table>
@@ -163,10 +164,10 @@
dataIndex: 'sendTime' dataIndex: 'sendTime'
}, },
{ {
title:'', title: '',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 50, width: 50
} }
], ],
url: { url: {
@@ -177,7 +178,8 @@
}, },
loading: false, loading: false,
openPath: '', openPath: '',
formData: '' formData: '',
language: ''
} }
}, },
watch: { watch: {
@@ -186,16 +188,25 @@
this.loadData() this.loadData()
} }
}, },
mounted() {
this.language = localStorage.getItem('language') || ''
},
methods: { methods: {
expandIcon(props) { expandIcon(props) {
if (props.expanded) { if (props.expanded) {
return <a-icon type='down' onClick={e => { return <a-icon type = 'down'onClick = { e=>
props.onExpand(props.record, e); {
}}/>; props.onExpand(props.record, e)
}
}
/>;
} else { } else {
return <a-icon type='right' onClick={e => { return <a-icon type = 'right' onClick = { e =>
props.onExpand(props.record, e); {
}}/>; props.onExpand(props.record, e)
}
}
/>;
} }
}, },
getQueryParams() { getQueryParams() {
@@ -359,8 +370,9 @@
height: 38px; height: 38px;
/*margin-top: 2px;*/ /*margin-top: 2px;*/
} }
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon{
margin-right: 0; ::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon {
margin-right: 0;
} }
</style> </style>
<style> <style>