Merge branch 'feature/REQ-5965' into dev
This commit is contained in:
commit
48feb8f46c
@ -106,7 +106,9 @@ public class BpmnTaskAuditDTO {
|
||||
private String operationDesc;
|
||||
|
||||
/**
|
||||
* 更新或新增流程变量
|
||||
* 更新或新增流程变量,
|
||||
* <p>
|
||||
* 如果不修改,则map 的 value 设置为 null,内部会自动过滤
|
||||
*/
|
||||
private Map<String, Object> variables;
|
||||
}
|
||||
|
||||
@ -109,7 +109,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;
|
||||
|
||||
}
|
||||
|
||||
@ -67,7 +67,9 @@ public class CustomGetProcessInstanceVariablesCmd extends AbstractCommand<Map<St
|
||||
HistoryService historyService = processEngineConfiguration.getHistoryService();
|
||||
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(processInstanceId).includeProcessVariables().singleResult();
|
||||
|
||||
if (Objects.isNull(instance)) {
|
||||
return variables;
|
||||
}
|
||||
variables.put(PRINT_VAR_PROCESS_NAME, instance.getName());
|
||||
variables.put(PRINT_VAR_PROCESS_BELONG_TENANT_ID, instance.getTenantId());
|
||||
// 添加流程开始时间
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
package cn.axzo.workflow.core.repository.mapper;
|
||||
|
||||
import cn.axzo.workflow.core.conf.handler.ListAssigneeTypeHandler;
|
||||
import cn.axzo.workflow.core.repository.entity.ExtAxProcessLog;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Result;
|
||||
import org.apache.ibatis.annotations.Results;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
@Mapper
|
||||
public interface ExtAxProcessLogMapper extends BaseMapperX<ExtAxProcessLog> {
|
||||
@ -13,5 +17,8 @@ public interface ExtAxProcessLogMapper extends BaseMapperX<ExtAxProcessLog> {
|
||||
|
||||
|
||||
@Select("select * from ext_ax_process_log WHERE process_instance_id = #{processInstanceId} and task_id = #{taskId}")
|
||||
@Results({
|
||||
@Result(column = "assignee_full", property = "assigneeFull", jdbcType = JdbcType.ARRAY, typeHandler = ListAssigneeTypeHandler.class)
|
||||
})
|
||||
ExtAxProcessLog findByProcessIdAndTaskIdWithDeleted(String processInstanceId, String taskId);
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user