From cfab84008b540782acd9c556beb527d41e52a292 Mon Sep 17 00:00:00 2001 From: caihaohan Date: Mon, 12 Aug 2024 15:35:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=2088349=20=E5=A4=96=E6=9D=A5=E6=A0=87?= =?UTF-8?q?=E5=87=86=E6=B3=95=E8=A7=84=E6=96=87=E6=9C=AC=E5=BA=93--?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E8=B4=9F=E8=B4=A3=E4=BA=BA=E3=80=81=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=94=B6=E8=97=8F=E5=90=8E=EF=BC=8C=E4=BB=8D=E7=84=B6?= =?UTF-8?q?=E7=BB=99=E5=8E=9F=E6=9D=A5=E7=9A=84=E8=B4=A6=E5=8F=B7=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 --- .../job/ReplaceImplementationDateMsgJob.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/standard/job/ReplaceImplementationDateMsgJob.java b/laws-modules/src/main/java/com/jero/modules/laws/standard/job/ReplaceImplementationDateMsgJob.java index 44950c54..e0c5811a 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/standard/job/ReplaceImplementationDateMsgJob.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/standard/job/ReplaceImplementationDateMsgJob.java @@ -122,34 +122,33 @@ public class ReplaceImplementationDateMsgJob implements Job { sendMap.put("standardName", mainStandard.getStandardName()); sendMap.put("implementationDate", simpleDateFormat.format(mainStandard.getImplementationDate())); - Set userIdList = new HashSet<>(); + Set userIdSet = new HashSet<>(); // 拼接发送人员 for (String standard : replacedStandardNumberList) { // 如果有书名号的话只取书名号前的内容 standard = standard.split("《")[0]; LawsEnterpriseStandard replaceStandard = standardMap.get(standard); // 被代替标准的主起草人,责任人,收藏标准的人员 - userIdList.add(replaceStandard.getMainDraftingUser()); + userIdSet.add(replaceStandard.getMainDraftingUser()); // 获取收藏标准的所有人员 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(LawsStandardCollection::getStandardId, replaceStandard.getId()); List standardCollectionList = collectionService.list(wrapper); for (LawsStandardCollection standardCollection : standardCollectionList) { - userIdList.add(standardCollection.getCollectorId()); + userIdSet.add(standardCollection.getCollectorId()); } } // 去除最后一个分号 - if (CollUtil.isEmpty(userIdList)) { + if (CollUtil.isEmpty(userIdSet)) { continue; } - sendMessageDTO.setToUserId(String.join(",", userIdList)); + sendMessageDTO.setToUserId(String.join(",", userIdSet)); sendMessageDTO.setMap(sendMap); sendMessageAPI.sendMessage(sendMessageDTO); } } private void sendGbStandardMsg() { - // 新标准到实施日期后,老标准状态变为废止 List allExpireStandardNumberList = new ArrayList<>(); // 获取所有已经到了外部标准 List standardList = dsService.list(); @@ -211,7 +210,7 @@ public class ReplaceImplementationDateMsgJob implements Job { sendMap.put("standardName", mainStandard.getStandardName()); sendMap.put("implementationDate", simpleDateFormat.format(mainStandard.getImplementationDate())); - Set userIdList = new HashSet<>(); + Set userIdSet = new HashSet<>(); // 拼接发送人员 for (String standard : replacedStandardNumberList) { // 如果有书名号的话只取书名号前的内容 @@ -229,7 +228,7 @@ public class ReplaceImplementationDateMsgJob implements Job { masterPlanList.stream().map(LawsStandardMasterPlan::getId).collect(Collectors.toList())); List sublistList = masterPlanSublistService.list(sublistWrapper); for (LawsStandardMasterPlanSublist sublist : sublistList) { - userIdList.add(sublist.getResponsiblePerson()); + userIdSet.add(sublist.getResponsiblePerson()); } } // 获取收藏标准的所有人员 @@ -237,14 +236,14 @@ public class ReplaceImplementationDateMsgJob implements Job { wrapper.eq(LawsStandardCollection::getStandardId, replaceStandard.getId()); List standardCollectionList = collectionService.list(wrapper); for (LawsStandardCollection standardCollection : standardCollectionList) { - userIdList.add(standardCollection.getCollectorId()); + userIdSet.add(standardCollection.getCollectorId()); } } // 去除最后一个分号 - if (CollUtil.isEmpty(userIdList)) { + if (CollUtil.isEmpty(userIdSet)) { continue; } - sendMessageDTO.setToUserId(String.join(",", userIdList)); + sendMessageDTO.setToUserId(String.join(",", userIdSet)); sendMessageDTO.setMap(sendMap); sendMessageAPI.sendMessage(sendMessageDTO); }