From ba706da84035e710a90b4ce35a208161b48ea7d7 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Fri, 19 Jul 2024 16:38:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=A0=87=E5=87=86=E8=A7=A3=E8=AF=BB?= =?UTF-8?q?=E6=B5=81=E7=A8=8B):=20=E6=8E=A8=E9=80=81=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xml/ProcessStandardInterpretMapper.xml | 2 -- .../StandardInterpretFlowServiceImpl.java | 32 +++++++++++++++++-- .../vo/HomeNewestStandardInterpret.java | 5 --- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretMapper.xml b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretMapper.xml index 52fa7ef6..d5cf1992 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/mapper/xml/ProcessStandardInterpretMapper.xml @@ -38,8 +38,6 @@ i.split_info_id, standard_id, standard_number, - standard_number, - s.create_time, implementation_date, standard_state, substitute_standard_number diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java index b2bc5ff9..7f8aa69e 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/service/impl/StandardInterpretFlowServiceImpl.java @@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.api.SendMessageAPI; +import com.jero.common.api.dto.message.SendMessageDTO; import com.jero.common.api.vo.Result; import com.jero.common.api.vo.ResultCommon; import com.jero.common.constant.CommonConstant; @@ -131,13 +133,11 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe private final ManagementService managementService; private final ILawsStandardMasterPlanService lawsStandardMasterPlanService; private final ProcessStandardInterpretMapper processStandardInterpretMapper; + private final SendMessageAPI sendMessageAPI; private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); private final List tempList = new ArrayList<>(); - private String taskId; - private String userId; - @Override public void flowStart(StandardInterpretFlowDTO standardInterpretFlowDTO) { // 流程信息 @@ -279,6 +279,32 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe // 同步标准主计划 lawsStandardMasterPlanService.syncInterpretationOfRegulations(processStandardInterpret.getId(), processStandardInterpret.getStandardId()); + // 发送消息 + try { + sendMsg(processStandardInterpret); + }catch (Exception e){ + log.error(e.getMessage()); + log.error("=============={}", "消息发送失败!"); + } + } + } + + private void sendMsg(ProcessStandardInterpret processStandardInterpret) { + List userIdList = new ArrayList<>(); + userIdList.add(processStandardInterpret.getMasterInterpretId()); + userIdList.addAll(Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(","))); + userIdList.add(processStandardInterpret.getUploader()); + userIdList.add(processStandardInterpret.getApprovePersonId()); + SendMessageDTO sendMessageDTO = new SendMessageDTO(); + sendMessageDTO.setTemplateCode("standard_interpret"); + + for (String userId : userIdList) { + sendMessageDTO.setToUserId(userId); + Map map = new HashMap<>(); + map.put("standardNumber", processStandardInterpret.getStandardNumber()); + map.put("standardName", processStandardInterpret.getStandardName()); + sendMessageDTO.setMap(map); + sendMessageAPI.sendMessage(sendMessageDTO); } } diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/HomeNewestStandardInterpret.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/HomeNewestStandardInterpret.java index a214ed8a..227c56f4 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/HomeNewestStandardInterpret.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/standardinterpret/vo/HomeNewestStandardInterpret.java @@ -30,11 +30,6 @@ public class HomeNewestStandardInterpret { @ApiModelProperty(value = "标准状态") @Dict(dicCode = "standard_state") private String standardState; - // 发布日期 - @ApiModelProperty(value = "发布日期") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern="yyyy-MM-dd") - private Date createTime; // 实施日期 @ApiModelProperty(value = "实施日期") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")