流程驳回后 重新发起新的流程
parent
8e4ea7611b
commit
6370b3104c
|
@ -94,11 +94,11 @@ public class ActTaskDefService {
|
|||
* @param comment
|
||||
*/
|
||||
public void completeTaskByProcInsId(String procInsId, int type, String comment) {
|
||||
int adminId = InterfaceUtil.getAdminId();
|
||||
//int adminId = InterfaceUtil.getAdminId();
|
||||
List<Task> taskList = taskService.createTaskQuery().processInstanceId(procInsId).list();
|
||||
List<String> assignUserList;
|
||||
//List<String> assignUserList;
|
||||
for (Task task : taskList) {
|
||||
assignUserList = actUtil.getAssignUserList(task.getId());
|
||||
//assignUserList = actUtil.getAssignUserList(task.getId());
|
||||
//if (assignUserList.contains(String.valueOf(adminId))) {
|
||||
completeTask(task.getId(), procInsId, comment, type);
|
||||
//}
|
||||
|
|
|
@ -779,20 +779,7 @@ public class ProjectBudgetService {
|
|||
}
|
||||
|
||||
public void budgetApprove(Integer approveStatusBudget, Project projectInDb, Admin admin) throws Exception {
|
||||
|
||||
if(null != approveStatusBudget &&
|
||||
ApproveStatusEnum.APPROVAL_UNPASS.getApproveStatus() == approveStatusBudget){
|
||||
//审核不通过的情况下重新编辑后就完成当前任务
|
||||
List<String> budgetProcessInsIds = projectInstanceService.getBudgetProcessInsIds(projectInDb);
|
||||
if(CollectionUtil.isNotEmpty(budgetProcessInsIds)){
|
||||
actTaskDefService.completeTaskByProcInsId(budgetProcessInsIds.get(0),
|
||||
ApproveStatusEnum.APPROVAL_PASSED.getApproveStatus(),
|
||||
"重新修改了预算表,请审批");
|
||||
}
|
||||
}else {
|
||||
//第一次或者重新发起一个流程实例
|
||||
projectInstanceService.startBudgetProcessInstance(projectInDb, admin);
|
||||
}
|
||||
projectInstanceService.startBudgetProcessInstance(projectInDb, admin);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -297,40 +297,29 @@ public class ProjectEstimateService {
|
|||
}
|
||||
|
||||
public void estimateApprove(Integer approveStatusEstimate, Project projectInDb, Admin admin) throws Exception {
|
||||
if(null != approveStatusEstimate &&
|
||||
ApproveStatusEnum.APPROVAL_UNPASS.getApproveStatus() == approveStatusEstimate){
|
||||
//审核不通过的情况下重新编辑后就完成当前任务【此时任务节点在第一个,也就是发起审批】
|
||||
List<String> estimateProcessInsIds = projectInstanceService.getEstimateProcessInsIds(projectInDb);
|
||||
if(CollectionUtil.isNotEmpty(estimateProcessInsIds)){
|
||||
actTaskDefService.completeTaskByProcInsId(estimateProcessInsIds.get(0),
|
||||
ApproveStatusEnum.APPROVAL_PASSED.getApproveStatus(),
|
||||
"重新修改了概算表,请审批");
|
||||
}
|
||||
}else {
|
||||
//第一次或者重新发起一个流程实例【第一次或者以前的审批都已经过了】
|
||||
projectInstanceService.startEstimateProcessInstance(projectInDb, admin);
|
||||
int type = projectInDb.getType();
|
||||
List<SysUserRole> userIds = new ArrayList<>();
|
||||
if (type == 1) {
|
||||
String sql = "select sur.user_id from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_deleted = 0 and sur.is_deleted = 0 and sr.level in (1,2,3,4,5,6)";
|
||||
userIds = pagination.find(sql, SysUserRole.class);
|
||||
} else if (type == 2) {
|
||||
String sql = "select sur.user_id from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_deleted = 0 and sur.is_deleted = 0 and sr.level in (1,2,3,5,6)";
|
||||
userIds = pagination.find(sql, SysUserRole.class);
|
||||
} else if (type == 3) {
|
||||
String sql = "select sur.user_id from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_deleted = 0 and sur.is_deleted = 0 and sr.level in (1,2,3,6)";
|
||||
userIds = pagination.find(sql, SysUserRole.class);
|
||||
}
|
||||
List<ProjectVisible> pvs = new ArrayList<>();
|
||||
for (SysUserRole sysUserRole : userIds) {
|
||||
ProjectVisible pv = new ProjectVisible();
|
||||
pv.setProjectId(projectInDb.getId());
|
||||
pv.setType(2);
|
||||
pv.setTid(sysUserRole.getUserId());
|
||||
pvs.add(pv);
|
||||
}
|
||||
projectVisibleRepository.save(pvs);
|
||||
projectInstanceService.startEstimateProcessInstance(projectInDb, admin);
|
||||
int type = projectInDb.getType();
|
||||
List<SysUserRole> userIds = new ArrayList<>();
|
||||
if (type == 1) {
|
||||
String sql = "select sur.user_id from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_deleted = 0 and sur.is_deleted = 0 and sr.level in (1,2,3,4,5,6)";
|
||||
userIds = pagination.find(sql, SysUserRole.class);
|
||||
} else if (type == 2) {
|
||||
String sql = "select sur.user_id from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_deleted = 0 and sur.is_deleted = 0 and sr.level in (1,2,3,5,6)";
|
||||
userIds = pagination.find(sql, SysUserRole.class);
|
||||
} else if (type == 3) {
|
||||
String sql = "select sur.user_id from sys_role sr left join sys_user_role sur on sr.id = sur.role_id where sr.is_deleted = 0 and sur.is_deleted = 0 and sr.level in (1,2,3,6)";
|
||||
userIds = pagination.find(sql, SysUserRole.class);
|
||||
}
|
||||
List<ProjectVisible> pvs = new ArrayList<>();
|
||||
for (SysUserRole sysUserRole : userIds) {
|
||||
ProjectVisible pv = new ProjectVisible();
|
||||
pv.setProjectId(projectInDb.getId());
|
||||
pv.setType(2);
|
||||
pv.setTid(sysUserRole.getUserId());
|
||||
pvs.add(pv);
|
||||
}
|
||||
projectVisibleRepository.save(pvs);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue