|
@@ -120,7 +120,7 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@OperationLog(type = SysOperationLogType.START_FLOW)
|
|
|
@PostMapping("/startOnly")
|
|
|
- public ResponseResult<Void> startOnly(@MyRequestBody(required = true) String processDefinitionKey) {
|
|
|
+ public ResponseResult<Void> startOnly(@RequestBody(required = true) String processDefinitionKey) {
|
|
|
// 1. 验证流程数据的合法性。
|
|
|
ResponseResult<FlowEntry> flowEntryResult = flowOperationHelper.verifyAndGetFlowEntry(processDefinitionKey);
|
|
|
if (!flowEntryResult.isSuccess()) {
|
|
@@ -452,10 +452,10 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@PostMapping("/submitConsign")
|
|
|
public ResponseResult<Void> submitConsign(
|
|
|
- @MyRequestBody(required = true) String processInstanceId,
|
|
|
- @MyRequestBody(required = true) String taskId,
|
|
|
- @MyRequestBody(required = true) String newAssignees,
|
|
|
- @MyRequestBody Boolean isAdd) {
|
|
|
+ @RequestBody(required = true) String processInstanceId,
|
|
|
+ @RequestBody(required = true) String taskId,
|
|
|
+ @RequestBody(required = true) String newAssignees,
|
|
|
+ @RequestBody Boolean isAdd) {
|
|
|
String errorMessage;
|
|
|
ResponseResult<JSONObject> verifyResult = this.doVerifyMultiSign(processInstanceId, taskId);
|
|
|
if (!verifyResult.isSuccess()) {
|
|
@@ -515,8 +515,7 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@DisableDataFilter
|
|
|
@PostMapping("/listRuntimeTask")
|
|
|
- public ResMsg listRuntimeTask(
|
|
|
- @RequestBody ListRuntimeTaskRequestVo listRuntimeTaskRequestVo) {
|
|
|
+ public ResMsg listRuntimeTask(@RequestBody ListRuntimeTaskRequestVo listRuntimeTaskRequestVo) {
|
|
|
String username = TokenData.takeFromRequest().getLoginName();
|
|
|
MyPageData<Task> pageData = flowApiService.getTaskListByUserName(
|
|
|
username, listRuntimeTaskRequestVo);
|
|
@@ -546,8 +545,7 @@ public class FlowOperationController {
|
|
|
* @return 指定任务的可回退用户任务列表。
|
|
|
*/
|
|
|
@GetMapping("/listRejectCandidateUserTask")
|
|
|
- public ResponseResult<List<FlowTaskVo>> listRejectCandidateUserTask(
|
|
|
- @RequestParam String processInstanceId, @RequestParam String taskId) {
|
|
|
+ public ResponseResult<List<FlowTaskVo>> listRejectCandidateUserTask(@RequestParam String processInstanceId, @RequestParam String taskId) {
|
|
|
String errorMessage;
|
|
|
Task task = flowApiService.getProcessInstanceActiveTask(processInstanceId, taskId);
|
|
|
if (task == null) {
|
|
@@ -578,10 +576,10 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@PostMapping("/rejectToStartUserTask")
|
|
|
public ResponseResult<Void> rejectToStartUserTask(
|
|
|
- @MyRequestBody(required = true) String processInstanceId,
|
|
|
- @MyRequestBody(required = true) String taskId,
|
|
|
- @MyRequestBody(required = true) String taskComment,
|
|
|
- @MyRequestBody JSONObject taskVariableData) {
|
|
|
+ @RequestBody(required = true) String processInstanceId,
|
|
|
+ @RequestBody(required = true) String taskId,
|
|
|
+ @RequestBody(required = true) String taskComment,
|
|
|
+ @RequestBody JSONObject taskVariableData) {
|
|
|
String errorMessage;
|
|
|
ResponseResult<Task> taskResult =
|
|
|
flowOperationHelper.verifySubmitAndGetTask(processInstanceId, taskId, null);
|
|
@@ -609,11 +607,11 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@PostMapping("/rejectRuntimeTask")
|
|
|
public ResponseResult<Void> rejectRuntimeTask(
|
|
|
- @MyRequestBody(required = true) String processInstanceId,
|
|
|
- @MyRequestBody(required = true) String taskId,
|
|
|
- @MyRequestBody(required = true) String taskComment,
|
|
|
- @MyRequestBody String targetTaskKey,
|
|
|
- @MyRequestBody JSONObject taskVariableData) {
|
|
|
+ @RequestBody(required = true) String processInstanceId,
|
|
|
+ @RequestBody(required = true) String taskId,
|
|
|
+ @RequestBody(required = true) String taskComment,
|
|
|
+ @RequestBody String targetTaskKey,
|
|
|
+ @RequestBody JSONObject taskVariableData) {
|
|
|
String errorMessage;
|
|
|
ResponseResult<Task> taskResult =
|
|
|
flowOperationHelper.verifySubmitAndGetTask(processInstanceId, taskId, null);
|
|
@@ -639,10 +637,10 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@PostMapping("/revokeHistoricTask")
|
|
|
public ResponseResult<Void> revokeHistoricTask(
|
|
|
- @MyRequestBody(required = true) String processInstanceId,
|
|
|
- @MyRequestBody(required = true) String taskId,
|
|
|
- @MyRequestBody(required = true) String taskComment,
|
|
|
- @MyRequestBody JSONObject taskVariableData) {
|
|
|
+ @RequestBody(required = true) String processInstanceId,
|
|
|
+ @RequestBody(required = true) String taskId,
|
|
|
+ @RequestBody(required = true) String taskComment,
|
|
|
+ @RequestBody JSONObject taskVariableData) {
|
|
|
String errorMessage;
|
|
|
if (!flowApiService.existActiveProcessInstance(processInstanceId)) {
|
|
|
errorMessage = "数据验证失败,当前流程实例已经结束,不能执行撤回!";
|
|
@@ -835,10 +833,10 @@ public class FlowOperationController {
|
|
|
@DisableDataFilter
|
|
|
@PostMapping("/listHistoricTask")
|
|
|
public ResponseResult<MyPageData<Map<String, Object>>> listHistoricTask(
|
|
|
- @MyRequestBody String processDefinitionName,
|
|
|
- @MyRequestBody String beginDate,
|
|
|
- @MyRequestBody String endDate,
|
|
|
- @MyRequestBody(required = true) MyPageParam pageParam) throws ParseException {
|
|
|
+ @RequestBody String processDefinitionName,
|
|
|
+ @RequestBody String beginDate,
|
|
|
+ @RequestBody String endDate,
|
|
|
+ @RequestBody(required = true) MyPageParam pageParam) throws ParseException {
|
|
|
MyPageData<HistoricTaskInstance> pageData =
|
|
|
flowApiService.getHistoricTaskInstanceFinishedList(processDefinitionName, beginDate, endDate, pageParam);
|
|
|
List<Map<String, Object>> resultList = new LinkedList<>();
|
|
@@ -889,10 +887,10 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@PostMapping("/listHistoricProcessInstance")
|
|
|
public ResponseResult<MyPageData<Map<String, Object>>> listHistoricProcessInstance(
|
|
|
- @MyRequestBody String processDefinitionName,
|
|
|
- @MyRequestBody String beginDate,
|
|
|
- @MyRequestBody String endDate,
|
|
|
- @MyRequestBody(required = true) MyPageParam pageParam) throws ParseException {
|
|
|
+ @RequestBody String processDefinitionName,
|
|
|
+ @RequestBody String beginDate,
|
|
|
+ @RequestBody String endDate,
|
|
|
+ @RequestBody(required = true) MyPageParam pageParam) throws ParseException {
|
|
|
String loginName = TokenData.takeFromRequest().getLoginName();
|
|
|
MyPageData<HistoricProcessInstance> pageData = flowApiService.getHistoricProcessInstanceList(
|
|
|
null, processDefinitionName, loginName, beginDate, endDate, pageParam, true);
|
|
@@ -921,11 +919,11 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@PostMapping("/listAllHistoricProcessInstance")
|
|
|
public ResponseResult<MyPageData<Map<String, Object>>> listAllHistoricProcessInstance(
|
|
|
- @MyRequestBody String processDefinitionName,
|
|
|
- @MyRequestBody String startUser,
|
|
|
- @MyRequestBody String beginDate,
|
|
|
- @MyRequestBody String endDate,
|
|
|
- @MyRequestBody(required = true) MyPageParam pageParam) throws ParseException {
|
|
|
+ @RequestBody String processDefinitionName,
|
|
|
+ @RequestBody String startUser,
|
|
|
+ @RequestBody String beginDate,
|
|
|
+ @RequestBody String endDate,
|
|
|
+ @RequestBody(required = true) MyPageParam pageParam) throws ParseException {
|
|
|
MyPageData<HistoricProcessInstance> pageData = flowApiService.getHistoricProcessInstanceList(
|
|
|
null, processDefinitionName, startUser, beginDate, endDate, pageParam, false);
|
|
|
List<Map<String, Object>> resultList = new LinkedList<>();
|
|
@@ -972,7 +970,7 @@ public class FlowOperationController {
|
|
|
@DisableDataFilter
|
|
|
@OperationLog(type = SysOperationLogType.REMIND_TASK)
|
|
|
@PostMapping("/remindRuntimeTask")
|
|
|
- public ResponseResult<Void> remindRuntimeTask(@MyRequestBody(required = true) Long workOrderId) {
|
|
|
+ public ResponseResult<Void> remindRuntimeTask(@RequestBody(required = true) Long workOrderId) {
|
|
|
FlowWorkOrder flowWorkOrder = flowWorkOrderService.getById(workOrderId);
|
|
|
if (flowWorkOrder == null) {
|
|
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
|
@@ -1007,8 +1005,8 @@ public class FlowOperationController {
|
|
|
@DisableDataFilter
|
|
|
@PostMapping("/cancelWorkOrder")
|
|
|
public ResponseResult<Void> cancelWorkOrder(
|
|
|
- @MyRequestBody(required = true) Long workOrderId,
|
|
|
- @MyRequestBody(required = true) String cancelReason) {
|
|
|
+ @RequestBody(required = true) Long workOrderId,
|
|
|
+ @RequestBody(required = true) String cancelReason) {
|
|
|
FlowWorkOrder flowWorkOrder = flowWorkOrderService.getById(workOrderId);
|
|
|
if (flowWorkOrder == null) {
|
|
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
|
@@ -1051,11 +1049,11 @@ public class FlowOperationController {
|
|
|
@DisableDataFilter
|
|
|
@PostMapping("/interveneRuntimeTask")
|
|
|
public ResponseResult<Void> interveneRuntimeTask(
|
|
|
- @MyRequestBody(required = true) String processInstanceId,
|
|
|
- @MyRequestBody(required = true) String taskId,
|
|
|
- @MyRequestBody(required = true) String taskComment,
|
|
|
- @MyRequestBody String targetTaskKey,
|
|
|
- @MyRequestBody String delegateAssignee) {
|
|
|
+ @RequestBody(required = true) String processInstanceId,
|
|
|
+ @RequestBody(required = true) String taskId,
|
|
|
+ @RequestBody(required = true) String taskComment,
|
|
|
+ @RequestBody String targetTaskKey,
|
|
|
+ @RequestBody String delegateAssignee) {
|
|
|
String errorMessage;
|
|
|
Task task = flowApiService.getProcessInstanceActiveTask(processInstanceId, taskId);
|
|
|
if (task == null) {
|
|
@@ -1098,8 +1096,8 @@ public class FlowOperationController {
|
|
|
@DisableDataFilter
|
|
|
@PostMapping("/stopProcessInstance")
|
|
|
public ResponseResult<Void> stopProcessInstance(
|
|
|
- @MyRequestBody(required = true) String processInstanceId,
|
|
|
- @MyRequestBody(required = true) String stopReason) {
|
|
|
+ @RequestBody(required = true) String processInstanceId,
|
|
|
+ @RequestBody(required = true) String stopReason) {
|
|
|
CallResult result = flowApiService.stopProcessInstance(processInstanceId, stopReason, false);
|
|
|
if (!result.isSuccess()) {
|
|
|
return ResponseResult.errorFrom(result);
|
|
@@ -1115,7 +1113,7 @@ public class FlowOperationController {
|
|
|
*/
|
|
|
@OperationLog(type = SysOperationLogType.DELETE_FLOW)
|
|
|
@PostMapping("/deleteProcessInstance")
|
|
|
- public ResponseResult<Void> deleteProcessInstance(@MyRequestBody(required = true) String processInstanceId) {
|
|
|
+ public ResponseResult<Void> deleteProcessInstance(@RequestBody(required = true) String processInstanceId) {
|
|
|
flowApiService.deleteProcessInstance(processInstanceId);
|
|
|
return ResponseResult.success();
|
|
|
}
|