diff --git a/sql/archives20230911JilingLee.sql b/sql/archives20230911JilingLee.sql index 992ef479..bf1d536e 100644 --- a/sql/archives20230911JilingLee.sql +++ b/sql/archives20230911JilingLee.sql @@ -37,6 +37,9 @@ CREATE TABLE `archives_record` ( `updater` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id', `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '制单人', + `organization_id` bigint(20) NULL DEFAULT NULL COMMENT '立档单位ID', + `depot_id` bigint(20) NULL DEFAULT NULL COMMENT '库房ID', + `cabinet_id` bigint(20) NULL DEFAULT NULL COMMENT '档案柜ID', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '归档表' ROW_FORMAT = Dynamic; diff --git a/sql/setting20230913JilingLee.sql b/sql/setting20230913JilingLee.sql new file mode 100644 index 00000000..dc1c5011 --- /dev/null +++ b/sql/setting20230913JilingLee.sql @@ -0,0 +1,122 @@ +-- ---------------------------- +-- 创建立档单位表 setting_organization +-- ---------------------------- +DROP TABLE IF EXISTS `setting_organization`; +CREATE TABLE `setting_organization` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '单位id', + `organization_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `organization_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位编码', + `case_num` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '全宗号', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `attr1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留字段1', + `attr2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留字段2', + `attr3` int(11) NULL DEFAULT NULL COMMENT '预留字段3', + `attr4` int(11) NULL DEFAULT NULL COMMENT '预留字段4', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '所属部门id', + `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', + `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体id', + `company` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体', + `tenant_id` bigint(20) NOT NULL COMMENT '租户编号,一个集团/总公司对应一个租户', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '制单人', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '立档单位' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 创建库房表 for setting_depot +-- ---------------------------- +DROP TABLE IF EXISTS `setting_depot`; +CREATE TABLE `setting_depot` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库房名称', + `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库房编号', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库房地址', + `organization_id` bigint(20) NULL DEFAULT NULL COMMENT '立党单位id', + `maneger_id` bigint(20) NULL DEFAULT NULL COMMENT '管理者ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `maneger_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理者姓名', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '所属部门ID', + `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体ID', + `company` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint(20) NOT NULL COMMENT '租户编号', + `attr1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留字段1', + `attr2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留字段2', + `attr3` int(11) NULL DEFAULT NULL COMMENT '预留字段3', + `attr4` int(11) NULL DEFAULT NULL COMMENT '预留字段4', + `organization_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '立档单位名称', + `organization_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '立档单位编码', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '库房管理' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 创建档案柜表 for setting_depot_cabinet +-- ---------------------------- +DROP TABLE IF EXISTS `setting_depot_cabinet`; +CREATE TABLE `setting_depot_cabinet` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `depot_id` bigint(20) NULL DEFAULT NULL COMMENT '所属库房ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '柜子名称', + `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '柜子编号', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库房地址', + `maneger_id` bigint(20) NULL DEFAULT NULL COMMENT '管理者ID', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `maneger_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理者姓名', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '所属部门ID', + `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `company_id` bigint(20) NULL DEFAULT NULL COMMENT '业务实体ID', + `company` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务实体', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID', + `deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `tenant_id` bigint(20) NOT NULL COMMENT '租户编号', + `attr1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留字段1', + `attr2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留字段2', + `attr3` int(11) NULL DEFAULT NULL COMMENT '预留字段3', + `attr4` int(11) NULL DEFAULT NULL COMMENT '预留字段4', + `cabinet_num` int(11) NULL DEFAULT NULL COMMENT '柜子数量', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 11 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, 2, 0, '/setting', 'config', NULL, NULL, 0, b'1', b'1', b'1', '1', '2023-09-11 09:50:15', '1', '2023-09-11 10:41:21', b'0'); +-- 获取插入的档案设置菜单ID +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 ('立档单位管理', '', 2, 0, @menuId, 'organization', '', 'setting/organization/index', 'Organization', 0, b'1', b'1', b'1', '', '2023-09-11 10:39:56', '', '2023-09-11 10:39:56', b'0'); +-- 获取插入的立档单位菜单ID +SET @menuId2 = LAST_INSERT_ID(); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '立档单位查询', 'setting:organization:query', 3, 1, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-11 10:39:56', '', '2023-09-11 10:39:56', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '立档单位创建', 'setting:organization:create', 3, 2, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-11 10:39:56', '', '2023-09-11 10:39:56', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '立档单位更新', 'setting:organization:update', 3, 3, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-11 10:39:56', '', '2023-09-11 10:39:56', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '立档单位删除', 'setting:organization:delete', 3, 4, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-11 10:39:56', '', '2023-09-11 10:39:56', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '立档单位导出', 'setting:organization:export', 3, 5, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-11 10:39:56', '', '2023-09-11 10:39:56', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '档案柜管理管理', '', 2, 2, @menuId, 'depot-cabinet', '', 'setting/depotCabinet/index', 'DepotCabinet', 0, b'1', b'1', b'1', '', '2023-09-12 09:28:34', '1', '2023-09-12 09:33:27', b'0'); +-- 获取插入的档案柜管理菜单ID +SET @menuId3 = LAST_INSERT_ID(); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '档案柜管理查询', 'setting:depot-cabinet:query', 3, 1, @menuId3, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:34', '', '2023-09-12 09:28:34', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '档案柜管理创建', 'setting:depot-cabinet:create', 3, 2, @menuId3, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:34', '', '2023-09-12 09:28:34', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '档案柜管理更新', 'setting:depot-cabinet:update', 3, 3, @menuId3, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:34', '', '2023-09-12 09:28:34', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '档案柜管理删除', 'setting:depot-cabinet:delete', 3, 4, @menuId3, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:34', '', '2023-09-12 09:28:34', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '档案柜管理导出', 'setting:depot-cabinet:export', 3, 5, @menuId3, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:34', '', '2023-09-12 09:28:34', 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 ('库房管理管理', '', 2, 1, @menuId, 'depot', '', 'setting/depot/index', 'Depot', 0, b'1', b'1', b'1', '', '2023-09-12 09:28:44', '1', '2023-09-12 09:33:31', b'0'); +-- 获取插入的库房管理菜单ID +SET @menuId4 = LAST_INSERT_ID(); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '库房管理查询', 'setting:depot:query', 3, 1, @menuId4, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:44', '', '2023-09-12 09:28:44', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '库房管理创建', 'setting:depot:create', 3, 2, @menuId4, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:44', '', '2023-09-12 09:28:44', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '库房管理更新', 'setting:depot:update', 3, 3, @menuId4, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:44', '', '2023-09-12 09:28:44', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '库房管理删除', 'setting:depot:delete', 3, 4, @menuId4, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:44', '', '2023-09-12 09:28:44', b'0'); +INSERT INTO `lyr-one`.`system_menu`(`id`, `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 (NULL, '库房管理导出', 'setting:depot:export', 3, 5, @menuId4, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-12 09:28:44', '', '2023-09-12 09:28:44', b'0'); diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/common/CommonConstants.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/common/CommonConstants.java new file mode 100644 index 00000000..4bf78ede --- /dev/null +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/common/CommonConstants.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.archives.controller.admin.common; + +/*** + * @des + * @author Lee + * @date 2023/09/13 + */ + +public class CommonConstants { + /** + *归档状态-未归档 + */ + public static final String ARCHIVES_FILE_STATUS_START = "0"; + + /** + * 归档状态-已归档 + */ + public static final String ARCHIVES_FILE_STATUS_FINISH = "1"; + + + + +} diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/RecordController.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/RecordController.java index fcd70c4a..b0ac82be 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/RecordController.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/RecordController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.archives.controller.admin.record; import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; +import cn.iocoder.yudao.module.archives.controller.admin.common.CommonConstants; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -52,6 +53,19 @@ public class RecordController { return success(true); } + @PutMapping("/record") + @Operation(summary = "批量归档归档") + @PreAuthorize("@ss.hasPermission('archives:record:update')") + public CommonResult record(@RequestParam("ids") Long[] ids) { + for(Long id : ids){ + RecordUpdateReqVO updateReqVO = new RecordUpdateReqVO(); + updateReqVO.setId(id); + updateReqVO.setFileStatus(CommonConstants.ARCHIVES_FILE_STATUS_FINISH); + recordService.updateRecord(updateReqVO); + } + return success(true); + } + @DeleteMapping("/delete") @Operation(summary = "删除归档") @Parameter(name = "id", description = "编号", required = true) diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordBaseVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordBaseVO.java index 168499d9..dc524a22 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordBaseVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordBaseVO.java @@ -94,5 +94,12 @@ public class RecordBaseVO { @Schema(description = "制单人", example = "王五") private String createBy; + @Schema(description = "立档单位id") + private Long organizationId; + @Schema(description = "库房id") + private Long depotId; + @Schema(description = "档案柜id") + private Long cabinetId; + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordExcelVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordExcelVO.java index a78e11a5..94e521bf 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordExcelVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordExcelVO.java @@ -103,4 +103,17 @@ public class RecordExcelVO { @ExcelProperty("制单人") private String createBy; + /** + * 立档单位 + */ + private Long organizationId; + /** + * 库房 + */ + private Long depotId; + /** + * 档案柜 + */ + private Long cabinetId; + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordPageReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordPageReqVO.java index 6dd3ac42..717a90a7 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordPageReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordPageReqVO.java @@ -101,4 +101,17 @@ public class RecordPageReqVO extends PageParam { @Schema(description = "制单人") private String createBy; + /** + * 立档单位 + */ + private Long organizationId; + /** + * 库房 + */ + private Long depotId; + /** + * 档案柜 + */ + private Long cabinetId; + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordUpdateReqVO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordUpdateReqVO.java index 43713b97..e53cd716 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordUpdateReqVO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/record/vo/RecordUpdateReqVO.java @@ -14,5 +14,7 @@ public class RecordUpdateReqVO extends RecordBaseVO { @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4837") @NotNull(message = "主键不能为空") private Long id; + @NotNull(message = "归档状态不能为空") + private String fileStatus; } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/record/RecordDO.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/record/RecordDO.java index f5743402..f40d02ec 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/record/RecordDO.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/dal/dataobject/record/RecordDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.archives.dal.dataobject.record; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; import java.time.LocalDateTime; @@ -137,4 +138,18 @@ public class RecordDO extends BaseDO { private String createBy; + /** + * 立档单位 + */ + private Long organizationId; + /** + * 库房 + */ + private Long depotId; + /** + * 档案柜 + */ + private Long cabinetId; + + } diff --git a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/record/RecordServiceImpl.java b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/record/RecordServiceImpl.java index 73b76e26..fa2f3578 100644 --- a/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/record/RecordServiceImpl.java +++ b/yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/service/record/RecordServiceImpl.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.datapermission.core.rule.dept.DeptDataPermissi import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.archives.controller.admin.common.CommonConstants; import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper; @@ -60,6 +61,7 @@ public class RecordServiceImpl implements RecordService { record.setCompany(deptDO.getName()); } record.setCreateBy(adminUserDO.getNickname()); + record.setFileStatus(CommonConstants.ARCHIVES_FILE_STATUS_START); recordMapper.insert(record); // 返回 return record.getId(); diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetBaseVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetBaseVO.java index 74692a57..390630d0 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetBaseVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetBaseVO.java @@ -49,5 +49,7 @@ public class DepotCabinetBaseVO { @Schema(description = "备注", example = "你猜") private String remark; + @Schema(description = "柜子数量", example = "22208") + private Integer cabinetNum; } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExcelVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExcelVO.java index 8c837938..d46685d2 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExcelVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExcelVO.java @@ -57,5 +57,7 @@ public class DepotCabinetExcelVO { @ExcelProperty("备注") private String remark; + @ExcelProperty("柜子数量") + private Integer cabinetNum; } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExportReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExportReqVO.java index 628555a9..dc268043 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExportReqVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetExportReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.setting.controller.admin.depotcabinet.vo; +import com.alibaba.excel.annotation.ExcelProperty; import lombok.*; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -53,4 +54,7 @@ public class DepotCabinetExportReqVO { @Schema(description = "备注", example = "你猜") private String remark; + @Schema(description = "柜子数量", example = "22208") + private Integer cabinetNum; + } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetPageReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetPageReqVO.java index 57ef6c7f..27904bb1 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetPageReqVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/depotcabinet/vo/DepotCabinetPageReqVO.java @@ -55,4 +55,7 @@ public class DepotCabinetPageReqVO extends PageParam { @Schema(description = "备注", example = "你猜") private String remark; + @Schema(description = "柜子数量", example = "22208") + private Integer cabinetNum; + } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/OrganizationController.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/OrganizationController.java index fe8902af..b49b6fab 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/OrganizationController.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/OrganizationController.java @@ -104,7 +104,6 @@ public class OrganizationController { @GetMapping("/getTree") @Operation(summary = "获得立档单位树") - @PreAuthorize("@ss.hasPermission('setting:organization:query')") public CommonResult> getTree() { return success(organizationService.getOrganizationTree()); } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationBaseVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationBaseVO.java index 893ae811..9a53af8f 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationBaseVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationBaseVO.java @@ -40,5 +40,6 @@ public class OrganizationBaseVO { @Schema(description = "业务实体") private String company; - + @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/organization/vo/OrganizationExcelVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExcelVO.java index 4f85a3bd..66931962 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExcelVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExcelVO.java @@ -48,5 +48,7 @@ public class OrganizationExcelVO { @ExcelProperty("业务实体") private String company; + @ExcelProperty("制单人") + private String createBy; } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExportReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExportReqVO.java index 1aecf2b7..7923c64e 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExportReqVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationExportReqVO.java @@ -43,5 +43,7 @@ public class OrganizationExportReqVO { @Schema(description = "业务实体") private String company; + @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/organization/vo/OrganizationPageReqVO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationPageReqVO.java index b0b398e0..fa6ed69e 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationPageReqVO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/controller/admin/organization/vo/OrganizationPageReqVO.java @@ -45,5 +45,6 @@ public class OrganizationPageReqVO extends PageParam { @Schema(description = "业务实体") private String company; - + @Schema(description = "制单人") + private String createBy; } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/depotcabinet/DepotCabinetDO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/depotcabinet/DepotCabinetDO.java index 4a0adfc5..c819f257 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/depotcabinet/DepotCabinetDO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/depotcabinet/DepotCabinetDO.java @@ -91,5 +91,9 @@ public class DepotCabinetDO extends BaseDO { * 预留字段4 */ private Integer attr4; + /** + * 柜子数量 + */ + private Integer cabinetNum; } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/organization/OrganizationDO.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/organization/OrganizationDO.java index ece956f8..6c51a03a 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/organization/OrganizationDO.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/dataobject/organization/OrganizationDO.java @@ -79,5 +79,9 @@ public class OrganizationDO extends BaseDO { * 业务实体 */ private String company; + /** + * 制单人 + */ + private String createBy; } diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/organization/OrganizationServiceImpl.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/organization/OrganizationServiceImpl.java index a8212a86..2b3d6868 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/organization/OrganizationServiceImpl.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/organization/OrganizationServiceImpl.java @@ -46,6 +46,7 @@ public class OrganizationServiceImpl implements OrganizationService { AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId()); //添加数据部门id,后续DataPermissionConfigurationRecord配置类中过滤数据 organization.setDeptId(adminUserDO.getDeptId()); + organization.setCreateBy(adminUserDO.getNickname()); organizationMapper.insert(organization); // 返回 return organization.getId(); diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index b49e5278..45d40ba9 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -45,13 +45,13 @@ spring: datasource: master: name: ruoyi-vue-pro - url: jdbc:mysql://139.224.253.31:3308/lyr-one?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/lyr-one?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 username: root - password: abc123456. + password: root # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # slave: # 模拟从库,可根据自己需要修改 @@ -226,3 +226,12 @@ justauth: prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 +#mybatis-plus配置控制台打印完整带参数SQL语句 +mybatis-plus: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#Flowable相关配置 +flowable: + async-executor-activate: false #关闭定时任务JOB + # 将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。