Merge remote-tracking branch 'origin/main'

# Conflicts:
#	yudao-module-archives/yudao-module-archives-api/src/main/java/cn/iocoder/yudao/module/archives/enums/ErrorCodeConstants.java
new
JilingLee 1 year ago
commit d9cab3ddd1

@ -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;

@ -0,0 +1,66 @@
--
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(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();
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 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 '',
`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` bit(1) NULL DEFAULT b'0' COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) 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` = '';
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');

@ -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;

@ -5,4 +5,8 @@ public interface ErrorCodeConstants {
ErrorCode RECORD_NOT_EXISTS = new ErrorCode(200100, "归档不存在");
ErrorCode CODE_RULE_NOT_EXISTS = new ErrorCode(300100, "编码不存在");
ErrorCode TURN_OVER_NOT_EXISTS = new ErrorCode(400100, "移交管理不存在");
ErrorCode BORROW_APPLY_NOT_EXISTS = new ErrorCode(300200,"借阅申请不存在");
ErrorCode AUTHENTICATE_NOT_EXISTS = new ErrorCode(300300,"档案鉴定历史不存在");
}

@ -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/record")
@Operation(summary = "获得档案鉴定列表")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('archives:authenticate:query')")
public PageResult<RecordDO>getRecordList(RecordPageReqVO recordPageReqVO){
recordPageReqVO.setFileStatus("1");//查询已归档的档案
return recordService.getRecordPage(recordPageReqVO);
}
@PostMapping("/create")
@Operation(summary = "创建档案鉴定历史")
@PreAuthorize("@ss.hasPermission('archives:authenticate:create')")
public CommonResult<Long> createAuthenticate(@Valid @RequestBody AuthenticateCreateReqVO createReqVO) {
return success(authenticateService.createAuthenticate(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新档案鉴定历史")
@PreAuthorize("@ss.hasPermission('archives:authenticate:update')")
public CommonResult<Boolean> 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<Boolean> 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<AuthenticateRespVO> 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<List<AuthenticateRespVO>> getAuthenticateList(@RequestParam("ids") Collection<Long> ids) {
List<AuthenticateDO> list = authenticateService.getAuthenticateList(ids);
return success(AuthenticateConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得档案鉴定历史分页")
@PreAuthorize("@ss.hasPermission('archives:authenticate:query')")
public CommonResult<PageResult<AuthenticateRespVO>> getAuthenticatePage(@Valid AuthenticatePageReqVO pageVO) {
PageResult<AuthenticateDO> 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<AuthenticateDO> list = authenticateService.getAuthenticateList(exportReqVO);
// 导出 Excel
List<AuthenticateExcelVO> datas = AuthenticateConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "档案鉴定.xls", "数据", AuthenticateExcelVO.class, datas);
}
}

@ -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;
}

@ -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 {
}

@ -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;
}

@ -0,0 +1,66 @@
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;
@Schema(description = "鉴定结果",example = "鉴定结果")
private String result;
}

@ -0,0 +1,68 @@
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;
@Schema(description = "鉴定结果",example = "鉴定结果")
private String result;
}

@ -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;
}

@ -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;
}

@ -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<Long> createBorrowApply(@Valid @RequestBody BorrowApplyCreateReqVO createReqVO) {
return success(borrowApplyService.createBorrowApply(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新档案借阅申请")
@PreAuthorize("@ss.hasPermission('archives:borrow-apply:update')")
public CommonResult<Boolean> 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<Boolean> deleteBorrowApply(@RequestParam("id") Long 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<BorrowApplyRespVO> getBorrowApply(@RequestParam("id") Long 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<List<BorrowApplyRespVO>> getBorrowApplyList(@RequestParam("ids") Collection<Long> ids) {
List<BorrowApplyDO> list = borrowApplyService.getBorrowApplyList(ids);
return success(BorrowApplyConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得档案借阅申请分页")
@PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')")
public CommonResult<PageResult<BorrowApplyRespVO>> getBorrowApplyPage(@Valid BorrowApplyPageReqVO pageVO) {
PageResult<BorrowApplyDO> 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<BorrowApplyDO> list = borrowApplyService.getBorrowApplyList(exportReqVO);
// 导出 Excel
List<BorrowApplyExcelVO> datas = BorrowApplyConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "档案借阅申请.xls", "数据", BorrowApplyExcelVO.class, datas);
}
}

@ -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 String borrowState;
@Schema(description = "借阅事由", example = "不香")
private String reason;
@Schema(description = "借阅描述")
private String describes;
@Schema(description = "借阅人id", example = "30243")
private Long userId;
@Schema(description = "借阅人名称", example = "赵六")
private String userName;
@Schema(description = "借阅部门id", example = "17160")
private Long 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 String way;
@Schema(description = "档案介质")
private String media;
@Schema(description = "业务实体id", example = "7747")
private Long companyId;
@Schema(description = "业务实体名称")
private String company;
@Schema(description = "描述", example = "你猜")
private String remark;
}

@ -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 {
}

@ -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 Long id;
@ExcelProperty("借阅申请编码")
private String borrowCode;
@ExcelProperty("借阅申请状态 0:已通过 1驳回")
private String borrowState;
@ExcelProperty("借阅事由")
private String reason;
@ExcelProperty("借阅描述")
private String describes;
@ExcelProperty("借阅人id")
private Long userId;
@ExcelProperty("借阅人名称")
private String userName;
@ExcelProperty("借阅部门id")
private Long deptId;
@ExcelProperty("借阅部门名称")
private String deptName;
@ExcelProperty("预计归还日期")
private LocalDateTime returnTime;
@ExcelProperty("借阅方式 0:外接 1:现场查阅")
private String way;
@ExcelProperty("档案介质")
private String media;
@ExcelProperty("业务实体id")
private Long companyId;
@ExcelProperty("业务实体名称")
private String company;
@ExcelProperty("描述")
private String remark;
@ExcelProperty("创建日期")
private LocalDateTime createTime;
}

@ -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 String borrowState;
@Schema(description = "借阅事由", example = "不香")
private String reason;
@Schema(description = "借阅描述")
private String describes;
@Schema(description = "借阅人id", example = "30243")
private Long userId;
@Schema(description = "借阅人名称", example = "赵六")
private String userName;
@Schema(description = "借阅部门id", example = "17160")
private Long 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 String way;
@Schema(description = "档案介质")
private String media;
@Schema(description = "业务实体id", example = "7747")
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;
}

@ -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 String borrowState;
@Schema(description = "借阅事由", example = "不香")
private String reason;
@Schema(description = "借阅描述")
private String describes;
@Schema(description = "借阅人id", example = "30243")
private Long userId;
@Schema(description = "借阅人名称", example = "赵六")
private String userName;
@Schema(description = "借阅部门id", example = "17160")
private Long 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 String way;
@Schema(description = "档案介质")
private String media;
@Schema(description = "业务实体id", example = "7747")
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;
}

@ -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 = "2504")
private Long id;
@Schema(description = "创建日期")
private LocalDateTime createTime;
}

@ -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 = "2504")
@NotNull(message = "借阅id不能为空")
private Long id;
}

@ -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<AuthenticateRespVO> convertList(List<AuthenticateDO> list);
PageResult<AuthenticateRespVO> convertPage(PageResult<AuthenticateDO> page);
List<AuthenticateExcelVO> convertList02(List<AuthenticateDO> list);
}

@ -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<BorrowApplyRespVO> convertList(List<BorrowApplyDO> list);
PageResult<BorrowApplyRespVO> convertPage(PageResult<BorrowApplyDO> page);
List<BorrowApplyExcelVO> convertList02(List<BorrowApplyDO> list);
}

@ -0,0 +1,94 @@
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;
/**
*
*/
private String result;
}

@ -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 Long id;
/**
*
*/
private String borrowCode;
/**
* 0: 1
*/
private String borrowState;
/**
*
*/
private String reason;
/**
*
*/
private String describes;
/**
* id
*/
private Long userId;
/**
*
*/
private String userName;
/**
* id
*/
private Long deptId;
/**
*
*/
private String deptName;
/**
*
*/
private LocalDateTime returnTime;
/**
* 0: 1:
*/
private String way;
/**
*
*/
private String media;
/**
* id
*/
private Long companyId;
/**
*
*/
private String company;
/**
*
*/
private String remark;
}

@ -0,0 +1,62 @@
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<AuthenticateDO> {
default PageResult<AuthenticateDO> selectPage(AuthenticatePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AuthenticateDO>()
.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())
.eqIfPresent(AuthenticateDO::getResult, reqVO.getResult())
.orderByDesc(AuthenticateDO::getId));
}
default List<AuthenticateDO> selectList(AuthenticateExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<AuthenticateDO>()
.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())
.eqIfPresent(AuthenticateDO::getResult, reqVO.getResult())
.orderByDesc(AuthenticateDO::getId));
}
}

@ -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<BorrowApplyDO> {
default PageResult<BorrowApplyDO> selectPage(BorrowApplyPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<BorrowApplyDO>()
.eqIfPresent(BorrowApplyDO::getBorrowCode, reqVO.getBorrowCode())
.eqIfPresent(BorrowApplyDO::getBorrowState, reqVO.getBorrowState())
.eqIfPresent(BorrowApplyDO::getReason, reqVO.getReason())
.eqIfPresent(BorrowApplyDO::getDescribes, reqVO.getDescribes())
.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<BorrowApplyDO> selectList(BorrowApplyExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<BorrowApplyDO>()
.eqIfPresent(BorrowApplyDO::getBorrowCode, reqVO.getBorrowCode())
.eqIfPresent(BorrowApplyDO::getBorrowState, reqVO.getBorrowState())
.eqIfPresent(BorrowApplyDO::getReason, reqVO.getReason())
.eqIfPresent(BorrowApplyDO::getDescribes, reqVO.getDescribes())
.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));
}
}

@ -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<AuthenticateDO> getAuthenticateList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<AuthenticateDO> getAuthenticatePage(AuthenticatePageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<AuthenticateDO> getAuthenticateList(AuthenticateExportReqVO exportReqVO);
}

@ -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<AuthenticateDO> getAuthenticateList(Collection<Long> ids) {
return authenticateMapper.selectBatchIds(ids);
}
@Override
public PageResult<AuthenticateDO> getAuthenticatePage(AuthenticatePageReqVO pageReqVO) {
return authenticateMapper.selectPage(pageReqVO);
}
@Override
public List<AuthenticateDO> getAuthenticateList(AuthenticateExportReqVO exportReqVO) {
return authenticateMapper.selectList(exportReqVO);
}
}

@ -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
*/
Long createBorrowApply(@Valid BorrowApplyCreateReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateBorrowApply(@Valid BorrowApplyUpdateReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteBorrowApply(Long id);
/**
*
*
* @param id
* @return
*/
BorrowApplyDO getBorrowApply(Long id);
/**
*
*
* @param ids
* @return
*/
List<BorrowApplyDO> getBorrowApplyList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<BorrowApplyDO> getBorrowApplyPage(BorrowApplyPageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<BorrowApplyDO> getBorrowApplyList(BorrowApplyExportReqVO exportReqVO);
}

@ -0,0 +1,84 @@
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;
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 Long 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(Long id) {
// 校验存在
validateBorrowApplyExists(id);
// 删除
borrowApplyMapper.deleteById(id);
}
private void validateBorrowApplyExists(Long id) {
if (borrowApplyMapper.selectById(id) == null) {
throw exception(BORROW_APPLY_NOT_EXISTS);
}
}
@Override
public BorrowApplyDO getBorrowApply(Long id) {
return borrowApplyMapper.selectById(id);
}
@Override
public List<BorrowApplyDO> getBorrowApplyList(Collection<Long> ids) {
return borrowApplyMapper.selectBatchIds(ids);
}
@Override
public PageResult<BorrowApplyDO> getBorrowApplyPage(BorrowApplyPageReqVO pageReqVO) {
return borrowApplyMapper.selectPage(pageReqVO);
}
@Override
public List<BorrowApplyDO> getBorrowApplyList(BorrowApplyExportReqVO exportReqVO) {
return borrowApplyMapper.selectList(exportReqVO);
}
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.archives.dal.mysql.authenticate.AuthenticateMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -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, "档案分类不存在");
}

@ -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<Long> createFileCategory(@Valid @RequestBody FileCategoryCreateReqVO createReqVO) {
return success(fileCategoryService.createFileCategory(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新档案分类")
@PreAuthorize("@ss.hasPermission('setting:file-category:update')")
public CommonResult<Boolean> 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<Boolean> 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<FileCategoryRespVO> 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<List<FileCategoryRespVO>> getFileCategoryList(@RequestParam("ids") Collection<Long> ids) {
List<FileCategoryDO> list = fileCategoryService.getFileCategoryList(ids);
return success(FileCategoryConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得档案分类分页")
@PreAuthorize("@ss.hasPermission('setting:file-category:query')")
public CommonResult<PageResult<FileCategoryRespVO>> getFileCategoryPage(@Valid FileCategoryPageReqVO pageVO) {
PageResult<FileCategoryDO> 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<FileCategoryDO> list = fileCategoryService.getFileCategoryList(exportReqVO);
// 导出 Excel
List<FileCategoryExcelVO> datas = FileCategoryConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "档案分类.xls", "数据", FileCategoryExcelVO.class, datas);
}
}

@ -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;
}

@ -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 {
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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<FileCategoryRespVO> convertList(List<FileCategoryDO> list);
PageResult<FileCategoryRespVO> convertPage(PageResult<FileCategoryDO> page);
List<FileCategoryExcelVO> convertList02(List<FileCategoryDO> list);
}

@ -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;
}

@ -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<FileCategoryDO> {
default PageResult<FileCategoryDO> selectPage(FileCategoryPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<FileCategoryDO>()
.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<FileCategoryDO> selectList(FileCategoryExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<FileCategoryDO>()
.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));
}
}

@ -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<FileCategoryDO> getFileCategoryList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<FileCategoryDO> getFileCategoryPage(FileCategoryPageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<FileCategoryDO> getFileCategoryList(FileCategoryExportReqVO exportReqVO);
}

@ -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<FileCategoryDO> getFileCategoryList(Collection<Long> ids) {
return fileCategoryMapper.selectBatchIds(ids);
}
@Override
public PageResult<FileCategoryDO> getFileCategoryPage(FileCategoryPageReqVO pageReqVO) {
return fileCategoryMapper.selectPage(pageReqVO);
}
@Override
public List<FileCategoryDO> getFileCategoryList(FileCategoryExportReqVO exportReqVO) {
return fileCategoryMapper.selectList(exportReqVO);
}
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.setting.dal.mysql.filecategory.FileCategoryMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
Loading…
Cancel
Save