From f2dd3dcbc21b769155b85442958f562a7050c98f Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 5 Jun 2024 14:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=88=87=E4=B8=BB=E5=BA=93=E6=9F=A5?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/QcCheckTaskIncomeServiceImpl.java | 12 +++--------- .../service/impl/QcCheckTaskProduceServiceImpl.java | 10 ++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 141441cc..1dcf1598 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -288,17 +288,11 @@ public class QcCheckTaskIncomeServiceImpl implements if(!CollectionUtils.isEmpty(notices)) { List wecharts = new ArrayList<>(); - //去主库查微信id - DynamicDataSourceContextHolder.push("master");// 这是数据源的key - List userCodes = users.stream() - .map(QcUserMaterialDTO::getUserCode) - .collect(Collectors.toList()); - List wxids = qcCheckTaskIncomeMapper.getWxId(userCodes); - for (String wxid : wxids) { + for (SysNoticeGroup noticedto : notices) { WechartDTO wechart0 = new WechartDTO(); - wechart0.setUserId(wxid); + wechart0.setUserId(noticedto.getWxId()); String contentInfo = notices.get(0).getNoticeContent(); - contentInfo = contentInfo.replace("${checkNo}", qcCheckTaskIncome.getCheckNo()+"\n"); + contentInfo = contentInfo.replace("${checkNo}", qcCheckTaskIncome.getCheckNo() + "\n"); Matcher m = p2.matcher(contentInfo); contentInfo = m.replaceAll(""); wechart0.setText(contentInfo); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java index 6e13f0f7..5b93e926 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java @@ -296,15 +296,9 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService if(!CollectionUtils.isEmpty(notices)) { List wecharts = new ArrayList<>(); - //去主库查微信id - DynamicDataSourceContextHolder.push("master");// 这是数据源的key - List userCodes = users.stream() - .map(QcUserMaterialDTO::getUserCode) - .collect(Collectors.toList()); - List wxids = qcCheckTaskIncomeMapper.getWxId(userCodes); - for (String wxid : wxids) { + for (SysNoticeGroup noticedto : notices) { WechartDTO wechart0 = new WechartDTO(); - wechart0.setUserId(wxid); + wechart0.setUserId(noticedto.getWxId()); String contentInfo = notices.get(0).getNoticeContent(); contentInfo = contentInfo.replace("${checkNo}", qcCheckTaskProduce.getCheckNo() + "\n"); Matcher m = p2.matcher(contentInfo);