|
@@ -2,6 +2,7 @@ package com.ims.eval.service.custom.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.ims.common.utils.StringUtils;
|
|
|
import com.ims.eval.config.ImaConfig;
|
|
|
import com.ims.eval.entity.DeptAssessmentDeclaration;
|
|
|
import com.ims.eval.entity.custom.DoAction;
|
|
@@ -88,7 +89,6 @@ public class WorkflowServiceImpl {
|
|
|
map.put("businessKey", doAction.getBusinessKey());
|
|
|
map.put("action", doAction.getAction());
|
|
|
map.put("opinion", doAction.getOpinion());
|
|
|
-
|
|
|
HttpEntity<Map> param = new HttpEntity<>(map, headers);
|
|
|
ResponseEntity<String> responseEntity2 = restTemplate.exchange(imaConfig.getFlowUrl() + "/bpm/instance/doAction", HttpMethod.POST, param, String.class);
|
|
|
log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
|
|
@@ -96,7 +96,7 @@ public class WorkflowServiceImpl {
|
|
|
FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
|
|
|
|
|
|
if (result.getIsOk()) {
|
|
|
- boolean biz = updateWorkflowState(result.getData(), doAction.getDefKey(), doAction.getBusinessKey(), "", doAction.getAction());
|
|
|
+ boolean biz = updateWorkflowState(result.getData(), doAction.getDefKey(), doAction.getBusinessKey(), "", "");
|
|
|
if (biz) {
|
|
|
log.info("保存流程实例id成功");
|
|
|
}
|
|
@@ -224,6 +224,9 @@ public class WorkflowServiceImpl {
|
|
|
map.put("instanceId", isOkAction.getInstanceId());
|
|
|
map.put("opinion", isOkAction.getOpinion());
|
|
|
map.put("iamCode", isOkAction.getIamCode());
|
|
|
+ if ("EndNoneEvent1".equals(isOkAction.getDestination())){
|
|
|
+ map.put("destination", isOkAction.getDestination());
|
|
|
+ }
|
|
|
HttpEntity<Map> param = new HttpEntity<>(map, headers);
|
|
|
ResponseEntity<String> responseEntity2 = restTemplate.exchange(imaConfig.getFlowUrl() + "/bpm/task/doAction", HttpMethod.POST, param, String.class);
|
|
|
log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
|
|
@@ -231,7 +234,7 @@ public class WorkflowServiceImpl {
|
|
|
|
|
|
FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
|
|
|
if (result.getIsOk()) {
|
|
|
- boolean biz = updateWorkflowState("", isOkAction.getDefKey(), isOkAction.getBizKey(), isOkAction.getTaskName(), isOkAction.getAction());
|
|
|
+ boolean biz = updateWorkflowState("", isOkAction.getDefKey(), isOkAction.getBizKey(), isOkAction.getTaskName(), isOkAction.getDestination());
|
|
|
if (biz) {
|
|
|
log.info("状态修改成功");
|
|
|
}
|
|
@@ -295,7 +298,7 @@ public class WorkflowServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private boolean updateWorkflowState(String instId, String defKey, String bizKey, String taskName, String action) {
|
|
|
+ private boolean updateWorkflowState(String instId, String defKey, String bizKey, String taskName, String destination) {
|
|
|
|
|
|
switch (defKey) {
|
|
|
case "dwkpmbqd"://单位考评目标启动
|
|
@@ -320,7 +323,7 @@ public class WorkflowServiceImpl {
|
|
|
evaluationDeptBusinessAssessmentService.editState(bizKey, taskName, instId);
|
|
|
break;
|
|
|
case "jxjgkhsb"://绩效结果考核申报
|
|
|
- deptAssessmentDeclarationService.editState(bizKey, taskName, instId, action);
|
|
|
+ deptAssessmentDeclarationService.editState(bizKey, taskName, instId, destination);
|
|
|
break;
|
|
|
}
|
|
|
return true;
|