From 04c175b79e497c3394d271ee8cd8ee765f4ffa47 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 8 Jul 2024 16:54:04 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=B7=A5=E4=BD=9C=E4=BB=BB=E5=8A=A1=E5=8D=95?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=B1=BB=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/WorkTaskProcessServiceImpl.java | 50 ++++++++++++++++++++++ .../strategy/serviceimpl/WorkTaskServiceImpl.java | 50 ---------------------- 2 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskProcessServiceImpl.java delete mode 100644 hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskServiceImpl.java diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskProcessServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskProcessServiceImpl.java new file mode 100644 index 0000000..6e4fd3e --- /dev/null +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskProcessServiceImpl.java @@ -0,0 +1,50 @@ +package com.hnac.hzims.middle.processflow.strategy.serviceimpl; + +import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; +import com.hnac.hzims.middle.processflow.service.ProcessDictService; +import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService; +import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; +import com.hnac.hzims.ticket.repair.fegin.IWorkTaskClient; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Service; + +import static com.hnac.hzims.middle.process.constant.TicketProcessConstant.WORK_TASK; + +/** + * @author ysj + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class WorkTaskProcessServiceImpl extends ProcessAbstractService { + + private final ProcessDictService processDictService; + + private final IWorkTaskClient workTaskClient; + + /** + * 消息确认-工作任务单 + * @param flowQueue + * @return + */ + @Override + public Boolean isWorkflowProcess(WorkflowQueue flowQueue) { + String dictValue = processDictService.selectDictValueByKey(WORK_TASK); + return dictValue.equals(flowQueue.getProcessDefinitionKey()); + } + + /** + * 调用工作任务流程监听 + * @param response + */ + @Override + public void calculate(ProcessWorkFlowResponse response) { + R workTask = workTaskClient.listener(response); + if (!workTask.isSuccess() || !workTask.getData()) { + throw new ServiceException("检修任务业务执行异常!"); + } + } +} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskServiceImpl.java deleted file mode 100644 index dd9d8a6..0000000 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/WorkTaskServiceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.hnac.hzims.middle.processflow.strategy.serviceimpl; - -import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; -import com.hnac.hzims.middle.processflow.service.ProcessDictService; -import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService; -import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; -import com.hnac.hzims.ticket.repair.fegin.IWorkTaskClient; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.log.exception.ServiceException; -import org.springblade.core.tool.api.R; -import org.springframework.stereotype.Service; - -import static com.hnac.hzims.middle.process.constant.TicketProcessConstant.WORK_TASK; - -/** - * @author ysj - */ -@Slf4j -@Service -@RequiredArgsConstructor -public class WorkTaskServiceImpl extends ProcessAbstractService { - - private final ProcessDictService processDictService; - - private final IWorkTaskClient workTaskClient; - - /** - * 消息确认-工作任务单 - * @param flowQueue - * @return - */ - @Override - public Boolean isWorkflowProcess(WorkflowQueue flowQueue) { - String dictValue = processDictService.selectDictValueByKey(WORK_TASK); - return dictValue.equals(flowQueue.getProcessDefinitionKey()); - } - - /** - * 调用工作任务流程监听 - * @param response - */ - @Override - public void calculate(ProcessWorkFlowResponse response) { - R workTask = workTaskClient.listener(response); - if (!workTask.isSuccess() || !workTask.getData()) { - throw new ServiceException("检修任务业务执行异常!"); - } - } -}