强烈推荐篇:HR组织架构管理 / 组织架构管理(1)原创
金蝶云社区-枯藤老树昏鸦
枯藤老树昏鸦
7人赞赏了该文章 151次浏览 未经作者许可,禁止转载编辑于2024年02月23日 08:54:16

image.png


--建表脚本--

create table T_ORG_HRORGSTRUCTSCHEME(

FSCHEMEID int not null  comment '方案内码'

,FNUMBER nvarchar(30) default null  comment '方案编码'

,FROOTORGID int default null  comment '根业务组织'

,FORGSTRUCTTYPE varchar(36) default null  comment '组织架构类型'

,FDEPTNUMBER nvarchar(30) default null  comment '部门编号'

,FCREATEORGID int default 0  comment '创建组织内码'

,FUSEORGID int default 0  comment '使用组织内码'

,FCREATORID int default null  comment '创建人内码'

,FCREATEDATE datetime default null  comment '创建日期'

,FMODIFIERID int default null  comment '修改人内码'

,FMODIFYDATE datetime default null  comment '修改日期'

,FFORBIDDERID int default null  comment '禁用人内码'

,FFORBIDDATE datetime default null  comment '禁用日期'

,FFORBIDSTATUS char(1) default null  comment '禁用状态'

,FDOCUMENTSTATUS char(1) default null  comment '数据状态'

,FAUDITORID int default null  comment '审核人'

,FAUDITDATE datetime default null  comment '审核日期'

,primary key (FSCHEMEID)

) comment = 'hr组织架构方案'


--查询--

select FSCHEMEID as "fschemeid",FNUMBER as "fnumber",FROOTORGID as "frootorgid",FORGSTRUCTTYPE as "forgstructtype",FDEPTNUMBER as "fdeptnumber",FCREATEORGID as "fcreateorgid",FUSEORGID as "fuseorgid",FCREATORID as "fcreatorid",FCREATEDATE as "fcreatedate",FMODIFIERID as "fmodifierid",FMODIFYDATE as "fmodifydate",FFORBIDDERID as "fforbidderid",FFORBIDDATE as "fforbiddate",FFORBIDSTATUS as "fforbidstatus",FDOCUMENTSTATUS as "fdocumentstatus",FAUDITORID as "fauditorid",FAUDITDATE as "fauditdate" from T_ORG_HRORGSTRUCTSCHEME


--查询(中文字段)--

select FSCHEMEID as "方案内码",FNUMBER as "方案编码",FROOTORGID as "根业务组织",FORGSTRUCTTYPE as "组织架构类型",FDEPTNUMBER as "部门编号",FCREATEORGID as "创建组织内码",FUSEORGID as "使用组织内码",FCREATORID as "创建人内码",FCREATEDATE as "创建日期",FMODIFIERID as "修改人内码",FMODIFYDATE as "修改日期",FFORBIDDERID as "禁用人内码",FFORBIDDATE as "禁用日期",FFORBIDSTATUS as "禁用状态",FDOCUMENTSTATUS as "数据状态",FAUDITORID as "审核人",FAUDITDATE as "审核日期" from T_ORG_HRORGSTRUCTSCHEME


--INSERT脚本--

insert into T_ORG_HRORGSTRUCTSCHEME(FSCHEMEID,FNUMBER,FROOTORGID,FORGSTRUCTTYPE,FDEPTNUMBER,FCREATEORGID,FUSEORGID,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FFORBIDDERID,FFORBIDDATE,FFORBIDSTATUS,FDOCUMENTSTATUS,FAUDITORID,FAUDITDATE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


--UPDATE脚本--

update T_ORG_HRORGSTRUCTSCHEME set FSCHEMEID=?,FNUMBER=?,FROOTORGID=?,FORGSTRUCTTYPE=?,FDEPTNUMBER=?,FCREATEORGID=?,FUSEORGID=?,FCREATORID=?,FCREATEDATE=?,FMODIFIERID=?,FMODIFYDATE=?,FFORBIDDERID=?,FFORBIDDATE=?,FFORBIDSTATUS=?,FDOCUMENTSTATUS=?,FAUDITORID=?,FAUDITDATE=? where FSCHEMEID=?


--delete脚本--

delete from T_ORG_HRORGSTRUCTSCHEME where FSCHEMEID=?


--给字段加备注--

alter table T_ORG_HRORGSTRUCTSCHEME comment 'hr组织架构方案';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FSCHEMEID int not null  comment '方案内码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FNUMBER nvarchar(30) default null  comment '方案编码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FROOTORGID int default null  comment '根业务组织';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FORGSTRUCTTYPE varchar(36) default null  comment '组织架构类型';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FDEPTNUMBER nvarchar(30) default null  comment '部门编号';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FCREATEORGID int default 0  comment '创建组织内码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FUSEORGID int default 0  comment '使用组织内码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FCREATORID int default null  comment '创建人内码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FCREATEDATE datetime default null  comment '创建日期';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FMODIFIERID int default null  comment '修改人内码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FMODIFYDATE datetime default null  comment '修改日期';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FFORBIDDERID int default null  comment '禁用人内码';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FFORBIDDATE datetime default null  comment '禁用日期';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FFORBIDSTATUS char(1) default null  comment '禁用状态';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FDOCUMENTSTATUS char(1) default null  comment '数据状态';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FAUDITORID int default null  comment '审核人';

alter table T_ORG_HRORGSTRUCTSCHEME modify column FAUDITDATE datetime default null  comment '审核日期';



--建表脚本--

create table T_ORG_HRORGSTRUCTSCHEME_L(

FPKID int not null  comment '多语言内码'

,FSCHEMEID int default null  comment '方案内码'

,FLOCALEID int default null  comment '语言码'

,FNAME nvarchar(80) default null  comment '名称'

,FDESCRIPTION nvarchar(255) default null  comment '描述'

,primary key (FPKID)

) comment = 'hr组织架构方案多语言'


--查询--

select FPKID as "fpkid",FSCHEMEID as "fschemeid",FLOCALEID as "flocaleid",FNAME as "fname",FDESCRIPTION as "fdescription" from T_ORG_HRORGSTRUCTSCHEME_L


--查询(中文字段)--

select FPKID as "多语言内码",FSCHEMEID as "方案内码",FLOCALEID as "语言码",FNAME as "名称",FDESCRIPTION as "描述" from T_ORG_HRORGSTRUCTSCHEME_L


--INSERT脚本--

insert into T_ORG_HRORGSTRUCTSCHEME_L(FPKID,FSCHEMEID,FLOCALEID,FNAME,FDESCRIPTION) values (?,?,?,?,?)


--UPDATE脚本--

update T_ORG_HRORGSTRUCTSCHEME_L set FPKID=?,FSCHEMEID=?,FLOCALEID=?,FNAME=?,FDESCRIPTION=? where FPKID=?


--delete脚本--

delete from T_ORG_HRORGSTRUCTSCHEME_L where FPKID=?


--给字段加备注--

alter table T_ORG_HRORGSTRUCTSCHEME_L comment 'hr组织架构方案多语言';

alter table T_ORG_HRORGSTRUCTSCHEME_L modify column FPKID int not null  comment '多语言内码';

alter table T_ORG_HRORGSTRUCTSCHEME_L modify column FSCHEMEID int default null  comment '方案内码';

alter table T_ORG_HRORGSTRUCTSCHEME_L modify column FLOCALEID int default null  comment '语言码';

alter table T_ORG_HRORGSTRUCTSCHEME_L modify column FNAME nvarchar(80) default null  comment '名称';

alter table T_ORG_HRORGSTRUCTSCHEME_L modify column FDESCRIPTION nvarchar(255) default null  comment '描述';



--建表脚本--

create table T_ORG_HRORGUNIT(

FID int not null  comment '主键'

,FSCHEMEID int not null  comment '组织架构方案id'

,FDEPTID int default null  comment '平台部门id'

,FORGID int default null  comment '引入平台组织机构id'

,FISORGIMPORT char(1) not null  comment '是否引入平台组织'

,FUNITLEVELID int default null  comment '组织层级id'

,FUNITFORMID int default null  comment '组织形态id'

,FAFFILIATEDORGID int default null  comment '所属业务组织'

,FSELFCODE varchar(255) default null  comment '自助码'

,primary key (FID)

) comment = 'hr组织单元'


--查询--

select FID as "fid",FSCHEMEID as "fschemeid",FDEPTID as "fdeptid",FORGID as "forgid",FISORGIMPORT as "fisorgimport",FUNITLEVELID as "funitlevelid",FUNITFORMID as "funitformid",FAFFILIATEDORGID as "faffiliatedorgid",FSELFCODE as "fselfcode" from T_ORG_HRORGUNIT


--查询(中文字段)--

select FID as "主键",FSCHEMEID as "组织架构方案id",FDEPTID as "平台部门id",FORGID as "引入平台组织机构id",FISORGIMPORT as "是否引入平台组织",FUNITLEVELID as "组织层级id",FUNITFORMID as "组织形态id",FAFFILIATEDORGID as "所属业务组织",FSELFCODE as "自助码" from T_ORG_HRORGUNIT


--INSERT脚本--

insert into T_ORG_HRORGUNIT(FID,FSCHEMEID,FDEPTID,FORGID,FISORGIMPORT,FUNITLEVELID,FUNITFORMID,FAFFILIATEDORGID,FSELFCODE) values (?,?,?,?,?,?,?,?,?)


--UPDATE脚本--

update T_ORG_HRORGUNIT set FID=?,FSCHEMEID=?,FDEPTID=?,FORGID=?,FISORGIMPORT=?,FUNITLEVELID=?,FUNITFORMID=?,FAFFILIATEDORGID=?,FSELFCODE=? where FID=?


--delete脚本--

delete from T_ORG_HRORGUNIT where FID=?


--给字段加备注--

alter table T_ORG_HRORGUNIT comment 'hr组织单元';

alter table T_ORG_HRORGUNIT modify column FID int not null  comment '主键';

alter table T_ORG_HRORGUNIT modify column FSCHEMEID int not null  comment '组织架构方案id';

alter table T_ORG_HRORGUNIT modify column FDEPTID int default null  comment '平台部门id';

alter table T_ORG_HRORGUNIT modify column FORGID int default null  comment '引入平台组织机构id';

alter table T_ORG_HRORGUNIT modify column FISORGIMPORT char(1) not null  comment '是否引入平台组织';

alter table T_ORG_HRORGUNIT modify column FUNITLEVELID int default null  comment '组织层级id';

alter table T_ORG_HRORGUNIT modify column FUNITFORMID int default null  comment '组织形态id';

alter table T_ORG_HRORGUNIT modify column FAFFILIATEDORGID int default null  comment '所属业务组织';

alter table T_ORG_HRORGUNIT modify column FSELFCODE varchar(255) default null  comment '自助码';



--建表脚本--

create table T_ORG_HRORGUNITLEVEL(

FUNITLEVELID int not null  comment '组织层级内码'

,FNUMBER nvarchar(30) default null  comment '组织层级编码'

,FPARENTID int default null  comment '上级层级内码'

,FCREATEORGID int default 0  comment '创建组织内码'

,FUSEORGID int default 0  comment '使用组织内码'

,FCREATORID int default null  comment '创建人内码'

,FCREATEDATE datetime default null  comment '创建日期'

,FMODIFIERID int default null  comment '修改人内码'

,FMODIFYDATE datetime default null  comment '修改日期'

,FFORBIDDERID int default null  comment '禁用人内码'

,FFORBIDDATE datetime default null  comment '禁用日期'

,FFORBIDSTATUS char(1) default null  comment '禁用状态'

,FDOCUMENTSTATUS char(1) default null  comment '数据状态'

,FAUDITORID int default null  comment '审核人'

,FAUDITDATE datetime default null  comment '审核日期'

,primary key (FUNITLEVELID)

) comment = 'hr组织单元层级'


--查询--

select FUNITLEVELID as "funitlevelid",FNUMBER as "fnumber",FPARENTID as "fparentid",FCREATEORGID as "fcreateorgid",FUSEORGID as "fuseorgid",FCREATORID as "fcreatorid",FCREATEDATE as "fcreatedate",FMODIFIERID as "fmodifierid",FMODIFYDATE as "fmodifydate",FFORBIDDERID as "fforbidderid",FFORBIDDATE as "fforbiddate",FFORBIDSTATUS as "fforbidstatus",FDOCUMENTSTATUS as "fdocumentstatus",FAUDITORID as "fauditorid",FAUDITDATE as "fauditdate" from T_ORG_HRORGUNITLEVEL


--查询(中文字段)--

select FUNITLEVELID as "组织层级内码",FNUMBER as "组织层级编码",FPARENTID as "上级层级内码",FCREATEORGID as "创建组织内码",FUSEORGID as "使用组织内码",FCREATORID as "创建人内码",FCREATEDATE as "创建日期",FMODIFIERID as "修改人内码",FMODIFYDATE as "修改日期",FFORBIDDERID as "禁用人内码",FFORBIDDATE as "禁用日期",FFORBIDSTATUS as "禁用状态",FDOCUMENTSTATUS as "数据状态",FAUDITORID as "审核人",FAUDITDATE as "审核日期" from T_ORG_HRORGUNITLEVEL


--INSERT脚本--

insert into T_ORG_HRORGUNITLEVEL(FUNITLEVELID,FNUMBER,FPARENTID,FCREATEORGID,FUSEORGID,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FFORBIDDERID,FFORBIDDATE,FFORBIDSTATUS,FDOCUMENTSTATUS,FAUDITORID,FAUDITDATE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


--UPDATE脚本--

update T_ORG_HRORGUNITLEVEL set FUNITLEVELID=?,FNUMBER=?,FPARENTID=?,FCREATEORGID=?,FUSEORGID=?,FCREATORID=?,FCREATEDATE=?,FMODIFIERID=?,FMODIFYDATE=?,FFORBIDDERID=?,FFORBIDDATE=?,FFORBIDSTATUS=?,FDOCUMENTSTATUS=?,FAUDITORID=?,FAUDITDATE=? where FUNITLEVELID=?


--delete脚本--

delete from T_ORG_HRORGUNITLEVEL where FUNITLEVELID=?


--给字段加备注--

alter table T_ORG_HRORGUNITLEVEL comment 'hr组织单元层级';

alter table T_ORG_HRORGUNITLEVEL modify column FUNITLEVELID int not null  comment '组织层级内码';

alter table T_ORG_HRORGUNITLEVEL modify column FNUMBER nvarchar(30) default null  comment '组织层级编码';

alter table T_ORG_HRORGUNITLEVEL modify column FPARENTID int default null  comment '上级层级内码';

alter table T_ORG_HRORGUNITLEVEL modify column FCREATEORGID int default 0  comment '创建组织内码';

alter table T_ORG_HRORGUNITLEVEL modify column FUSEORGID int default 0  comment '使用组织内码';

alter table T_ORG_HRORGUNITLEVEL modify column FCREATORID int default null  comment '创建人内码';

alter table T_ORG_HRORGUNITLEVEL modify column FCREATEDATE datetime default null  comment '创建日期';

alter table T_ORG_HRORGUNITLEVEL modify column FMODIFIERID int default null  comment '修改人内码';

alter table T_ORG_HRORGUNITLEVEL modify column FMODIFYDATE datetime default null  comment '修改日期';

alter table T_ORG_HRORGUNITLEVEL modify column FFORBIDDERID int default null  comment '禁用人内码';

alter table T_ORG_HRORGUNITLEVEL modify column FFORBIDDATE datetime default null  comment '禁用日期';

alter table T_ORG_HRORGUNITLEVEL modify column FFORBIDSTATUS char(1) default null  comment '禁用状态';

alter table T_ORG_HRORGUNITLEVEL modify column FDOCUMENTSTATUS char(1) default null  comment '数据状态';

alter table T_ORG_HRORGUNITLEVEL modify column FAUDITORID int default null  comment '审核人';

alter table T_ORG_HRORGUNITLEVEL modify column FAUDITDATE datetime default null  comment '审核日期';



--建表脚本--

create table T_ORG_HRORGUNITLEVEL_L(

FPKID int not null  comment '多语言内码'

,FUNITLEVELID int default null  comment '组织层级内码'

,FLOCALEID int default null  comment '语言码'

,FNAME nvarchar(80) default null  comment '名称'

,FDESCRIPTION nvarchar(255) default null  comment '描述'

,primary key (FPKID)

) comment = 'hr组织单元层级多语言'


--查询--

select FPKID as "fpkid",FUNITLEVELID as "funitlevelid",FLOCALEID as "flocaleid",FNAME as "fname",FDESCRIPTION as "fdescription" from T_ORG_HRORGUNITLEVEL_L


--查询(中文字段)--

select FPKID as "多语言内码",FUNITLEVELID as "组织层级内码",FLOCALEID as "语言码",FNAME as "名称",FDESCRIPTION as "描述" from T_ORG_HRORGUNITLEVEL_L


--INSERT脚本--

insert into T_ORG_HRORGUNITLEVEL_L(FPKID,FUNITLEVELID,FLOCALEID,FNAME,FDESCRIPTION) values (?,?,?,?,?)


--UPDATE脚本--

update T_ORG_HRORGUNITLEVEL_L set FPKID=?,FUNITLEVELID=?,FLOCALEID=?,FNAME=?,FDESCRIPTION=? where FPKID=?


--delete脚本--

delete from T_ORG_HRORGUNITLEVEL_L where FPKID=?


--给字段加备注--

alter table T_ORG_HRORGUNITLEVEL_L comment 'hr组织单元层级多语言';

alter table T_ORG_HRORGUNITLEVEL_L modify column FPKID int not null  comment '多语言内码';

alter table T_ORG_HRORGUNITLEVEL_L modify column FUNITLEVELID int default null  comment '组织层级内码';

alter table T_ORG_HRORGUNITLEVEL_L modify column FLOCALEID int default null  comment '语言码';

alter table T_ORG_HRORGUNITLEVEL_L modify column FNAME nvarchar(80) default null  comment '名称';

alter table T_ORG_HRORGUNITLEVEL_L modify column FDESCRIPTION nvarchar(255) default null  comment '描述';



--建表脚本--

create table T_ORG_HRORGUNIT_L(

FPKID int not null  comment '多语言内码'

,FID int not null  comment '主键'

,FLOCALEID int default null  comment '语言码'

,FALIASNAME nvarchar(255) not null  comment '别名'

,primary key (FPKID)

) comment = 'hr组织单元多语言表'


--查询--

select FPKID as "fpkid",FID as "fid",FLOCALEID as "flocaleid",FALIASNAME as "faliasname" from T_ORG_HRORGUNIT_L


--查询(中文字段)--

select FPKID as "多语言内码",FID as "主键",FLOCALEID as "语言码",FALIASNAME as "别名" from T_ORG_HRORGUNIT_L


--INSERT脚本--

insert into T_ORG_HRORGUNIT_L(FPKID,FID,FLOCALEID,FALIASNAME) values (?,?,?,?)


--UPDATE脚本--

update T_ORG_HRORGUNIT_L set FPKID=?,FID=?,FLOCALEID=?,FALIASNAME=? where FPKID=?


--delete脚本--

delete from T_ORG_HRORGUNIT_L where FPKID=?


--给字段加备注--

alter table T_ORG_HRORGUNIT_L comment 'hr组织单元多语言表';

alter table T_ORG_HRORGUNIT_L modify column FPKID int not null  comment '多语言内码';

alter table T_ORG_HRORGUNIT_L modify column FID int not null  comment '主键';

alter table T_ORG_HRORGUNIT_L modify column FLOCALEID int default null  comment '语言码';

alter table T_ORG_HRORGUNIT_L modify column FALIASNAME nvarchar(255) not null  comment '别名';


--建表脚本--

create table T_ORG_HRPOST(

FHRPOSTID int not null  comment '职位信息内码'

,FPOSTID int default null  comment '岗位信息内码'

,FORGUNITID int default null  comment '所属组织单元内码'

,FAFFILIATEDORGID int default null  comment '所属业务组织内码'

,FSCHEMEID int default null  comment '组织架构方案内码'

,FLEADERPOST char(1) not null  comment '负责人职位'

,FJOBID int default null  comment '职务'

,primary key (FHRPOSTID)

) comment = 'hr职位信息基础表'


--查询--

select FHRPOSTID as "fhrpostid",FPOSTID as "fpostid",FORGUNITID as "forgunitid",FAFFILIATEDORGID as "faffiliatedorgid",FSCHEMEID as "fschemeid",FLEADERPOST as "fleaderpost",FJOBID as "fjobid" from T_ORG_HRPOST


--查询(中文字段)--

select FHRPOSTID as "职位信息内码",FPOSTID as "岗位信息内码",FORGUNITID as "所属组织单元内码",FAFFILIATEDORGID as "所属业务组织内码",FSCHEMEID as "组织架构方案内码",FLEADERPOST as "负责人职位",FJOBID as "职务" from T_ORG_HRPOST


--INSERT脚本--

insert into T_ORG_HRPOST(FHRPOSTID,FPOSTID,FORGUNITID,FAFFILIATEDORGID,FSCHEMEID,FLEADERPOST,FJOBID) values (?,?,?,?,?,?,?)


--UPDATE脚本--

update T_ORG_HRPOST set FHRPOSTID=?,FPOSTID=?,FORGUNITID=?,FAFFILIATEDORGID=?,FSCHEMEID=?,FLEADERPOST=?,FJOBID=? where FHRPOSTID=?


--delete脚本--

delete from T_ORG_HRPOST where FHRPOSTID=?


--给字段加备注--

alter table T_ORG_HRPOST comment 'hr职位信息基础表';

alter table T_ORG_HRPOST modify column FHRPOSTID int not null  comment '职位信息内码';

alter table T_ORG_HRPOST modify column FPOSTID int default null  comment '岗位信息内码';

alter table T_ORG_HRPOST modify column FORGUNITID int default null  comment '所属组织单元内码';

alter table T_ORG_HRPOST modify column FAFFILIATEDORGID int default null  comment '所属业务组织内码';

alter table T_ORG_HRPOST modify column FSCHEMEID int default null  comment '组织架构方案内码';

alter table T_ORG_HRPOST modify column FLEADERPOST char(1) not null  comment '负责人职位';

alter table T_ORG_HRPOST modify column FJOBID int default null  comment '职务';


上传图片



图标赞 7
7人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!