|
@@ -74,6 +74,14 @@ public class WorkflowService {
|
|
ResponseEntity<String> responseEntity2 = restTemplate.exchange("http://10.65.78.23:8080/bpm/instance/doAction", HttpMethod.POST,param,String.class);
|
|
ResponseEntity<String> responseEntity2 = restTemplate.exchange("http://10.65.78.23:8080/bpm/instance/doAction", HttpMethod.POST,param,String.class);
|
|
log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
|
|
log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
|
|
if(200== responseEntity2.getStatusCodeValue()){
|
|
if(200== responseEntity2.getStatusCodeValue()){
|
|
|
|
+ FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
|
|
|
|
+
|
|
|
|
+ if(result.getIsOk()){
|
|
|
|
+ boolean biz = updateWorkflowState(result.getData(),doAction.getDefKey(),doAction.getBusinessKey(),"");
|
|
|
|
+ if(biz){
|
|
|
|
+ log.info("保存流程实例id成功");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return JSON.parseObject(responseEntity2.getBody());
|
|
return JSON.parseObject(responseEntity2.getBody());
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
@@ -105,7 +113,7 @@ public class WorkflowService {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+//440416982620438529
|
|
|
|
|
|
/**
|
|
/**
|
|
* 流程审批
|
|
* 流程审批
|
|
@@ -136,7 +144,7 @@ public class WorkflowService {
|
|
|
|
|
|
FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
|
|
FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
|
|
if(result.getIsOk()){
|
|
if(result.getIsOk()){
|
|
- boolean biz = updateWorkflowState(isOkAction.getInstanceId(),isOkAction.getDefKey(),isOkAction.getBizKey(),isOkAction.getTaskName());
|
|
|
|
|
|
+ boolean biz = updateWorkflowState("",isOkAction.getDefKey(),isOkAction.getBizKey(),isOkAction.getTaskName());
|
|
if(biz){
|
|
if(biz){
|
|
log.info("状态修改成功");
|
|
log.info("状态修改成功");
|
|
}
|
|
}
|
|
@@ -199,14 +207,14 @@ public class WorkflowService {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean updateWorkflowState(String instanceId, String defKey, String bizKey,String taskName) {
|
|
|
|
|
|
+ private boolean updateWorkflowState(String instId, String defKey, String bizKey,String taskName) {
|
|
|
|
|
|
switch (defKey) {
|
|
switch (defKey) {
|
|
case "dwkpmbqd"://单位考评目标启动
|
|
case "dwkpmbqd"://单位考评目标启动
|
|
- deptResponsibilityService.editState(bizKey,taskName);
|
|
|
|
|
|
+ deptResponsibilityService.editState(bizKey,taskName,instId);
|
|
break;
|
|
break;
|
|
case "yddwkplc"://月度单位考评流程
|
|
case "yddwkplc"://月度单位考评流程
|
|
- boolean b = organizationEvaluationService.editState(bizKey, taskName);
|
|
|
|
|
|
+ boolean b = organizationEvaluationService.editState(bizKey, taskName,instId);
|
|
if ("人事部审核".equals(taskName) && b){
|
|
if ("人事部审核".equals(taskName) && b){
|
|
scoreCalculationSchedule.doTask(bizKey);
|
|
scoreCalculationSchedule.doTask(bizKey);
|
|
}
|
|
}
|
|
@@ -220,4 +228,5 @@ public class WorkflowService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
}
|
|
}
|