Commit 4e440afd authored by lisong's avatar lisong

流程提交处理

parent e7760205
......@@ -140,6 +140,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public void flowExecute(Long id, String instanceId, String operate, String comment) {
try {
JgEnableDisable jgEnableDisable = this.baseMapper.selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id");
......@@ -150,6 +151,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate);
if (!ObjectUtils.isEmpty(jgEnableDisable.getAuditStatus()) || WorkFlowStatusEnum.ENABLE_SUBMIT.getReject().equals(jgEnableDisable.getAuditStatus()) || WorkFlowStatusEnum.ENABLE_SUBMIT.getRollBack().equals(jgEnableDisable.getAuditStatus())) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map);
//执行流程
Workflow.taskClient.completeByTask(taskId, dto);
......
......@@ -133,8 +133,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
return maintenanceContractMapper.updateBySequenceNbr(dto);
}
public void flowExecute(Long id,String instanceId, String operate, String comment, Boolean update) {
public void flowExecute(Long id, String instanceId, String operate, String comment, Boolean update) {
try {
JgMaintenanceContract jgMaintenanceContract = this.getBaseMapper().selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id");
......@@ -145,6 +146,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate);
if (!ObjectUtils.isEmpty(jgMaintenanceContract.getStatus()) || WorkFlowStatusEnum.MAIN_SUBMIT.getReject().equals(jgMaintenanceContract.getStatus()) || WorkFlowStatusEnum.MAIN_SUBMIT.getRollBack().equals(jgMaintenanceContract.getStatus())) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map);
//执行流程
Workflow.taskClient.completeByTask(taskId, dto);
......
......@@ -324,6 +324,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public void flowExecute(Long id, String instanceId, String operate, String comment) {
try {
JgUseRegistration jgUseRegistration = this.getBaseMapper().selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id");
......@@ -334,6 +335,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate);
if (!ObjectUtils.isEmpty(jgUseRegistration.getStatus()) || jgUseRegistration.getStatus().equals(WorkFlowStatusEnum.USE_SUBMIT.getReject()) || jgUseRegistration.getStatus().equals(WorkFlowStatusEnum.USE_SUBMIT.getRollBack())) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map);
//执行流程
Workflow.taskClient.completeByTask(taskId, dto);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment