TG.WXCRM.V4/Model/Sql/2022-07-11/2022-07-11.sql

187 lines
5.5 KiB
SQL
Raw Permalink 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 bas_innergroup ADD department_id NUMBER;
COMMENT ON COLUMN bas_innergroup.department_id IS '员工系统:对应部门Id';
ALTER TABLE bas_innergroup ADD department_code VARCHAR2(50);
COMMENT ON COLUMN bas_innergroup.department_code IS '员工系统:对应部门编码';
ALTER TABLE bas_innergroup ADD is_profession NUMBER;
COMMENT ON COLUMN bas_innergroup.is_profession IS '员工系统:是否为业务部门 1 为业务部门 0为其他部门';
ALTER TABLE bas_innergroup ADD department_parentid NUMBER;
COMMENT ON COLUMN bas_innergroup.department_parentid IS '员工系统:对应部门的父Id';
ALTER TABLE bas_innergroup ADD ischeck NUMBER;
COMMENT ON COLUMN bas_innergroup.ischeck IS '员工系统:是否勾选 1是 0否';
ALTER TABLE bas_innergroup ADD department_sort NUMBER;
COMMENT ON COLUMN bas_innergroup.department_sort IS '员工系统:排序';
ALTER TABLE bas_innergroup ADD is_deleted NUMBER;
COMMENT ON COLUMN bas_innergroup.is_deleted IS '员工系统:是否删除';
alter table BAS_SALESDEPARTMENT
drop constraint FK_BAS_SALE_REFERENCE_BAS_COMP;
-- Add/modify columns
alter table BAS_SALESDEPARTMENT modify saledeptcode varchar2(50);
--- 新增了销售组
-- Add/modify columns
alter table BAS_GROUPLEADER add type INTEGER default 0;
-- Add comments to the columns
comment on column BAS_GROUPLEADER.type
is '类型 0销售组 1部门';
-- Add/modify columns
alter table BAS_INNERUSER add employee_id NUMBER;
-- Add comments to the columns
comment on column BAS_INNERUSER.employee_id
is '员工系统员工的ID';
-- Add/modify columns
alter table BAS_SALESDEPARTMENT add department_id NUMBER;
alter table BAS_SALESDEPARTMENT add department_code VARCHAR2(50);
alter table BAS_SALESDEPARTMENT add is_profession NUMBER;
alter table BAS_SALESDEPARTMENT add department_parentid NUMBER;
alter table BAS_SALESDEPARTMENT add ischeck NUMBER;
alter table BAS_SALESDEPARTMENT add department_sort NUMBER;
alter table BAS_SALESDEPARTMENT add is_deleted NUMBER;
-- Add comments to the columns
comment on column BAS_SALESDEPARTMENT.department_id
is '员工系统对应的部门ID';
comment on column BAS_SALESDEPARTMENT.department_code
is '员工系统:对应的部门编码';
comment on column BAS_SALESDEPARTMENT.is_profession
is '员工系统:是否为业务部门, 1为业务部门0为其他部门';
comment on column BAS_SALESDEPARTMENT.department_parentid
is '员工系统部门的父ID';
comment on column BAS_SALESDEPARTMENT.ischeck
is '员工系统是否勾选1是 0';
comment on column BAS_SALESDEPARTMENT.department_sort
is '员工系统:排序';
comment on column BAS_SALESDEPARTMENT.is_deleted
is '员工系统:是否删除';
-- Create table
create table BAS_EMPLOYEE
(
id NUMBER,
employee_id VARCHAR2(50),
employee_name VARCHAR2(50),
login_password VARCHAR2(250),
employee_position VARCHAR2(250),
status NUMBER,
salt VARCHAR2(250),
sex NUMBER,
phone VARCHAR2(20),
entry_date DATE,
leave_date DATE,
is_change_password NUMBER,
is_deleted NUMBER,
create_time DATE,
update_time DATE
)
tablespace UPDEV_DATA
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table BAS_EMPLOYEE
is '员工表:员工系统同步过来的';
-- Add comments to the columns
comment on column BAS_EMPLOYEE.id
is '主键ID';
comment on column BAS_EMPLOYEE.employee_id
is '工号';
comment on column BAS_EMPLOYEE.employee_name
is '姓名';
comment on column BAS_EMPLOYEE.login_password
is '登录密码';
comment on column BAS_EMPLOYEE.employee_position
is '职位';
comment on column BAS_EMPLOYEE.status
is '状态';
comment on column BAS_EMPLOYEE.salt
is '盐值';
comment on column BAS_EMPLOYEE.sex
is '性别';
comment on column BAS_EMPLOYEE.phone
is '联系电话';
comment on column BAS_EMPLOYEE.entry_date
is '入职日期';
comment on column BAS_EMPLOYEE.leave_date
is '离职日期';
comment on column BAS_EMPLOYEE.is_change_password
is '是否修改了密码';
comment on column BAS_EMPLOYEE.is_deleted
is '删除标志';
comment on column BAS_EMPLOYEE.create_time
is '创建时间';
comment on column BAS_EMPLOYEE.update_time
is '更新时间';
-- Create table
create table BAS_EMPLOYEE_DEPARTMENT
(
id NUMBER,
employee_id NUMBER,
department_id NUMBER,
is_deleted NUMBER,
create_time DATE,
update_time DATE
)
tablespace UPDEV_DATA
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table BAS_EMPLOYEE_DEPARTMENT
is '员工部门关系表:员工系统同步过来的';
-- Add comments to the columns
comment on column BAS_EMPLOYEE_DEPARTMENT.id
is '主键ID';
comment on column BAS_EMPLOYEE_DEPARTMENT.employee_id
is '用户ID';
comment on column BAS_EMPLOYEE_DEPARTMENT.department_id
is '部门ID';
comment on column BAS_EMPLOYEE_DEPARTMENT.is_deleted
is '删除标志';
comment on column BAS_EMPLOYEE_DEPARTMENT.create_time
is '创建时间';
comment on column BAS_EMPLOYEE_DEPARTMENT.update_time
is '更新时间';
PACK_RES_ALLOCATE
pack_wx_res.GetSceneRes
PACK_CSVR.CSVR_CALLRECORDQUERY
PACK_CSVR.CSVR_UNCALLRECORDQUERY
PACK_RES_ALLOCATE.GetKFBSeniorDistribution_New
PACK_WX.GetMyServiceRes
PACK_RES_ALLOCATE.GetKFBMySeniorRes
PACK_WX_SETTLEMENT.OrderRefundDetail