feat: 工会报销优化
This commit is contained in:
@@ -10,9 +10,8 @@ CREATE TABLE IF NOT EXISTS `outlay_annual_base` (
|
||||
`calculatedMoney` decimal(10,2) NOT NULL,
|
||||
`allocateMoney` decimal(10,2) NOT NULL,
|
||||
`remark` varchar(1000) DEFAULT NULL,
|
||||
`status` tinyint NOT NULL DEFAULT 0 COMMENT '0待下拨 1已下拨',
|
||||
`status` tinyint NOT NULL DEFAULT 0 COMMENT '0待下拨 1已下拨 2已重置',
|
||||
`version` int NOT NULL DEFAULT 0,
|
||||
`allocatedAt` bigint DEFAULT NULL,
|
||||
`createdAt` bigint NOT NULL,
|
||||
`createdBy` varchar(32) NOT NULL,
|
||||
`updatedAt` bigint NOT NULL,
|
||||
@@ -30,7 +29,6 @@ CREATE TABLE IF NOT EXISTS `outlay_annual_special` (
|
||||
`remark` varchar(1000) DEFAULT NULL,
|
||||
`status` tinyint NOT NULL DEFAULT 0 COMMENT '0待下拨 1已下拨',
|
||||
`version` int NOT NULL DEFAULT 0,
|
||||
`allocatedAt` bigint DEFAULT NULL,
|
||||
`createdAt` bigint NOT NULL,
|
||||
`createdBy` varchar(32) NOT NULL,
|
||||
`updatedAt` bigint NOT NULL,
|
||||
@@ -53,6 +51,23 @@ CREATE TABLE IF NOT EXISTS `outlay_annual_allocate_log` (
|
||||
KEY `idx_annual_log_record_time` (`allocateType`,`allocateId`,`createdAt`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='经费下拨及调整记录';
|
||||
|
||||
-- 兼容已执行旧版建表脚本的数据库。
|
||||
SET @drop_annual_allocated_at = IF(EXISTS (
|
||||
SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'outlay_annual_base' AND COLUMN_NAME = 'allocatedAt'
|
||||
), 'ALTER TABLE `outlay_annual_base` DROP COLUMN `allocatedAt`', 'DO 0');
|
||||
PREPARE drop_annual_allocated_at FROM @drop_annual_allocated_at;
|
||||
EXECUTE drop_annual_allocated_at;
|
||||
DEALLOCATE PREPARE drop_annual_allocated_at;
|
||||
|
||||
SET @drop_annual_allocated_at = IF(EXISTS (
|
||||
SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'outlay_annual_special' AND COLUMN_NAME = 'allocatedAt'
|
||||
), 'ALTER TABLE `outlay_annual_special` DROP COLUMN `allocatedAt`', 'DO 0');
|
||||
PREPARE drop_annual_allocated_at FROM @drop_annual_allocated_at;
|
||||
EXECUTE drop_annual_allocated_at;
|
||||
DEALLOCATE PREPARE drop_annual_allocated_at;
|
||||
|
||||
-- 沿用现有权限与入口,仅调整菜单名称。
|
||||
UPDATE sys_menu SET name='年度经费下拨', aliasName='年度经费下拨'
|
||||
WHERE permission='outlay.outlayManage.union.allocate';
|
||||
|
||||
Reference in New Issue
Block a user