Merge branch 'feature/REQ-7125' into dev
This commit is contained in:
commit
7df1a5b62d
@ -62,7 +62,6 @@ import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskInstanceLogVO;
|
||||
import cn.axzo.workflow.common.model.response.category.CategoryItemVO;
|
||||
import cn.axzo.workflow.core.common.utils.BpmnCollectionUtils;
|
||||
import cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper;
|
||||
import cn.axzo.workflow.core.conf.OmsWorkspaceProperty;
|
||||
import cn.axzo.workflow.core.engine.cmd.CustomAbortProcessInstanceAsyncCmd;
|
||||
import cn.axzo.workflow.core.engine.cmd.CustomAbortProcessInstanceCmd;
|
||||
import cn.axzo.workflow.core.engine.cmd.CustomCancelProcessInstanceAsyncCmd;
|
||||
@ -305,8 +304,6 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
|
||||
private ExtAxProcessSignService extAxProcessSignService;
|
||||
@Resource
|
||||
private ExtAxReadRecordService extAxReadRecordService;
|
||||
@Resource
|
||||
private OmsWorkspaceProperty omsWorkspaceProperty;
|
||||
|
||||
@Override
|
||||
public HistoricProcessInstance getProcessInstanceByBusinessKey(String businessKey, @Nullable String tenantId,
|
||||
@ -1706,54 +1703,12 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
|
||||
// 处理是否加密
|
||||
handleEncrypt(dto.getEncrypt(), tasks);
|
||||
// 处理 oms 审批人脱敏
|
||||
handleOmsApproverDesensitization(dto.getOmsApproveDesensitization(), tasks);
|
||||
// handleOmsApproverDesensitization(dto.getOmsApproveDesensitization(), tasks);
|
||||
// reset field forecastAssignees Empty to null;
|
||||
resetCollectionToNull(tasks);
|
||||
return tasks;
|
||||
}
|
||||
|
||||
private void handleOmsApproverDesensitization(Boolean omsApproveDesensitization, List<BpmnTaskInstanceLogVO> tasks) {
|
||||
if (Boolean.FALSE.equals(omsApproveDesensitization)) {
|
||||
return;
|
||||
}
|
||||
tasks.forEach(i -> {
|
||||
if (Objects.nonNull(i.getResult())) {
|
||||
if (Objects.equals(i.getResult(), PROCESSING)) {
|
||||
// 脱敏头像
|
||||
if (Objects.nonNull(i.getAssigneeSnapshot()) && Objects.equals(i.getAssigneeSnapshot().getTenantId(), String.valueOf(omsWorkspaceProperty.getTenantId()))) {
|
||||
// 目前该节点是单人审批
|
||||
i.getAssigneeSnapshot().setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
} else if (!CollectionUtils.isEmpty(i.getForecastAssignees())) {
|
||||
i.getForecastAssignees().forEach(j -> {
|
||||
j.setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 隐藏姓名、脱敏头像
|
||||
if (Objects.nonNull(i.getAssigneeSnapshot())) {
|
||||
// 目前该节点是单人审批
|
||||
i.getAssigneeSnapshot().setAssignerName("");
|
||||
i.getAssigneeSnapshot().setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
} else if (!CollectionUtils.isEmpty(i.getForecastAssignees())) {
|
||||
i.getForecastAssignees().forEach(j -> {
|
||||
j.setAssignerName("");
|
||||
j.setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
});
|
||||
}
|
||||
i.setOperationDesc(i.getResult().getDesc());
|
||||
}
|
||||
} else {
|
||||
// 未来节点
|
||||
if (!CollectionUtils.isEmpty(i.getForecastAssignees())) {
|
||||
i.getForecastAssignees().forEach(j -> {
|
||||
j.setAssignerName("");
|
||||
j.setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void resetCollectionToNull(List<BpmnTaskInstanceLogVO> tasks) {
|
||||
tasks.forEach(i -> {
|
||||
if (ListUtils.emptyIfNull(i.getForecastAssignees()).isEmpty()) {
|
||||
|
||||
@ -48,12 +48,12 @@ import cn.axzo.workflow.common.model.response.bpmn.process.doc.DocPendingVO;
|
||||
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskButtonVo;
|
||||
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskInstanceLogVO;
|
||||
import cn.axzo.workflow.common.valid.group.ValidGroup;
|
||||
import cn.axzo.workflow.core.conf.OmsWorkspaceProperty;
|
||||
import cn.axzo.workflow.core.engine.cmd.CustomGetModelDocsCmd;
|
||||
import cn.axzo.workflow.core.repository.entity.ExtAxProcessLog;
|
||||
import cn.axzo.workflow.core.repository.mapper.ExtAxModelDocMapper;
|
||||
import cn.axzo.workflow.core.service.BpmnProcessInstanceService;
|
||||
import cn.axzo.workflow.core.service.BpmnProcessTaskService;
|
||||
import cn.axzo.workflow.core.service.CategoryService;
|
||||
import cn.axzo.workflow.core.service.ExtAxProcessLogService;
|
||||
import cn.axzo.workflow.core.service.ExtAxProcessSignService;
|
||||
import cn.axzo.workflow.core.service.ExtAxReModelService;
|
||||
@ -101,6 +101,7 @@ import static cn.axzo.workflow.common.code.BpmnInstanceRespCode.PROCESS_DOC_ID_N
|
||||
import static cn.axzo.workflow.common.code.BpmnInstanceRespCode.PROCESS_DOC_READ_PARAM_ERROR;
|
||||
import static cn.axzo.workflow.common.code.BpmnInstanceRespCode.PROCESS_EXT_LOG_PARAM_ERROR;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.SIGN_BIZ_CUSTOM_DOCS;
|
||||
import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.PROCESSING;
|
||||
import static cn.azxo.framework.common.model.CommonResponse.success;
|
||||
|
||||
/**
|
||||
@ -134,7 +135,7 @@ public class BpmnProcessInstanceController extends BasicPopulateAvatarController
|
||||
@Resource
|
||||
private ExtAxProcessLogService extAxProcessLogService;
|
||||
@Resource
|
||||
private CategoryService categoryService;
|
||||
private OmsWorkspaceProperty omsWorkspaceProperty;
|
||||
|
||||
/**
|
||||
* 超管查询所有流程实例
|
||||
@ -441,9 +442,59 @@ public class BpmnProcessInstanceController extends BasicPopulateAvatarController
|
||||
BpmnProcessInstanceLogVO log = bpmnProcessInstanceService.getProcessInstanceLog(dto);
|
||||
parseSignatureUrl(log);
|
||||
resetPersonInfo(log);
|
||||
handleOmsApproverDesensitization(dto.getOmsApproveDesensitization(), log.getTaskDetails());
|
||||
return success(log);
|
||||
}
|
||||
|
||||
private void handleOmsApproverDesensitization(Boolean omsApproveDesensitization, List<BpmnTaskInstanceLogVO> tasks) {
|
||||
if (Boolean.FALSE.equals(omsApproveDesensitization)) {
|
||||
return;
|
||||
}
|
||||
tasks.forEach(i -> {
|
||||
if (Objects.nonNull(i.getResult())) {
|
||||
if (Objects.equals(i.getResult(), PROCESSING)) {
|
||||
// 脱敏头像
|
||||
if (Objects.nonNull(i.getAssigneeSnapshot()) && Objects.equals(i.getAssigneeSnapshot().getTenantId(), String.valueOf(omsWorkspaceProperty.getWorkspaceId()))) {
|
||||
// 目前该节点是单人审批
|
||||
i.getAssigneeSnapshot().setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
} else if (!CollectionUtils.isEmpty(i.getForecastAssignees())) {
|
||||
i.getForecastAssignees().stream()
|
||||
.filter(j -> Objects.equals(j.getTenantId(), String.valueOf(omsWorkspaceProperty.getWorkspaceId())))
|
||||
.forEach(j -> {
|
||||
j.setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 隐藏姓名、脱敏头像
|
||||
if (Objects.nonNull(i.getAssigneeSnapshot()) && Objects.equals(i.getAssigneeSnapshot().getTenantId(), String.valueOf(omsWorkspaceProperty.getWorkspaceId()))) {
|
||||
// 目前该节点是单人审批
|
||||
i.getAssigneeSnapshot().setAssignerName("");
|
||||
i.getAssigneeSnapshot().setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
i.setOperationDesc(i.getResult().getDesc());
|
||||
} else if (!CollectionUtils.isEmpty(i.getForecastAssignees())) {
|
||||
i.getForecastAssignees().stream()
|
||||
.filter(j -> Objects.equals(j.getTenantId(), String.valueOf(omsWorkspaceProperty.getWorkspaceId())))
|
||||
.forEach(j -> {
|
||||
j.setAssignerName("");
|
||||
j.setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
i.setOperationDesc(i.getResult().getDesc());
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 未来节点
|
||||
if (!CollectionUtils.isEmpty(i.getForecastAssignees())) {
|
||||
i.getForecastAssignees().stream()
|
||||
.filter(j -> Objects.equals(j.getTenantId(), String.valueOf(omsWorkspaceProperty.getWorkspaceId())))
|
||||
.forEach(j -> {
|
||||
j.setAssignerName("");
|
||||
j.setAvatar("https://axzo-public.oss-cn-chengdu.aliyuncs.com/app/app/1d718eb672a44247a6e530548dc0100f.svg");
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据任务id查询任务状态,按钮详情
|
||||
|
||||
Loading…
Reference in New Issue
Block a user