Files
tms-erp-api/doc/sql/transport/blade_user_remark_patch_20260806.sql
b2894lxlx f716b3fc63 1、车船模块fix bug
2、运力模块fix bug
3、新增设备台账
4、其他bug 修复
5、调整组织、人员模块
2026-08-07 08:27:47 +08:00

33 lines
2.0 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ALTER TABLE `blade_user`
ADD COLUMN `remark` varchar(255) NULL DEFAULT NULL COMMENT '备注' AFTER `is_leader`,
ADD COLUMN `person_category` tinyint NOT NULL DEFAULT 1 COMMENT '人员类别1内部员工2承运商' AFTER `remark`,
ADD COLUMN `data_scope_range` tinyint NOT NULL DEFAULT 1 COMMENT '数据权限范围1所属组织2全部组织3自定义' AFTER `person_category`,
ADD COLUMN `data_level_range` tinyint NOT NULL DEFAULT 1 COMMENT '数据层级范围1包含下级2仅本级' AFTER `data_scope_range`,
ADD COLUMN `include_new_customer` tinyint NOT NULL DEFAULT 0 COMMENT '包含新增客商0否1是' AFTER `data_level_range`;
CREATE TABLE `blade_user_data_scope` (
`id` bigint NOT NULL COMMENT '主键',
`user_id` bigint NOT NULL COMMENT '用户主键',
`dept_id` bigint NOT NULL COMMENT '组织主键',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_blade_user_data_scope_user_dept` (`user_id`, `dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户组织数据权限';
CREATE TABLE `blade_user_customer_scope` (
`id` bigint NOT NULL COMMENT '主键',
`user_id` bigint NOT NULL COMMENT '用户主键',
`customer_id` bigint NOT NULL COMMENT '客商档案主键',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_blade_user_customer_scope_user_customer` (`user_id`, `customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户客商权限';
ALTER TABLE `blade_user_dept`
ADD COLUMN `company_code` varchar(64) NULL DEFAULT NULL COMMENT 'OA公司编码',
ADD COLUMN `company_name` varchar(255) NULL DEFAULT NULL COMMENT 'OA公司名称',
ADD COLUMN `dept_code` varchar(64) NULL DEFAULT NULL COMMENT 'OA部门编码',
ADD COLUMN `dept_name` varchar(255) NULL DEFAULT NULL COMMENT 'OA部门名称',
ADD COLUMN `sort` int NULL DEFAULT NULL COMMENT '排序',
ADD COLUMN `oa_id` varchar(64) NULL DEFAULT NULL COMMENT 'OA人员ID',
ADD COLUMN `oa_login_id` varchar(128) NULL DEFAULT NULL COMMENT 'OA登录账号',
ADD COLUMN `sync_time` datetime NULL DEFAULT NULL COMMENT '同步时间';