Browse Source

新增:工作流补偿机制

zhongwei
ty 4 months ago
parent
commit
6b6d67947e
  1. 23
      hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/entity/CompensateFlow.java
  2. 40
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/CompensateProcessController.java
  3. 2
      pom.xml

23
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<String> userIds;
}

40
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());
}
}

2
pom.xml

@ -49,7 +49,7 @@
<dependency> <dependency>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<artifactId>blade-flow-api</artifactId> <artifactId>blade-flow-api</artifactId>
<version>5.1.3.RELEASE</version> <version>5.1.3.RELEASE.fix1</version>
</dependency> </dependency>
<dependency> <dependency>

Loading…
Cancel
Save