|
@@ -348,7 +348,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
rejectLinkMap.remove(userTask.getId());
|
|
rejectLinkMap.remove(userTask.getId());
|
|
tfFlowApprove.setRejectLink(rejectLinkMap.size() == 0 ? null : JacksonUtil.parseJson(rejectLinkMap));
|
|
tfFlowApprove.setRejectLink(rejectLinkMap.size() == 0 ? null : JacksonUtil.parseJson(rejectLinkMap));
|
|
}
|
|
}
|
|
- } else if (approvePass == FlowApprovePassEnum.REJECT) {
|
|
|
|
|
|
+ } else if (approvePass == FlowApprovePassEnum.REJECT || approvePass == FlowApprovePassEnum.CANCEL) {
|
|
Optional.ofNullable(map.get(SystemConstant.APPROVE_SETUP)).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("流程驳回节点不能为空"));
|
|
Optional.ofNullable(map.get(SystemConstant.APPROVE_SETUP)).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("流程驳回节点不能为空"));
|
|
Integer rejectSetup = Integer.parseInt(map.get(SystemConstant.APPROVE_SETUP).toString());
|
|
Integer rejectSetup = Integer.parseInt(map.get(SystemConstant.APPROVE_SETUP).toString());
|
|
|
|
|
|
@@ -369,7 +369,8 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
tfFlowApprove,
|
|
tfFlowApprove,
|
|
tfFlowLog,
|
|
tfFlowLog,
|
|
agginessMap,
|
|
agginessMap,
|
|
- gson);
|
|
|
|
|
|
+ gson,
|
|
|
|
+ approvePass);
|
|
}
|
|
}
|
|
//获取流程变量
|
|
//获取流程变量
|
|
this.getAgginess(nextFlowTaskResult,
|
|
this.getAgginess(nextFlowTaskResult,
|
|
@@ -520,6 +521,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
* @param tfFlowLog
|
|
* @param tfFlowLog
|
|
* @param agginessMap
|
|
* @param agginessMap
|
|
* @param gson
|
|
* @param gson
|
|
|
|
+ * @param approvePass
|
|
*/
|
|
*/
|
|
protected void approveReject(boolean multiInstance,
|
|
protected void approveReject(boolean multiInstance,
|
|
Map<String, Object> map,
|
|
Map<String, Object> map,
|
|
@@ -529,16 +531,17 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
TFFlowApprove tfFlowApprove,
|
|
TFFlowApprove tfFlowApprove,
|
|
TFFlowLog tfFlowLog,
|
|
TFFlowLog tfFlowLog,
|
|
Map<String, CustomFlowVarDto> agginessMap,
|
|
Map<String, CustomFlowVarDto> agginessMap,
|
|
- Gson gson) {
|
|
|
|
|
|
+ Gson gson,
|
|
|
|
+ FlowApprovePassEnum approvePass) {
|
|
if (multiInstance) {
|
|
if (multiInstance) {
|
|
map.computeIfAbsent(FlowApproveOperationEnum.REJECT.getId() + id, v -> 1);
|
|
map.computeIfAbsent(FlowApproveOperationEnum.REJECT.getId() + id, v -> 1);
|
|
}
|
|
}
|
|
map.put(SystemConstant.APPROVE, nextFlowTaskResult.getTaskKey());
|
|
map.put(SystemConstant.APPROVE, nextFlowTaskResult.getTaskKey());
|
|
tfFlowApprove.setSetup(nextFlowTaskResult.getSetup());
|
|
tfFlowApprove.setSetup(nextFlowTaskResult.getSetup());
|
|
- tfFlowApprove.setStatus(FlowStatusEnum.REJECT);
|
|
|
|
- tfFlowLog.setApproveOperation(FlowApproveOperationEnum.REJECT);
|
|
|
|
|
|
+ tfFlowApprove.setStatus(FlowStatusEnum.convertToEnum(approvePass.name()));
|
|
|
|
+ tfFlowLog.setApproveOperation(FlowApproveOperationEnum.convertToEnum(approvePass.name()));
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(agginessMap.get(currFlowTaskResult.getTaskKey())), CustomFlowVarDto.class);
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(agginessMap.get(currFlowTaskResult.getTaskKey())), CustomFlowVarDto.class);
|
|
- if (Objects.nonNull(customFlowVarDto) && customFlowVarDto.getRejectResubmitType() == CustomFlowRejectResubmitTypeEnum.PREV_STEP) {
|
|
|
|
|
|
+ if (approvePass == FlowApprovePassEnum.REJECT && Objects.nonNull(customFlowVarDto) && customFlowVarDto.getRejectResubmitType() == CustomFlowRejectResubmitTypeEnum.PREV_STEP) {
|
|
Map<String, FlowTaskResult> rejectLinkMap = null;
|
|
Map<String, FlowTaskResult> rejectLinkMap = null;
|
|
if (Objects.nonNull(tfFlowApprove.getRejectLink())) {
|
|
if (Objects.nonNull(tfFlowApprove.getRejectLink())) {
|
|
rejectLinkMap = JacksonUtil.readJson(tfFlowApprove.getRejectLink(), Map.class);
|
|
rejectLinkMap = JacksonUtil.readJson(tfFlowApprove.getRejectLink(), Map.class);
|
|
@@ -579,7 +582,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
} else {
|
|
} else {
|
|
nextFlowTaskResult = this.getNextFlowTaskResult(setupMap, gson, currSetup, nextFlowTaskResult);
|
|
nextFlowTaskResult = this.getNextFlowTaskResult(setupMap, gson, currSetup, nextFlowTaskResult);
|
|
}
|
|
}
|
|
- } else if (approvePass == FlowApprovePassEnum.REJECT) {
|
|
|
|
|
|
+ } else if (approvePass == FlowApprovePassEnum.REJECT || approvePass == FlowApprovePassEnum.CANCEL) {
|
|
nextFlowTaskResult = this.getNextFlowTaskResult(setupMap, gson, currSetup, nextFlowTaskResult);
|
|
nextFlowTaskResult = this.getNextFlowTaskResult(setupMap, gson, currSetup, nextFlowTaskResult);
|
|
}
|
|
}
|
|
Optional.ofNullable(nextFlowTaskResult).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("该节点不能审批通过"));
|
|
Optional.ofNullable(nextFlowTaskResult).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("该节点不能审批通过"));
|