Merge remote-tracking branch 'base-version/main' into test
# Conflicts: # pom.xml # zt-dependencies/pom.xml
This commit is contained in:
6
pom.xml
6
pom.xml
@@ -32,7 +32,7 @@
|
|||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.0.37</revision>
|
<revision>3.0.38</revision>
|
||||||
<!-- Maven 相关 -->
|
<!-- Maven 相关 -->
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
@@ -254,8 +254,8 @@
|
|||||||
<id>env-local</id>
|
<id>env-local</id>
|
||||||
<properties>
|
<properties>
|
||||||
<env.name>local</env.name>
|
<env.name>local</env.name>
|
||||||
<config.server-addr>localhost:8848</config.server-addr>
|
<!-- <config.server-addr>localhost:8848</config.server-addr>-->
|
||||||
<!-- <config.server-addr>172.16.46.63:30848</config.server-addr>-->
|
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||||
<config.namespace>local</config.namespace>
|
<config.namespace>local</config.namespace>
|
||||||
<config.group>DEFAULT_GROUP</config.group>
|
<config.group>DEFAULT_GROUP</config.group>
|
||||||
<config.username/>
|
<config.username/>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ CREATE TABLE infra_bsn_file (
|
|||||||
file_id bigint NOT NULL,
|
file_id bigint NOT NULL,
|
||||||
file_name varchar(500) DEFAULT '' NULL,
|
file_name varchar(500) DEFAULT '' NULL,
|
||||||
src varchar(100) DEFAULT '' NULL,
|
src varchar(100) DEFAULT '' NULL,
|
||||||
|
status smallint DEFAULT 1 NOT NULL,
|
||||||
creator varchar(64) DEFAULT '' NULL,
|
creator varchar(64) DEFAULT '' NULL,
|
||||||
create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||||
updater varchar(64) DEFAULT '' NULL,
|
updater varchar(64) DEFAULT '' NULL,
|
||||||
@@ -30,6 +31,7 @@ COMMENT ON COLUMN infra_bsn_file.bsn_cd IS '业务编码';
|
|||||||
COMMENT ON COLUMN infra_bsn_file.file_id IS '附件fileId';
|
COMMENT ON COLUMN infra_bsn_file.file_id IS '附件fileId';
|
||||||
COMMENT ON COLUMN infra_bsn_file.file_name IS '附件名称';
|
COMMENT ON COLUMN infra_bsn_file.file_name IS '附件名称';
|
||||||
COMMENT ON COLUMN infra_bsn_file.src IS '附件来源';
|
COMMENT ON COLUMN infra_bsn_file.src IS '附件来源';
|
||||||
|
COMMENT ON COLUMN infra_bsn_file.status IS '状态(1-正常,0-禁用)';
|
||||||
COMMENT ON COLUMN infra_bsn_file.creator IS '创建者';
|
COMMENT ON COLUMN infra_bsn_file.creator IS '创建者';
|
||||||
COMMENT ON COLUMN infra_bsn_file.create_time IS '创建时间';
|
COMMENT ON COLUMN infra_bsn_file.create_time IS '创建时间';
|
||||||
COMMENT ON COLUMN infra_bsn_file.updater IS '更新者';
|
COMMENT ON COLUMN infra_bsn_file.updater IS '更新者';
|
||||||
|
|||||||
3
sql/dm/新增业务附件表状态.sql
Normal file
3
sql/dm/新增业务附件表状态.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
-- 为业务附件关联表添加状态字段 (达梦数据库)
|
||||||
|
ALTER TABLE infra_bsn_file ADD COLUMN status SMALLINT DEFAULT 1 NOT NULL;
|
||||||
|
COMMENT ON COLUMN infra_bsn_file.status IS '状态(1-正常,0-禁用)';
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.0.37</revision>
|
<revision>3.0.38</revision>
|
||||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.boot.version>3.4.5</spring.boot.version>
|
<spring.boot.version>3.4.5</spring.boot.version>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.zt.plat.framework.business.filter;
|
|||||||
import com.zt.plat.framework.common.util.spring.SpringUtils;
|
import com.zt.plat.framework.common.util.spring.SpringUtils;
|
||||||
import com.zt.plat.module.infra.api.businessfile.BusinessFileApi;
|
import com.zt.plat.module.infra.api.businessfile.BusinessFileApi;
|
||||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
||||||
|
import com.zt.plat.module.infra.enums.businessfile.BusinessFileStatusEnum;
|
||||||
import com.esotericsoftware.minlog.Log;
|
import com.esotericsoftware.minlog.Log;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -139,6 +140,7 @@ public class FileUploadFilter implements Filter {
|
|||||||
createReqDTO.setFileId(Long.parseLong(fileId));
|
createReqDTO.setFileId(Long.parseLong(fileId));
|
||||||
createReqDTO.setFileName(fileName);
|
createReqDTO.setFileName(fileName);
|
||||||
createReqDTO.setSource(businessSource);
|
createReqDTO.setSource(businessSource);
|
||||||
|
createReqDTO.setStatus(BusinessFileStatusEnum.NORMAL.getStatus()); // 设置默认状态为正常
|
||||||
reqDTOList.add(createReqDTO);
|
reqDTOList.add(createReqDTO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.bpm.api.task.dto;
|
package com.zt.plat.module.bpm.api.task.dto;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.core.KeyValue;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -47,13 +48,86 @@ public class BpmTaskRespDTO {
|
|||||||
@Schema(description = "表单编号", example = "1024")
|
@Schema(description = "表单编号", example = "1024")
|
||||||
private Long formId;
|
private Long formId;
|
||||||
|
|
||||||
|
@Schema(description = "表单路径", example = "/form/leave")
|
||||||
|
private String formPath;
|
||||||
|
|
||||||
|
@Schema(description = "表单名字", example = "请假表单")
|
||||||
|
private String formName;
|
||||||
|
|
||||||
@Schema(description = "表单的配置", example = "[]")
|
@Schema(description = "表单的配置", example = "[]")
|
||||||
private String formConf;
|
private String formConf;
|
||||||
|
|
||||||
@Schema(description = "表单项的数组", example = "[]")
|
@Schema(description = "表单项的数组", example = "[]")
|
||||||
private String formFields;
|
private List<String> formFields;
|
||||||
|
|
||||||
@Schema(description = "提交的表单值", example = "{\"name\": \"芋艿\"}")
|
@Schema(description = "提交的表单值", example = "{\"name\": \"芋艿\"}")
|
||||||
private Map<String, Object> formVariables;
|
private Map<String, Object> formVariables;
|
||||||
|
|
||||||
|
@Schema(description = "任务负责人编号", example = "2048")
|
||||||
|
private Long owner;
|
||||||
|
|
||||||
|
@Schema(description = "负责人的用户信息")
|
||||||
|
private UserSimpleDTO ownerUser;
|
||||||
|
|
||||||
|
@Schema(description = "任务分配人编号", example = "2048")
|
||||||
|
private Long assignee;
|
||||||
|
|
||||||
|
@Schema(description = "审核的用户信息")
|
||||||
|
private UserSimpleDTO assigneeUser;
|
||||||
|
|
||||||
|
@Schema(description = "父任务编号", example = "1024")
|
||||||
|
private String parentTaskId;
|
||||||
|
|
||||||
|
@Schema(description = "子任务列表(由加签生成)")
|
||||||
|
private List<BpmTaskRespDTO> children;
|
||||||
|
|
||||||
|
@Schema(description = "所属流程实例")
|
||||||
|
private ProcessInstanceDTO processInstance;
|
||||||
|
|
||||||
|
@Schema(description = "操作按钮设置值")
|
||||||
|
private Map<Integer, OperationButtonSettingDTO> buttonsSetting;
|
||||||
|
|
||||||
|
@Schema(description = "是否需要签名", example = "false")
|
||||||
|
private Boolean signEnable;
|
||||||
|
|
||||||
|
@Schema(description = "是否填写审批意见", example = "false")
|
||||||
|
private Boolean reasonRequire;
|
||||||
|
|
||||||
|
@Schema(description = "节点类型", example = "10")
|
||||||
|
private Integer nodeType;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "流程实例信息")
|
||||||
|
public static class ProcessInstanceDTO {
|
||||||
|
|
||||||
|
@Schema(description = "流程实例编号", example = "1024")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例名称", example = "芋道")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "提交时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "流程定义的编号", example = "2048")
|
||||||
|
private String processDefinitionId;
|
||||||
|
|
||||||
|
@Schema(description = "流程摘要", example = "[]")
|
||||||
|
private List<KeyValue<String, String>> summary;
|
||||||
|
|
||||||
|
@Schema(description = "发起人的用户信息")
|
||||||
|
private UserSimpleDTO startUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "操作按钮设置")
|
||||||
|
public static class OperationButtonSettingDTO {
|
||||||
|
|
||||||
|
@Schema(description = "显示名称", example = "审批")
|
||||||
|
private String displayName;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用", example = "true")
|
||||||
|
private Boolean enable;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.zt.plat.module.bpm.api.task.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "RPC 服务 - 用户精简信息 DTO")
|
||||||
|
@Data
|
||||||
|
public class UserSimpleDTO {
|
||||||
|
|
||||||
|
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -75,9 +75,11 @@ public class BpmTaskApiImpl implements BpmTaskApi {
|
|||||||
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
|
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
|
||||||
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(convertSet(pageResult.getList(), Task::getProcessDefinitionId));
|
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(convertSet(pageResult.getList(), Task::getProcessDefinitionId));
|
||||||
|
|
||||||
// 使用转换器构建结果并转换为 DTO
|
// 使用转换器构建完整的 VO 结果,然后转换为 DTO
|
||||||
var voPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap, processDefinitionInfoMap);
|
var voPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap, processDefinitionInfoMap);
|
||||||
return success(BeanUtils.toBean(voPageResult.getList(), BpmTaskRespDTO.class));
|
List<BpmTaskRespDTO> result = BpmTaskConvert.INSTANCE.buildTaskRespDTOList(voPageResult.getList());
|
||||||
|
|
||||||
|
return success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -96,9 +98,11 @@ public class BpmTaskApiImpl implements BpmTaskApi {
|
|||||||
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
|
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
|
||||||
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(convertSet(pageResult.getList(), HistoricTaskInstance::getProcessDefinitionId));
|
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(convertSet(pageResult.getList(), HistoricTaskInstance::getProcessDefinitionId));
|
||||||
|
|
||||||
// 使用转换器构建结果并转换为 DTO
|
// 使用转换器构建完整的 VO 结果,然后转换为 DTO
|
||||||
var voPageResult = BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, null, processDefinitionInfoMap);
|
var voPageResult = BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, null, processDefinitionInfoMap);
|
||||||
return success(BeanUtils.toBean(voPageResult.getList(), BpmTaskRespDTO.class));
|
List<BpmTaskRespDTO> result = BpmTaskConvert.INSTANCE.buildTaskRespDTOList(voPageResult.getList());
|
||||||
|
|
||||||
|
return success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -121,9 +125,11 @@ public class BpmTaskApiImpl implements BpmTaskApi {
|
|||||||
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), DeptUtil::getDeptId));
|
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), DeptUtil::getDeptId));
|
||||||
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(convertSet(pageResult.getList(), HistoricTaskInstance::getProcessDefinitionId));
|
Map<String, BpmProcessDefinitionInfoDO> processDefinitionInfoMap = processDefinitionService.getProcessDefinitionInfoMap(convertSet(pageResult.getList(), HistoricTaskInstance::getProcessDefinitionId));
|
||||||
|
|
||||||
// 使用转换器构建结果并转换为 DTO
|
// 使用转换器构建完整的 VO 结果,然后转换为 DTO
|
||||||
var voPageResult = BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, deptMap, processDefinitionInfoMap);
|
var voPageResult = BpmTaskConvert.INSTANCE.buildTaskPage(pageResult, processInstanceMap, userMap, deptMap, processDefinitionInfoMap);
|
||||||
return success(BeanUtils.toBean(voPageResult.getList(), BpmTaskRespDTO.class));
|
List<BpmTaskRespDTO> result = BpmTaskConvert.INSTANCE.buildTaskRespDTOList(voPageResult.getList());
|
||||||
|
|
||||||
|
return success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -152,9 +158,9 @@ public class BpmTaskApiImpl implements BpmTaskApi {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 使用转换器构建结果并转换为 DTO
|
// 使用转换器构建完整的 VO 结果,然后转换为 DTO
|
||||||
var voList = BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, formMap, userMap, deptMap);
|
var voList = BpmTaskConvert.INSTANCE.buildTaskListByProcessInstanceId(taskList, formMap, userMap, deptMap);
|
||||||
List<BpmTaskRespDTO> result = BeanUtils.toBean(voList, BpmTaskRespDTO.class);
|
List<BpmTaskRespDTO> result = BpmTaskConvert.INSTANCE.buildTaskRespDTOList(voList);
|
||||||
|
|
||||||
return success(result);
|
return success(result);
|
||||||
}
|
}
|
||||||
@@ -187,9 +193,9 @@ public class BpmTaskApiImpl implements BpmTaskApi {
|
|||||||
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSetByFlatMap(taskList, user -> Stream.of(NumberUtils.parseLong(user.getAssignee()), NumberUtils.parseLong(user.getOwner()))));
|
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSetByFlatMap(taskList, user -> Stream.of(NumberUtils.parseLong(user.getAssignee()), NumberUtils.parseLong(user.getOwner()))));
|
||||||
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), DeptUtil::getDeptId));
|
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), DeptUtil::getDeptId));
|
||||||
|
|
||||||
// 使用转换器构建结果并转换为 DTO
|
// 使用转换器构建完整的 VO 结果,然后转换为 DTO
|
||||||
var voList = BpmTaskConvert.INSTANCE.buildTaskListByParentTaskId(taskList, userMap, deptMap);
|
var voList = BpmTaskConvert.INSTANCE.buildTaskListByParentTaskId(taskList, userMap, deptMap);
|
||||||
List<BpmTaskRespDTO> result = BeanUtils.toBean(voList, BpmTaskRespDTO.class);
|
List<BpmTaskRespDTO> result = BpmTaskConvert.INSTANCE.buildTaskRespDTOList(voList);
|
||||||
|
|
||||||
return success(result);
|
return success(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
|||||||
import com.zt.plat.framework.common.util.date.DateUtils;
|
import com.zt.plat.framework.common.util.date.DateUtils;
|
||||||
import com.zt.plat.framework.common.util.number.NumberUtils;
|
import com.zt.plat.framework.common.util.number.NumberUtils;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.module.bpm.api.task.dto.BpmTaskRespDTO;
|
||||||
|
import com.zt.plat.module.bpm.api.task.dto.UserSimpleDTO;
|
||||||
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
||||||
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
|
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
|
||||||
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmFormDO;
|
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmFormDO;
|
||||||
@@ -230,4 +232,85 @@ public interface BpmTaskConvert {
|
|||||||
childTask.setTenantId(parentTask.getTenantId());
|
childTask.setTenantId(parentTask.getTenantId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 BpmTaskRespVO 转换为 BpmTaskRespDTO,保持完整的嵌套结构
|
||||||
|
*/
|
||||||
|
default List<BpmTaskRespDTO> buildTaskRespDTOList(List<BpmTaskRespVO> voList) {
|
||||||
|
return CollectionUtils.convertList(voList, this::buildTaskRespDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 BpmTaskRespVO 转换为 BpmTaskRespDTO,保持完整的嵌套结构
|
||||||
|
*/
|
||||||
|
default BpmTaskRespDTO buildTaskRespDTO(BpmTaskRespVO vo) {
|
||||||
|
if (vo == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
BpmTaskRespDTO dto = BeanUtils.toBean(vo, BpmTaskRespDTO.class);
|
||||||
|
|
||||||
|
// 转换用户信息
|
||||||
|
if (vo.getAssigneeUser() != null) {
|
||||||
|
dto.setAssigneeUser(convertToUserSimpleDTO(vo.getAssigneeUser()));
|
||||||
|
}
|
||||||
|
if (vo.getOwnerUser() != null) {
|
||||||
|
dto.setOwnerUser(convertToUserSimpleDTO(vo.getOwnerUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换流程实例信息
|
||||||
|
if (vo.getProcessInstance() != null) {
|
||||||
|
BpmTaskRespDTO.ProcessInstanceDTO processInstanceDTO = new BpmTaskRespDTO.ProcessInstanceDTO();
|
||||||
|
processInstanceDTO.setId(vo.getProcessInstance().getId());
|
||||||
|
processInstanceDTO.setName(vo.getProcessInstance().getName());
|
||||||
|
processInstanceDTO.setCreateTime(vo.getProcessInstance().getCreateTime());
|
||||||
|
processInstanceDTO.setProcessDefinitionId(vo.getProcessInstance().getProcessDefinitionId());
|
||||||
|
processInstanceDTO.setSummary(vo.getProcessInstance().getSummary());
|
||||||
|
|
||||||
|
if (vo.getProcessInstance().getStartUser() != null) {
|
||||||
|
processInstanceDTO.setStartUser(convertToUserSimpleDTO(vo.getProcessInstance().getStartUser()));
|
||||||
|
}
|
||||||
|
dto.setProcessInstance(processInstanceDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换操作按钮设置
|
||||||
|
if (vo.getButtonsSetting() != null) {
|
||||||
|
Map<Integer, BpmTaskRespDTO.OperationButtonSettingDTO> buttonsSettingDTO = vo.getButtonsSetting().entrySet()
|
||||||
|
.stream()
|
||||||
|
.collect(java.util.stream.Collectors.toMap(
|
||||||
|
Map.Entry::getKey,
|
||||||
|
entry -> {
|
||||||
|
BpmTaskRespDTO.OperationButtonSettingDTO settingDTO = new BpmTaskRespDTO.OperationButtonSettingDTO();
|
||||||
|
settingDTO.setDisplayName(entry.getValue().getDisplayName());
|
||||||
|
settingDTO.setEnable(entry.getValue().getEnable());
|
||||||
|
return settingDTO;
|
||||||
|
}
|
||||||
|
));
|
||||||
|
dto.setButtonsSetting(buttonsSettingDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 递归转换子任务
|
||||||
|
if (vo.getChildren() != null) {
|
||||||
|
dto.setChildren(buildTaskRespDTOList(vo.getChildren()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 UserSimpleBaseVO 转换为 UserSimpleDTO,确保所有字段都被正确赋值
|
||||||
|
*/
|
||||||
|
default UserSimpleDTO convertToUserSimpleDTO(UserSimpleBaseVO vo) {
|
||||||
|
if (vo == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserSimpleDTO dto = new UserSimpleDTO();
|
||||||
|
dto.setId(vo.getId());
|
||||||
|
dto.setNickname(vo.getNickname());
|
||||||
|
dto.setAvatar(vo.getAvatar());
|
||||||
|
dto.setDeptId(vo.getDeptId());
|
||||||
|
dto.setDeptName(vo.getDeptName()); // 确保 deptName 被正确赋值
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,4 +67,19 @@ public interface BusinessFileApi {
|
|||||||
CommonResult<Boolean> deleteBusinessFileByBusinessIdAndSource(@RequestParam("businessId") Long businessId,
|
CommonResult<Boolean> deleteBusinessFileByBusinessIdAndSource(@RequestParam("businessId") Long businessId,
|
||||||
@RequestParam("source") String source);
|
@RequestParam("source") String source);
|
||||||
|
|
||||||
|
@PutMapping(PREFIX + "/enable")
|
||||||
|
@Operation(summary = "启用业务附件关联")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
CommonResult<Boolean> enableBusinessFile(@RequestParam("id") Long id);
|
||||||
|
|
||||||
|
@PutMapping(PREFIX + "/disable")
|
||||||
|
@Operation(summary = "禁用业务附件关联")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
CommonResult<Boolean> disableBusinessFile(@RequestParam("id") Long id);
|
||||||
|
|
||||||
|
@PutMapping(PREFIX + "/update-status")
|
||||||
|
@Operation(summary = "批量更新业务附件状态")
|
||||||
|
CommonResult<Boolean> updateBusinessFileStatus(@RequestParam("ids") List<Long> ids,
|
||||||
|
@RequestParam("status") Integer status);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user