From c4bb8252a8a851944999e05055b9c1419d7948dc Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Wed, 13 Sep 2023 15:41:41 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=80=9F=E9=98=85?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/enums/ErrorCodeConstants.java | 2 + .../borrowapply/BorrowApplyController.java | 102 ++++++++++++++++++ .../borrowapply/vo/BorrowApplyBaseVO.java | 64 +++++++++++ .../vo/BorrowApplyCreateReqVO.java | 14 +++ .../borrowapply/vo/BorrowApplyExcelVO.java | 68 ++++++++++++ .../vo/BorrowApplyExportReqVO.java | 63 +++++++++++ .../borrowapply/vo/BorrowApplyPageReqVO.java | 65 +++++++++++ .../borrowapply/vo/BorrowApplyRespVO.java | 19 ++++ .../vo/BorrowApplyUpdateReqVO.java | 18 ++++ .../borrowapply/BorrowApplyConvert.java | 34 ++++++ .../dataobject/borrowapply/BorrowApplyDO.java | 88 +++++++++++++++ .../mysql/borrowapply/BorrowApplyMapper.java | 60 +++++++++++ .../borrowapply/BorrowApplyService.java | 70 ++++++++++++ .../borrowapply/BorrowApplyServiceImpl.java | 82 ++++++++++++++ .../mapper/borrowapply/BorrowApplyMapper.xml | 12 +++ 15 files changed, 761 insertions(+) create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyCreateReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/borrowapply/BorrowApplyConvert.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml diff --git a/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java b/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java index 300ab79d..6746d127 100644 --- a/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java +++ b/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java @@ -4,4 +4,6 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; public interface ErrorCodeConstants { ErrorCode RECORD_NOT_EXISTS = new ErrorCode(200100, "归档不存在"); ErrorCode CODE_RULE_NOT_EXISTS = new ErrorCode(300100, "编码不存在"); + + ErrorCode BORROW_APPLY_NOT_EXISTS = new ErrorCode(300200,"借阅申请不存在"); } \ No newline at end of file diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java new file mode 100644 index 00000000..d9bd04f8 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply.BorrowApplyDO; +import cn.iocoder.yudao.module.archives.convert.borrowapply.BorrowApplyConvert; +import cn.iocoder.yudao.module.archives.service.borrowapply.BorrowApplyService; + +@Tag(name = "管理后台 - 档案借阅申请") +@RestController +@RequestMapping("/archives/borrow-apply") +@Validated +public class BorrowApplyController { + + @Resource + private BorrowApplyService borrowApplyService; + + @PostMapping("/create") + @Operation(summary = "创建档案借阅申请") + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:create')") + public CommonResult createBorrowApply(@Valid @RequestBody BorrowApplyCreateReqVO createReqVO) { + return success(borrowApplyService.createBorrowApply(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新档案借阅申请") + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:update')") + public CommonResult updateBorrowApply(@Valid @RequestBody BorrowApplyUpdateReqVO updateReqVO) { + borrowApplyService.updateBorrowApply(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除档案借阅申请") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:delete')") + public CommonResult deleteBorrowApply(@RequestParam("id") Integer id) { + borrowApplyService.deleteBorrowApply(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得档案借阅申请") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')") + public CommonResult getBorrowApply(@RequestParam("id") Integer id) { + BorrowApplyDO borrowApply = borrowApplyService.getBorrowApply(id); + return success(BorrowApplyConvert.INSTANCE.convert(borrowApply)); + } + + @GetMapping("/list") + @Operation(summary = "获得档案借阅申请列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')") + public CommonResult> getBorrowApplyList(@RequestParam("ids") Collection ids) { + List list = borrowApplyService.getBorrowApplyList(ids); + return success(BorrowApplyConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @Operation(summary = "获得档案借阅申请分页") + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')") + public CommonResult> getBorrowApplyPage(@Valid BorrowApplyPageReqVO pageVO) { + PageResult pageResult = borrowApplyService.getBorrowApplyPage(pageVO); + return success(BorrowApplyConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出档案借阅申请 Excel") + @PreAuthorize("@ss.hasPermission('archives:borrow-apply:export')") + @OperateLog(type = EXPORT) + public void exportBorrowApplyExcel(@Valid BorrowApplyExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = borrowApplyService.getBorrowApplyList(exportReqVO); + // 导出 Excel + List datas = BorrowApplyConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "档案借阅申请.xls", "数据", BorrowApplyExcelVO.class, datas); + } + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java new file mode 100644 index 00000000..8a37a66f --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import javax.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 档案借阅申请 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class BorrowApplyBaseVO { + + @Schema(description = "借阅申请编码") + private String borrowCode; + + @Schema(description = "借阅申请状态 0:已通过 1驳回") + private Boolean borrowState; + + @Schema(description = "借阅事由", example = "不好") + private String reason; + + @Schema(description = "借阅描述") + private String describe; + + @Schema(description = "借阅人id", example = "6652") + private Integer userId; + + @Schema(description = "借阅人名称", example = "李四") + private String userName; + + @Schema(description = "借阅部门id", example = "29611") + private Integer deptId; + + @Schema(description = "借阅部门名称", example = "张三") + private String deptName; + + @Schema(description = "预计归还日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime returnTime; + + @Schema(description = "借阅方式 0:外接 1:现场查阅") + private Boolean way; + + @Schema(description = "档案介质") + private Boolean media; + + @Schema(description = "业务实体id", example = "23211") + private Long companyId; + + @Schema(description = "业务实体名称") + private String company; + + @Schema(description = "描述", example = "随便") + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyCreateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyCreateReqVO.java new file mode 100644 index 00000000..a397da6c --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 档案借阅申请创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BorrowApplyCreateReqVO extends BorrowApplyBaseVO { + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java new file mode 100644 index 00000000..5d46dc93 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 档案借阅申请 Excel VO + * + * @author 芋道源码 + */ +@Data +public class BorrowApplyExcelVO { + + @ExcelProperty("借阅id") + private Integer id; + + @ExcelProperty("借阅申请编码") + private String borrowCode; + + @ExcelProperty("借阅申请状态 0:已通过 1驳回") + private Boolean borrowState; + + @ExcelProperty("借阅事由") + private String reason; + + @ExcelProperty("借阅描述") + private String describe; + + @ExcelProperty("借阅人id") + private Integer userId; + + @ExcelProperty("借阅人名称") + private String userName; + + @ExcelProperty("借阅部门id") + private Integer deptId; + + @ExcelProperty("借阅部门名称") + private String deptName; + + @ExcelProperty("预计归还日期") + private LocalDateTime returnTime; + + @ExcelProperty("借阅方式 0:外接 1:现场查阅") + private Boolean way; + + @ExcelProperty("档案介质") + private Boolean media; + + @ExcelProperty("业务实体id") + private Long companyId; + + @ExcelProperty("业务实体名称") + private String company; + + @ExcelProperty("描述") + private String remark; + + @ExcelProperty("创建日期") + private LocalDateTime createTime; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java new file mode 100644 index 00000000..726eb9b4 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 档案借阅申请 Excel 导出 Request VO,参数和 BorrowApplyPageReqVO 是一致的") +@Data +public class BorrowApplyExportReqVO { + + @Schema(description = "借阅申请编码") + private String borrowCode; + + @Schema(description = "借阅申请状态 0:已通过 1驳回") + private Boolean borrowState; + + @Schema(description = "借阅事由", example = "不好") + private String reason; + + @Schema(description = "借阅描述") + private String describe; + + @Schema(description = "借阅人id", example = "6652") + private Integer userId; + + @Schema(description = "借阅人名称", example = "李四") + private String userName; + + @Schema(description = "借阅部门id", example = "29611") + private Integer deptId; + + @Schema(description = "借阅部门名称", example = "张三") + private String deptName; + + @Schema(description = "预计归还日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] returnTime; + + @Schema(description = "借阅方式 0:外接 1:现场查阅") + private Boolean way; + + @Schema(description = "档案介质") + private Boolean media; + + @Schema(description = "业务实体id", example = "23211") + private Long companyId; + + @Schema(description = "业务实体名称") + private String company; + + @Schema(description = "描述", example = "随便") + private String remark; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java new file mode 100644 index 00000000..19c97871 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 档案借阅申请分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BorrowApplyPageReqVO extends PageParam { + + @Schema(description = "借阅申请编码") + private String borrowCode; + + @Schema(description = "借阅申请状态 0:已通过 1驳回") + private Boolean borrowState; + + @Schema(description = "借阅事由", example = "不好") + private String reason; + + @Schema(description = "借阅描述") + private String describe; + + @Schema(description = "借阅人id", example = "6652") + private Integer userId; + + @Schema(description = "借阅人名称", example = "李四") + private String userName; + + @Schema(description = "借阅部门id", example = "29611") + private Integer deptId; + + @Schema(description = "借阅部门名称", example = "张三") + private String deptName; + + @Schema(description = "预计归还日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] returnTime; + + @Schema(description = "借阅方式 0:外接 1:现场查阅") + private Boolean way; + + @Schema(description = "档案介质") + private Boolean media; + + @Schema(description = "业务实体id", example = "23211") + private Long companyId; + + @Schema(description = "业务实体名称") + private String company; + + @Schema(description = "描述", example = "随便") + private String remark; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java new file mode 100644 index 00000000..81ad9e77 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 档案借阅申请 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BorrowApplyRespVO extends BorrowApplyBaseVO { + + @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8595") + private Integer id; + + @Schema(description = "创建日期") + private LocalDateTime createTime; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java new file mode 100644 index 00000000..37f347a0 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 档案借阅申请更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class BorrowApplyUpdateReqVO extends BorrowApplyBaseVO { + + @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8595") + @NotNull(message = "借阅id不能为空") + private Integer id; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/borrowapply/BorrowApplyConvert.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/borrowapply/BorrowApplyConvert.java new file mode 100644 index 00000000..e6c34376 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/borrowapply/BorrowApplyConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.archives.convert.borrowapply; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply.BorrowApplyDO; + +/** + * 档案借阅申请 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface BorrowApplyConvert { + + BorrowApplyConvert INSTANCE = Mappers.getMapper(BorrowApplyConvert.class); + + BorrowApplyDO convert(BorrowApplyCreateReqVO bean); + + BorrowApplyDO convert(BorrowApplyUpdateReqVO bean); + + BorrowApplyRespVO convert(BorrowApplyDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java new file mode 100644 index 00000000..e7035160 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java @@ -0,0 +1,88 @@ +package cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 档案借阅申请 DO + * + * @author 芋道源码 + */ +@TableName("archives_borrow_apply") +@KeySequence("archives_borrow_apply_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BorrowApplyDO extends BaseDO { + + /** + * 借阅id + */ + @TableId + private Integer id; + /** + * 借阅申请编码 + */ + private String borrowCode; + /** + * 借阅申请状态 0:已通过 1驳回 + */ + private Boolean borrowState; + /** + * 借阅事由 + */ + private String reason; + /** + * 借阅描述 + */ + private String describe; + /** + * 借阅人id + */ + private Integer userId; + /** + * 借阅人名称 + */ + private String userName; + /** + * 借阅部门id + */ + private Integer deptId; + /** + * 借阅部门名称 + */ + private String deptName; + /** + * 预计归还日期 + */ + private LocalDateTime returnTime; + /** + * 借阅方式 0:外接 1:现场查阅 + */ + private Boolean way; + /** + * 档案介质 + */ + private Boolean media; + /** + * 业务实体id + */ + private Long companyId; + /** + * 业务实体名称 + */ + private String company; + /** + * 描述 + */ + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java new file mode 100644 index 00000000..c8c194d3 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.archives.dal.mysql.borrowapply; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply.BorrowApplyDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo.*; + +/** + * 档案借阅申请 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface BorrowApplyMapper extends BaseMapperX { + + default PageResult selectPage(BorrowApplyPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BorrowApplyDO::getBorrowCode, reqVO.getBorrowCode()) + .eqIfPresent(BorrowApplyDO::getBorrowState, reqVO.getBorrowState()) + .eqIfPresent(BorrowApplyDO::getReason, reqVO.getReason()) + .eqIfPresent(BorrowApplyDO::getDescribe, reqVO.getDescribe()) + .eqIfPresent(BorrowApplyDO::getUserId, reqVO.getUserId()) + .likeIfPresent(BorrowApplyDO::getUserName, reqVO.getUserName()) + .eqIfPresent(BorrowApplyDO::getDeptId, reqVO.getDeptId()) + .likeIfPresent(BorrowApplyDO::getDeptName, reqVO.getDeptName()) + .betweenIfPresent(BorrowApplyDO::getReturnTime, reqVO.getReturnTime()) + .eqIfPresent(BorrowApplyDO::getWay, reqVO.getWay()) + .eqIfPresent(BorrowApplyDO::getMedia, reqVO.getMedia()) + .eqIfPresent(BorrowApplyDO::getCompanyId, reqVO.getCompanyId()) + .eqIfPresent(BorrowApplyDO::getCompany, reqVO.getCompany()) + .eqIfPresent(BorrowApplyDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(BorrowApplyDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(BorrowApplyDO::getId)); + } + + default List selectList(BorrowApplyExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(BorrowApplyDO::getBorrowCode, reqVO.getBorrowCode()) + .eqIfPresent(BorrowApplyDO::getBorrowState, reqVO.getBorrowState()) + .eqIfPresent(BorrowApplyDO::getReason, reqVO.getReason()) + .eqIfPresent(BorrowApplyDO::getDescribe, reqVO.getDescribe()) + .eqIfPresent(BorrowApplyDO::getUserId, reqVO.getUserId()) + .likeIfPresent(BorrowApplyDO::getUserName, reqVO.getUserName()) + .eqIfPresent(BorrowApplyDO::getDeptId, reqVO.getDeptId()) + .likeIfPresent(BorrowApplyDO::getDeptName, reqVO.getDeptName()) + .betweenIfPresent(BorrowApplyDO::getReturnTime, reqVO.getReturnTime()) + .eqIfPresent(BorrowApplyDO::getWay, reqVO.getWay()) + .eqIfPresent(BorrowApplyDO::getMedia, reqVO.getMedia()) + .eqIfPresent(BorrowApplyDO::getCompanyId, reqVO.getCompanyId()) + .eqIfPresent(BorrowApplyDO::getCompany, reqVO.getCompany()) + .eqIfPresent(BorrowApplyDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(BorrowApplyDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(BorrowApplyDO::getId)); + } + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java new file mode 100644 index 00000000..9dbf38e8 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.archives.service.borrowapply; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply.BorrowApplyDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 档案借阅申请 Service 接口 + * + * @author 芋道源码 + */ +public interface BorrowApplyService { + + /** + * 创建档案借阅申请 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createBorrowApply(@Valid BorrowApplyCreateReqVO createReqVO); + + /** + * 更新档案借阅申请 + * + * @param updateReqVO 更新信息 + */ + void updateBorrowApply(@Valid BorrowApplyUpdateReqVO updateReqVO); + + /** + * 删除档案借阅申请 + * + * @param id 编号 + */ + void deleteBorrowApply(Integer id); + + /** + * 获得档案借阅申请 + * + * @param id 编号 + * @return 档案借阅申请 + */ + BorrowApplyDO getBorrowApply(Integer id); + + /** + * 获得档案借阅申请列表 + * + * @param ids 编号 + * @return 档案借阅申请列表 + */ + List getBorrowApplyList(Collection ids); + + /** + * 获得档案借阅申请分页 + * + * @param pageReqVO 分页查询 + * @return 档案借阅申请分页 + */ + PageResult getBorrowApplyPage(BorrowApplyPageReqVO pageReqVO); + + /** + * 获得档案借阅申请列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 档案借阅申请列表 + */ + List getBorrowApplyList(BorrowApplyExportReqVO exportReqVO); + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java new file mode 100644 index 00000000..2e30f2bc --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.archives.service.borrowapply; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply.BorrowApplyDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.archives.convert.borrowapply.BorrowApplyConvert; +import cn.iocoder.yudao.module.archives.dal.mysql.borrowapply.BorrowApplyMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*; + +/** + * 档案借阅申请 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class BorrowApplyServiceImpl implements BorrowApplyService { + + @Resource + private BorrowApplyMapper borrowApplyMapper; + + @Override + public Integer createBorrowApply(BorrowApplyCreateReqVO createReqVO) { + // 插入 + BorrowApplyDO borrowApply = BorrowApplyConvert.INSTANCE.convert(createReqVO); + borrowApplyMapper.insert(borrowApply); + // 返回 + return borrowApply.getId(); + } + + @Override + public void updateBorrowApply(BorrowApplyUpdateReqVO updateReqVO) { + // 校验存在 + validateBorrowApplyExists(updateReqVO.getId()); + // 更新 + BorrowApplyDO updateObj = BorrowApplyConvert.INSTANCE.convert(updateReqVO); + borrowApplyMapper.updateById(updateObj); + } + + @Override + public void deleteBorrowApply(Integer id) { + // 校验存在 + validateBorrowApplyExists(id); + // 删除 + borrowApplyMapper.deleteById(id); + } + + private void validateBorrowApplyExists(Integer id) { + if (borrowApplyMapper.selectById(id) == null) { + throw exception(BORROW_APPLY_NOT_EXISTS); + } + } + + @Override + public BorrowApplyDO getBorrowApply(Integer id) { + return borrowApplyMapper.selectById(id); + } + + @Override + public List getBorrowApplyList(Collection ids) { + return borrowApplyMapper.selectBatchIds(ids); + } + + @Override + public PageResult getBorrowApplyPage(BorrowApplyPageReqVO pageReqVO) { + return borrowApplyMapper.selectPage(pageReqVO); + } + + @Override + public List getBorrowApplyList(BorrowApplyExportReqVO exportReqVO) { + return borrowApplyMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml b/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml new file mode 100644 index 00000000..468705e1 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml @@ -0,0 +1,12 @@ + + + + + + + From c4e102b6c74d8950678682bcabe7870dd32b0033 Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 14 Sep 2023 10:01:51 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=80=9F=E9=98=85?= =?UTF-8?q?=E7=94=B3=E8=AF=B7,=E6=A1=A3=E6=A1=88=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/borrow_apply20230913JS.sql | 65 +++++++++++ .../borrowapply/BorrowApplyController.java | 8 +- .../borrowapply/vo/BorrowApplyBaseVO.java | 10 +- .../borrowapply/vo/BorrowApplyExcelVO.java | 12 +-- .../vo/BorrowApplyExportReqVO.java | 10 +- .../borrowapply/vo/BorrowApplyPageReqVO.java | 10 +- .../borrowapply/vo/BorrowApplyRespVO.java | 2 +- .../vo/BorrowApplyUpdateReqVO.java | 2 +- .../dataobject/borrowapply/BorrowApplyDO.java | 12 +-- .../borrowapply/BorrowApplyService.java | 8 +- .../borrowapply/BorrowApplyServiceImpl.java | 10 +- .../setting/enums/ErrorCodeConstants.java | 2 + .../filecategory/FileCategoryController.java | 102 ++++++++++++++++++ .../filecategory/vo/FileCategoryBaseVO.java | 46 ++++++++ .../vo/FileCategoryCreateReqVO.java | 14 +++ .../filecategory/vo/FileCategoryExcelVO.java | 50 +++++++++ .../vo/FileCategoryExportReqVO.java | 45 ++++++++ .../vo/FileCategoryPageReqVO.java | 47 ++++++++ .../filecategory/vo/FileCategoryRespVO.java | 19 ++++ .../vo/FileCategoryUpdateReqVO.java | 18 ++++ .../filecategory/FileCategoryConvert.java | 34 ++++++ .../filecategory/FileCategoryDO.java | 64 +++++++++++ .../filecategory/FileCategoryMapper.java | 48 +++++++++ .../filecategory/FileCategoryService.java | 70 ++++++++++++ .../filecategory/FileCategoryServiceImpl.java | 82 ++++++++++++++ .../filecategory/FileCategoryMapper.xml | 12 +++ 26 files changed, 760 insertions(+), 42 deletions(-) create mode 100644 sql/borrow_apply20230913JS.sql create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/FileCategoryController.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryBaseVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryCreateReqVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExcelVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExportReqVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryPageReqVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryRespVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryUpdateReqVO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/convert/filecategory/FileCategoryConvert.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/filecategory/FileCategoryDO.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/filecategory/FileCategoryMapper.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryService.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryServiceImpl.java create mode 100644 yudao-module-setting/yudao-module-setting-biz/src/main/resources/mapper/filecategory/FileCategoryMapper.xml diff --git a/sql/borrow_apply20230913JS.sql b/sql/borrow_apply20230913JS.sql new file mode 100644 index 00000000..94d7cf80 --- /dev/null +++ b/sql/borrow_apply20230913JS.sql @@ -0,0 +1,65 @@ +-- 新增 借阅申请表 +CREATE TABLE `lyr-one`.`archives_borrow_apply` ( + `id` bigint(20) NOT NULL COMMENT '借阅id', + `borrow_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请编码', + `borrow_state` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请状态 0:已通过 1驳回', + `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅事由', + `describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅描述', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '借阅人id', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅人名称', + `dept_id` bigint(11) NULL DEFAULT NULL COMMENT '借阅部门id', + `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅部门名称', + `return_time` datetime NULL DEFAULT NULL COMMENT '预计归还日期', + `way` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅方式 0:外接 1:现场查阅', + `media` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案介质', + `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体id', + `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体名称', + `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户编号', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', + `deleted` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '逻辑删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案借阅申请表' ROW_FORMAT = Dynamic; + + +INSERT INTO `lyr-one`.`system_menu` (`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '借阅', '', 1, 0, 0, '/borrow', 'component', NULL, NULL, 0, b'1', b'1', b'1', '', '2023-09-13 15:27:06', '', '2023-09-13 15:27:16', b'0'); +SET @menuId = LAST_INSERT_ID(); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '借阅申请', 'borrow:apply:list', 2, 1, @menuId, 'apply', 'education', 'borrow/apply/index', 'apply', 0, b'1', b'1', b'1', '', '2023-09-13 15:29:48', '', '2023-09-13 15:29:48', b'0'); +SET @menuId2 = LAST_INSERT_ID(); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '新增借阅申请', 'archives:borrowAapply:create', 3, 1, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 15:36:56', '', '2023-09-13 15:36:56', b'0'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '导出借阅申请', 'archives:borrowAapply:export', 3, 2, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 15:37:31', '', '2023-09-13 15:37:31', b'0'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '修改借阅申请', 'archives:borrowAapply:update', 3, 3, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 15:39:24', '', '2023-09-13 15:39:24', b'0'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('删除借阅申请', 'archives:borrowAapply:delete', 3, 4, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 15:39:53', '', '2023-09-13 16:08:02', b'1'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '删除借阅申请', 'archives:borrowAapply:delete', 3, 4, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 16:08:23', '', '2023-09-13 16:08:23', b'0'); + +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '借阅历史记录', 'borrow:record:list', 2, 2, @menuId, 'record', 'table', 'borrow/record/index', 'record', 0, b'1', b'1', b'1', '', '2023-09-13 16:09:53', '', '2023-09-13 16:12:09', b'0'); + + +-- 新增档案分类表 +CREATE TABLE `lyr-one`.`setting_file_category` ( + `id` bigint(20) NOT NULL COMMENT 'id', + `category_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案类型编码', + `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '档案类型父id', + `type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称', + `catalog_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '目录号', + `two_catalog_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '二级类别号', + `custody_time` datetime NULL DEFAULT NULL COMMENT '保管期限', + `state` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '启用状态 0启用 1禁用', + `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '住户编号', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '制单人', + `deleted` tinyint(1) NULL DEFAULT NULL COMMENT '逻辑删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案分类表' ROW_FORMAT = Dynamic; + +-- 查询档案设置id进行赋值 +SELECT `id` INTO @menuId FROM system_menu WHERE `name` = '档案设置'; +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '档案分类', '', 2, 4, @menuId, 'fileCategory', '#', 'setting/fileCategory/index', 'fileCategory', 0, b'1', b'1', b'1', '', '2023-09-13 16:59:36', '', '2023-09-13 17:05:30', b'0'); +SET @menuId2 = LAST_INSERT_ID(); + +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '档案分类创建', 'setting:file-category:create', 3, 1, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 17:14:06', '', '2023-09-13 17:14:44', b'0'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('档案分类导出', 'setting:file-category:export', 3, 2, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 17:14:35', '', '2023-09-13 17:14:35', b'0'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '档案类型删除', 'setting:file-category:delete', 3, 3, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 17:15:04', '', '2023-09-13 17:15:04', b'0'); +INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '档案类型修改', 'setting:file-category:update', 3, 4, @menuId2, '', '', '', '', 0, b'1', b'1', b'1', '', '2023-09-13 17:15:24', '', '2023-09-13 17:15:24', b'0'); diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java index d9bd04f8..59242013 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/BorrowApplyController.java @@ -40,7 +40,7 @@ public class BorrowApplyController { @PostMapping("/create") @Operation(summary = "创建档案借阅申请") @PreAuthorize("@ss.hasPermission('archives:borrow-apply:create')") - public CommonResult createBorrowApply(@Valid @RequestBody BorrowApplyCreateReqVO createReqVO) { + public CommonResult createBorrowApply(@Valid @RequestBody BorrowApplyCreateReqVO createReqVO) { return success(borrowApplyService.createBorrowApply(createReqVO)); } @@ -56,7 +56,7 @@ public class BorrowApplyController { @Operation(summary = "删除档案借阅申请") @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('archives:borrow-apply:delete')") - public CommonResult deleteBorrowApply(@RequestParam("id") Integer id) { + public CommonResult deleteBorrowApply(@RequestParam("id") Long id) { borrowApplyService.deleteBorrowApply(id); return success(true); } @@ -65,7 +65,7 @@ public class BorrowApplyController { @Operation(summary = "获得档案借阅申请") @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')") - public CommonResult getBorrowApply(@RequestParam("id") Integer id) { + public CommonResult getBorrowApply(@RequestParam("id") Long id) { BorrowApplyDO borrowApply = borrowApplyService.getBorrowApply(id); return success(BorrowApplyConvert.INSTANCE.convert(borrowApply)); } @@ -74,7 +74,7 @@ public class BorrowApplyController { @Operation(summary = "获得档案借阅申请列表") @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") @PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')") - public CommonResult> getBorrowApplyList(@RequestParam("ids") Collection ids) { + public CommonResult> getBorrowApplyList(@RequestParam("ids") Collection ids) { List list = borrowApplyService.getBorrowApplyList(ids); return success(BorrowApplyConvert.INSTANCE.convertList(list)); } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java index 8a37a66f..95d87b2c 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java @@ -22,7 +22,7 @@ public class BorrowApplyBaseVO { private String borrowCode; @Schema(description = "借阅申请状态 0:已通过 1驳回") - private Boolean borrowState; + private String borrowState; @Schema(description = "借阅事由", example = "不好") private String reason; @@ -31,13 +31,13 @@ public class BorrowApplyBaseVO { private String describe; @Schema(description = "借阅人id", example = "6652") - private Integer userId; + private Long userId; @Schema(description = "借阅人名称", example = "李四") private String userName; @Schema(description = "借阅部门id", example = "29611") - private Integer deptId; + private Long deptId; @Schema(description = "借阅部门名称", example = "张三") private String deptName; @@ -47,10 +47,10 @@ public class BorrowApplyBaseVO { private LocalDateTime returnTime; @Schema(description = "借阅方式 0:外接 1:现场查阅") - private Boolean way; + private String way; @Schema(description = "档案介质") - private Boolean media; + private String media; @Schema(description = "业务实体id", example = "23211") private Long companyId; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java index 5d46dc93..156dcc31 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java @@ -18,13 +18,13 @@ import com.alibaba.excel.annotation.ExcelProperty; public class BorrowApplyExcelVO { @ExcelProperty("借阅id") - private Integer id; + private Long id; @ExcelProperty("借阅申请编码") private String borrowCode; @ExcelProperty("借阅申请状态 0:已通过 1驳回") - private Boolean borrowState; + private String borrowState; @ExcelProperty("借阅事由") private String reason; @@ -33,13 +33,13 @@ public class BorrowApplyExcelVO { private String describe; @ExcelProperty("借阅人id") - private Integer userId; + private Long userId; @ExcelProperty("借阅人名称") private String userName; @ExcelProperty("借阅部门id") - private Integer deptId; + private Long deptId; @ExcelProperty("借阅部门名称") private String deptName; @@ -48,10 +48,10 @@ public class BorrowApplyExcelVO { private LocalDateTime returnTime; @ExcelProperty("借阅方式 0:外接 1:现场查阅") - private Boolean way; + private String way; @ExcelProperty("档案介质") - private Boolean media; + private String media; @ExcelProperty("业务实体id") private Long companyId; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java index 726eb9b4..13d22f17 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java @@ -17,7 +17,7 @@ public class BorrowApplyExportReqVO { private String borrowCode; @Schema(description = "借阅申请状态 0:已通过 1驳回") - private Boolean borrowState; + private String borrowState; @Schema(description = "借阅事由", example = "不好") private String reason; @@ -26,13 +26,13 @@ public class BorrowApplyExportReqVO { private String describe; @Schema(description = "借阅人id", example = "6652") - private Integer userId; + private Long userId; @Schema(description = "借阅人名称", example = "李四") private String userName; @Schema(description = "借阅部门id", example = "29611") - private Integer deptId; + private Long deptId; @Schema(description = "借阅部门名称", example = "张三") private String deptName; @@ -42,10 +42,10 @@ public class BorrowApplyExportReqVO { private LocalDateTime[] returnTime; @Schema(description = "借阅方式 0:外接 1:现场查阅") - private Boolean way; + private String way; @Schema(description = "档案介质") - private Boolean media; + private String media; @Schema(description = "业务实体id", example = "23211") private Long companyId; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java index 19c97871..e3323da9 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java @@ -19,7 +19,7 @@ public class BorrowApplyPageReqVO extends PageParam { private String borrowCode; @Schema(description = "借阅申请状态 0:已通过 1驳回") - private Boolean borrowState; + private String borrowState; @Schema(description = "借阅事由", example = "不好") private String reason; @@ -28,13 +28,13 @@ public class BorrowApplyPageReqVO extends PageParam { private String describe; @Schema(description = "借阅人id", example = "6652") - private Integer userId; + private Long userId; @Schema(description = "借阅人名称", example = "李四") private String userName; @Schema(description = "借阅部门id", example = "29611") - private Integer deptId; + private Long deptId; @Schema(description = "借阅部门名称", example = "张三") private String deptName; @@ -44,10 +44,10 @@ public class BorrowApplyPageReqVO extends PageParam { private LocalDateTime[] returnTime; @Schema(description = "借阅方式 0:外接 1:现场查阅") - private Boolean way; + private String way; @Schema(description = "档案介质") - private Boolean media; + private String media; @Schema(description = "业务实体id", example = "23211") private Long companyId; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java index 81ad9e77..5d2280bd 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java @@ -11,7 +11,7 @@ import java.time.LocalDateTime; public class BorrowApplyRespVO extends BorrowApplyBaseVO { @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8595") - private Integer id; + private Long id; @Schema(description = "创建日期") private LocalDateTime createTime; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java index 37f347a0..89f245ba 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java @@ -13,6 +13,6 @@ public class BorrowApplyUpdateReqVO extends BorrowApplyBaseVO { @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8595") @NotNull(message = "借阅id不能为空") - private Integer id; + private Long id; } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java index e7035160..7897b0ea 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java @@ -27,7 +27,7 @@ public class BorrowApplyDO extends BaseDO { * 借阅id */ @TableId - private Integer id; + private Long id; /** * 借阅申请编码 */ @@ -35,7 +35,7 @@ public class BorrowApplyDO extends BaseDO { /** * 借阅申请状态 0:已通过 1驳回 */ - private Boolean borrowState; + private String borrowState; /** * 借阅事由 */ @@ -47,7 +47,7 @@ public class BorrowApplyDO extends BaseDO { /** * 借阅人id */ - private Integer userId; + private Long userId; /** * 借阅人名称 */ @@ -55,7 +55,7 @@ public class BorrowApplyDO extends BaseDO { /** * 借阅部门id */ - private Integer deptId; + private Long deptId; /** * 借阅部门名称 */ @@ -67,11 +67,11 @@ public class BorrowApplyDO extends BaseDO { /** * 借阅方式 0:外接 1:现场查阅 */ - private Boolean way; + private String way; /** * 档案介质 */ - private Boolean media; + private String media; /** * 业务实体id */ diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java index 9dbf38e8..de63c097 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyService.java @@ -19,7 +19,7 @@ public interface BorrowApplyService { * @param createReqVO 创建信息 * @return 编号 */ - Integer createBorrowApply(@Valid BorrowApplyCreateReqVO createReqVO); + Long createBorrowApply(@Valid BorrowApplyCreateReqVO createReqVO); /** * 更新档案借阅申请 @@ -33,7 +33,7 @@ public interface BorrowApplyService { * * @param id 编号 */ - void deleteBorrowApply(Integer id); + void deleteBorrowApply(Long id); /** * 获得档案借阅申请 @@ -41,7 +41,7 @@ public interface BorrowApplyService { * @param id 编号 * @return 档案借阅申请 */ - BorrowApplyDO getBorrowApply(Integer id); + BorrowApplyDO getBorrowApply(Long id); /** * 获得档案借阅申请列表 @@ -49,7 +49,7 @@ public interface BorrowApplyService { * @param ids 编号 * @return 档案借阅申请列表 */ - List getBorrowApplyList(Collection ids); + List getBorrowApplyList(Collection ids); /** * 获得档案借阅申请分页 diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java index 2e30f2bc..2251fe5b 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java @@ -28,7 +28,7 @@ public class BorrowApplyServiceImpl implements BorrowApplyService { private BorrowApplyMapper borrowApplyMapper; @Override - public Integer createBorrowApply(BorrowApplyCreateReqVO createReqVO) { + public Long createBorrowApply(BorrowApplyCreateReqVO createReqVO) { // 插入 BorrowApplyDO borrowApply = BorrowApplyConvert.INSTANCE.convert(createReqVO); borrowApplyMapper.insert(borrowApply); @@ -46,26 +46,26 @@ public class BorrowApplyServiceImpl implements BorrowApplyService { } @Override - public void deleteBorrowApply(Integer id) { + public void deleteBorrowApply(Long id) { // 校验存在 validateBorrowApplyExists(id); // 删除 borrowApplyMapper.deleteById(id); } - private void validateBorrowApplyExists(Integer id) { + private void validateBorrowApplyExists(Long id) { if (borrowApplyMapper.selectById(id) == null) { throw exception(BORROW_APPLY_NOT_EXISTS); } } @Override - public BorrowApplyDO getBorrowApply(Integer id) { + public BorrowApplyDO getBorrowApply(Long id) { return borrowApplyMapper.selectById(id); } @Override - public List getBorrowApplyList(Collection ids) { + public List getBorrowApplyList(Collection ids) { return borrowApplyMapper.selectBatchIds(ids); } diff --git a/yudao-module-setting/yudao-module-setting-api/src/main/java/cn/iocoder/yudao/module/setting/enums/ErrorCodeConstants.java b/yudao-module-setting/yudao-module-setting-api/src/main/java/cn/iocoder/yudao/module/setting/enums/ErrorCodeConstants.java index 6c9119a2..0a1e8527 100644 --- a/yudao-module-setting/yudao-module-setting-api/src/main/java/cn/iocoder/yudao/module/setting/enums/ErrorCodeConstants.java +++ b/yudao-module-setting/yudao-module-setting-api/src/main/java/cn/iocoder/yudao/module/setting/enums/ErrorCodeConstants.java @@ -6,4 +6,6 @@ public interface ErrorCodeConstants { ErrorCode DEPOT_CABINET_NOT_EXISTS = new ErrorCode(300100, "档案柜管理不存在"); ErrorCode DEPOT_NOT_EXISTS = new ErrorCode(400100, "库房管理不存在"); + ErrorCode FILE_CATEGORY_NOT_EXISTS = new ErrorCode(400200, "档案分类不存在"); + } \ No newline at end of file diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/FileCategoryController.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/FileCategoryController.java new file mode 100644 index 00000000..9d38768d --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/FileCategoryController.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo.*; +import cn.iocoder.yudao.module.setting.dal.dataobject.filecategory.FileCategoryDO; +import cn.iocoder.yudao.module.setting.convert.filecategory.FileCategoryConvert; +import cn.iocoder.yudao.module.setting.service.filecategory.FileCategoryService; + +@Tag(name = "管理后台 - 档案分类") +@RestController +@RequestMapping("/setting/file-category") +@Validated +public class FileCategoryController { + + @Resource + private FileCategoryService fileCategoryService; + + @PostMapping("/create") + @Operation(summary = "创建档案分类") + @PreAuthorize("@ss.hasPermission('setting:file-category:create')") + public CommonResult createFileCategory(@Valid @RequestBody FileCategoryCreateReqVO createReqVO) { + return success(fileCategoryService.createFileCategory(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新档案分类") + @PreAuthorize("@ss.hasPermission('setting:file-category:update')") + public CommonResult updateFileCategory(@Valid @RequestBody FileCategoryUpdateReqVO updateReqVO) { + fileCategoryService.updateFileCategory(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除档案分类") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('setting:file-category:delete')") + public CommonResult deleteFileCategory(@RequestParam("id") Long id) { + fileCategoryService.deleteFileCategory(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得档案分类") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('setting:file-category:query')") + public CommonResult getFileCategory(@RequestParam("id") Long id) { + FileCategoryDO fileCategory = fileCategoryService.getFileCategory(id); + return success(FileCategoryConvert.INSTANCE.convert(fileCategory)); + } + + @GetMapping("/list") + @Operation(summary = "获得档案分类列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") + @PreAuthorize("@ss.hasPermission('setting:file-category:query')") + public CommonResult> getFileCategoryList(@RequestParam("ids") Collection ids) { + List list = fileCategoryService.getFileCategoryList(ids); + return success(FileCategoryConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @Operation(summary = "获得档案分类分页") + @PreAuthorize("@ss.hasPermission('setting:file-category:query')") + public CommonResult> getFileCategoryPage(@Valid FileCategoryPageReqVO pageVO) { + PageResult pageResult = fileCategoryService.getFileCategoryPage(pageVO); + return success(FileCategoryConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出档案分类 Excel") + @PreAuthorize("@ss.hasPermission('setting:file-category:export')") + @OperateLog(type = EXPORT) + public void exportFileCategoryExcel(@Valid FileCategoryExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = fileCategoryService.getFileCategoryList(exportReqVO); + // 导出 Excel + List datas = FileCategoryConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "档案分类.xls", "数据", FileCategoryExcelVO.class, datas); + } + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryBaseVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryBaseVO.java new file mode 100644 index 00000000..81d20d52 --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryBaseVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import javax.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 档案分类 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class FileCategoryBaseVO { + + @Schema(description = "档案类型编码") + private String categoryCode; + + @Schema(description = "档案类型父id", example = "23289") + private Long parentId; + + @Schema(description = "类型名称", example = "张三") + private String typeName; + + @Schema(description = "目录号") + private String catalogNumber; + + @Schema(description = "二级类别号") + private String twoCatalogNumber; + + @Schema(description = "保管期限") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime custodyTime; + + @Schema(description = "启用状态 0启用 1禁用") + private Boolean state; + + @Schema(description = "制单人") + private String createBy; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryCreateReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryCreateReqVO.java new file mode 100644 index 00000000..0bf940ac --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 档案分类创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class FileCategoryCreateReqVO extends FileCategoryBaseVO { + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExcelVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExcelVO.java new file mode 100644 index 00000000..cd0afd81 --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExcelVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 档案分类 Excel VO + * + * @author 芋道源码 + */ +@Data +public class FileCategoryExcelVO { + + @ExcelProperty("tenant_id create_time update_time create_by deleted ") + private Long id; + + @ExcelProperty("档案类型编码") + private String categoryCode; + + @ExcelProperty("档案类型父id") + private Long parentId; + + @ExcelProperty("类型名称") + private String typeName; + + @ExcelProperty("目录号") + private String catalogNumber; + + @ExcelProperty("二级类别号") + private String twoCatalogNumber; + + @ExcelProperty("保管期限") + private LocalDateTime custodyTime; + + @ExcelProperty("启用状态 0启用 1禁用") + private Boolean state; + + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @ExcelProperty("制单人") + private String createBy; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExportReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExportReqVO.java new file mode 100644 index 00000000..593c50f1 --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryExportReqVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 档案分类 Excel 导出 Request VO,参数和 FileCategoryPageReqVO 是一致的") +@Data +public class FileCategoryExportReqVO { + + @Schema(description = "档案类型编码") + private String categoryCode; + + @Schema(description = "档案类型父id", example = "23289") + private Long parentId; + + @Schema(description = "类型名称", example = "张三") + private String typeName; + + @Schema(description = "目录号") + private String catalogNumber; + + @Schema(description = "二级类别号") + private String twoCatalogNumber; + + @Schema(description = "保管期限") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] custodyTime; + + @Schema(description = "启用状态 0启用 1禁用") + private Boolean state; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "制单人") + private String createBy; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryPageReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryPageReqVO.java new file mode 100644 index 00000000..6855cdee --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryPageReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 档案分类分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class FileCategoryPageReqVO extends PageParam { + + @Schema(description = "档案类型编码") + private String categoryCode; + + @Schema(description = "档案类型父id", example = "23289") + private Long parentId; + + @Schema(description = "类型名称", example = "张三") + private String typeName; + + @Schema(description = "目录号") + private String catalogNumber; + + @Schema(description = "二级类别号") + private String twoCatalogNumber; + + @Schema(description = "保管期限") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] custodyTime; + + @Schema(description = "启用状态 0启用 1禁用") + private Boolean state; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "制单人") + private String createBy; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryRespVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryRespVO.java new file mode 100644 index 00000000..4c33c686 --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 档案分类 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class FileCategoryRespVO extends FileCategoryBaseVO { + + @Schema(description = "tenant_id create_time update_time create_by deleted ", requiredMode = Schema.RequiredMode.REQUIRED, example = "19533") + private Long id; + + @Schema(description = "创建日期") + private LocalDateTime createTime; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryUpdateReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryUpdateReqVO.java new file mode 100644 index 00000000..9c52d08b --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/filecategory/vo/FileCategoryUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 档案分类更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class FileCategoryUpdateReqVO extends FileCategoryBaseVO { + + @Schema(description = "tenant_id create_time update_time create_by deleted ", requiredMode = Schema.RequiredMode.REQUIRED, example = "19533") + @NotNull(message = "tenant_id create_time update_time create_by deleted 不能为空") + private Long id; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/convert/filecategory/FileCategoryConvert.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/convert/filecategory/FileCategoryConvert.java new file mode 100644 index 00000000..b5564ecd --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/convert/filecategory/FileCategoryConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.setting.convert.filecategory; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo.*; +import cn.iocoder.yudao.module.setting.dal.dataobject.filecategory.FileCategoryDO; + +/** + * 档案分类 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface FileCategoryConvert { + + FileCategoryConvert INSTANCE = Mappers.getMapper(FileCategoryConvert.class); + + FileCategoryDO convert(FileCategoryCreateReqVO bean); + + FileCategoryDO convert(FileCategoryUpdateReqVO bean); + + FileCategoryRespVO convert(FileCategoryDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/filecategory/FileCategoryDO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/filecategory/FileCategoryDO.java new file mode 100644 index 00000000..43f1bfe3 --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/filecategory/FileCategoryDO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.setting.dal.dataobject.filecategory; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 档案分类 DO + * + * @author 芋道源码 + */ +@TableName("setting_file_category") +@KeySequence("setting_file_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FileCategoryDO extends BaseDO { + + /** + * tenant_id create_time update_time create_by deleted + */ + @TableId + private Long id; + /** + * 档案类型编码 + */ + private String categoryCode; + /** + * 档案类型父id + */ + private Long parentId; + /** + * 类型名称 + */ + private String typeName; + /** + * 目录号 + */ + private String catalogNumber; + /** + * 二级类别号 + */ + private String twoCatalogNumber; + /** + * 保管期限 + */ + private LocalDateTime custodyTime; + /** + * 启用状态 0启用 1禁用 + */ + private Boolean state; + /** + * 制单人 + */ + private String createBy; + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/filecategory/FileCategoryMapper.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/filecategory/FileCategoryMapper.java new file mode 100644 index 00000000..3f19a1de --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/filecategory/FileCategoryMapper.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.setting.dal.mysql.filecategory; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.setting.dal.dataobject.filecategory.FileCategoryDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo.*; + +/** + * 档案分类 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface FileCategoryMapper extends BaseMapperX { + + default PageResult selectPage(FileCategoryPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(FileCategoryDO::getCategoryCode, reqVO.getCategoryCode()) + .eqIfPresent(FileCategoryDO::getParentId, reqVO.getParentId()) + .likeIfPresent(FileCategoryDO::getTypeName, reqVO.getTypeName()) + .eqIfPresent(FileCategoryDO::getCatalogNumber, reqVO.getCatalogNumber()) + .eqIfPresent(FileCategoryDO::getTwoCatalogNumber, reqVO.getTwoCatalogNumber()) + .betweenIfPresent(FileCategoryDO::getCustodyTime, reqVO.getCustodyTime()) + .eqIfPresent(FileCategoryDO::getState, reqVO.getState()) + .betweenIfPresent(FileCategoryDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(FileCategoryDO::getCreateBy, reqVO.getCreateBy()) + .orderByDesc(FileCategoryDO::getId)); + } + + default List selectList(FileCategoryExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(FileCategoryDO::getCategoryCode, reqVO.getCategoryCode()) + .eqIfPresent(FileCategoryDO::getParentId, reqVO.getParentId()) + .likeIfPresent(FileCategoryDO::getTypeName, reqVO.getTypeName()) + .eqIfPresent(FileCategoryDO::getCatalogNumber, reqVO.getCatalogNumber()) + .eqIfPresent(FileCategoryDO::getTwoCatalogNumber, reqVO.getTwoCatalogNumber()) + .betweenIfPresent(FileCategoryDO::getCustodyTime, reqVO.getCustodyTime()) + .eqIfPresent(FileCategoryDO::getState, reqVO.getState()) + .betweenIfPresent(FileCategoryDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(FileCategoryDO::getCreateBy, reqVO.getCreateBy()) + .orderByDesc(FileCategoryDO::getId)); + } + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryService.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryService.java new file mode 100644 index 00000000..a1bd5315 --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.setting.service.filecategory; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo.*; +import cn.iocoder.yudao.module.setting.dal.dataobject.filecategory.FileCategoryDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 档案分类 Service 接口 + * + * @author 芋道源码 + */ +public interface FileCategoryService { + + /** + * 创建档案分类 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createFileCategory(@Valid FileCategoryCreateReqVO createReqVO); + + /** + * 更新档案分类 + * + * @param updateReqVO 更新信息 + */ + void updateFileCategory(@Valid FileCategoryUpdateReqVO updateReqVO); + + /** + * 删除档案分类 + * + * @param id 编号 + */ + void deleteFileCategory(Long id); + + /** + * 获得档案分类 + * + * @param id 编号 + * @return 档案分类 + */ + FileCategoryDO getFileCategory(Long id); + + /** + * 获得档案分类列表 + * + * @param ids 编号 + * @return 档案分类列表 + */ + List getFileCategoryList(Collection ids); + + /** + * 获得档案分类分页 + * + * @param pageReqVO 分页查询 + * @return 档案分类分页 + */ + PageResult getFileCategoryPage(FileCategoryPageReqVO pageReqVO); + + /** + * 获得档案分类列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 档案分类列表 + */ + List getFileCategoryList(FileCategoryExportReqVO exportReqVO); + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryServiceImpl.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryServiceImpl.java new file mode 100644 index 00000000..6c9c0a0e --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/filecategory/FileCategoryServiceImpl.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.setting.service.filecategory; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.setting.controller.admin.filecategory.vo.*; +import cn.iocoder.yudao.module.setting.dal.dataobject.filecategory.FileCategoryDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.setting.convert.filecategory.FileCategoryConvert; +import cn.iocoder.yudao.module.setting.dal.mysql.filecategory.FileCategoryMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.setting.enums.ErrorCodeConstants.*; + +/** + * 档案分类 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class FileCategoryServiceImpl implements FileCategoryService { + + @Resource + private FileCategoryMapper fileCategoryMapper; + + @Override + public Long createFileCategory(FileCategoryCreateReqVO createReqVO) { + // 插入 + FileCategoryDO fileCategory = FileCategoryConvert.INSTANCE.convert(createReqVO); + fileCategoryMapper.insert(fileCategory); + // 返回 + return fileCategory.getId(); + } + + @Override + public void updateFileCategory(FileCategoryUpdateReqVO updateReqVO) { + // 校验存在 + validateFileCategoryExists(updateReqVO.getId()); + // 更新 + FileCategoryDO updateObj = FileCategoryConvert.INSTANCE.convert(updateReqVO); + fileCategoryMapper.updateById(updateObj); + } + + @Override + public void deleteFileCategory(Long id) { + // 校验存在 + validateFileCategoryExists(id); + // 删除 + fileCategoryMapper.deleteById(id); + } + + private void validateFileCategoryExists(Long id) { + if (fileCategoryMapper.selectById(id) == null) { + throw exception(FILE_CATEGORY_NOT_EXISTS); + } + } + + @Override + public FileCategoryDO getFileCategory(Long id) { + return fileCategoryMapper.selectById(id); + } + + @Override + public List getFileCategoryList(Collection ids) { + return fileCategoryMapper.selectBatchIds(ids); + } + + @Override + public PageResult getFileCategoryPage(FileCategoryPageReqVO pageReqVO) { + return fileCategoryMapper.selectPage(pageReqVO); + } + + @Override + public List getFileCategoryList(FileCategoryExportReqVO exportReqVO) { + return fileCategoryMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/resources/mapper/filecategory/FileCategoryMapper.xml b/yudao-module-setting/yudao-module-setting-biz/src/main/resources/mapper/filecategory/FileCategoryMapper.xml new file mode 100644 index 00000000..3e1d814b --- /dev/null +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/resources/mapper/filecategory/FileCategoryMapper.xml @@ -0,0 +1,12 @@ + + + + + + + From b8651bfb2150823d1c794ce4cf35bcb1d0c9c901 Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 14 Sep 2023 10:12:57 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=80=9F=E9=98=85?= =?UTF-8?q?=E7=94=B3=E8=AF=B7,=E6=A1=A3=E6=A1=88=E5=88=86=E7=B1=BB=20sql?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/borrow_apply20230913JS.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/borrow_apply20230913JS.sql b/sql/borrow_apply20230913JS.sql index 94d7cf80..1bb723f7 100644 --- a/sql/borrow_apply20230913JS.sql +++ b/sql/borrow_apply20230913JS.sql @@ -1,6 +1,6 @@ -- 新增 借阅申请表 CREATE TABLE `lyr-one`.`archives_borrow_apply` ( - `id` bigint(20) NOT NULL COMMENT '借阅id', + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '借阅id', `borrow_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请编码', `borrow_state` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请状态 0:已通过 1驳回', `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅事由', @@ -20,7 +20,7 @@ CREATE TABLE `lyr-one`.`archives_borrow_apply` ( `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', `deleted` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '逻辑删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案借阅申请表' ROW_FORMAT = Dynamic; +) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案借阅申请表' ROW_FORMAT = Dynamic; INSERT INTO `lyr-one`.`system_menu` (`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '借阅', '', 1, 0, 0, '/borrow', 'component', NULL, NULL, 0, b'1', b'1', b'1', '', '2023-09-13 15:27:06', '', '2023-09-13 15:27:16', b'0'); @@ -38,7 +38,7 @@ INSERT INTO `lyr-one`.`system_menu` ( `name`, `permission`, `type`, `sort`, `par -- 新增档案分类表 CREATE TABLE `lyr-one`.`setting_file_category` ( - `id` bigint(20) NOT NULL COMMENT 'id', + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `category_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案类型编码', `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '档案类型父id', `type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型名称', @@ -52,7 +52,7 @@ CREATE TABLE `lyr-one`.`setting_file_category` ( `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '制单人', `deleted` tinyint(1) NULL DEFAULT NULL COMMENT '逻辑删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案分类表' ROW_FORMAT = Dynamic; +) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案分类表' ROW_FORMAT = Dynamic; -- 查询档案设置id进行赋值 SELECT `id` INTO @menuId FROM system_menu WHERE `name` = '档案设置'; From 431c47d01b425915ad16671159cefc2ce3636c2c Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 14 Sep 2023 10:35:12 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=80=9F=E9=98=85?= =?UTF-8?q?=E7=94=B3=E8=AF=B7,=E6=A1=A3=E6=A1=88=E5=88=86=E7=B1=BB=20sql?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91=E5=88=A0=E9=99=A4=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/borrow_apply20230913JS.sql | 6 +++--- sql/ea_electronic20230911JS.sql | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/borrow_apply20230913JS.sql b/sql/borrow_apply20230913JS.sql index 1bb723f7..0088770d 100644 --- a/sql/borrow_apply20230913JS.sql +++ b/sql/borrow_apply20230913JS.sql @@ -18,7 +18,7 @@ CREATE TABLE `lyr-one`.`archives_borrow_apply` ( `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述', `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', - `deleted` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '逻辑删除', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案借阅申请表' ROW_FORMAT = Dynamic; @@ -50,9 +50,9 @@ CREATE TABLE `lyr-one`.`setting_file_category` ( `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '制单人', - `deleted` tinyint(1) NULL DEFAULT NULL COMMENT '逻辑删除', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE -) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案分类表' ROW_FORMAT = Dynamic; +) ENGINE = MyISAM AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案分类表' ROW_FORMAT = Dynamic; -- 查询档案设置id进行赋值 SELECT `id` INTO @menuId FROM system_menu WHERE `name` = '档案设置'; diff --git a/sql/ea_electronic20230911JS.sql b/sql/ea_electronic20230911JS.sql index 7707e4b6..8765772a 100644 --- a/sql/ea_electronic20230911JS.sql +++ b/sql/ea_electronic20230911JS.sql @@ -28,7 +28,7 @@ CREATE TABLE `lyr-one`.`ea_electronic_assets` ( `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '制单人', - `deleted` tinyint(1) NULL DEFAULT NULL COMMENT '逻辑删除', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资产档案表' ROW_FORMAT = Dynamic; From 9c04b21f03d19b1d5b2c053adae4f38f70260050 Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 14 Sep 2023 11:29:20 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E9=89=B4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/enums/ErrorCodeConstants.java | 2 + .../authenticate/AuthenticateController.java | 125 ++++++++++++++++++ .../authenticate/vo/AuthenticateBaseVO.java | 66 +++++++++ .../vo/AuthenticateCreateReqVO.java | 14 ++ .../authenticate/vo/AuthenticateExcelVO.java | 69 ++++++++++ .../vo/AuthenticateExportReqVO.java | 63 +++++++++ .../vo/AuthenticatePageReqVO.java | 65 +++++++++ .../authenticate/vo/AuthenticateRespVO.java | 19 +++ .../vo/AuthenticateUpdateReqVO.java | 18 +++ .../authenticate/AuthenticateConvert.java | 34 +++++ .../authenticate/AuthenticateDO.java | 89 +++++++++++++ .../authenticate/AuthenticateMapper.java | 60 +++++++++ .../authenticate/AuthenticateService.java | 70 ++++++++++ .../authenticate/AuthenticateServiceImpl.java | 82 ++++++++++++ .../authenticate/AuthenticateMapper.xml | 12 ++ 15 files changed, 788 insertions(+) create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateBaseVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateCreateReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExcelVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateRespVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateUpdateReqVO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/authenticate/AuthenticateConvert.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateService.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateServiceImpl.java create mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/authenticate/AuthenticateMapper.xml diff --git a/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java b/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java index 6746d127..21060ec4 100644 --- a/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java +++ b/yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java @@ -6,4 +6,6 @@ public interface ErrorCodeConstants { ErrorCode CODE_RULE_NOT_EXISTS = new ErrorCode(300100, "编码不存在"); ErrorCode BORROW_APPLY_NOT_EXISTS = new ErrorCode(300200,"借阅申请不存在"); + + ErrorCode AUTHENTICATE_NOT_EXISTS = new ErrorCode(300300,"档案鉴定历史不存在"); } \ No newline at end of file diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java new file mode 100644 index 00000000..3131fccf --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java @@ -0,0 +1,125 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate; + +import cn.iocoder.yudao.module.archives.controller.admin.record.vo.RecordPageReqVO; +import cn.iocoder.yudao.module.archives.controller.admin.record.vo.RecordUpdateReqVO; +import cn.iocoder.yudao.module.archives.dal.dataobject.record.RecordDO; +import cn.iocoder.yudao.module.archives.service.record.RecordService; +import org.apache.poi.hssf.record.Record; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.authenticate.AuthenticateDO; +import cn.iocoder.yudao.module.archives.convert.authenticate.AuthenticateConvert; +import cn.iocoder.yudao.module.archives.service.authenticate.AuthenticateService; + +@Tag(name = "管理后台 - 档案鉴定历史") +@RestController +@RequestMapping("/archives/authenticate") +@Validated +public class AuthenticateController { + + @Resource + private AuthenticateService authenticateService; + + @Resource + private RecordService recordService; + + + /** + * 获取档案鉴定列表 + * @param recordPageReqVO + * @return + */ + @GetMapping("/get") + @Operation(summary = "获得档案鉴定列表") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('archives:authenticate:query')") + public PageResultgetRecordList(RecordPageReqVO recordPageReqVO){ + recordPageReqVO.setFileStatus("1");//查询已归档的档案 + return recordService.getRecordPage(recordPageReqVO); + } + + @PostMapping("/create") + @Operation(summary = "创建档案鉴定历史") + @PreAuthorize("@ss.hasPermission('archives:authenticate:create')") + public CommonResult createAuthenticate(@Valid @RequestBody AuthenticateCreateReqVO createReqVO) { + return success(authenticateService.createAuthenticate(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新档案鉴定历史") + @PreAuthorize("@ss.hasPermission('archives:authenticate:update')") + public CommonResult updateAuthenticate(@Valid @RequestBody AuthenticateUpdateReqVO updateReqVO) { + authenticateService.updateAuthenticate(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除档案鉴定历史") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('archives:authenticate:delete')") + public CommonResult deleteAuthenticate(@RequestParam("id") Long id) { + authenticateService.deleteAuthenticate(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得档案鉴定历史") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('archives:authenticate:query')") + public CommonResult getAuthenticate(@RequestParam("id") Long id) { + AuthenticateDO authenticate = authenticateService.getAuthenticate(id); + return success(AuthenticateConvert.INSTANCE.convert(authenticate)); + } + + @GetMapping("/list") + @Operation(summary = "获得档案鉴定历史列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") + @PreAuthorize("@ss.hasPermission('archives:authenticate:query')") + public CommonResult> getAuthenticateList(@RequestParam("ids") Collection ids) { + List list = authenticateService.getAuthenticateList(ids); + return success(AuthenticateConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @Operation(summary = "获得档案鉴定历史分页") + @PreAuthorize("@ss.hasPermission('archives:authenticate:query')") + public CommonResult> getAuthenticatePage(@Valid AuthenticatePageReqVO pageVO) { + PageResult pageResult = authenticateService.getAuthenticatePage(pageVO); + return success(AuthenticateConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出档案鉴定历史 Excel") + @PreAuthorize("@ss.hasPermission('archives:authenticate:export')") + @OperateLog(type = EXPORT) + public void exportAuthenticateExcel(@Valid AuthenticateExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = authenticateService.getAuthenticateList(exportReqVO); + // 导出 Excel + List datas = AuthenticateConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "档案鉴定.xls", "数据", AuthenticateExcelVO.class, datas); + } + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateBaseVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateBaseVO.java new file mode 100644 index 00000000..d12f610c --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateBaseVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import javax.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 档案鉴定 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class AuthenticateBaseVO { + + @Schema(description = "档案类型", example = "2") + private String type; + + @Schema(description = "鉴定时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime date; + + @Schema(description = "档案位置") + private String position; + + @Schema(description = "保存期限") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime timeLimit; + + @Schema(description = "归档id", example = "4386") + private Integer recordId; + + @Schema(description = "鉴定人", example = "27064") + private Long userId; + + @Schema(description = "鉴定人名称", example = "李四") + private String userName; + + @Schema(description = "归档名称", example = "李四") + private String recordName; + + @Schema(description = "创建人") + private String createBy; + + @Schema(description = "部门id", example = "5631") + private Long deptId; + + @Schema(description = "部门名称", example = "张三") + private String deptName; + + @Schema(description = "业务实体id", example = "25023") + private Long companyId; + + @Schema(description = "业务实体名称") + private String company; + + @Schema(description = "备注", example = "你猜") + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateCreateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateCreateReqVO.java new file mode 100644 index 00000000..213e4a3f --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 档案鉴定创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AuthenticateCreateReqVO extends AuthenticateBaseVO { + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExcelVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExcelVO.java new file mode 100644 index 00000000..6f3eb844 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExcelVO.java @@ -0,0 +1,69 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 档案鉴定 Excel VO + * + * @author 芋道源码 + */ +@Data +public class AuthenticateExcelVO { + + @ExcelProperty("id") + private Long id; + + @ExcelProperty("档案类型") + private String type; + + @ExcelProperty("鉴定时间") + private LocalDateTime date; + + @ExcelProperty("档案位置") + private String position; + + @ExcelProperty("保存期限") + private LocalDateTime timeLimit; + + @ExcelProperty("归档id") + private Integer recordId; + + @ExcelProperty("鉴定人") + private Long userId; + + @ExcelProperty("鉴定人名称") + private String userName; + + @ExcelProperty("归档名称") + private String recordName; + + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @ExcelProperty("创建人") + private String createBy; + + @ExcelProperty("部门id") + private Long deptId; + + @ExcelProperty("部门名称") + private String deptName; + + @ExcelProperty("业务实体id") + private Long companyId; + + @ExcelProperty("业务实体名称") + private String company; + + @ExcelProperty("备注") + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java new file mode 100644 index 00000000..47e74c22 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 档案鉴定 Excel 导出 Request VO,参数和 AuthenticatePageReqVO 是一致的") +@Data +public class AuthenticateExportReqVO { + + @Schema(description = "档案类型", example = "2") + private String type; + + @Schema(description = "鉴定时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] date; + + @Schema(description = "档案位置") + private String position; + + @Schema(description = "保存期限") + private LocalDateTime timeLimit; + + @Schema(description = "归档id", example = "4386") + private Integer recordId; + + @Schema(description = "鉴定人", example = "27064") + private Long userId; + + @Schema(description = "鉴定人名称", example = "李四") + private String userName; + + @Schema(description = "归档名称", example = "李四") + private String recordName; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "创建人") + private String createBy; + + @Schema(description = "部门id", example = "5631") + private Long deptId; + + @Schema(description = "部门名称", example = "张三") + private String deptName; + + @Schema(description = "业务实体id", example = "25023") + private Long companyId; + + @Schema(description = "业务实体名称") + private String company; + + @Schema(description = "备注", example = "你猜") + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java new file mode 100644 index 00000000..799a42a4 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 档案鉴定分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AuthenticatePageReqVO extends PageParam { + + @Schema(description = "档案类型", example = "2") + private String type; + + @Schema(description = "鉴定时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] date; + + @Schema(description = "档案位置") + private String position; + + @Schema(description = "保存期限") + private LocalDateTime timeLimit; + + @Schema(description = "归档id", example = "4386") + private Integer recordId; + + @Schema(description = "鉴定人", example = "27064") + private Long userId; + + @Schema(description = "鉴定人名称", example = "李四") + private String userName; + + @Schema(description = "归档名称", example = "李四") + private String recordName; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "创建人") + private String createBy; + + @Schema(description = "部门id", example = "5631") + private Long deptId; + + @Schema(description = "部门名称", example = "张三") + private String deptName; + + @Schema(description = "业务实体id", example = "25023") + private Long companyId; + + @Schema(description = "业务实体名称") + private String company; + + @Schema(description = "备注", example = "你猜") + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateRespVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateRespVO.java new file mode 100644 index 00000000..65fdeed2 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 档案鉴定 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AuthenticateRespVO extends AuthenticateBaseVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23874") + private Long id; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateUpdateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateUpdateReqVO.java new file mode 100644 index 00000000..fd96a36f --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 档案鉴定更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AuthenticateUpdateReqVO extends AuthenticateBaseVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23874") + @NotNull(message = "id不能为空") + private Long id; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/authenticate/AuthenticateConvert.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/authenticate/AuthenticateConvert.java new file mode 100644 index 00000000..5f98978a --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/convert/authenticate/AuthenticateConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.archives.convert.authenticate; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.authenticate.AuthenticateDO; + +/** + * 档案鉴定 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface AuthenticateConvert { + + AuthenticateConvert INSTANCE = Mappers.getMapper(AuthenticateConvert.class); + + AuthenticateDO convert(AuthenticateCreateReqVO bean); + + AuthenticateDO convert(AuthenticateUpdateReqVO bean); + + AuthenticateRespVO convert(AuthenticateDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java new file mode 100644 index 00000000..fa22b5fb --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.archives.dal.dataobject.authenticate; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 档案鉴定 DO + * + * @author 芋道源码 + */ +@TableName("archives_authenticate") +@KeySequence("archives_authenticate_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AuthenticateDO extends BaseDO { + + /** + * id + */ + @TableId + private Long id; + /** + * 档案类型 + */ + private String type; + /** + * 鉴定时间 + */ + private LocalDateTime date; + /** + * 档案位置 + */ + private String position; + /** + * 保存期限 + */ + private LocalDateTime timeLimit; + /** + * 归档id + */ + private Integer recordId; + /** + * 鉴定人 + */ + private Long userId; + /** + * 鉴定人名称 + */ + private String userName; + /** + * 归档名称 + */ + private String recordName; + /** + * 创建人 + */ + private String createBy; + /** + * 部门id + */ + private Long deptId; + /** + * 部门名称 + */ + private String deptName; + /** + * 业务实体id + */ + private Long companyId; + /** + * 业务实体名称 + */ + private String company; + /** + * 备注 + */ + private String remark; + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java new file mode 100644 index 00000000..e7032afa --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.archives.dal.mysql.authenticate; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.archives.dal.dataobject.authenticate.AuthenticateDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo.*; + +/** + * 档案鉴定 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface AuthenticateMapper extends BaseMapperX { + + default PageResult selectPage(AuthenticatePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(AuthenticateDO::getType, reqVO.getType()) + .betweenIfPresent(AuthenticateDO::getDate, reqVO.getDate()) + .eqIfPresent(AuthenticateDO::getPosition, reqVO.getPosition()) + .eqIfPresent(AuthenticateDO::getTimeLimit, reqVO.getTimeLimit()) + .eqIfPresent(AuthenticateDO::getRecordId, reqVO.getRecordId()) + .eqIfPresent(AuthenticateDO::getUserId, reqVO.getUserId()) + .likeIfPresent(AuthenticateDO::getUserName, reqVO.getUserName()) + .likeIfPresent(AuthenticateDO::getRecordName, reqVO.getRecordName()) + .betweenIfPresent(AuthenticateDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(AuthenticateDO::getCreateBy, reqVO.getCreateBy()) + .eqIfPresent(AuthenticateDO::getDeptId, reqVO.getDeptId()) + .likeIfPresent(AuthenticateDO::getDeptName, reqVO.getDeptName()) + .eqIfPresent(AuthenticateDO::getCompanyId, reqVO.getCompanyId()) + .eqIfPresent(AuthenticateDO::getCompany, reqVO.getCompany()) + .eqIfPresent(AuthenticateDO::getRemark, reqVO.getRemark()) + .orderByDesc(AuthenticateDO::getId)); + } + + default List selectList(AuthenticateExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(AuthenticateDO::getType, reqVO.getType()) + .betweenIfPresent(AuthenticateDO::getDate, reqVO.getDate()) + .eqIfPresent(AuthenticateDO::getPosition, reqVO.getPosition()) + .eqIfPresent(AuthenticateDO::getTimeLimit, reqVO.getTimeLimit()) + .eqIfPresent(AuthenticateDO::getRecordId, reqVO.getRecordId()) + .eqIfPresent(AuthenticateDO::getUserId, reqVO.getUserId()) + .likeIfPresent(AuthenticateDO::getUserName, reqVO.getUserName()) + .likeIfPresent(AuthenticateDO::getRecordName, reqVO.getRecordName()) + .betweenIfPresent(AuthenticateDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(AuthenticateDO::getCreateBy, reqVO.getCreateBy()) + .eqIfPresent(AuthenticateDO::getDeptId, reqVO.getDeptId()) + .likeIfPresent(AuthenticateDO::getDeptName, reqVO.getDeptName()) + .eqIfPresent(AuthenticateDO::getCompanyId, reqVO.getCompanyId()) + .eqIfPresent(AuthenticateDO::getCompany, reqVO.getCompany()) + .eqIfPresent(AuthenticateDO::getRemark, reqVO.getRemark()) + .orderByDesc(AuthenticateDO::getId)); + } + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateService.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateService.java new file mode 100644 index 00000000..b9b1cb9c --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.archives.service.authenticate; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.authenticate.AuthenticateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 档案鉴定 Service 接口 + * + * @author 芋道源码 + */ +public interface AuthenticateService { + + /** + * 创建档案鉴定历史 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createAuthenticate(@Valid AuthenticateCreateReqVO createReqVO); + + /** + * 更新档案鉴定历史 + * + * @param updateReqVO 更新信息 + */ + void updateAuthenticate(@Valid AuthenticateUpdateReqVO updateReqVO); + + /** + * 删除档案鉴定历史 + * + * @param id 编号 + */ + void deleteAuthenticate(Long id); + + /** + * 获得档案鉴定历史 + * + * @param id 编号 + * @return 档案鉴定 + */ + AuthenticateDO getAuthenticate(Long id); + + /** + * 获得档案鉴定历史列表 + * + * @param ids 编号 + * @return 档案鉴定列表 + */ + List getAuthenticateList(Collection ids); + + /** + * 获得档案鉴定历史分页 + * + * @param pageReqVO 分页查询 + * @return 档案鉴定历史分页 + */ + PageResult getAuthenticatePage(AuthenticatePageReqVO pageReqVO); + + /** + * 获得档案鉴定历史列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 档案鉴定历史列表 + */ + List getAuthenticateList(AuthenticateExportReqVO exportReqVO); + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateServiceImpl.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateServiceImpl.java new file mode 100644 index 00000000..178943f3 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/authenticate/AuthenticateServiceImpl.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.archives.service.authenticate; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.archives.controller.admin.authenticate.vo.*; +import cn.iocoder.yudao.module.archives.dal.dataobject.authenticate.AuthenticateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.archives.convert.authenticate.AuthenticateConvert; +import cn.iocoder.yudao.module.archives.dal.mysql.authenticate.AuthenticateMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*; + +/** + * 档案鉴定 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class AuthenticateServiceImpl implements AuthenticateService { + + @Resource + private AuthenticateMapper authenticateMapper; + + @Override + public Long createAuthenticate(AuthenticateCreateReqVO createReqVO) { + // 插入 + AuthenticateDO authenticate = AuthenticateConvert.INSTANCE.convert(createReqVO); + authenticateMapper.insert(authenticate); + // 返回 + return authenticate.getId(); + } + + @Override + public void updateAuthenticate(AuthenticateUpdateReqVO updateReqVO) { + // 校验存在 + validateAuthenticateExists(updateReqVO.getId()); + // 更新 + AuthenticateDO updateObj = AuthenticateConvert.INSTANCE.convert(updateReqVO); + authenticateMapper.updateById(updateObj); + } + + @Override + public void deleteAuthenticate(Long id) { + // 校验存在 + validateAuthenticateExists(id); + // 删除 + authenticateMapper.deleteById(id); + } + + private void validateAuthenticateExists(Long id) { + if (authenticateMapper.selectById(id) == null) { + throw exception(AUTHENTICATE_NOT_EXISTS); + } + } + + @Override + public AuthenticateDO getAuthenticate(Long id) { + return authenticateMapper.selectById(id); + } + + @Override + public List getAuthenticateList(Collection ids) { + return authenticateMapper.selectBatchIds(ids); + } + + @Override + public PageResult getAuthenticatePage(AuthenticatePageReqVO pageReqVO) { + return authenticateMapper.selectPage(pageReqVO); + } + + @Override + public List getAuthenticateList(AuthenticateExportReqVO exportReqVO) { + return authenticateMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/authenticate/AuthenticateMapper.xml b/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/authenticate/AuthenticateMapper.xml new file mode 100644 index 00000000..95cc22a3 --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/authenticate/AuthenticateMapper.xml @@ -0,0 +1,12 @@ + + + + + + + From 6babc07765cd2dbea18038cfed3f6eb85b1088a4 Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 14 Sep 2023 11:36:13 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E9=89=B4=E5=AE=9A?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE=E5=BA=93sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/archives_authenticate20230914JS.sql | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sql/archives_authenticate20230914JS.sql diff --git a/sql/archives_authenticate20230914JS.sql b/sql/archives_authenticate20230914JS.sql new file mode 100644 index 00000000..9eeb77d8 --- /dev/null +++ b/sql/archives_authenticate20230914JS.sql @@ -0,0 +1,24 @@ +-- 新增档案鉴定历史表 +CREATE TABLE `lyr-one`.`archives_authenticate` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案类型', + `date` datetime NULL DEFAULT NULL COMMENT '鉴定时间', + `position` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案位置', + `time_limit` datetime NULL DEFAULT NULL COMMENT '保存期限', + `record_id` int(11) NULL DEFAULT NULL COMMENT '归档id', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鉴定人', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鉴定人名称', + `record_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '归档名称', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门id', + `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名称', + `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体id', + `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体名称', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '住户编号', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案鉴定表' ROW_FORMAT = Dynamic; \ No newline at end of file From 9c8eaf7a4be121f3fa5a803b79e98aa758850522 Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 14 Sep 2023 16:42:15 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=80=9F=E9=98=85=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/borrow_apply20230913JS.sql | 45 ++++++++++--------- .../authenticate/AuthenticateController.java | 2 +- .../vo/AuthenticateExportReqVO.java | 3 ++ .../vo/AuthenticatePageReqVO.java | 3 ++ .../borrowapply/vo/BorrowApplyBaseVO.java | 16 +++---- .../borrowapply/vo/BorrowApplyExcelVO.java | 2 +- .../vo/BorrowApplyExportReqVO.java | 16 +++---- .../borrowapply/vo/BorrowApplyPageReqVO.java | 16 +++---- .../borrowapply/vo/BorrowApplyRespVO.java | 2 +- .../vo/BorrowApplyUpdateReqVO.java | 2 +- .../authenticate/AuthenticateDO.java | 5 +++ .../dataobject/borrowapply/BorrowApplyDO.java | 2 +- .../authenticate/AuthenticateMapper.java | 2 + .../mysql/borrowapply/BorrowApplyMapper.java | 4 +- .../borrowapply/BorrowApplyServiceImpl.java | 2 + .../mapper/borrowapply/BorrowApplyMapper.xml | 12 ----- 16 files changed, 69 insertions(+), 65 deletions(-) delete mode 100644 yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml diff --git a/sql/borrow_apply20230913JS.sql b/sql/borrow_apply20230913JS.sql index 0088770d..1c24726e 100644 --- a/sql/borrow_apply20230913JS.sql +++ b/sql/borrow_apply20230913JS.sql @@ -1,27 +1,28 @@ -- 新增 借阅申请表 CREATE TABLE `lyr-one`.`archives_borrow_apply` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '借阅id', - `borrow_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请编码', - `borrow_state` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请状态 0:已通过 1驳回', - `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅事由', - `describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅描述', - `user_id` bigint(20) NULL DEFAULT NULL COMMENT '借阅人id', - `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅人名称', - `dept_id` bigint(11) NULL DEFAULT NULL COMMENT '借阅部门id', - `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅部门名称', - `return_time` datetime NULL DEFAULT NULL COMMENT '预计归还日期', - `way` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅方式 0:外接 1:现场查阅', - `media` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案介质', - `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体id', - `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体名称', - `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户编号', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述', - `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', - `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', - `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案借阅申请表' ROW_FORMAT = Dynamic; - + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '借阅id', + `borrow_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请编码', + `borrow_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅申请状态 0:已通过 1驳回', + `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅事由', + `describes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅描述', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '借阅人id', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅人名称', + `dept_id` bigint(11) NULL DEFAULT NULL COMMENT '借阅部门id', + `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅部门名称', + `return_time` datetime NULL DEFAULT NULL COMMENT '预计归还日期', + `way` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '借阅方式 0:外接 1:现场查阅', + `media` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档案介质', + `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体id', + `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体名称', + `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户编号', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '修改日期', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', + `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '档案借阅申请表' ROW_FORMAT = DYNAMIC; INSERT INTO `lyr-one`.`system_menu` (`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ( '借阅', '', 1, 0, 0, '/borrow', 'component', NULL, NULL, 0, b'1', b'1', b'1', '', '2023-09-13 15:27:06', '', '2023-09-13 15:27:16', b'0'); SET @menuId = LAST_INSERT_ID(); diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java index 3131fccf..f52a86d5 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/AuthenticateController.java @@ -51,7 +51,7 @@ public class AuthenticateController { * @param recordPageReqVO * @return */ - @GetMapping("/get") + @GetMapping("/get/record") @Operation(summary = "获得档案鉴定列表") @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('archives:authenticate:query')") diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java index 47e74c22..be2470ce 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticateExportReqVO.java @@ -60,4 +60,7 @@ public class AuthenticateExportReqVO { @Schema(description = "备注", example = "你猜") private String remark; + @Schema(description = "鉴定结果",example = "鉴定结果") + private String result; + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java index 799a42a4..9e46831a 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/authenticate/vo/AuthenticatePageReqVO.java @@ -62,4 +62,7 @@ public class AuthenticatePageReqVO extends PageParam { @Schema(description = "备注", example = "你猜") private String remark; + @Schema(description = "鉴定结果",example = "鉴定结果") + private String result; + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java index 95d87b2c..70080219 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyBaseVO.java @@ -24,22 +24,22 @@ public class BorrowApplyBaseVO { @Schema(description = "借阅申请状态 0:已通过 1驳回") private String borrowState; - @Schema(description = "借阅事由", example = "不好") + @Schema(description = "借阅事由", example = "不香") private String reason; @Schema(description = "借阅描述") - private String describe; + private String describes; - @Schema(description = "借阅人id", example = "6652") + @Schema(description = "借阅人id", example = "30243") private Long userId; - @Schema(description = "借阅人名称", example = "李四") + @Schema(description = "借阅人名称", example = "赵六") private String userName; - @Schema(description = "借阅部门id", example = "29611") + @Schema(description = "借阅部门id", example = "17160") private Long deptId; - @Schema(description = "借阅部门名称", example = "张三") + @Schema(description = "借阅部门名称", example = "李四") private String deptName; @Schema(description = "预计归还日期") @@ -52,13 +52,13 @@ public class BorrowApplyBaseVO { @Schema(description = "档案介质") private String media; - @Schema(description = "业务实体id", example = "23211") + @Schema(description = "业务实体id", example = "7747") private Long companyId; @Schema(description = "业务实体名称") private String company; - @Schema(description = "描述", example = "随便") + @Schema(description = "描述", example = "你猜") private String remark; } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java index 156dcc31..175162c6 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExcelVO.java @@ -30,7 +30,7 @@ public class BorrowApplyExcelVO { private String reason; @ExcelProperty("借阅描述") - private String describe; + private String describes; @ExcelProperty("借阅人id") private Long userId; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java index 13d22f17..f19794a4 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyExportReqVO.java @@ -19,22 +19,22 @@ public class BorrowApplyExportReqVO { @Schema(description = "借阅申请状态 0:已通过 1驳回") private String borrowState; - @Schema(description = "借阅事由", example = "不好") + @Schema(description = "借阅事由", example = "不香") private String reason; @Schema(description = "借阅描述") - private String describe; + private String describes; - @Schema(description = "借阅人id", example = "6652") + @Schema(description = "借阅人id", example = "30243") private Long userId; - @Schema(description = "借阅人名称", example = "李四") + @Schema(description = "借阅人名称", example = "赵六") private String userName; - @Schema(description = "借阅部门id", example = "29611") + @Schema(description = "借阅部门id", example = "17160") private Long deptId; - @Schema(description = "借阅部门名称", example = "张三") + @Schema(description = "借阅部门名称", example = "李四") private String deptName; @Schema(description = "预计归还日期") @@ -47,13 +47,13 @@ public class BorrowApplyExportReqVO { @Schema(description = "档案介质") private String media; - @Schema(description = "业务实体id", example = "23211") + @Schema(description = "业务实体id", example = "7747") private Long companyId; @Schema(description = "业务实体名称") private String company; - @Schema(description = "描述", example = "随便") + @Schema(description = "描述", example = "你猜") private String remark; @Schema(description = "创建日期") diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java index e3323da9..45ba431b 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyPageReqVO.java @@ -21,22 +21,22 @@ public class BorrowApplyPageReqVO extends PageParam { @Schema(description = "借阅申请状态 0:已通过 1驳回") private String borrowState; - @Schema(description = "借阅事由", example = "不好") + @Schema(description = "借阅事由", example = "不香") private String reason; @Schema(description = "借阅描述") - private String describe; + private String describes; - @Schema(description = "借阅人id", example = "6652") + @Schema(description = "借阅人id", example = "30243") private Long userId; - @Schema(description = "借阅人名称", example = "李四") + @Schema(description = "借阅人名称", example = "赵六") private String userName; - @Schema(description = "借阅部门id", example = "29611") + @Schema(description = "借阅部门id", example = "17160") private Long deptId; - @Schema(description = "借阅部门名称", example = "张三") + @Schema(description = "借阅部门名称", example = "李四") private String deptName; @Schema(description = "预计归还日期") @@ -49,13 +49,13 @@ public class BorrowApplyPageReqVO extends PageParam { @Schema(description = "档案介质") private String media; - @Schema(description = "业务实体id", example = "23211") + @Schema(description = "业务实体id", example = "7747") private Long companyId; @Schema(description = "业务实体名称") private String company; - @Schema(description = "描述", example = "随便") + @Schema(description = "描述", example = "你猜") private String remark; @Schema(description = "创建日期") diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java index 5d2280bd..0e9f2e49 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyRespVO.java @@ -10,7 +10,7 @@ import java.time.LocalDateTime; @ToString(callSuper = true) public class BorrowApplyRespVO extends BorrowApplyBaseVO { - @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8595") + @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2504") private Long id; @Schema(description = "创建日期") diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java index 89f245ba..9849e45b 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/borrowapply/vo/BorrowApplyUpdateReqVO.java @@ -11,7 +11,7 @@ import javax.validation.constraints.*; @ToString(callSuper = true) public class BorrowApplyUpdateReqVO extends BorrowApplyBaseVO { - @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8595") + @Schema(description = "借阅id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2504") @NotNull(message = "借阅id不能为空") private Long id; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java index fa22b5fb..00e648af 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/authenticate/AuthenticateDO.java @@ -86,4 +86,9 @@ public class AuthenticateDO extends BaseDO { */ private String remark; + /** + * 鉴定结果 + */ + private String result; + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java index 7897b0ea..c7e51190 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/borrowapply/BorrowApplyDO.java @@ -43,7 +43,7 @@ public class BorrowApplyDO extends BaseDO { /** * 借阅描述 */ - private String describe; + private String describes; /** * 借阅人id */ diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java index e7032afa..a2c799b6 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/authenticate/AuthenticateMapper.java @@ -34,6 +34,7 @@ public interface AuthenticateMapper extends BaseMapperX { .eqIfPresent(AuthenticateDO::getCompanyId, reqVO.getCompanyId()) .eqIfPresent(AuthenticateDO::getCompany, reqVO.getCompany()) .eqIfPresent(AuthenticateDO::getRemark, reqVO.getRemark()) + .eqIfPresent(AuthenticateDO::getResult, reqVO.getResult()) .orderByDesc(AuthenticateDO::getId)); } @@ -54,6 +55,7 @@ public interface AuthenticateMapper extends BaseMapperX { .eqIfPresent(AuthenticateDO::getCompanyId, reqVO.getCompanyId()) .eqIfPresent(AuthenticateDO::getCompany, reqVO.getCompany()) .eqIfPresent(AuthenticateDO::getRemark, reqVO.getRemark()) + .eqIfPresent(AuthenticateDO::getResult, reqVO.getResult()) .orderByDesc(AuthenticateDO::getId)); } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java index c8c194d3..1f0db30c 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/mysql/borrowapply/BorrowApplyMapper.java @@ -22,7 +22,7 @@ public interface BorrowApplyMapper extends BaseMapperX { .eqIfPresent(BorrowApplyDO::getBorrowCode, reqVO.getBorrowCode()) .eqIfPresent(BorrowApplyDO::getBorrowState, reqVO.getBorrowState()) .eqIfPresent(BorrowApplyDO::getReason, reqVO.getReason()) - .eqIfPresent(BorrowApplyDO::getDescribe, reqVO.getDescribe()) + .eqIfPresent(BorrowApplyDO::getDescribes, reqVO.getDescribes()) .eqIfPresent(BorrowApplyDO::getUserId, reqVO.getUserId()) .likeIfPresent(BorrowApplyDO::getUserName, reqVO.getUserName()) .eqIfPresent(BorrowApplyDO::getDeptId, reqVO.getDeptId()) @@ -42,7 +42,7 @@ public interface BorrowApplyMapper extends BaseMapperX { .eqIfPresent(BorrowApplyDO::getBorrowCode, reqVO.getBorrowCode()) .eqIfPresent(BorrowApplyDO::getBorrowState, reqVO.getBorrowState()) .eqIfPresent(BorrowApplyDO::getReason, reqVO.getReason()) - .eqIfPresent(BorrowApplyDO::getDescribe, reqVO.getDescribe()) + .eqIfPresent(BorrowApplyDO::getDescribes, reqVO.getDescribes()) .eqIfPresent(BorrowApplyDO::getUserId, reqVO.getUserId()) .likeIfPresent(BorrowApplyDO::getUserName, reqVO.getUserName()) .eqIfPresent(BorrowApplyDO::getDeptId, reqVO.getDeptId()) diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java index 2251fe5b..ce17b670 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/borrowapply/BorrowApplyServiceImpl.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.archives.service.borrowapply; +import cn.hutool.core.date.LocalDateTimeUtil; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; +import java.time.LocalDateTime; import java.util.*; import cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo.*; import cn.iocoder.yudao.module.archives.dal.dataobject.borrowapply.BorrowApplyDO; diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml b/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml deleted file mode 100644 index 468705e1..00000000 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/resources/mapper/borrowapply/BorrowApplyMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -