From 9165ca7baa6137183b3b338262a2cb354c662f57 Mon Sep 17 00:00:00 2001 From: Wayne Date: Tue, 7 May 2024 09:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../message/BpmMessageServiceImpl.java | 25 ++++++++++++------- .../vo/EnterpriseInformationPageReqVO.java | 1 + .../vo/EnterpriseInformationRespVO.java | 8 ++++++ 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index a3898f7..ce3e4e6 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ yudao-module-infra yudao-module-fta - + yudao-module-bpm diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java index 0323701..fcf7a73 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.bpm.enums.message.BpmMessageEnum; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceRejectReqDTO; import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO; +import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi; +import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; import cn.iocoder.yudao.module.system.api.sms.SmsSendApi; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -31,13 +33,17 @@ public class BpmMessageServiceImpl implements BpmMessageService { @Resource private WebProperties webProperties; + @Resource + private NotifyMessageSendApi notifySendApi; + @Override public void sendMessageWhenProcessInstanceApprove(BpmMessageSendWhenProcessInstanceApproveReqDTO reqDTO) { Map templateParams = new HashMap<>(); templateParams.put("processInstanceName", reqDTO.getProcessInstanceName()); templateParams.put("detailUrl", getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId())); - smsSendApi.sendSingleSmsToAdmin(BpmMessageConvert.INSTANCE.convert(reqDTO.getStartUserId(), - BpmMessageEnum.PROCESS_INSTANCE_APPROVE.getSmsTemplateCode(), templateParams)); + String templateCode = "fta_workflow_task_pass"; + notifySendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO().setUserId(reqDTO.getStartUserId()) + .setTemplateCode(templateCode).setTemplateParams(templateParams)); } @Override @@ -46,19 +52,20 @@ public class BpmMessageServiceImpl implements BpmMessageService { templateParams.put("processInstanceName", reqDTO.getProcessInstanceName()); templateParams.put("reason", reqDTO.getReason()); templateParams.put("detailUrl", getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId())); - smsSendApi.sendSingleSmsToAdmin(BpmMessageConvert.INSTANCE.convert(reqDTO.getStartUserId(), - BpmMessageEnum.PROCESS_INSTANCE_REJECT.getSmsTemplateCode(), templateParams)); + String templateCode = "fta_workflow_task_not_pass"; + notifySendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO().setUserId(reqDTO.getStartUserId()) + .setTemplateCode(templateCode).setTemplateParams(templateParams)); } @Override public void sendMessageWhenTaskAssigned(BpmMessageSendWhenTaskCreatedReqDTO reqDTO) { - Map templateParams = new HashMap<>(); + Map templateParams = new HashMap(); templateParams.put("processInstanceName", reqDTO.getProcessInstanceName()); + templateParams.put("startUserNickname",reqDTO.getStartUserNickname()); templateParams.put("taskName", reqDTO.getTaskName()); - templateParams.put("startUserNickname", reqDTO.getStartUserNickname()); - templateParams.put("detailUrl", getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId())); - smsSendApi.sendSingleSmsToAdmin(BpmMessageConvert.INSTANCE.convert(reqDTO.getAssigneeUserId(), - BpmMessageEnum.TASK_ASSIGNED.getSmsTemplateCode(), templateParams)); + String templateCode = "fta_workflow_task"; + notifySendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO().setUserId(reqDTO.getAssigneeUserId()) + .setTemplateCode(templateCode).setTemplateParams(templateParams)); } private String getProcessInstanceDetailUrl(String taskId) { diff --git a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationPageReqVO.java b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationPageReqVO.java index 0e4f9bd..244f37c 100644 --- a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationPageReqVO.java +++ b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationPageReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.fta.controller.admin.enterpriseinformation.vo; +import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; import lombok.*; import java.time.LocalDate; diff --git a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationRespVO.java b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationRespVO.java index 10eaf72..8fc10e0 100644 --- a/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationRespVO.java +++ b/yudao-module-fta/yudao-module-fta-biz/src/main/java/cn/iocoder/yudao/module/fta/controller/admin/enterpriseinformation/vo/EnterpriseInformationRespVO.java @@ -79,4 +79,12 @@ public class EnterpriseInformationRespVO { @ExcelProperty("经营许可范围") private String operatePermitRange; + @Schema(description = "审批结果", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelIgnore + private Integer status; + + @Schema(description = "流程编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelIgnore + private String processInstanceId; + }