--建表脚本--
create table T_BAS_BILLTYPE(
FBILLTYPEID varchar(36) not null comment '类型内码'
,FNUMBER nvarchar(30) not null comment '编码'
,FBILLFORMID varchar(36) not null comment '单据'
,FISDEFAULT char(1) not null comment '默认'
,FBILLCODERULEID varchar(36) not null comment '编码规则内码'
,FCREATORID int not null comment '创建人'
,FCREATEDATE datetime not null comment '创建日期'
,FMODIFIERID int default 0 comment '修改人'
,FMODIFYDATE datetime default getdate() comment '修改日期'
,FCONTROLPRINTCOUNT char(1) not null comment '控制打印次数'
,FMAXPRINTCOUNT smallint not null comment '最大打印次数'
,FPRINTAFTERAUDIT char(1) not 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 '禁用日期'
,FDEFPRINTTEMPLATE varchar(255) default null comment '套打模板'
,FISSYSPRESET char(1) not null comment '系统预设'
,FParaSettingXML xml default null comment '参数设置xml'
,FLAYOUTSOLUTION varchar(36) default null comment '单据布局方案'
,FDEFWNREPORTTEMPLATE varchar(36) default null comment '默认报表模板'
,primary key (FBILLTYPEID)
) comment = '单据类型表'
--查询--
select FBILLTYPEID as "fbilltypeid",FNUMBER as "fnumber",FBILLFORMID as "fbillformid",FISDEFAULT as "fisdefault",FBILLCODERULEID as "fbillcoderuleid",FCREATORID as "fcreatorid",FCREATEDATE as "fcreatedate",FMODIFIERID as "fmodifierid",FMODIFYDATE as "fmodifydate",FCONTROLPRINTCOUNT as "fcontrolprintcount",FMAXPRINTCOUNT as "fmaxprintcount",FPRINTAFTERAUDIT as "fprintafteraudit",FDOCUMENTSTATUS as "fdocumentstatus",FAUDITORID as "fauditorid",FAUDITDATE as "fauditdate",FFORBIDSTATUS as "fforbidstatus",FFORBIDDERID as "fforbidderid",FFORBIDDATE as "fforbiddate",FDEFPRINTTEMPLATE as "fdefprinttemplate",FISSYSPRESET as "fissyspreset",FParaSettingXML as "fparasettingxml",FLAYOUTSOLUTION as "flayoutsolution",FDEFWNREPORTTEMPLATE as "fdefwnreporttemplate" from T_BAS_BILLTYPE
--查询(中文字段)--
select FBILLTYPEID as "类型内码",FNUMBER as "编码",FBILLFORMID as "单据",FISDEFAULT as "默认",FBILLCODERULEID as "编码规则内码",FCREATORID as "创建人",FCREATEDATE as "创建日期",FMODIFIERID as "修改人",FMODIFYDATE as "修改日期",FCONTROLPRINTCOUNT as "控制打印次数",FMAXPRINTCOUNT as "最大打印次数",FPRINTAFTERAUDIT as "审核后才允许打印",FDOCUMENTSTATUS as "业务状态",FAUDITORID as "审核人",FAUDITDATE as "审核日期",FFORBIDSTATUS as "禁用状态",FFORBIDDERID as "禁用人",FFORBIDDATE as "禁用日期",FDEFPRINTTEMPLATE as "套打模板",FISSYSPRESET as "系统预设",FParaSettingXML as "参数设置xml",FLAYOUTSOLUTION as "单据布局方案",FDEFWNREPORTTEMPLATE as "默认报表模板" from T_BAS_BILLTYPE
--INSERT脚本--
insert into T_BAS_BILLTYPE(FBILLTYPEID,FNUMBER,FBILLFORMID,FISDEFAULT,FBILLCODERULEID,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FCONTROLPRINTCOUNT,FMAXPRINTCOUNT,FPRINTAFTERAUDIT,FDOCUMENTSTATUS,FAUDITORID,FAUDITDATE,FFORBIDSTATUS,FFORBIDDERID,FFORBIDDATE,FDEFPRINTTEMPLATE,FISSYSPRESET,FParaSettingXML,FLAYOUTSOLUTION,FDEFWNREPORTTEMPLATE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_BAS_BILLTYPE set FBILLTYPEID=?,FNUMBER=?,FBILLFORMID=?,FISDEFAULT=?,FBILLCODERULEID=?,FCREATORID=?,FCREATEDATE=?,FMODIFIERID=?,FMODIFYDATE=?,FCONTROLPRINTCOUNT=?,FMAXPRINTCOUNT=?,FPRINTAFTERAUDIT=?,FDOCUMENTSTATUS=?,FAUDITORID=?,FAUDITDATE=?,FFORBIDSTATUS=?,FFORBIDDERID=?,FFORBIDDATE=?,FDEFPRINTTEMPLATE=?,FISSYSPRESET=?,FParaSettingXML=?,FLAYOUTSOLUTION=?,FDEFWNREPORTTEMPLATE=? where FBILLTYPEID=?
--delete脚本--
delete from T_BAS_BILLTYPE where FBILLTYPEID=?
--给字段加备注--
alter table T_BAS_BILLTYPE comment '单据类型表';
alter table T_BAS_BILLTYPE modify column FBILLTYPEID varchar(36) not null comment '类型内码';
alter table T_BAS_BILLTYPE modify column FNUMBER nvarchar(30) not null comment '编码';
alter table T_BAS_BILLTYPE modify column FBILLFORMID varchar(36) not null comment '单据';
alter table T_BAS_BILLTYPE modify column FISDEFAULT char(1) not null comment '默认';
alter table T_BAS_BILLTYPE modify column FBILLCODERULEID varchar(36) not null comment '编码规则内码';
alter table T_BAS_BILLTYPE modify column FCREATORID int not null comment '创建人';
alter table T_BAS_BILLTYPE modify column FCREATEDATE datetime not null comment '创建日期';
alter table T_BAS_BILLTYPE modify column FMODIFIERID int default 0 comment '修改人';
alter table T_BAS_BILLTYPE modify column FMODIFYDATE datetime default getdate() comment '修改日期';
alter table T_BAS_BILLTYPE modify column FCONTROLPRINTCOUNT char(1) not null comment '控制打印次数';
alter table T_BAS_BILLTYPE modify column FMAXPRINTCOUNT smallint not null comment '最大打印次数';
alter table T_BAS_BILLTYPE modify column FPRINTAFTERAUDIT char(1) not null comment '审核后才允许打印';
alter table T_BAS_BILLTYPE modify column FDOCUMENTSTATUS char(1) not null comment '业务状态';
alter table T_BAS_BILLTYPE modify column FAUDITORID int not null comment '审核人';
alter table T_BAS_BILLTYPE modify column FAUDITDATE datetime default null comment '审核日期';
alter table T_BAS_BILLTYPE modify column FFORBIDSTATUS char(1) not null comment '禁用状态';
alter table T_BAS_BILLTYPE modify column FFORBIDDERID int not null comment '禁用人';
alter table T_BAS_BILLTYPE modify column FFORBIDDATE datetime default null comment '禁用日期';
alter table T_BAS_BILLTYPE modify column FDEFPRINTTEMPLATE varchar(255) default null comment '套打模板';
alter table T_BAS_BILLTYPE modify column FISSYSPRESET char(1) not null comment '系统预设';
alter table T_BAS_BILLTYPE modify column FParaSettingXML xml default null comment '参数设置xml';
alter table T_BAS_BILLTYPE modify column FLAYOUTSOLUTION varchar(36) default null comment '单据布局方案';
alter table T_BAS_BILLTYPE modify column FDEFWNREPORTTEMPLATE varchar(36) default null comment '默认报表模板';
--建表脚本--
create table T_BAS_BILLTYPEFLDCTL(
FENTRYID varchar(36) not null comment '字段控制内码'
,FBILLTYPEID varchar(36) not null comment '单据类型内码'
,FSEQ smallint default 0 comment '序号'
,FFIELDKEY varchar(200) default '''' comment '字段'
,FMUSTINPUT char(1) not null comment '是否必录'
,FDEFAULTVALUE nvarchar(255) default '' comment '默认值'
,FDEFAULTFUNCNAME nvarchar(255) default '' comment '默认值函数名称'
,FDEFAULTVALUETYPE int not null comment '默认值类型'
,FDEFAULTFUNCID int not null comment '默认值函数id'
,FDEFAULTFUNCPARAM nvarchar(100) not null comment '默认值函数参数'
,FFIELDELEMENTTYPE int not null comment '字段元素类型'
,FENABLED char(1) not null comment '是否锁定'
,FEDITENABLED char(1) not null comment '修改锁定'
,primary key (FENTRYID)
) comment = '单据类型字段控制单据体'
--查询--
select FENTRYID as "fentryid",FBILLTYPEID as "fbilltypeid",FSEQ as "fseq",FFIELDKEY as "ffieldkey",FMUSTINPUT as "fmustinput",FDEFAULTVALUE as "fdefaultvalue",FDEFAULTFUNCNAME as "fdefaultfuncname",FDEFAULTVALUETYPE as "fdefaultvaluetype",FDEFAULTFUNCID as "fdefaultfuncid",FDEFAULTFUNCPARAM as "fdefaultfuncparam",FFIELDELEMENTTYPE as "ffieldelementtype",FENABLED as "fenabled",FEDITENABLED as "feditenabled" from T_BAS_BILLTYPEFLDCTL
--查询(中文字段)--
select FENTRYID as "字段控制内码",FBILLTYPEID as "单据类型内码",FSEQ as "序号",FFIELDKEY as "字段",FMUSTINPUT as "是否必录",FDEFAULTVALUE as "默认值",FDEFAULTFUNCNAME as "默认值函数名称",FDEFAULTVALUETYPE as "默认值类型",FDEFAULTFUNCID as "默认值函数id",FDEFAULTFUNCPARAM as "默认值函数参数",FFIELDELEMENTTYPE as "字段元素类型",FENABLED as "是否锁定",FEDITENABLED as "修改锁定" from T_BAS_BILLTYPEFLDCTL
--INSERT脚本--
insert into T_BAS_BILLTYPEFLDCTL(FENTRYID,FBILLTYPEID,FSEQ,FFIELDKEY,FMUSTINPUT,FDEFAULTVALUE,FDEFAULTFUNCNAME,FDEFAULTVALUETYPE,FDEFAULTFUNCID,FDEFAULTFUNCPARAM,FFIELDELEMENTTYPE,FENABLED,FEDITENABLED) values (?,?,?,?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_BAS_BILLTYPEFLDCTL set FENTRYID=?,FBILLTYPEID=?,FSEQ=?,FFIELDKEY=?,FMUSTINPUT=?,FDEFAULTVALUE=?,FDEFAULTFUNCNAME=?,FDEFAULTVALUETYPE=?,FDEFAULTFUNCID=?,FDEFAULTFUNCPARAM=?,FFIELDELEMENTTYPE=?,FENABLED=?,FEDITENABLED=? where FENTRYID=?
--delete脚本--
delete from T_BAS_BILLTYPEFLDCTL where FENTRYID=?
--给字段加备注--
alter table T_BAS_BILLTYPEFLDCTL comment '单据类型字段控制单据体';
alter table T_BAS_BILLTYPEFLDCTL modify column FENTRYID varchar(36) not null comment '字段控制内码';
alter table T_BAS_BILLTYPEFLDCTL modify column FBILLTYPEID varchar(36) not null comment '单据类型内码';
alter table T_BAS_BILLTYPEFLDCTL modify column FSEQ smallint default 0 comment '序号';
alter table T_BAS_BILLTYPEFLDCTL modify column FFIELDKEY varchar(200) default '''' comment '字段';
alter table T_BAS_BILLTYPEFLDCTL modify column FMUSTINPUT char(1) not null comment '是否必录';
alter table T_BAS_BILLTYPEFLDCTL modify column FDEFAULTVALUE nvarchar(255) default '' comment '默认值';
alter table T_BAS_BILLTYPEFLDCTL modify column FDEFAULTFUNCNAME nvarchar(255) default '' comment '默认值函数名称';
alter table T_BAS_BILLTYPEFLDCTL modify column FDEFAULTVALUETYPE int not null comment '默认值类型';
alter table T_BAS_BILLTYPEFLDCTL modify column FDEFAULTFUNCID int not null comment '默认值函数id';
alter table T_BAS_BILLTYPEFLDCTL modify column FDEFAULTFUNCPARAM nvarchar(100) not null comment '默认值函数参数';
alter table T_BAS_BILLTYPEFLDCTL modify column FFIELDELEMENTTYPE int not null comment '字段元素类型';
alter table T_BAS_BILLTYPEFLDCTL modify column FENABLED char(1) not null comment '是否锁定';
alter table T_BAS_BILLTYPEFLDCTL modify column FEDITENABLED char(1) not null comment '修改锁定';
--建表脚本--
create table T_BAS_BILLTYPE_L(
FPKID varchar(36) not null comment '内码'
,FBILLTYPEID varchar(36) not null comment '单据类型内码'
,FLOCALEID int default 0 comment '语言类型内码'
,FNAME nvarchar(80) default '' comment '名称'
,FDESCRIPTION nvarchar(255) default '' comment '描述'
,primary key (FPKID)
) comment = '单据类型多语言表'
--查询--
select FPKID as "fpkid",FBILLTYPEID as "fbilltypeid",FLOCALEID as "flocaleid",FNAME as "fname",FDESCRIPTION as "fdescription" from T_BAS_BILLTYPE_L
--查询(中文字段)--
select FPKID as "内码",FBILLTYPEID as "单据类型内码",FLOCALEID as "语言类型内码",FNAME as "名称",FDESCRIPTION as "描述" from T_BAS_BILLTYPE_L
--INSERT脚本--
insert into T_BAS_BILLTYPE_L(FPKID,FBILLTYPEID,FLOCALEID,FNAME,FDESCRIPTION) values (?,?,?,?,?)
--UPDATE脚本--
update T_BAS_BILLTYPE_L set FPKID=?,FBILLTYPEID=?,FLOCALEID=?,FNAME=?,FDESCRIPTION=? where FPKID=?
--delete脚本--
delete from T_BAS_BILLTYPE_L where FPKID=?
--给字段加备注--
alter table T_BAS_BILLTYPE_L comment '单据类型多语言表';
alter table T_BAS_BILLTYPE_L modify column FPKID varchar(36) not null comment '内码';
alter table T_BAS_BILLTYPE_L modify column FBILLTYPEID varchar(36) not null comment '单据类型内码';
alter table T_BAS_BILLTYPE_L modify column FLOCALEID int default 0 comment '语言类型内码';
alter table T_BAS_BILLTYPE_L modify column FNAME nvarchar(80) default '' comment '名称';
alter table T_BAS_BILLTYPE_L modify column FDESCRIPTION nvarchar(255) default '' comment '描述';
推荐阅读