|
|
|
@ -34,10 +34,9 @@ import cn.jyjz.xiaoyao.oa.from.service.*;
|
|
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.*;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrUsersearchService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.*;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
@ -113,6 +112,9 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrPictureService ocrPictureService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private IOcrMsgService ocrMsgService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void myTodoTaskList(PageUtils vo, HttpServletRequest request) {
|
|
|
|
|
|
|
|
|
@ -317,6 +319,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
category.setFormid(busskey[1]);
|
|
|
|
|
return category;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取已办流程过程图
|
|
|
|
|
*
|
|
|
|
@ -494,6 +497,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
IFormCustomService iFormCustomService = SpringUtils.getBean(categoryDto.getServicename());
|
|
|
|
|
|
|
|
|
|
FlowModelVO formData = iFormCustomService.getForm(taskVO.getFormid());
|
|
|
|
|
OcrTaskchildPicture model = ocrTaskchildPictureService.getById(Long.parseLong(taskVO.getFormid()));
|
|
|
|
|
|
|
|
|
|
List<Task> taskList = this.nowRunTask(formData.getProcessInstanceId(), formData.getProcessdefinitionid());
|
|
|
|
|
Task taskData = null;
|
|
|
|
@ -502,11 +506,32 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
//判断节点上的描述字段,是否伟finale_judgment,如果是,记录到终审表中,如果终审表已经存在,不再重复记录
|
|
|
|
|
if (null != taskData && StringUtils.isNotBlank(taskData.getDescription()) && taskData.getDescription().equals(SystemConstantsOa.OA_TASK_COMPLETE_FINALE_FORM)) {
|
|
|
|
|
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
|
|
|
|
|
User user = userService.findByLoginname(formData.getAssignee());
|
|
|
|
|
userFinalService.save(user.getId().toString(), taskVO.getFormid());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
|
|
|
|
|
cn.jyjz.xiaoyao.common.base.vo.User byLoginname = userTokenService.findByLoginname(model.getAssignee());
|
|
|
|
|
OcrMsg msg = new OcrMsg();
|
|
|
|
|
msg.setCreateTime(System.currentTimeMillis());
|
|
|
|
|
msg.setSendTime(System.currentTimeMillis());
|
|
|
|
|
msg.setReceiveUserIds(byLoginname.getId().toString());
|
|
|
|
|
msg.setTitile(model.getFromtaskname());
|
|
|
|
|
msg.setSender(Long.valueOf(userToken.getUserid()));
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("taskId", model.getFromtaskid());
|
|
|
|
|
jsonObject.put("nodeName", model.getTaskname());
|
|
|
|
|
jsonObject.put("states", model.getStates());
|
|
|
|
|
jsonObject.put("sendUserId", userToken.getUserid());
|
|
|
|
|
jsonObject.put("sendUserName", userToken.getUsername());
|
|
|
|
|
jsonObject.put("sendTime", System.currentTimeMillis());
|
|
|
|
|
jsonObject.put("fromId", model.getId().toString());
|
|
|
|
|
jsonObject.put("taskName", model.getFromtaskname());
|
|
|
|
|
msg.setBusJson(jsonObject.toJSONString());
|
|
|
|
|
msg.setCreateBy(Long.valueOf(userToken.getUserid()));
|
|
|
|
|
msg.setCreateTime(System.currentTimeMillis());
|
|
|
|
|
msg.setSendStatus("1");
|
|
|
|
|
|
|
|
|
|
ocrMsgService.save(msg);
|
|
|
|
|
//增加未查看记录
|
|
|
|
|
userViewApproeService.saveUserViewApproe(formData.getAssignee(), formData.getFormid().toString(), formData.getTenantid().toString());
|
|
|
|
|
} else {
|
|
|
|
@ -561,6 +586,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新当前节点处理人信息
|
|
|
|
|
*
|
|
|
|
|
* @param processDefinition
|
|
|
|
|
*/
|
|
|
|
|
public void updateAssignee(String processInstanceId, String processDefinitionId, ProcessDefinition processDefinition) {
|
|
|
|
@ -586,6 +612,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List findEndFlowElement(String processDefId) {
|
|
|
|
|
Process mainProcess = repositoryService.getBpmnModel(processDefId).getMainProcess();
|
|
|
|
|
Collection<FlowElement> list = mainProcess.getFlowElements();
|
|
|
|
@ -594,8 +621,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
return list.stream().filter(f -> f instanceof EndEvent).collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查看当前执行人列表
|
|
|
|
|
*
|
|
|
|
|
* @param processInstanceId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -649,6 +678,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
/**
|
|
|
|
|
* 设置当前审批节点的审批人
|
|
|
|
|
* 目前只多候选组和多个候选人起作用
|
|
|
|
|
*
|
|
|
|
|
* @param processInstanceId
|
|
|
|
|
*/
|
|
|
|
|
public FlowTaskCompleteVO updateNowTaskAssignee(String processInstanceId, String processDefinitionId) {
|
|
|
|
@ -716,6 +746,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
return flowTaskCompleteVO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 设置当前审批节点的
|
|
|
|
|
*/
|
|
|
|
@ -726,8 +757,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
.list();
|
|
|
|
|
return taskList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取下一个节点审批人信息
|
|
|
|
|
*
|
|
|
|
|
* @param userTaskList
|
|
|
|
|
* @param bpmnModel
|
|
|
|
|
* @param currentId
|
|
|
|
@ -768,6 +801,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询我的已办信息
|
|
|
|
|
*
|
|
|
|
|
* @param pageUtils
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
@ -892,6 +926,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查看任务的流程记录
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<HistoricTaskInstanceDto> listHistoriceTask(String processInstanceId) {
|
|
|
|
@ -1104,7 +1139,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询我发起的流程实例
|
|
|
|
|
*
|
|
|
|
@ -1261,6 +1295,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
pageUtils.setList(list);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询我的待办、已经办理任务
|
|
|
|
|
*
|
|
|
|
@ -1537,6 +1572,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 抄送给我的
|
|
|
|
|
*
|
|
|
|
@ -1586,7 +1622,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询历史
|
|
|
|
|
List<HistoricTaskInstanceDto> historicTaskInstanceDtos = new ArrayList<>();
|
|
|
|
|
// 查询当前任务的流转信息
|
|
|
|
@ -1633,6 +1668,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
flowableccIPage.setRecords(list);
|
|
|
|
|
return flowableccIPage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void cancelTask(String taskId, String reason) {
|
|
|
|
|
// 获取当前任务
|
|
|
|
|
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
|
|
|
|