增加文件附件表
This commit is contained in:
@@ -261,4 +261,8 @@ public interface ErrorCodeConstants {
|
|||||||
|
|
||||||
// ========== 文件记录分发号,记录文件分发与线下对应的分发号对应,且标记到目标人物 TODO 补充编号 ==========
|
// ========== 文件记录分发号,记录文件分发与线下对应的分发号对应,且标记到目标人物 TODO 补充编号 ==========
|
||||||
ErrorCode RECORD_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_450_000, "文件记录分发号,记录文件分发与线下对应的分发号对应,且标记到目标人物不存在");
|
ErrorCode RECORD_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_450_000, "文件记录分发号,记录文件分发与线下对应的分发号对应,且标记到目标人物不存在");
|
||||||
|
|
||||||
|
|
||||||
|
// ========== 文件记录附件 TODO 补充编号 ==========
|
||||||
|
ErrorCode RECORD_FILE_ATTACHMENT_NOT_EXISTS = new ErrorCode(1_032_450_099, "文件记录附件不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.record.controller.admin.recordfileattachment.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 文件记录附件分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class RecordFileAttachmentPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "记录ID,文件记录ID", example = "23915")
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
@Schema(description = "文件表ID,关联文件记录表ID", example = "28216")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
@Schema(description = "原始父级Id", example = "15685")
|
||||||
|
private Long mainId;
|
||||||
|
|
||||||
|
@Schema(description = "是否最新版")
|
||||||
|
private Integer currentFlag;
|
||||||
|
|
||||||
|
@Schema(description = "文件版本号,文件版本号")
|
||||||
|
private String fileVersion;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.record.controller.admin.recordfileattachment.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 文件记录附件 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class RecordFileAttachmentRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15260")
|
||||||
|
@ExcelProperty("编号")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "记录ID,文件记录ID", example = "23915")
|
||||||
|
@ExcelProperty("记录ID,文件记录ID")
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
@Schema(description = "文件表ID,关联文件记录表ID", example = "28216")
|
||||||
|
@ExcelProperty("文件表ID,关联文件记录表ID")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
@Schema(description = "原始父级Id", example = "15685")
|
||||||
|
@ExcelProperty("原始父级Id")
|
||||||
|
private Long mainId;
|
||||||
|
|
||||||
|
@Schema(description = "是否最新版")
|
||||||
|
@ExcelProperty("是否最新版")
|
||||||
|
private Integer currentFlag;
|
||||||
|
|
||||||
|
@Schema(description = "文件版本号,文件版本号")
|
||||||
|
@ExcelProperty("文件版本号,文件版本号")
|
||||||
|
private String fileVersion;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
@ExcelProperty("所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.record.controller.admin.recordfileattachment.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 文件记录附件新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class RecordFileAttachmentSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15260")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "记录ID,文件记录ID", example = "23915")
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
@Schema(description = "文件表ID,关联文件记录表ID", example = "28216")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
@Schema(description = "原始父级Id", example = "15685")
|
||||||
|
private Long mainId;
|
||||||
|
|
||||||
|
@Schema(description = "是否最新版")
|
||||||
|
private Integer currentFlag;
|
||||||
|
|
||||||
|
@Schema(description = "文件版本号,文件版本号")
|
||||||
|
private String fileVersion;
|
||||||
|
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -36,7 +36,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
|||||||
@RequestMapping("/qms/resource/record-record")
|
@RequestMapping("/qms/resource/record-record")
|
||||||
@Validated
|
@Validated
|
||||||
@DeptDataPermissionIgnore(enable = "true")
|
@DeptDataPermissionIgnore(enable = "true")
|
||||||
@FileUploadController(source = "qms.recordrecord", codeKey = "data.fileUploadBusinessCode")
|
@FileUploadController(source = "qms.versionmanagement", codeKey = "data.fileUploadBusinessCode")
|
||||||
public class RecordRecordController extends AbstractFileUploadController implements BusinessControllerMarker {
|
public class RecordRecordController extends AbstractFileUploadController implements BusinessControllerMarker {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.record.dal.dataobject.recordfileattachment;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
|
/**
|
||||||
|
* 文件记录附件 DO
|
||||||
|
*
|
||||||
|
* @author 后台管理
|
||||||
|
*/
|
||||||
|
@TableName("t_rcd_file_atm")
|
||||||
|
@KeySequence("t_rcd_file_atm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class RecordFileAttachmentDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 记录ID,文件记录ID
|
||||||
|
*/
|
||||||
|
@TableField("RCD_ID")
|
||||||
|
private Long recordId;
|
||||||
|
/**
|
||||||
|
* 文件表ID,关联文件记录表ID
|
||||||
|
*/
|
||||||
|
@TableField("FILE_ID")
|
||||||
|
private String fileId;
|
||||||
|
/**
|
||||||
|
* 原始父级Id
|
||||||
|
*/
|
||||||
|
@TableField("MAIN_ID")
|
||||||
|
private Long mainId;
|
||||||
|
/**
|
||||||
|
* 是否最新版
|
||||||
|
*/
|
||||||
|
@TableField("CRNT_FLG")
|
||||||
|
private Integer currentFlag;
|
||||||
|
/**
|
||||||
|
* 文件版本号,文件版本号
|
||||||
|
*/
|
||||||
|
@TableField("FILE_VER")
|
||||||
|
private String fileVersion;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@TableField("SYS_DEPT_CD")
|
||||||
|
private String systemDepartmentCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField("RMK")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.resource.record.dal.dataobject.recordrecord;
|
package com.zt.plat.module.qms.resource.record.dal.dataobject.recordrecord;
|
||||||
|
|
||||||
|
import com.zt.plat.module.qms.resource.clientManage.controller.vo.UploadFileVo;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -196,24 +198,7 @@ public class RecordRecordDO extends BusinessBaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Object customConfig;
|
private Object customConfig;
|
||||||
|
|
||||||
// ====== 文件提交申请关联字段 ======
|
@TableField(exist = false)
|
||||||
|
private List<UploadFileVo> files;
|
||||||
/**
|
|
||||||
* 文件提交申请ID(RecordApply.id)
|
|
||||||
*/
|
|
||||||
// @TableField(exist = false)
|
|
||||||
// private Long applyId;
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 文件提交流程实例ID(RecordApply.flowInstanceId)
|
|
||||||
// */
|
|
||||||
// @TableField(exist = false)
|
|
||||||
// private String flowInstanceId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件提交业务状态(RecordApply.businessStatus)
|
|
||||||
*/
|
|
||||||
// @TableField(exist = false)
|
|
||||||
// private String applyBusinessStatus;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.record.dal.mapper;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import com.zt.plat.module.qms.resource.record.dal.dataobject.recordfileattachment.RecordFileAttachmentDO;
|
||||||
|
import com.zt.plat.module.qms.resource.record.controller.admin.recordfileattachment.vo.RecordFileAttachmentPageReqVO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件记录附件 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface RecordFileAttachmentMapper extends BaseMapperX<RecordFileAttachmentDO> {
|
||||||
|
|
||||||
|
default PageResult<RecordFileAttachmentDO> selectPage(RecordFileAttachmentPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<RecordFileAttachmentDO>()
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getRecordId, reqVO.getRecordId())
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getFileId, reqVO.getFileId())
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getMainId, reqVO.getMainId())
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getCurrentFlag, reqVO.getCurrentFlag())
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getFileVersion, reqVO.getFileVersion())
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
.eqIfPresent(RecordFileAttachmentDO::getRemark, reqVO.getRemark())
|
||||||
|
.betweenIfPresent(RecordFileAttachmentDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(RecordFileAttachmentDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -44,13 +44,13 @@ public class RecordCategoryServiceImpl implements RecordCategoryService {
|
|||||||
public RecordCategoryRespVO createRecordCategory(RecordCategorySaveReqVO createReqVO) {
|
public RecordCategoryRespVO createRecordCategory(RecordCategorySaveReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
RecordCategoryDO recordCategory = BeanUtils.toBean(createReqVO, RecordCategoryDO.class);
|
RecordCategoryDO recordCategory = BeanUtils.toBean(createReqVO, RecordCategoryDO.class);
|
||||||
recordCategory.setCancelFlag("-1"); // 临时数据
|
|
||||||
int insert = recordCategoryMapper.insert(recordCategory);
|
int insert = recordCategoryMapper.insert(recordCategory);
|
||||||
if (insert <= 0) throw exception(RECORD_CATEGORY_NOT_EXISTS);
|
if (insert <= 0) throw exception(RECORD_CATEGORY_NOT_EXISTS);
|
||||||
Long id = recordCategory.getId();// 获取插入后的ID
|
Long id = recordCategory.getId();// 获取插入后的ID
|
||||||
Long parentId = recordCategory.getParentId();
|
Long parentId = recordCategory.getParentId();
|
||||||
// 判断父节点是否为null或者0,如果是,则设置父节点ID为0,否则查询父节点信息并设置ID路径
|
// 判断父节点是否为null或者0,如果是,则设置父节点ID为0,否则查询父节点信息并设置ID路径
|
||||||
if (parentId == null || parentId == 0L) {// 没有父节点
|
if (parentId == null || parentId == 0L) {// 没有父节点
|
||||||
|
recordCategory.setCancelFlag("-1"); // 临时数据标识
|
||||||
recordCategory.setParentId(0L);
|
recordCategory.setParentId(0L);
|
||||||
// 更新ID_Path
|
// 更新ID_Path
|
||||||
recordCategory.setIdPath("/" + recordCategory.getParentId() + "/" + id );
|
recordCategory.setIdPath("/" + recordCategory.getParentId() + "/" + id );
|
||||||
@@ -61,6 +61,7 @@ public class RecordCategoryServiceImpl implements RecordCategoryService {
|
|||||||
String idPath = parent.getIdPath();
|
String idPath = parent.getIdPath();
|
||||||
recordCategory.setIdPath(idPath + "/" + id);
|
recordCategory.setIdPath(idPath + "/" + id);
|
||||||
}
|
}
|
||||||
|
recordCategory.setCancelFlag("1");
|
||||||
}
|
}
|
||||||
int i = recordCategoryMapper.updateById(recordCategory);
|
int i = recordCategoryMapper.updateById(recordCategory);
|
||||||
if (i <= 0) throw exception(RECORD_CATEGORY_NOT_EXISTS);
|
if (i <= 0) throw exception(RECORD_CATEGORY_NOT_EXISTS);
|
||||||
@@ -211,7 +212,7 @@ public class RecordCategoryServiceImpl implements RecordCategoryService {
|
|||||||
// 获取所有分类树
|
// 获取所有分类树
|
||||||
@Override
|
@Override
|
||||||
public List<RecordCategoryDO> getRecordCategoryTree(RecordCategoryPageReqVO pageReqVO) {
|
public List<RecordCategoryDO> getRecordCategoryTree(RecordCategoryPageReqVO pageReqVO) {
|
||||||
pageReqVO.setPageSize(9999);
|
pageReqVO.setPageSize(999);
|
||||||
pageReqVO.setPageNo(1);
|
pageReqVO.setPageNo(1);
|
||||||
// LambdaQueryWrapper<RecordCategoryDO> queryWrapper = Wrappers.lambdaQuery();
|
// LambdaQueryWrapper<RecordCategoryDO> queryWrapper = Wrappers.lambdaQuery();
|
||||||
// queryWrapper.orderByAsc(RecordCategoryDO::getSortNo); // 升序
|
// queryWrapper.orderByAsc(RecordCategoryDO::getSortNo); // 升序
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user