MFG制造

### T_PRD_RETURNMTRLENTRY(退料单表体)：脚本代码

if exists (select 1
from sysindexes
where id = object_id('T_PRD_RETURNMTRLENTRY')
and name = 'IDX_PRD_RME_MOENTRYID'
and indid > 0
and indid < 255)
drop index T_PRD_RETURNMTRLENTRY.IDX_PRD_RME_MOENTRYID
go
if exists (select 1
from sysindexes
where id = object_id('T_PRD_RETURNMTRLENTRY')
and name = 'IDX_PRD_RME_MTRLID'
and indid > 0
and indid < 255)
drop index T_PRD_RETURNMTRLENTRY.IDX_PRD_RME_MTRLID
go
if exists (select 1
from sysindexes
where id = object_id('T_PRD_RETURNMTRLENTRY')
and name = 'IDX_PRD_RME_ID'
and indid > 0
and indid < 255)
drop index T_PRD_RETURNMTRLENTRY.IDX_PRD_RME_ID
go
if exists (select 1
from sysobjects
where id = object_id('T_PRD_RETURNMTRLENTRY')
and type = 'U')
drop table T_PRD_RETURNMTRLENTRY
go
/*==============================================================*/
/* Table: T_PRD_RETURNMTRLENTRY */
/*==============================================================*/
create table T_PRD_RETURNMTRLENTRY (
FID int null,
FENTRYID int not null default 0,
FSEQ int null,
FMATERIALID int null,
FUNITID int null,
FAPPQTY decimal(23,10) not null default 0,
FQTY decimal(23,10) not null default 0,
FBASEUNITID int null,
FBASEAPPQTY decimal(23,10) null,
FBASEQTY decimal(23,10) not null default 0,
FBASESELREPICKEDQTY decimal(23,10) not null default 0,
FSTOCKUNITID int null,
FSTOCKAPPQTY decimal(23,10) not null default 0,
FSTOCKQTY decimal(23,10) not null default 0,
FSECUNITID int null,
FSECSTOCKQTY decimal(23,10) not null default 0,
FSELREPICKEDQTY decimal(23,10) not null default 0,
FRETURNTYPE char(1) null,
FRETURNREASON varchar(36) null,
FBOMID int null,
FAUXPROPID int null,
FSTOCKID int null,
FSTOCKLOCID int null,
FSRCBILLTYPE varchar(36) null,
FSRCINTERID int null,
FSRCBILLNO nvarchar(80) null,
FSRCENTRYID int null,
FSRCENTRYSEQ int null,
FMOID int null,
FMOBILLNO nvarchar(80) null,
FMOENTRYID int null,
FMOENTRYSEQ int null,
FPPBOMENTRYID int null,
FPPBOMBILLNO nvarchar(80) null,
FMTONO nvarchar(255) null,
FPROJECTNO nvarchar(80) null,
FLOT int null,
FLOT_TEXT nvarchar(255) null,
FOPERID int null,
FPROCESSID int null,
FPRICE decimal(19,6) not null default 0,
FAMOUNT decimal(19,6) not null default 0,
FCURRID int null,
FSTOCKSTATUSID int null,
FPRODUCEDATE datetime null,
FEXPIRYDATE datetime null,
FKEEPERTYPEID varchar(36) null,
FKEEPERID int null,
FSTOCKFLAG char(1) null,
FOWNERTYPEID varchar(36) null,
FOWNERID int null,
FWORKSHOPID int null,
FPARENTOWNERTYPEID varchar(36) null,
FPARENTOWNERID int null,
FBFLOWID varchar(36) not null default '',
constraint PK_PRD_RETURNMTRLENTRY primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'和供应链保持一致，表体冗余',
'user', @CurrentUser, 'table', 'T_PRD_RETURNMTRLENTRY', 'column', 'FOWNERTYPEID'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'和供应链保持一致，表体冗余',
'user', @CurrentUser, 'table', 'T_PRD_RETURNMTRLENTRY', 'column', 'FOWNERID'
go
/*==============================================================*/
/* Index: IDX_PRD_RME_ID */
/*==============================================================*/
create index IDX_PRD_RME_ID on T_PRD_RETURNMTRLENTRY (
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_PRD_RME_MTRLID */
/*==============================================================*/
create index IDX_PRD_RME_MTRLID on T_PRD_RETURNMTRLENTRY (
FMATERIALID ASC
)
go
/*==============================================================*/
/* Index: IDX_PRD_RME_MOENTRYID */
/*==============================================================*/
create index IDX_PRD_RME_MOENTRYID on T_PRD_RETURNMTRLENTRY (
FMOENTRYID ASC
)
go

### T_PRD_RETURNMTRLENTRY(退料单表体)：键值定义

名称 | 代码 | 主要的
PK_PRD_RETURNMTRLENTRY | PK_PRD_RETURNMTRLENTRY | TRUE

### T_PRD_RETURNMTRLENTRY(退料单表体)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_PRD_RME_ID | IDX_PRD_RME_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_PRD_RETURNMTRLENTRY(退料单表体)
IDX_PRD_RME_MTRLID | IDX_PRD_RME_MTRLID | FALSE | FALSE | FALSE | FALSE | FALSE | T_PRD_RETURNMTRLENTRY(退料单表体)
IDX_PRD_RME_MOENTRYID | IDX_PRD_RME_MOENTRYID | FALSE | FALSE | FALSE | FALSE | FALSE | T_PRD_RETURNMTRLENTRY(退料单表体)

上一页

主页

下一页