--建表脚本--
create table T_PLM_CFG_COMPLETENESS_RULE(
FEntryID bigint not null comment 'FEntryID'
,FID bigint not null comment 'FID'
,FSTATUSNAME int not null comment 'FSTATUSNAME'
,FRULECATEGERY varchar(20) default null comment 'FRULECATEGERY'
,FRULETEXT nvarchar(500) default null comment 'FRULETEXT'
,FRULESTAGE varchar(50) default null comment 'FRULESTAGE'
,FRULEORDER int not null comment 'FRULEORDER'
,RULECATEGERY varchar(20) default null comment 'RULECATEGERY'
,FFILECONTAINS nvarchar(100) not null comment '文件包含字段'
,primary key (FEntryID)
) comment = '完整性检查规则'
--查询--
select FEntryID as "fentryid",FID as "fid",FSTATUSNAME as "fstatusname",FRULECATEGERY as "frulecategery",FRULETEXT as "fruletext",FRULESTAGE as "frulestage",FRULEORDER as "fruleorder",RULECATEGERY as "rulecategery",FFILECONTAINS as "ffilecontains" from T_PLM_CFG_COMPLETENESS_RULE
--查询(中文字段)--
select FEntryID as "FEntryID",FID as "FID",FSTATUSNAME as "FSTATUSNAME",FRULECATEGERY as "FRULECATEGERY",FRULETEXT as "FRULETEXT",FRULESTAGE as "FRULESTAGE",FRULEORDER as "FRULEORDER",RULECATEGERY as "RULECATEGERY",FFILECONTAINS as "文件包含字段" from T_PLM_CFG_COMPLETENESS_RULE
--INSERT脚本--
insert into T_PLM_CFG_COMPLETENESS_RULE(FEntryID,FID,FSTATUSNAME,FRULECATEGERY,FRULETEXT,FRULESTAGE,FRULEORDER,RULECATEGERY,FFILECONTAINS) values (?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_PLM_CFG_COMPLETENESS_RULE set FEntryID=?,FID=?,FSTATUSNAME=?,FRULECATEGERY=?,FRULETEXT=?,FRULESTAGE=?,FRULEORDER=?,RULECATEGERY=?,FFILECONTAINS=? where FEntryID=?
--delete脚本--
delete from T_PLM_CFG_COMPLETENESS_RULE where FEntryID=?
--给字段加备注--
alter table T_PLM_CFG_COMPLETENESS_RULE comment '完整性检查规则';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FEntryID bigint not null comment 'FEntryID';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FID bigint not null comment 'FID';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FSTATUSNAME int not null comment 'FSTATUSNAME';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FRULECATEGERY varchar(20) default null comment 'FRULECATEGERY';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FRULETEXT nvarchar(500) default null comment 'FRULETEXT';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FRULESTAGE varchar(50) default null comment 'FRULESTAGE';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FRULEORDER int not null comment 'FRULEORDER';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column RULECATEGERY varchar(20) default null comment 'RULECATEGERY';
alter table T_PLM_CFG_COMPLETENESS_RULE modify column FFILECONTAINS nvarchar(100) not null comment '文件包含字段';
--建表脚本--
create table T_PLM_CFG_COMPLETENESS_RULES(
FEntryID bigint not null comment '分录主键'
,FID bigint not null comment '主键'
,FORDER bigint not null comment '序号'
,FRULEBASE bigint not null comment '项详情'
,FRULESTAGE bigint not null comment '阶段'
,FRULECATEGORY bigint not null comment '业务类型'
,FFILECONTAINS nvarchar(100) not null comment '文件包含字段'
,primary key (FEntryID)
) comment = '完整性检查规则项'
--查询--
select FEntryID as "fentryid",FID as "fid",FORDER as "forder",FRULEBASE as "frulebase",FRULESTAGE as "frulestage",FRULECATEGORY as "frulecategory",FFILECONTAINS as "ffilecontains" from T_PLM_CFG_COMPLETENESS_RULES
--查询(中文字段)--
select FEntryID as "分录主键",FID as "主键",FORDER as "序号",FRULEBASE as "项详情",FRULESTAGE as "阶段",FRULECATEGORY as "业务类型",FFILECONTAINS as "文件包含字段" from T_PLM_CFG_COMPLETENESS_RULES
--INSERT脚本--
insert into T_PLM_CFG_COMPLETENESS_RULES(FEntryID,FID,FORDER,FRULEBASE,FRULESTAGE,FRULECATEGORY,FFILECONTAINS) values (?,?,?,?,?,?,?)
--UPDATE脚本--
update T_PLM_CFG_COMPLETENESS_RULES set FEntryID=?,FID=?,FORDER=?,FRULEBASE=?,FRULESTAGE=?,FRULECATEGORY=?,FFILECONTAINS=? where FEntryID=?
--delete脚本--
delete from T_PLM_CFG_COMPLETENESS_RULES where FEntryID=?
--给字段加备注--
alter table T_PLM_CFG_COMPLETENESS_RULES comment '完整性检查规则项';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FEntryID bigint not null comment '分录主键';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FID bigint not null comment '主键';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FORDER bigint not null comment '序号';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FRULEBASE bigint not null comment '项详情';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FRULESTAGE bigint not null comment '阶段';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FRULECATEGORY bigint not null comment '业务类型';
alter table T_PLM_CFG_COMPLETENESS_RULES modify column FFILECONTAINS nvarchar(100) not null comment '文件包含字段';
--建表脚本--
create table T_PLM_CFG_COMPLETE_CHECK(
FID bigint not null comment '主键'
,FMasterID bigint not null comment '组织主键'
,FCODE nvarchar(200) default null comment '编码'
,FCHECKTYPE varchar(20) default null comment '检查方式'
,FPRODUCTIONMODE varchar(100) default null comment '物料生产方式'
,FSTAGEBASE bigint not null comment '对应状态转换'
,FSTATUSVALUE nvarchar(200) default null comment '对应转换状态'
,FCHECKSTATUSFIELD bigint default 0 comment '对应状态字段'
,FNAME nvarchar(50) default null comment '名称'
,FOPERATIONNAME nvarchar(200) default null comment '操作名称'
,primary key (FID)
) comment = '完整性检查规则'
--查询--
select FID as "fid",FMasterID as "fmasterid",FCODE as "fcode",FCHECKTYPE as "fchecktype",FPRODUCTIONMODE as "fproductionmode",FSTAGEBASE as "fstagebase",FSTATUSVALUE as "fstatusvalue",FCHECKSTATUSFIELD as "fcheckstatusfield",FNAME as "fname",FOPERATIONNAME as "foperationname" from T_PLM_CFG_COMPLETE_CHECK
--查询(中文字段)--
select FID as "主键",FMasterID as "组织主键",FCODE as "编码",FCHECKTYPE as "检查方式",FPRODUCTIONMODE as "物料生产方式",FSTAGEBASE as "对应状态转换",FSTATUSVALUE as "对应转换状态",FCHECKSTATUSFIELD as "对应状态字段",FNAME as "名称",FOPERATIONNAME as "操作名称" from T_PLM_CFG_COMPLETE_CHECK
--INSERT脚本--
insert into T_PLM_CFG_COMPLETE_CHECK(FID,FMasterID,FCODE,FCHECKTYPE,FPRODUCTIONMODE,FSTAGEBASE,FSTATUSVALUE,FCHECKSTATUSFIELD,FNAME,FOPERATIONNAME) values (?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_PLM_CFG_COMPLETE_CHECK set FID=?,FMasterID=?,FCODE=?,FCHECKTYPE=?,FPRODUCTIONMODE=?,FSTAGEBASE=?,FSTATUSVALUE=?,FCHECKSTATUSFIELD=?,FNAME=?,FOPERATIONNAME=? where FID=?
--delete脚本--
delete from T_PLM_CFG_COMPLETE_CHECK where FID=?
--给字段加备注--
alter table T_PLM_CFG_COMPLETE_CHECK comment '完整性检查规则';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FID bigint not null comment '主键';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FMasterID bigint not null comment '组织主键';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FCODE nvarchar(200) default null comment '编码';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FCHECKTYPE varchar(20) default null comment '检查方式';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FPRODUCTIONMODE varchar(100) default null comment '物料生产方式';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FSTAGEBASE bigint not null comment '对应状态转换';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FSTATUSVALUE nvarchar(200) default null comment '对应转换状态';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FCHECKSTATUSFIELD bigint default 0 comment '对应状态字段';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FNAME nvarchar(50) default null comment '名称';
alter table T_PLM_CFG_COMPLETE_CHECK modify column FOPERATIONNAME nvarchar(200) default null comment '操作名称';
--建表脚本--
create table T_PLM_CFG_ERPBOMFIELD(
FID bigint not null comment '主键'
,FMasterID bigint not null comment '组织id'
,FCODE nvarchar(50) default null comment '编码'
,FENTITYCODE nvarchar(50) default null comment '属性编码'
,FFIELDTYPE nvarchar(50) default null comment '字段类型'
,FKEY nvarchar(50) default null comment '标识'
,FELEMENTTYPEID nvarchar(50) default null comment '元数据类型id'
,FDEFVALUE nvarchar(50) default null comment '默认值'
,FMUSTINPUT char(1) default ''0'' comment '必填'
,FFUNCTIONDEFAULT nvarchar(200) default null comment '默认函数'
,FBASETYPE nvarchar(50) default null comment '基础资料'
,FENUMNAME nvarchar(50) default null comment '枚举名'
,FISREADONLY char(1) default ''0'' comment '只读'
,FISSHOWLIST char(1) default ''0'' comment '是否列表显示'
,FISSHOW char(1) default ''0'' comment '是否显示'
,FOBJECTTYPE nvarchar(50) default null comment '对象类型'
,FOBJECTNAME nvarchar(50) default null comment '对象名称'
,FNAME nvarchar(50) default null comment '名称'
,FELEMENTTYPE nvarchar(50) default null comment '元素类型'
,primary key (FID)
) comment = 'erpbom字段'
--查询--
select FID as "fid",FMasterID as "fmasterid",FCODE as "fcode",FENTITYCODE as "fentitycode",FFIELDTYPE as "ffieldtype",FKEY as "fkey",FELEMENTTYPEID as "felementtypeid",FDEFVALUE as "fdefvalue",FMUSTINPUT as "fmustinput",FFUNCTIONDEFAULT as "ffunctiondefault",FBASETYPE as "fbasetype",FENUMNAME as "fenumname",FISREADONLY as "fisreadonly",FISSHOWLIST as "fisshowlist",FISSHOW as "fisshow",FOBJECTTYPE as "fobjecttype",FOBJECTNAME as "fobjectname",FNAME as "fname",FELEMENTTYPE as "felementtype" from T_PLM_CFG_ERPBOMFIELD
--查询(中文字段)--
select FID as "主键",FMasterID as "组织id",FCODE as "编码",FENTITYCODE as "属性编码",FFIELDTYPE as "字段类型",FKEY as "标识",FELEMENTTYPEID as "元数据类型id",FDEFVALUE as "默认值",FMUSTINPUT as "必填",FFUNCTIONDEFAULT as "默认函数",FBASETYPE as "基础资料",FENUMNAME as "枚举名",FISREADONLY as "只读",FISSHOWLIST as "是否列表显示",FISSHOW as "是否显示",FOBJECTTYPE as "对象类型",FOBJECTNAME as "对象名称",FNAME as "名称",FELEMENTTYPE as "元素类型" from T_PLM_CFG_ERPBOMFIELD
--INSERT脚本--
insert into T_PLM_CFG_ERPBOMFIELD(FID,FMasterID,FCODE,FENTITYCODE,FFIELDTYPE,FKEY,FELEMENTTYPEID,FDEFVALUE,FMUSTINPUT,FFUNCTIONDEFAULT,FBASETYPE,FENUMNAME,FISREADONLY,FISSHOWLIST,FISSHOW,FOBJECTTYPE,FOBJECTNAME,FNAME,FELEMENTTYPE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_PLM_CFG_ERPBOMFIELD set FID=?,FMasterID=?,FCODE=?,FENTITYCODE=?,FFIELDTYPE=?,FKEY=?,FELEMENTTYPEID=?,FDEFVALUE=?,FMUSTINPUT=?,FFUNCTIONDEFAULT=?,FBASETYPE=?,FENUMNAME=?,FISREADONLY=?,FISSHOWLIST=?,FISSHOW=?,FOBJECTTYPE=?,FOBJECTNAME=?,FNAME=?,FELEMENTTYPE=? where FID=?
--delete脚本--
delete from T_PLM_CFG_ERPBOMFIELD where FID=?
--给字段加备注--
alter table T_PLM_CFG_ERPBOMFIELD comment 'erpbom字段';
alter table T_PLM_CFG_ERPBOMFIELD modify column FID bigint not null comment '主键';
alter table T_PLM_CFG_ERPBOMFIELD modify column FMasterID bigint not null comment '组织id';
alter table T_PLM_CFG_ERPBOMFIELD modify column FCODE nvarchar(50) default null comment '编码';
alter table T_PLM_CFG_ERPBOMFIELD modify column FENTITYCODE nvarchar(50) default null comment '属性编码';
alter table T_PLM_CFG_ERPBOMFIELD modify column FFIELDTYPE nvarchar(50) default null comment '字段类型';
alter table T_PLM_CFG_ERPBOMFIELD modify column FKEY nvarchar(50) default null comment '标识';
alter table T_PLM_CFG_ERPBOMFIELD modify column FELEMENTTYPEID nvarchar(50) default null comment '元数据类型id';
alter table T_PLM_CFG_ERPBOMFIELD modify column FDEFVALUE nvarchar(50) default null comment '默认值';
alter table T_PLM_CFG_ERPBOMFIELD modify column FMUSTINPUT char(1) default ''0'' comment '必填';
alter table T_PLM_CFG_ERPBOMFIELD modify column FFUNCTIONDEFAULT nvarchar(200) default null comment '默认函数';
alter table T_PLM_CFG_ERPBOMFIELD modify column FBASETYPE nvarchar(50) default null comment '基础资料';
alter table T_PLM_CFG_ERPBOMFIELD modify column FENUMNAME nvarchar(50) default null comment '枚举名';
alter table T_PLM_CFG_ERPBOMFIELD modify column FISREADONLY char(1) default ''0'' comment '只读';
alter table T_PLM_CFG_ERPBOMFIELD modify column FISSHOWLIST char(1) default ''0'' comment '是否列表显示';
alter table T_PLM_CFG_ERPBOMFIELD modify column FISSHOW char(1) default ''0'' comment '是否显示';
alter table T_PLM_CFG_ERPBOMFIELD modify column FOBJECTTYPE nvarchar(50) default null comment '对象类型';
alter table T_PLM_CFG_ERPBOMFIELD modify column FOBJECTNAME nvarchar(50) default null comment '对象名称';
alter table T_PLM_CFG_ERPBOMFIELD modify column FNAME nvarchar(50) default null comment '名称';
alter table T_PLM_CFG_ERPBOMFIELD modify column FELEMENTTYPE nvarchar(50) default null comment '元素类型';
--建表脚本--
create table T_PLM_CFG_ERPMATFIELD(
FID bigint not null comment '主键'
,FMasterID bigint not null comment '组织id'
,FCODE nvarchar(50) default null comment '编码'
,FENTITYCODE nvarchar(50) default null comment '属性编码'
,FFIELDTYPE nvarchar(50) default null comment '字段类型'
,FKEY nvarchar(50) default null comment '标识'
,FELEMENTTYPEID nvarchar(50) default null comment '元数据标识'
,FDEFVALUE nvarchar(50) default null comment '默认值'
,FMUSTINPUT char(1) default ''0'' comment '是否必填'
,FFUNCTIONDEFAULT nvarchar(200) default null comment '默认函数'
,FBASETYPE nvarchar(50) default null comment '基础类型'
,FENUMNAME nvarchar(50) default null comment '枚举名称'
,FISREADONLY char(1) default ''0'' comment '是否只读'
,FISSHOWLIST char(1) default ''0'' comment '是否列表显示'
,FISSHOW char(1) default ''0'' comment '是否显示'
,FOBJECTTYPE nvarchar(50) default null comment '对象类型'
,FOBJECTNAME nvarchar(50) default null comment '对象名称'
,FNAME nvarchar(50) default null comment '名称'
,FELEMENTTYPE nvarchar(50) default null comment '元素类型'
,primary key (FID)
) comment = 'erp物料字段'
--查询--
select FID as "fid",FMasterID as "fmasterid",FCODE as "fcode",FENTITYCODE as "fentitycode",FFIELDTYPE as "ffieldtype",FKEY as "fkey",FELEMENTTYPEID as "felementtypeid",FDEFVALUE as "fdefvalue",FMUSTINPUT as "fmustinput",FFUNCTIONDEFAULT as "ffunctiondefault",FBASETYPE as "fbasetype",FENUMNAME as "fenumname",FISREADONLY as "fisreadonly",FISSHOWLIST as "fisshowlist",FISSHOW as "fisshow",FOBJECTTYPE as "fobjecttype",FOBJECTNAME as "fobjectname",FNAME as "fname",FELEMENTTYPE as "felementtype" from T_PLM_CFG_ERPMATFIELD
--查询(中文字段)--
select FID as "主键",FMasterID as "组织id",FCODE as "编码",FENTITYCODE as "属性编码",FFIELDTYPE as "字段类型",FKEY as "标识",FELEMENTTYPEID as "元数据标识",FDEFVALUE as "默认值",FMUSTINPUT as "是否必填",FFUNCTIONDEFAULT as "默认函数",FBASETYPE as "基础类型",FENUMNAME as "枚举名称",FISREADONLY as "是否只读",FISSHOWLIST as "是否列表显示",FISSHOW as "是否显示",FOBJECTTYPE as "对象类型",FOBJECTNAME as "对象名称",FNAME as "名称",FELEMENTTYPE as "元素类型" from T_PLM_CFG_ERPMATFIELD
--INSERT脚本--
insert into T_PLM_CFG_ERPMATFIELD(FID,FMasterID,FCODE,FENTITYCODE,FFIELDTYPE,FKEY,FELEMENTTYPEID,FDEFVALUE,FMUSTINPUT,FFUNCTIONDEFAULT,FBASETYPE,FENUMNAME,FISREADONLY,FISSHOWLIST,FISSHOW,FOBJECTTYPE,FOBJECTNAME,FNAME,FELEMENTTYPE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_PLM_CFG_ERPMATFIELD set FID=?,FMasterID=?,FCODE=?,FENTITYCODE=?,FFIELDTYPE=?,FKEY=?,FELEMENTTYPEID=?,FDEFVALUE=?,FMUSTINPUT=?,FFUNCTIONDEFAULT=?,FBASETYPE=?,FENUMNAME=?,FISREADONLY=?,FISSHOWLIST=?,FISSHOW=?,FOBJECTTYPE=?,FOBJECTNAME=?,FNAME=?,FELEMENTTYPE=? where FID=?
--delete脚本--
delete from T_PLM_CFG_ERPMATFIELD where FID=?
--给字段加备注--
alter table T_PLM_CFG_ERPMATFIELD comment 'erp物料字段';
alter table T_PLM_CFG_ERPMATFIELD modify column FID bigint not null comment '主键';
alter table T_PLM_CFG_ERPMATFIELD modify column FMasterID bigint not null comment '组织id';
alter table T_PLM_CFG_ERPMATFIELD modify column FCODE nvarchar(50) default null comment '编码';
alter table T_PLM_CFG_ERPMATFIELD modify column FENTITYCODE nvarchar(50) default null comment '属性编码';
alter table T_PLM_CFG_ERPMATFIELD modify column FFIELDTYPE nvarchar(50) default null comment '字段类型';
alter table T_PLM_CFG_ERPMATFIELD modify column FKEY nvarchar(50) default null comment '标识';
alter table T_PLM_CFG_ERPMATFIELD modify column FELEMENTTYPEID nvarchar(50) default null comment '元数据标识';
alter table T_PLM_CFG_ERPMATFIELD modify column FDEFVALUE nvarchar(50) default null comment '默认值';
alter table T_PLM_CFG_ERPMATFIELD modify column FMUSTINPUT char(1) default ''0'' comment '是否必填';
alter table T_PLM_CFG_ERPMATFIELD modify column FFUNCTIONDEFAULT nvarchar(200) default null comment '默认函数';
alter table T_PLM_CFG_ERPMATFIELD modify column FBASETYPE nvarchar(50) default null comment '基础类型';
alter table T_PLM_CFG_ERPMATFIELD modify column FENUMNAME nvarchar(50) default null comment '枚举名称';
alter table T_PLM_CFG_ERPMATFIELD modify column FISREADONLY char(1) default ''0'' comment '是否只读';
alter table T_PLM_CFG_ERPMATFIELD modify column FISSHOWLIST char(1) default ''0'' comment '是否列表显示';
alter table T_PLM_CFG_ERPMATFIELD modify column FISSHOW char(1) default ''0'' comment '是否显示';
alter table T_PLM_CFG_ERPMATFIELD modify column FOBJECTTYPE nvarchar(50) default null comment '对象类型';
alter table T_PLM_CFG_ERPMATFIELD modify column FOBJECTNAME nvarchar(50) default null comment '对象名称';
alter table T_PLM_CFG_ERPMATFIELD modify column FNAME nvarchar(50) default null comment '名称';
alter table T_PLM_CFG_ERPMATFIELD modify column FELEMENTTYPE nvarchar(50) default null comment '元素类型';
推荐阅读