流程状态控制
parent
f09f66dcaf
commit
00247e6b16
|
@ -74,6 +74,7 @@ public class ProjectController extends BaseController {
|
|||
Map<String, Object> model) {
|
||||
//当前登录人的角色类型
|
||||
model.put("keywords", keywords);
|
||||
model.put("adminId", InterfaceUtil.getAdminId());
|
||||
model.put("deptList", deptRepository.findAll());
|
||||
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords, model);
|
||||
model.put("pager", projectService.list(searchInfo, pageNumber, pageSize));
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ActListenerService {
|
|||
* @throws Exception
|
||||
*/
|
||||
public void create(DelegateTask delegateTask) throws Exception {
|
||||
logger.info("--节点创建后监听-- name:{}, {}", delegateTask.getName(), JSONObject.toJSONString(delegateTask));
|
||||
logger.info("--节点创建后监听-- procInsId:{}, {}", delegateTask.getProcessInstanceId(), delegateTask);
|
||||
|
||||
String procDefId = delegateTask.getProcessDefinitionId();
|
||||
String procInsId = delegateTask.getProcessInstanceId();
|
||||
|
@ -55,10 +55,7 @@ public class ActListenerService {
|
|||
List<String> candidateUsers = actTaskDefService.findCandidateUsers(procDefId, procInsId, taskDefKey);
|
||||
logger.info("addCandidateUsers : {}", candidateUsers);
|
||||
|
||||
ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery();
|
||||
List<ProcessInstance> list = processInstanceQuery.list();
|
||||
System.out.println(list);
|
||||
ProcessInstance processInstance = processInstanceQuery.processInstanceId(delegateTask.getProcessInstanceId()).singleResult();
|
||||
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(delegateTask.getProcessInstanceId()).singleResult();
|
||||
if (actUtil.isProjectProcessIns(processInstance)) {
|
||||
updateProjectApprover(candidateUsers, processInstance);
|
||||
}
|
||||
|
|
|
@ -87,9 +87,10 @@ public class ActProcInsService {
|
|||
String adminId = InterfaceUtil.getAdminId() + "";
|
||||
variables.put(ActConstant.START_PROCESS_USERID, adminId);
|
||||
//启动流程
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinition.getId(), businessKey, variables);
|
||||
ProcessInstance instance = runtimeService.startProcessInstanceById(processDefinition.getId(), businessKey, variables);
|
||||
logger.info("startProcessInstanceSuccess procInsId:{}, procDefKey:{}, procDefName:{}", instance.getId(), instance.getProcessDefinitionKey(), instance.getProcessDefinitionName());
|
||||
|
||||
String procInsId = processInstance.getProcessInstanceId();
|
||||
String procInsId = instance.getProcessInstanceId();
|
||||
Task task = taskService.createTaskQuery().processInstanceId(procInsId).singleResult();
|
||||
if (task == null) {
|
||||
throw new Exception("procDefKey(" + procDefKey + ")启动异常");
|
||||
|
@ -101,15 +102,15 @@ public class ActProcInsService {
|
|||
taskService.addComment(taskId, procInsId, comment);
|
||||
|
||||
//设置发起人为办理人 然后完成任务 任务转入下一个审批节点
|
||||
task.setAssignee(adminId);
|
||||
taskService.setAssignee(taskId, adminId);
|
||||
taskService.complete(taskId);
|
||||
|
||||
if (actUtil.isProjectProcessIns(processInstance)) {
|
||||
projectTaskRecordService.saveTaskRecord(Integer.parseInt(processInstance.getBusinessKey()),
|
||||
if (actUtil.isProjectProcessIns(instance)) {
|
||||
projectTaskRecordService.saveTaskRecord(Integer.parseInt(instance.getBusinessKey()),
|
||||
task, ApproveStatusEnum.APPROVAL_PENDING.getApproveStatus(), ActConstant.TASK_INDEX_FIRST_USER_TASK, comment);
|
||||
}
|
||||
|
||||
return processInstance.getId();
|
||||
return instance.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1336,7 +1336,7 @@
|
|||
<div class="am-u-sm-4 am-u-md-2 am-text-right">
|
||||
审核意见
|
||||
</div>
|
||||
<div class="am-u-sm-4 am-u-md-4 am-text-left">
|
||||
<div class="am-u-sm-8 am-u-md-10 am-text-left">
|
||||
<#list taskRecords as node>
|
||||
<span>${node.assigneeName} : ${node.taskComment} ${node.createTime}</span>
|
||||
<hr/>
|
||||
|
|
|
@ -201,18 +201,23 @@
|
|||
<div class="am-btn-toolbar">
|
||||
<div class="am-btn-group am-btn-group-xs">
|
||||
<#--<@shiro.hasPermission name="PROJECT_EDIT">-->
|
||||
<#if list.approveStatusEstimate==0 || list.approveStatusEstimate==3>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/edit?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>编辑
|
||||
class="am-icon-pencil-square-o"></span>编辑概算
|
||||
</button>
|
||||
</#if>
|
||||
|
||||
<#-- </@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="PROJECT_EDIT">-->
|
||||
<#if list.status==5>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/budgetEdit?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>填写预算表
|
||||
</button>
|
||||
</#if>
|
||||
<#-- </@shiro.hasPermission>-->
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
|
@ -224,11 +229,16 @@
|
|||
onclick="location.href='${base}/project/detail?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>查看
|
||||
</button>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/approve?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>审核
|
||||
</button>
|
||||
|
||||
|
||||
<#if adminId==list.approveId>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/approve?id=${list.id}'"><span
|
||||
class="am-icon-pencil-square-o"></span>审核
|
||||
</button>
|
||||
</#if>
|
||||
|
||||
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
<span></span>
|
||||
</div>
|
||||
<div class="time-axis-title"> ${node.roleName}-${node.assigneeName}:
|
||||
<#if node.taskStatus==2>审批通过</#if>
|
||||
<#if node.taskStatus==3>审批不通过</#if>
|
||||
<#if node.taskIndex!=2 && node.taskStatus==2>审批通过</#if>
|
||||
<#if node.taskIndex!=2 && node.taskStatus==3>审批不通过</#if>
|
||||
</div>
|
||||
<div class="time-axis-title">
|
||||
${node.taskComment}
|
||||
|
|
Loading…
Reference in New Issue