|
@@ -10,6 +10,7 @@ import com.qmth.sop.business.bean.result.WorkTaskResult;
|
|
import com.qmth.sop.business.entity.TFCustomFlow;
|
|
import com.qmth.sop.business.entity.TFCustomFlow;
|
|
import com.qmth.sop.business.service.TFCustomFlowService;
|
|
import com.qmth.sop.business.service.TFCustomFlowService;
|
|
import com.qmth.sop.common.contant.SystemConstant;
|
|
import com.qmth.sop.common.contant.SystemConstant;
|
|
|
|
+import com.qmth.sop.common.enums.ExceptionResultEnum;
|
|
import com.qmth.sop.common.enums.FlowTaskTypeEnum;
|
|
import com.qmth.sop.common.enums.FlowTaskTypeEnum;
|
|
import com.qmth.sop.common.enums.TFCustomTypeEnum;
|
|
import com.qmth.sop.common.enums.TFCustomTypeEnum;
|
|
import com.qmth.sop.common.util.Result;
|
|
import com.qmth.sop.common.util.Result;
|
|
@@ -27,6 +28,7 @@ import javax.validation.constraints.Max;
|
|
import javax.validation.constraints.Min;
|
|
import javax.validation.constraints.Min;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -114,14 +116,18 @@ public class TFCustomFlowController {
|
|
@RequestMapping(value = "/task/approver/exchange", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/task/approver/exchange", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
|
|
public Result taskApproverExchange(@ApiParam(value = "用户id", required = true) @RequestParam Long userId,
|
|
public Result taskApproverExchange(@ApiParam(value = "用户id", required = true) @RequestParam Long userId,
|
|
- @ApiParam(value = "用户id", required = true) @RequestParam Long taskId) {
|
|
|
|
|
|
+ @ApiParam(value = "流程任务id", required = true) @RequestParam Long taskId) {
|
|
return ResultUtil.ok(activitiService.taskApproverExchange(userId, taskId));
|
|
return ResultUtil.ok(activitiService.taskApproverExchange(userId, taskId));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取流程详细信息接口")
|
|
@ApiOperation(value = "获取流程详细信息接口")
|
|
@RequestMapping(value = "/view", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/view", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = FlowViewResult.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = FlowViewResult.class)})
|
|
- public Result flowView(@ApiParam(value = "用户id", required = true) @RequestParam Long flowId) {
|
|
|
|
- return ResultUtil.ok(activitiService.flowView(flowId));
|
|
|
|
|
|
+ public Result flowView(@ApiParam(value = "流程id") @RequestParam(required = false) Long flowId,
|
|
|
|
+ @ApiParam(value = "流程编号") @RequestParam(required = false) String code) {
|
|
|
|
+ if (Objects.isNull(flowId) || Objects.isNull(code)) {
|
|
|
|
+ throw ExceptionResultEnum.PARAMS_ERROR.exception();
|
|
|
|
+ }
|
|
|
|
+ return ResultUtil.ok(activitiService.flowView(flowId, code));
|
|
}
|
|
}
|
|
}
|
|
}
|