|  | @@ -166,22 +166,22 @@ public class FlowInstanceServiceImpl extends BaseServiceImpl<FlowInstanceDao, Fl
 | 
	
		
			
				|  |  |          for (String instanceId : instanceIds) {
 | 
	
		
			
				|  |  |              FlowInstance instance = this.getInstance(instanceId);
 | 
	
		
			
				|  |  |              if (instance.getStatus() != ProcessStatus.RUNNING) {
 | 
	
		
			
				|  |  | -                throw new BaseException("流程已结束,不能撤回");
 | 
	
		
			
				|  |  | +                throw new BaseException("流程已结束,不能撤销");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              Integer cancelDays = instance.getCancelDays();
 | 
	
		
			
				|  |  |              if (cancelDays <= 0) {
 | 
	
		
			
				|  |  | -                throw new BaseException("无法撤回流程");
 | 
	
		
			
				|  |  | +                throw new BaseException("无法撤销流程");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              LocalDateTime startTime = instance.getStartTime();
 | 
	
		
			
				|  |  |              if (LocalDateTime.now().isAfter(startTime.plusDays(cancelDays))) {
 | 
	
		
			
				|  |  | -                throw new BaseException("流程撤回时间已过");
 | 
	
		
			
				|  |  | +                throw new BaseException("流程撤销时间已过");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              taskService.createTaskQuery().processInstanceId(instanceId).list().forEach(task -> {
 | 
	
		
			
				|  |  | -                flowTaskService.updateStatus(task.getId(), ProcessStatus.CANCELED);
 | 
	
		
			
				|  |  | +                flowTaskService.updateStatus(task.getId(), ProcessStatus.REVOKE);
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | -            runtimeService.updateBusinessStatus(instanceId, ProcessStatus.CANCELED.toString());
 | 
	
		
			
				|  |  | -            runtimeService.deleteProcessInstance(instanceId, "撤回");
 | 
	
		
			
				|  |  | -            FlowInstance flowInstance = FlowInstance.buildStatus(instanceId, ProcessStatus.CANCELED);
 | 
	
		
			
				|  |  | +            runtimeService.updateBusinessStatus(instanceId, ProcessStatus.REVOKE.toString());
 | 
	
		
			
				|  |  | +            runtimeService.deleteProcessInstance(instanceId, "撤销");
 | 
	
		
			
				|  |  | +            FlowInstance flowInstance = FlowInstance.buildStatus(instanceId, ProcessStatus.REVOKE);
 | 
	
		
			
				|  |  |              this.updateById(flowInstance);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 |