From 6b6d67947e4674e16cb4212c831a09f63bce3f1c Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Mon, 15 Jul 2024 14:41:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E8=A1=A5=E5=81=BF=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../middle/process/entity/CompensateFlow.java | 23 +++++++++++++ .../controller/CompensateProcessController.java | 40 ++++++++++++++++++++++ pom.xml | 2 +- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/entity/CompensateFlow.java create mode 100644 hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/CompensateProcessController.java diff --git a/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/entity/CompensateFlow.java b/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/entity/CompensateFlow.java new file mode 100644 index 0000000..bd71d4c --- /dev/null +++ b/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/entity/CompensateFlow.java @@ -0,0 +1,23 @@ +package com.hnac.hzims.middle.process.entity; + +import io.swagger.annotations.ApiModel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author dfy + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/3/27 16:49 + */ +@Data +@ApiModel("工作流补偿实体类") +public class CompensateFlow { + + private String taskId; + private List userIds; +} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/CompensateProcessController.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/CompensateProcessController.java new file mode 100644 index 0000000..f6cef07 --- /dev/null +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/CompensateProcessController.java @@ -0,0 +1,40 @@ +package com.hnac.hzims.middle.processflow.controller; + + +import com.hnac.hzims.middle.process.entity.CompensateFlow; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springblade.flow.core.feign.IFlowClient; +import org.springframework.web.bind.annotation.*; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/6/5 9:35 + */ + +@Slf4j +@RequestMapping("/startProcessCallBack") +@RestController +@RequiredArgsConstructor +public class CompensateProcessController { + + + private final IFlowClient flowClient; + + + /** + * 补偿工作流接口(调用平台) + * @param compensateFlow + * @return + */ + @PostMapping("/compensateProcess") + public R getTicketByCode(@RequestBody CompensateFlow compensateFlow) { + return flowClient.assignUserToTask(compensateFlow.getTaskId(), compensateFlow.getUserIds()); + } + + + +} diff --git a/pom.xml b/pom.xml index 0e1de2d..264170e 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ org.springblade blade-flow-api - 5.1.3.RELEASE + 5.1.3.RELEASE.fix1