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