fix: 类更名CustomTitleSetting->TitleSetting
This commit is contained in:
parent
846d0605d8
commit
bcfa08f8ef
|
@ -75,7 +75,7 @@ public class BpmModelMetaInfoVO {
|
|||
private Integer autoApprovalType;
|
||||
|
||||
@Schema(description = "标题设置", example = "{}")
|
||||
private CustomTitleSetting customTitleSetting;
|
||||
private TitleSetting titleSetting;
|
||||
|
||||
@Schema(description = "流程 ID 规则")
|
||||
@Data
|
||||
|
@ -101,11 +101,10 @@ public class BpmModelMetaInfoVO {
|
|||
|
||||
}
|
||||
|
||||
// TODO @lesan:TitleSetting 会不会更好。因为 Custom 和 Setting 有点重叠
|
||||
@Schema(description = "标题设置")
|
||||
@Data
|
||||
@Valid
|
||||
public static class CustomTitleSetting {
|
||||
public static class TitleSetting {
|
||||
|
||||
@Schema(description = "是否自定义", example = "false")
|
||||
@NotNull(message = "是否自定义不能为空")
|
||||
|
|
|
@ -174,6 +174,6 @@ public class BpmProcessDefinitionInfoDO extends BaseDO {
|
|||
* 标题设置
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private BpmModelMetaInfoVO.CustomTitleSetting customTitleSetting;
|
||||
private BpmModelMetaInfoVO.TitleSetting titleSetting;
|
||||
|
||||
}
|
||||
|
|
|
@ -618,15 +618,15 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||
processInstanceBuilder.predefineProcessInstanceId(processIdRedisDAO.generate(processIdRule));
|
||||
}
|
||||
// 3.2 流程名称
|
||||
BpmModelMetaInfoVO.CustomTitleSetting customTitleSetting = processDefinitionInfo.getCustomTitleSetting();
|
||||
if (customTitleSetting != null && Boolean.TRUE.equals(customTitleSetting.getEnable())) {
|
||||
BpmModelMetaInfoVO.TitleSetting titleSetting = processDefinitionInfo.getTitleSetting();
|
||||
if (titleSetting != null && Boolean.TRUE.equals(titleSetting.getEnable())) {
|
||||
AdminUserRespDTO user = adminUserApi.getUser(userId);
|
||||
// TODO @lesan:new HashMap 会更好哈。clone 感觉反射,不一定合适。
|
||||
Map<String, Object> cloneVariables = ObjectUtil.clone(variables);
|
||||
cloneVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_ID, user.getNickname());
|
||||
cloneVariables.put(BpmnVariableConstants.PROCESS_START_TIME, DateUtil.now());
|
||||
cloneVariables.put(BpmnVariableConstants.PROCESS_DEFINITION_NAME, definition.getName().trim());
|
||||
processInstanceBuilder.name(StrUtil.format(customTitleSetting.getTitle(), cloneVariables));
|
||||
processInstanceBuilder.name(StrUtil.format(titleSetting.getTitle(), cloneVariables));
|
||||
} else {
|
||||
processInstanceBuilder.name(definition.getName().trim());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue