1.3 BD基础--基础资料-公用(科目表、科目表多语言)原创
金蝶云社区-枯藤老树昏鸦
枯藤老树昏鸦
6人赞赏了该文章 183次浏览 未经作者许可,禁止转载编辑于2023年10月07日 10:14:23
T_BD_ACCOUNTTABLE(科目表)
是否主键字段名字段描述数据类型长度可空缺省值备注
FACCTTABLEID 内码 int

0

FACCTGROUPTBLID 会计要素表内码 int

0 引用会计要素表

FNUMBER 编码 nvarchar 30



FMASTERID 组织隔离字段 int

0

FCREATEORGID 创建组织 int

0

FCREATORID 创建人 int

0

FCREATEDATE 创建日期 datetime



FUSEORGID 使用组织 int

0

FMODIFIERID 修改人 int

0

FMODIFYDATE 修改日期 datetime



FDOCUMENTSTATUS 数据状态 char 1



FAUDITORID 审核人 int

0

FAUDITDATE 审核日期 datetime



FFORBIDSTATUS 禁用状态 char 1



FFORBIDDERID 禁用人 int

0

FFORBIDDATE 禁用日期 datetime



FISSYSPRESET 是否系统预设 char 1
'0' 是否系统预设
1 系统预设
0 非系统预设
默认0

备注:存放科目表信息


--建表脚本--

create table T_BD_ACCOUNTTABLE(

FACCTTABLEID int not null  comment '内码'

,FACCTGROUPTBLID int not null  comment '会计要素表内码'

,FNUMBER nvarchar(30) not null  comment '编码'

,FMASTERID int not null  comment '组织隔离字段'

,FCREATEORGID int not null  comment '创建组织'

,FCREATORID int not null  comment '创建人'

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

,FUSEORGID int not null  comment '使用组织'

,FMODIFIERID int not null  comment '修改人'

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

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

,FAUDITORID int not null  comment '审核人'

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

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

,FFORBIDDERID int not null  comment '禁用人'

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

,FISSYSPRESET char(1) not null  comment '是否系统预设'

,primary key (FACCTTABLEID)

) comment = '科目表'


--查询--

select FACCTTABLEID as "faccttableid",FACCTGROUPTBLID as "facctgrouptblid",FNUMBER as "fnumber",FMASTERID as "fmasterid",FCREATEORGID as "fcreateorgid",FCREATORID as "fcreatorid",FCREATEDATE as "fcreatedate",FUSEORGID as "fuseorgid",FMODIFIERID as "fmodifierid",FMODIFYDATE as "fmodifydate",FDOCUMENTSTATUS as "fdocumentstatus",FAUDITORID as "fauditorid",FAUDITDATE as "fauditdate",FFORBIDSTATUS as "fforbidstatus",FFORBIDDERID as "fforbidderid",FFORBIDDATE as "fforbiddate",FISSYSPRESET as "fissyspreset" from T_BD_ACCOUNTTABLE


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

select FACCTTABLEID as "内码",FACCTGROUPTBLID as "会计要素表内码",FNUMBER as "编码",FMASTERID as "组织隔离字段",FCREATEORGID as "创建组织",FCREATORID as "创建人",FCREATEDATE as "创建日期",FUSEORGID as "使用组织",FMODIFIERID as "修改人",FMODIFYDATE as "修改日期",FDOCUMENTSTATUS as "数据状态",FAUDITORID as "审核人",FAUDITDATE as "审核日期",FFORBIDSTATUS as "禁用状态",FFORBIDDERID as "禁用人",FFORBIDDATE as "禁用日期",FISSYSPRESET as "是否系统预设" from T_BD_ACCOUNTTABLE


--INSERT脚本--

insert into T_BD_ACCOUNTTABLE(FACCTTABLEID,FACCTGROUPTBLID,FNUMBER,FMASTERID,FCREATEORGID,FCREATORID,FCREATEDATE,FUSEORGID,FMODIFIERID,FMODIFYDATE,FDOCUMENTSTATUS,FAUDITORID,FAUDITDATE,FFORBIDSTATUS,FFORBIDDERID,FFORBIDDATE,FISSYSPRESET) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


--UPDATE脚本--

update T_BD_ACCOUNTTABLE set FACCTTABLEID=?,FACCTGROUPTBLID=?,FNUMBER=?,FMASTERID=?,FCREATEORGID=?,FCREATORID=?,FCREATEDATE=?,FUSEORGID=?,FMODIFIERID=?,FMODIFYDATE=?,FDOCUMENTSTATUS=?,FAUDITORID=?,FAUDITDATE=?,FFORBIDSTATUS=?,FFORBIDDERID=?,FFORBIDDATE=?,FISSYSPRESET=? where FACCTTABLEID=?


--delete脚本--

delete from T_BD_ACCOUNTTABLE where FACCTTABLEID=?


--给字段加备注--

alter table T_BD_ACCOUNTTABLE comment '科目表';

alter table T_BD_ACCOUNTTABLE modify column FACCTTABLEID int not null  comment '内码';

alter table T_BD_ACCOUNTTABLE modify column FACCTGROUPTBLID int not null  comment '会计要素表内码';

alter table T_BD_ACCOUNTTABLE modify column FNUMBER nvarchar(30) not null  comment '编码';

alter table T_BD_ACCOUNTTABLE modify column FMASTERID int not null  comment '组织隔离字段';

alter table T_BD_ACCOUNTTABLE modify column FCREATEORGID int not null  comment '创建组织';

alter table T_BD_ACCOUNTTABLE modify column FCREATORID int not null  comment '创建人';

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

alter table T_BD_ACCOUNTTABLE modify column FUSEORGID int not null  comment '使用组织';

alter table T_BD_ACCOUNTTABLE modify column FMODIFIERID int not null  comment '修改人';

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

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

alter table T_BD_ACCOUNTTABLE modify column FAUDITORID int not null  comment '审核人';

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

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

alter table T_BD_ACCOUNTTABLE modify column FFORBIDDERID int not null  comment '禁用人';

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

alter table T_BD_ACCOUNTTABLE modify column FISSYSPRESET char(1) not null  comment '是否系统预设';



T_BD_ACCOUNTTABLE_L(科目表多语言)
是否主键字段名字段描述数据类型长度可空缺省值备注
FPKID 内码 int

0

FACCTTABLEID 科目表内码 int

0 引用账簿

FNAME 科目表名称 nvarchar 80



FDESCRIPTION 描述 nvarchar 255



FLOCALEID 语言内码 int

0

备注:保存科目表多语言信息


--建表脚本--

create table T_BD_ACCOUNTTABLE_L(

FPKID int not null  comment '内码'

,FACCTTABLEID int not null  comment '科目表内码'

,FNAME nvarchar(80) not null  comment '科目表名称'

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

,FLOCALEID int not null  comment '语言内码'

,primary key (FPKID)

) comment = '科目表多语言'


--查询--

select FPKID as "fpkid",FACCTTABLEID as "faccttableid",FNAME as "fname",FDESCRIPTION as "fdescription",FLOCALEID as "flocaleid" from T_BD_ACCOUNTTABLE_L


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

select FPKID as "内码",FACCTTABLEID as "科目表内码",FNAME as "科目表名称",FDESCRIPTION as "描述",FLOCALEID as "语言内码" from T_BD_ACCOUNTTABLE_L


--INSERT脚本--

insert into T_BD_ACCOUNTTABLE_L(FPKID,FACCTTABLEID,FNAME,FDESCRIPTION,FLOCALEID) values (?,?,?,?,?)


--UPDATE脚本--

update T_BD_ACCOUNTTABLE_L set FPKID=?,FACCTTABLEID=?,FNAME=?,FDESCRIPTION=?,FLOCALEID=? where FPKID=?


--delete脚本--

delete from T_BD_ACCOUNTTABLE_L where FPKID=?


--给字段加备注--

alter table T_BD_ACCOUNTTABLE_L comment '科目表多语言';

alter table T_BD_ACCOUNTTABLE_L modify column FPKID int not null  comment '内码';

alter table T_BD_ACCOUNTTABLE_L modify column FACCTTABLEID int not null  comment '科目表内码';

alter table T_BD_ACCOUNTTABLE_L modify column FNAME nvarchar(80) not null  comment '科目表名称';

alter table T_BD_ACCOUNTTABLE_L modify column FDESCRIPTION nvarchar(255) not null  comment '描述';

alter table T_BD_ACCOUNTTABLE_L modify column FLOCALEID int not null  comment '语言内码';


上传图片


赞 6