From b53d52b5fbd7b03f190d4f8614b081bfcc079c74 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Tue, 11 Apr 2023 09:42:00 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF--?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=BA=93=E8=BD=AC=E5=8F=91=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BussDocumentLibraryEOServiceImpl.java | 28 ++++++++++++------- .../feishu/enums/TemplateInfoEnum2.java | 2 +- 2 files changed, 19 insertions(+), 11 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 45d144656..29c44d722 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 @@ -5669,18 +5669,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl params = new HashMap<>(); + params.put("contentInfoFeiCn",contentTempCn); + params.put("contentInfoFeiEn",contentTemp); + params.put("userIdList",userIdList); + params.put("back_url",encode); + params.put("titleCn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn()); + params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn()); + iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params); } - } catch (IOException e) { + } catch (Exception e) { log.error("飞书推送失败"); } sendWebsocket(documentIds, contentInfo); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java index d783246d8..f49b4d5a7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java @@ -75,7 +75,7 @@ public enum TemplateInfoEnum2 { /** * 转发推送 */ - TRANSPOND_PUSH("转发推送","ctp_AArfkau1GRMZ","Share / Forward"), + TRANSPOND_PUSH("转发推送","","Share / Forward"), From 8599e503a593f81456e8bf3673df5192a543697a Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Tue, 11 Apr 2023 09:51:06 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF--?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9F=A5=E8=AF=86=E5=BA=93=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProblemKnowledgeBaseEOServiceImpl.java | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 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 03c26a557..85b905b73 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 @@ -17,6 +17,7 @@ import com.jero.common.system.vo.LoginUser; import com.jero.modules.document.enums.SearchEnum; import com.jero.modules.document.utils.ReadPdfUtil; import com.jero.modules.document.utils.ReadWordUtil; +import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.message.websocket.WebSocket; @@ -908,18 +909,25 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl params = new HashMap<>(); + params.put("contentInfoFeiCn",contentInfoFeiCn); + params.put("contentInfoFeiEn",msgContentENTemp); + params.put("userIdList",userIdList); + params.put("back_url",hrefFeishu); + params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn()); + params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn()); + iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params); + } catch (Exception e) { log.error("飞书推送失败"); } this.sendWebsocket(problemKnowledgeBaseId, contentInfo); From a9a9596b1811ede5327d9133fad21486d34089fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Tue, 11 Apr 2023 10:03:20 +0800 Subject: [PATCH 3/8] bug68004 --- .../parameter/managementdetails/index.vue | 4 +-- .../components/circulationHistory.vue | 28 ++++++++++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/jero-web/src/views/parameter/managementdetails/index.vue b/jero-web/src/views/parameter/managementdetails/index.vue index 82ad26555..ec5408871 100644 --- a/jero-web/src/views/parameter/managementdetails/index.vue +++ b/jero-web/src/views/parameter/managementdetails/index.vue @@ -895,8 +895,8 @@ color: red; } - \ No newline at end of file From f3e1ec4204b8382bf31aa7f6fc417ae1dc1cbc4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Tue, 11 Apr 2023 10:11:38 +0800 Subject: [PATCH 4/8] bug68012 --- .../components/circulationHistory.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue index 3b1da7d24..50fa0e270 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue @@ -40,8 +40,8 @@ {{approvalResult[text]}} - - + + @@ -509,13 +509,13 @@ } - /deep/.ant-table-row-cell-ellipsis .tooltip { - span { - display: inline-block; - width: 50%; - white-space:nowrap;/*强制单行显示*/ - text-overflow:ellipsis;/*超出部分省略号表示*/ - overflow:hidden;/*超出部分隐藏*/ - } - } + ///deep/.ant-table-row-cell-ellipsis .tooltip { + // span { + // display: inline-block; + // width: 50%; + // white-space:nowrap;/*强制单行显示*/ + // text-overflow:ellipsis;/*超出部分省略号表示*/ + // overflow:hidden;/*超出部分隐藏*/ + // } + //} \ No newline at end of file From 186188efb8b671acfbcf239a77cef7c40cbbea28 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Tue, 11 Apr 2023 10:17:08 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF-?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9F=A5=E8=AF=86=E5=BA=93=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...blemKnowledgeBaseCommentEOServiceImpl.java | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java index d19c2d5b0..182435424 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java @@ -6,6 +6,7 @@ import com.jero.common.constant.enums.MessageTypeEnum; import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.vo.LoginUser; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; +import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO; @@ -36,7 +37,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -94,7 +97,7 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl"+ problemKnowledgeBaseEO.getTitle() + ""; - String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看."; + String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看。"; String contentInfoENNo = "In the Q&A knowledge "+href+" you created, a new comment has been added. Please be reminded to check it out."; //发送消息(站内和飞书) @@ -111,16 +114,24 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl params = new HashMap<>(); + params.put("contentInfoFeiCn",contentCNNo); + params.put("contentInfoFeiEn",contentENNo); + params.put("userIdList",Arrays.asList(sysUser.getId().split(","))); + params.put("back_url",url); + params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn()); + params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn()); + iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params); + } catch (Exception e) { e.printStackTrace(); } // } From 5e90e750da0dc50d73566bf535f417d59afbcfc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 11 Apr 2023 10:56:07 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=B9=E9=87=8F=E5=A4=84=E7=90=86=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E4=B8=8D=E5=9B=BA=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 5 +- jero-web/src/common/lang/zh-cn.js | 6 +- .../components/addConfiguration.vue | 123 +++++++++ .../components/reasonForReturn.vue | 147 +++++++++++ .../components/referenceDeliverablesList.vue | 244 ++++++++++++++++++ 5 files changed, 523 insertions(+), 2 deletions(-) create mode 100644 jero-web/src/views/projectManagement/components/certificationList/components/addConfiguration.vue create mode 100644 jero-web/src/views/projectManagement/components/certificationList/components/reasonForReturn.vue create mode 100644 jero-web/src/views/toDoCenter/projectRegulationTasks/components/referenceDeliverablesList.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 07e82b478..d8ba67780 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1423,7 +1423,7 @@ module.exports = { confirmLaunchTask:'Confirm launch task ?', conditionsNotMet:'Conditions not met', onlyProcessStatusReturned:'Only the data whose process status is list to be checked and rejected by the responsible person can be returned', - onlyProcessReturned:'Only data with process status of list to be checked and rejected by responsible person can be initiated And the project interface person and responsible person cannot be blank', + onlyProcessReturned:'Only data with a process status of list to be verified and rejected by the responsible person can be initiated, and the delivery type, engineering interface person, responsible person, and deadline cannot be empty', confirmToAcceptTheTask:'Confirm to accept the task ?', confirmRejectTask:'Confirm Reject Task ?', onlyDataStatusConfirmedSelected:'Only data with process status of task to be confirmed can be selected', @@ -1767,4 +1767,7 @@ module.exports = { andPendingSubmissionReviewReturned:'And the process status is result pending submission, review returned', deliverablesFor:'Deliverables for', dutyPersonRejected:'Duty Person Rejected', + theCurrentlySelectedDataContainsReviewed:'The currently selected data contains reviewed data. Are you sure to return it?', + reviewTheReasonForReturn:'Review the reason for return', + reasonForTaskRejection:'Reason for task rejection', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 608603925..b2b361f68 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1523,7 +1523,7 @@ module.exports = { confirmLaunchTask:'确认发起任务?', conditionsNotMet:'不满足条件', onlyProcessStatusReturned:'只能退回流程状态为清单待校核和责任人拒绝的数据', - onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据,并且工程接口人和责任人不能为空', + onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据,并且交付物类型、工程接口人、责任人、截止时间不能为空', confirmToAcceptTheTask:'确认接受任务?', confirmRejectTask:'确认拒绝任务?', onlyDataStatusConfirmedSelected:'只能选择流程状态为任务待确认的数据', @@ -1869,4 +1869,8 @@ module.exports = { andPendingSubmissionReviewReturned:'并且流程状态为结果待提交、审查退回', deliverablesFor:'的交付结果', dutyPersonRejected:'责任人拒绝', + theCurrentlySelectedDataContainsReviewed:'当前选择的数据中包含审查通过的数据,确认退回吗?', + reviewTheReasonForReturn:'审查退回原因', + reasonForTaskRejection:'任务拒绝原因', + } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addConfiguration.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addConfiguration.vue new file mode 100644 index 000000000..a79f11d61 --- /dev/null +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addConfiguration.vue @@ -0,0 +1,123 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/reasonForReturn.vue b/jero-web/src/views/projectManagement/components/certificationList/components/reasonForReturn.vue new file mode 100644 index 000000000..29a1eddcc --- /dev/null +++ b/jero-web/src/views/projectManagement/components/certificationList/components/reasonForReturn.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/referenceDeliverablesList.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/referenceDeliverablesList.vue new file mode 100644 index 000000000..0c0c53401 --- /dev/null +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/referenceDeliverablesList.vue @@ -0,0 +1,244 @@ + + + + + \ No newline at end of file From 0e9d612a47d05d2506500e53db5021711eead17d Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Tue, 11 Apr 2023 13:52:30 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF--?= =?UTF-8?q?=E9=A2=84=E8=AD=A6=EF=BC=88=E5=BD=93=E5=89=8D,6,12=E4=B8=AA?= =?UTF-8?q?=E6=9C=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feishu/enums/TemplateInfoEnum2.java | 5 ++ .../feishu/service/IFeishuService.java | 7 ++ .../service/impl/FeishuServiceImpl.java | 43 +++++++++++++ .../modules/warn/service/TimedTaskWarn.java | 64 +++++++++++++------ 4 files changed, 99 insertions(+), 20 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java index f49b4d5a7..544a9d473 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java @@ -77,6 +77,11 @@ public enum TemplateInfoEnum2 { */ TRANSPOND_PUSH("转发推送","","Share / Forward"), + /** + * 法规预警 + */ + LAWS_WARN("法规预警","ctp_AArYGerQrOcE","Regulation Early Warning"), + ; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java index 225fde2e1..3fe15cf62 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java @@ -138,4 +138,11 @@ public interface IFeishuService { */ void sendMessageSubscriptionNotification(String templeteId,Map params); + /** + * 飞书消息模板--法规预警 + * @param templeteId + * @param params + */ + void sendMessageLawsWarn(String templeteId,Map params); + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java index 41143401a..3f5aa20db 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java @@ -1473,4 +1473,47 @@ public class FeishuServiceImpl implements IFeishuService { } } + @Override + public void sendMessageLawsWarn(String templeteId, Map params) { + List userIdList = (List) params.get("userIdList"); + if (CollectionUtils.isNotEmpty(userIdList)) { + List userInfoList = this.sysUserService.querySysUserListByIdList(userIdList); + + String contentCn = (String) params.get("contentInfoFeiCn"); + String contentEn = (String) params.get("contentInfoFeiEn"); + String back_url = (String) params.get("back_url"); + String titleCn = (String) params.get("titleCn"); + String titleEn = (String) params.get("titleEn"); + String regulationNo = (String) params.get("regulationNo"); + String newTypeExecutionDate = (String) params.get("newTypeExecutionDate"); + String newVehicleExecutionDate = (String) params.get("newVehicleExecutionDate"); + try { + for (String userId : userIdList) { + String thirdId = this.sysUserService.getUserThirdIdByUserId(userInfoList,userId); + if(StringUtils.isNotEmpty(thirdId)){ + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", templeteId); + larkMesJson.put("userIds",thirdId); + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("contentInfoFeiCn",contentCn); + templateVariableMap.put("contentInfoFeiEn",contentEn); + templateVariableMap.put("view_url_cn",back_url); + templateVariableMap.put("view_url_en",back_url); + templateVariableMap.put("titleCn",titleCn); + templateVariableMap.put("titleEn",titleEn); + templateVariableMap.put("regulationNo",regulationNo); + templateVariableMap.put("newTypeExecutionDate",newTypeExecutionDate); + templateVariableMap.put("newVehicleExecutionDate",newVehicleExecutionDate); + + larkMesJson.put("templateVariableMap",templateVariableMap); + batchSendLarkCardMsgByTemplate2(larkMesJson); + } + } + } catch (Exception e) { + log.error("飞书消息推送失败"); + } + } + } + } 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 397ac8803..b0ab1f770 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 @@ -3,6 +3,7 @@ package com.jero.modules.warn.service; 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.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.subscribe.entity.OnlCgformSubscribe; @@ -28,7 +29,9 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -136,19 +139,19 @@ public class TimedTaskWarn implements Job { // } if(currentTime.equals(beforeTimeSixTen)){ //发送飞书消息(提前一年) - sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1"); + sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1",userIdList); //站内消息 sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href); } if(currentTime.equals(beforeTimeSix)){ //发送飞书消息(提前6个月) - sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6"); + sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6",userIdList); //站内消息 sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href); } if(currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){ //发送飞书消息(当天) - sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0"); + sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0",userIdList); //站内消息 sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href); } @@ -175,19 +178,19 @@ public class TimedTaskWarn implements Job { } if(currentTime.equals(beforeTimeSixTen)){ //发送飞书消息(提前一年) - sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1"); + sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1",userIdList); //站内消息 sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href); } if(currentTime.equals(beforeTimeSix)){ //发送飞书消息(提前6个月) - sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6"); + sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6",userIdList); //站内消息 sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href); } if(currentTime.equals(implementTimeStr)){ //发送飞书消息(当天) - sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0"); + sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0",userIdList); //站内消息 sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href); } @@ -199,7 +202,8 @@ public class TimedTaskWarn implements Job { BussDocumentLibraryEO bussDocumentLibraryEO, String url, List thirdIdList, - String flag) { + String flag, + List userIdList) { FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); feishuMsgVo.setTitle(MessageTypeEnum.WARN.getNameCn()+"/"+MessageTypeEnum.WARN.getName()); feishuMsgVo.setUrl(url); @@ -217,21 +221,41 @@ public class TimedTaskWarn implements Job { 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())); - } +// 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) { +// iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}),feishuMsgVo); + //飞书消息(模板-20230410) + Map params = new HashMap<>(); + params.put("contentInfoFeiCn",contentCn); + params.put("contentInfoFeiEn",contentEn); + params.put("userIdList",userIdList); + params.put("back_url",url); + params.put("titleCn", " "+ bussDocumentLibraryEO.getTitle()); + params.put("titleEn", " "+ bussDocumentLibraryEO.getTitleEn()); + params.put("regulationNo", " "+ bussDocumentLibraryEO.getSerialNumber()); + if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){ + params.put("newTypeExecutionDate", " "+ sdf.format(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())); + }else{ + params.put("newTypeExecutionDate",""); + } + if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getImplementTime())){ + params.put("newVehicleExecutionDate", " "+ sdf.format(bussDocumentLibraryEO.getImplementTime())); + }else{ + params.put("newVehicleExecutionDate",""); + } + iFeishuService.sendMessageLawsWarn(TemplateInfoEnum2.LAWS_WARN.getValue(),params); + } catch (Exception e) { e.printStackTrace(); } } From 63da8409ba0bebdce73044473fcdaaeb3d51f346 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Tue, 11 Apr 2023 14:29:11 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF--?= =?UTF-8?q?=E9=A2=84=E8=AD=A6=E4=BF=A1=E6=81=AF=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/warn/service/LawsWarnService.java | 63 +++++++++++-------- 1 file changed, 37 insertions(+), 26 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 21bb11074..1fd7b4b88 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 @@ -18,6 +18,7 @@ import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper; import com.jero.modules.document.service.IPhasedImplementationDetailsEOService; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.dummy.entity.DummyInventoryInfoEO; +import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.system.entity.SysAnnouncement; @@ -55,6 +56,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; +import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; @@ -554,41 +556,50 @@ public class LawsWarnService { for (String s : urlList) { FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); String encode = UriEncoder.encode(s); - List list = new ArrayList<>(); + String contentInfoFei = sysUser.getUsername() +" shared Regulation Early Warning infomation with you."; + String contentInfoFeiCn = sysUser.getUsername() +"向您分享了法规预警信息."; + List userIdListNew = userIdList; mapList.stream().forEach(e->{ if(s.contains((String)e.get("id"))){ String serialNumber = StringUtils.valueOf(e.get("serial_number")); //封装飞书消息实体类 - setFeishuMsgVo(sysUser, sdf, feishuMsgVo, encode, e, serialNumber); +// setFeishuMsgVo(sysUser, sdf, feishuMsgVo, encode, e, serialNumber); - String timeContent = ""; - if("1".equals(flag)){ - String value = StringUtils.valueOf(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1")); - if(StringUtils.isNotBlank(value)){ - if(value.contains(" ")){ - value = value.split(" ")[0]; - } - timeContent =" to you as the implementation date of the new model is " +value; - } - }else if("2".equals(flag)){ - String value = StringUtils.valueOf(e.get("implement_time")); - if(StringUtils.isNotBlank(value)){ - if(value.contains(" ")){ - value = value.split(" ")[0]; - } - timeContent =" to you as the implementation date of vehicle production is " +value; - } + String documentTitleCn = ""; //文档标题 + String documentTitleEn = ""; //文档标题 + String newTypeExecutionDate = ""; //新车型实施日期 + String newVehicleExecutionDate = ""; //在产车实施日期 + + if(ObjectUtils.isNotEmpty(e.get("title"))){ + documentTitleCn = String.valueOf(e.get("title")); } - list.add(serialNumber + timeContent); + if(ObjectUtils.isNotEmpty(e.get("title_en"))){ + documentTitleEn = String.valueOf(e.get("title_en")); + } + if(ObjectUtils.isNotEmpty(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"))){ + newTypeExecutionDate = sdf.format(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1")); + } + if(ObjectUtils.isNotEmpty(e.get("implement_time"))){ + newVehicleExecutionDate = sdf.format(e.get("implement_time")); + } + + //飞书消息(模板-20230410) + Map params = new HashMap<>(); + params.put("contentInfoFeiCn",contentInfoFeiCn); + params.put("contentInfoFeiEn",contentInfoFei); + params.put("userIdList",userIdListNew); + params.put("back_url",encode); + params.put("titleCn", " "+documentTitleCn); + params.put("titleEn"," "+documentTitleEn); + params.put("regulationNo"," "+serialNumber); + params.put("newTypeExecutionDate"," "+newTypeExecutionDate); + params.put("newVehicleExecutionDate"," "+newVehicleExecutionDate); + iFeishuService.sendMessageLawsWarn(TemplateInfoEnum2.LAWS_WARN.getValue(),params); } }); - iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}), feishuMsgVo); - - -// String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out."; -// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode); +// iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}), feishuMsgVo); } - } catch (IOException e) { + } catch (Exception e) { e.printStackTrace(); } bussDocumentLibraryEOService.sendWebsocket(documentIds, documentIds);