| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.beanutils.BeanUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.common.engine.api.FlowableException; |
| | | import org.flowable.engine.TaskService; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public Result<?> auditDispatchFile(DispatchFileFlowTaskVo dispatchFileFlowTaskVo) { |
| | | try { |
| | | // 参数校验 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 批量审批操作 |
| | | * @param dispatchFileFlowTaskVo |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public Result<?> auditBatchDispatchFile(DispatchFileFlowTaskVo dispatchFileFlowTaskVo) throws InvocationTargetException, IllegalAccessException { |
| | | if (dispatchFileFlowTaskVo.getTaskIds()==null || dispatchFileFlowTaskVo.getTaskIds().isEmpty()) { |
| | | return Result.error(CommonCode.INVALID_PARAM.toString()); |
| | | } |
| | | if (dispatchFileFlowTaskVo.getTaskIds().contains(",")){ |
| | | String[] taskIds = dispatchFileFlowTaskVo.getTaskIds().split(","); |
| | | for (String taskId : taskIds) { |
| | | FlowMyBusiness flowMyBusiness=flowMyBusinessService.getOne(new QueryWrapper<FlowMyBusiness>().eq("task_id",taskId)); |
| | | DispatchFileFlowTaskVo dispatchFileFlowTaskVoNew=new DispatchFileFlowTaskVo(); |
| | | BeanUtils.copyProperties(dispatchFileFlowTaskVoNew, dispatchFileFlowTaskVo); |
| | | dispatchFileFlowTaskVoNew.setTaskId(taskId); |
| | | dispatchFileFlowTaskVoNew.setDataId(flowMyBusiness.getDataId()); |
| | | dispatchFileFlowTaskVoNew.setInstanceId(flowMyBusiness.getProcessInstanceId()); |
| | | if (dispatchFileFlowTaskVo.getTargetKey().equals("task_prepare")){ |
| | | reStartDispatchFile(dispatchFileFlowTaskVoNew); |
| | | }else { |
| | | auditDispatchFile(dispatchFileFlowTaskVoNew); |
| | | } |
| | | } |
| | | } |
| | | return Result.OK("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 查询审签基本信息 |
| | | * @param id |
| | | */ |