feat(REQ-5965) - 移除同意操作时的空值变量

This commit is contained in:
wangli 2025-11-06 18:33:23 +08:00
parent 3a755e0d90
commit ccf56781fc
2 changed files with 10 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class SupportRefreshProperties {
@Value("${workflow.ignoreMqAlterApplicationNames:}")
private List<String> ignoreMqAlterApplicationNames;
@Value("${workflow.processLogHtmlUrl:https://taskflow-web.axzo.cn/#/document/log?processInstanceId=%s&personId=%d}")
@Value("${workflow.processLogHtmlUrl:https://taskflow-web.axzo.cn/#/document/log?processInstanceId=%s&personId=%s}")
private String processLogHtmlUrl;
}

View File

@ -54,6 +54,7 @@ import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import static cn.axzo.workflow.common.code.BpmnTaskRespCode.TASK_OPERATION_PARAM_INVALID;
@ -112,6 +113,10 @@ public class BpmnProcessTaskController extends BasicPopulateAvatarController imp
if (!StringUtils.hasText(dto.getTaskId())) {
dto.setTaskId(bpmnProcessTaskService.findTaskIdByInstanceIdAndPersonId(dto.getProcessInstanceId(), dto.getApprover().getPersonId()));
}
// 移除 variable value null key
dto.getVariables().entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
List<AttachmentDTO> tempAttachments = ListUtils.defaultIfNull(dto.getAttachmentList(), new ArrayList<>());
if (StringUtils.hasText(dto.getSignatureUrl())) {
AttachmentDTO signature = new AttachmentDTO();
@ -138,6 +143,10 @@ public class BpmnProcessTaskController extends BasicPopulateAvatarController imp
if (!StringUtils.hasText(dto.getTaskId())) {
dto.setTaskId(bpmnProcessTaskService.findTaskIdByInstanceIdAndPersonId(dto.getProcessInstanceId(), dto.getApprover().getPersonId()));
}
// 移除 variable value null key
dto.getVariables().entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
List<AttachmentDTO> tempAttachments = ListUtils.defaultIfNull(dto.getAttachmentList(), new ArrayList<>());
if (StringUtils.hasText(dto.getSignatureUrl())) {
AttachmentDTO signature = new AttachmentDTO();