From 5682840fd1ce6380876251cea5f548d25d8f6f5e Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Fri, 28 Oct 2022 18:03:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E6=B8=85=E5=8D=95--?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DummyInventoryBaseEOServiceImpl.java | 73 ++++++++++++++++--- 1 file changed, 63 insertions(+), 10 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java index 9c7fbcbe0..1a3f6daa6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java @@ -42,6 +42,7 @@ import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysCategoryServiceImpl; import org.apache.commons.collections.MapUtils; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -409,31 +410,83 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl hrefListAdd = new ArrayList<>(); if(serialNumberAddList.size() != 0){ - List hrefList = new ArrayList<>(); + for (DummyInventoryInfoEO dummyInventoryInfoEO : collectAdd) { String href = "" + dummyInventoryInfoEO.getSerialNumber() + ""; - hrefList.add(href); + hrefListAdd.add(href); } - contentLog += count+". New regulations: " + StringUtils.join(hrefList,",") + "
"; + contentLog += count+". New regulations: " + StringUtils.join(hrefListAdd,",") + "
"; contentLogFeishu += count+". New regulations: " + StringUtils.join(serialNumberAddList,",") + " "; count++; } + List hrefListDelete = new ArrayList<>(); if(serialNumberDeleteList.size() != 0){ - List hrefList = new ArrayList<>(); for (DummyInventoryInfoEO dummyInventoryInfoEO : collectDelete) { String href = "" + dummyInventoryInfoEO.getSerialNumber() + ""; - hrefList.add(href); + hrefListDelete.add(href); } - contentLog += count + ". Remove regulations: " + StringUtils.join(hrefList,",") + "
"; + contentLog += count + ". Remove regulations: " + StringUtils.join(hrefListDelete,",") + "
"; contentLogFeishu += count + ". Remove regulations: " + StringUtils.join(serialNumberDeleteList,",") + " "; } if(serialNumberAddList.size() != 0 || serialNumberDeleteList.size() != 0){ + int countNo = 1; + StringBuilder sbContentNo = new StringBuilder(); + if(ObjectUtils.isNotEmpty(serialNumberAddList)){ + sbContentNo.append(countNo+". New regulations: "+StringUtils.join(serialNumberAddList,",")+", "); + countNo ++; + } + if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){ + sbContentNo.append(countNo+". Remove regulations: "+StringUtils.join(serialNumberDeleteList,",")); + } + + int countYes = 1; + StringBuilder sbContentYes = new StringBuilder(); + if(ObjectUtils.isNotEmpty(serialNumberAddList)){ + sbContentYes.append(countYes+". New regulations: "+StringUtils.join(hrefListAdd,",")+"
"); + countYes ++; + } + if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){ + sbContentYes.append(countYes+". Remove regulations: "+StringUtils.join(hrefListDelete,",")); + } + //消息英文--不带标签 + String contentNo = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + sbContentNo; + //消息英文--带标签 + String contentYes = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:"+ "
" + sbContentYes;; + + int countInfoNo = 1; + StringBuilder sbContentINfoNo = new StringBuilder(); + if(ObjectUtils.isNotEmpty(serialNumberAddList)){ + sbContentINfoNo.append(countInfoNo+". 新增文档: "+StringUtils.join(serialNumberAddList,",")+", "); + countInfoNo ++; + } + if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){ + sbContentINfoNo.append(countInfoNo+". 删除文档: "+StringUtils.join(serialNumberDeleteList,",")); + } + + int countInfoYes = 1; + StringBuilder sbContentInfoYes = new StringBuilder(); + if(ObjectUtils.isNotEmpty(serialNumberAddList)){ + sbContentInfoYes.append(countInfoYes+". 新增文档: "+StringUtils.join(hrefListAdd,",")+"
"); + countInfoYes ++; + } + if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){ + sbContentInfoYes.append(countInfoYes+". 删除文档: "+StringUtils.join(hrefListDelete,",")); + } + + //消息中文--不带标签 + String contentInfoNo = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:"+sbContentINfoNo; + //消息中文--带标签 + String contentInfoYes = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:"+"
"+sbContentInfoYes; + + + List userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId()); List thirdIdList = new ArrayList<>(); if(userNameList.size() != 0){ @@ -444,12 +497,12 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl Date: Mon, 31 Oct 2022 09:48:43 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E6=92=A4=E5=9B=9E--=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DummyInventoryBaseEOServiceImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java index 1a3f6daa6..f457388b6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java @@ -552,13 +552,16 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl Date: Mon, 31 Oct 2022 09:57:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=BA=93=E6=8E=A8?= =?UTF-8?q?=E9=80=81-=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BussDocumentLibraryEOServiceImpl.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index d9b7e1175..42b30a509 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -5265,15 +5265,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl Date: Mon, 31 Oct 2022 10:13:19 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E8=BD=AC=E5=8F=91=E6=8E=A8=E9=80=81--=E5=8F=91?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProblemKnowledgeBaseEOServiceImpl.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java index 79bbdb54d..81cdbe91c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java @@ -881,8 +881,24 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl" + " View details" + ""; String contentInfo = msgContentEN + " " + href; + + String ContentENNo = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out."; + String ContentInfoENYes = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out."+ " " + href; + + String contentCnNo = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看."; + String contentInfoCnYes = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看"+ " " + href; + + //封装消息的实体类 - SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContentEN, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); + SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, + msgTitle, + ContentENNo, + ContentInfoENYes, + MessageTypeEnum.PUSH.getValue(), + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), + contentCnNo, + contentInfoCnYes); + this.sysAnnouncementService.saveAnnouncement(sysAnnouncement); this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo); //飞书 @@ -922,7 +938,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl Date: Mon, 31 Oct 2022 11:22:55 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B3=95=E8=A7=84=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E6=8E=A8=E9=80=81--=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/warn/service/LawsWarnService.java | 65 +++++++++++++------ 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/LawsWarnService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/LawsWarnService.java index 93e4cb4f6..527eb8527 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/LawsWarnService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/LawsWarnService.java @@ -373,7 +373,7 @@ public class LawsWarnService { thirdIdList.addAll(thirdId); } } - + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); //查询文档 List> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds); List serialNumberList = new ArrayList<>(); @@ -409,27 +409,52 @@ public class LawsWarnService { "&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + ""; urlList.add(url); hrefList.add(href+timeContent); + + //推送多条时, 每条单独发消息 + //编号, 标题, 新车型实施日期, 在产车实施日期 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String serialNumber = StringUtils.valueOf(map.get("serial_number")); + String titleCn = StringUtils.valueOf(map.get("title")); + String titleEn = StringUtils.valueOf(map.get("title_en")); + String newType = ""; + if(ObjectUtils.isNotEmpty(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"))){ + newType = sdf.format(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1")); + } + String newVehicle = ""; + if(ObjectUtils.isNotEmpty(map.get("implement_time"))){ + newVehicle = sdf.format(map.get("implement_time")); + } + //消息-英文 + String contentNo = sysUser.getUsername() +" shared Regulation Early Warning infomation with you, " + +"Regulation No: "+serialNumber+",Title: "+titleEn+",New Type Execution Date: "+newType+",New Vehicle Execution Date: "+newVehicle; + String contentInfoYes = sysUser.getUsername() +" shared Regulation Early Warning infomation with you, "+"
" + +"Regulation No: "+href+"
" + +"Title: "+titleEn+"
" + +"New Type Execution Date: "+newType+"
" + +"New Vehicle Execution Date: "+newVehicle; + + + //消息中文 + String contentCnNo = sysUser.getUsername() +"向您分享了法规预警信息, "+"编号: "+serialNumber+",标题: "+titleCn+",新车型实施日期: "+newType+",在产车实施日期: "+newVehicle; + String contentInfoCnYes = sysUser.getUsername() +"向您分享了法规预警信息,"+"
" + +"编号: "+href+"
" + +"标题: "+titleCn+"
" + +"新车型实施日期: "+newType+"
" + +"在产车实施日期: "+newVehicle; + + //封装消息的实体类 + SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, + null, + contentNo, + contentInfoYes, + MessageTypeEnum.PUSH.getValue(), + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), + contentCnNo,contentInfoCnYes); + sysAnnouncementService.saveAnnouncement(sysAnnouncement); + bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfoCnYes); } - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - String content = StringUtils.join(serialNumberList, ",") + " has been shared with you, please check."; - //消息详情模板 - // XXX has pushed GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX, - // GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX, Please be reminded to check it out. - String contentInfo = sysUser.getUsername() + " has pushed " + StringUtils.join(hrefList, ",") + ", Please be reminded to check it out."; - String title = content; - - //封装消息的实体类 - 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); //飞书 try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); @@ -473,7 +498,7 @@ public class LawsWarnService { } catch (IOException e) { e.printStackTrace(); } - bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo); + bussDocumentLibraryEOService.sendWebsocket(documentIds, documentIds); return "推送成功"; } From 74e32546dd3e99696c8a6f8f7fa7394c6e4f18bc Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Mon, 31 Oct 2022 14:21:46 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1--=E5=BD=93=E5=89=8D,6=E4=B8=AA=E6=9C=88,?= =?UTF-8?q?=E4=B8=80=E5=B9=B4(=E5=8F=91=E6=B6=88=E6=81=AF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/warn/service/TimedTaskWarn.java | 133 ++++++++++++++---- 1 file changed, 109 insertions(+), 24 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/TimedTaskWarn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/TimedTaskWarn.java index f8cc2140e..397ac8803 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/TimedTaskWarn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/warn/service/TimedTaskWarn.java @@ -124,27 +124,33 @@ public class TimedTaskWarn implements Job { //当前时间的前12个月 String beforeTimeSixTen = beforeTime(12,xin1Che1Xing2Shi2Shi1Ri4Qi1); - if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){ - //发送站内消息和飞书消息 - String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1); - String content = "The implementation date of the " + category +" "+ serialNumber - + " new model you subscribed to is "+format+",please pay attention to check"; - String contentInfo = "The implementation date of the " + category +" "+ href - + " new model you subscribed to is "+format+",please pay attention to check"; - String msgTitle = content; - sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList); - } +// if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){ +// //发送站内消息和飞书消息 +// String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1); +// String content = "The implementation date of the " + category +" "+ serialNumber +// + " new model you subscribed to is "+format+",please pay attention to check"; +// String contentInfo = "The implementation date of the " + category +" "+ href +// + " new model you subscribed to is "+format+",please pay attention to check"; +// String msgTitle = content; +// sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList); +// } if(currentTime.equals(beforeTimeSixTen)){ //发送飞书消息(提前一年) sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1"); + //站内消息 + sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href); } if(currentTime.equals(beforeTimeSix)){ //发送飞书消息(提前6个月) sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6"); + //站内消息 + sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href); } if(currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){ //发送飞书消息(当天) sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0"); + //站内消息 + sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href); } } @@ -165,19 +171,25 @@ public class TimedTaskWarn implements Job { String contentInfo = "The implementation date of the " + category +" "+ href + " production vehicle you subscribed to is "+format+",please pay attention to check"; 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"); + //站内消息 + sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href); } if(currentTime.equals(beforeTimeSix)){ //发送飞书消息(提前6个月) sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6"); + //站内消息 + sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href); } if(currentTime.equals(implementTimeStr)){ //发送飞书消息(当天) sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0"); + //站内消息 + sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href); } } } @@ -224,25 +236,98 @@ public class TimedTaskWarn implements Job { } } - private void sendMessage(String title, String content,String contentInfo,String contentFeiShu, String url, List userIdList, List thirdIdList) { - //站内消息 +// private void sendMessage(String title, String content,String contentInfo,String contentFeiShu, String url, List userIdList, List thirdIdList) { +// //站内消息 +// //封装消息的实体类 +// 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(); +//// } +// } + private void sendMessage(BussDocumentLibraryEO bussDocumentLibraryEO, + List userIdList, + String flag, + SimpleDateFormat sdf, + String href) { + String number = bussDocumentLibraryEO.getSerialNumber(); + String title = bussDocumentLibraryEO.getTitle(); + String titleEn = bussDocumentLibraryEO.getTitleEn(); + Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1(); + Date implementTime = bussDocumentLibraryEO.getImplementTime(); + String newType = ""; + String newVehicle = ""; + if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){ + newType = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1); + } + if(ObjectUtils.isNotEmpty(implementTime)){ + newVehicle = sdf.format(implementTime); + } + String contentCn = ""; + String contentInfoCn = ""; + String contentEn = ""; + String contentInfoEn = ""; + //"
" + + contentCn = ",编号: "+number + +",标题: "+title + +",新车型实施日期: "+newType + +",在产车实施日期: "+newVehicle; + contentInfoCn = "编号: "+href+"
" + +"标题: "+title+"
" + +"新车型实施日期: "+newType+"
" + +"在产车实施日期: "+newVehicle; + + contentEn = ",Regulation No: "+number + +",Title: "+titleEn + +",New Type Execution Date: "+newType + +",New Vehicle Execution Date: "+newVehicle; + + contentInfoEn = "Regulation No: "+href+"
" + +"Title: "+titleEn+"
" + +"New Type Execution Date: "+newType+"
" + +"New Vehicle Execution Date: "+newVehicle; + + if("1".equals(flag)){ + contentCn = "您所订阅的法规将于1年后实施"+contentCn; + contentInfoCn = "您所订阅的法规将于1年后实施"+"
"+contentInfoCn; + contentEn = "The regulation you subscribed to will be implemented in one year"+contentEn; + contentInfoEn = "The regulation you subscribed to will be implemented in one year"+"
"+contentInfoEn; + } + if("6".equals(flag)){ + contentCn = "您所订阅的法规将于6个月后实施"+contentCn; + contentInfoCn = "您所订阅的法规将于6个月后实施"+"
"+contentInfoCn; + contentEn = "The regulation you subscribed to will be implemented in six months"+contentEn; + contentInfoEn = "The regulation you subscribed to will be implemented in six months"+"
"+contentInfoEn; + } + if("0".equals(flag)){ + contentCn = "您所订阅的法规已实施"+contentCn; + contentInfoCn = "您所订阅的法规已实施"+"
"+contentInfoCn; + contentEn = "The regulation you subscribed to is implemented"+contentEn; + contentInfoEn = "The regulation you subscribed to is implemented"+"
"+contentInfoEn; + } + //封装消息的实体类 SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, - content, - contentInfo, + contentEn, + contentInfoEn, MessageTypeEnum.WARN.getValue(), MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), - null,null); + contentCn,contentInfoCn); 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(); -// } + bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), contentInfoEn); } private String beforeTime (int month,Date date){