能力资源上架 通过后
This commit is contained in:
parent
828d6baae4
commit
dec5ac235f
|
@ -52,7 +52,15 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
|
||||
@Override
|
||||
public void notify(DelegateExecution execution) throws Exception {
|
||||
logger.error("----------------------进入审批通过节点---------------------------");
|
||||
final String eventName = execution.getEventName();
|
||||
|
||||
switch (eventName) {
|
||||
case EVENTNAME_TAKE: {
|
||||
endTake(execution.getVariables());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,9 +79,9 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
case EVENTNAME_CREATE: // 创建当前审批节点事件
|
||||
create(delegateTask, roleDTO);
|
||||
break;
|
||||
case EVENTNAME_COMPLETE:
|
||||
complete(delegateTask);
|
||||
break;
|
||||
// case EVENTNAME_COMPLETE:
|
||||
// complete(delegateTask);
|
||||
// break;
|
||||
default:
|
||||
logger.error("未处理该事件:" + eventName);
|
||||
}
|
||||
|
@ -99,8 +107,25 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入最后结束节点
|
||||
*
|
||||
* @param kv
|
||||
*/
|
||||
private void endTake(Map<String, Object> kv) { // 进入最后结束节点
|
||||
Gson gson = new Gson();
|
||||
JsonElement jsonElement = gson.toJsonTree(kv);
|
||||
TResourceMountApplyDTO resourceMountApplyDTO = gson.fromJson(jsonElement, TResourceMountApplyDTO.class);
|
||||
ResourceDTO re = resourceMountApplyDTO.getResourceDTO();
|
||||
if (re != null) {
|
||||
re.setDelFlag(0);
|
||||
resourceService.update(re);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程结束,推送
|
||||
*
|
||||
* @param delegateTask
|
||||
*/
|
||||
private void complete(DelegateTask delegateTask) {
|
||||
|
|
Loading…
Reference in New Issue