MFG制造

## 数据表：T_PLN_FORECASTENTRY(预测单表体)

### T_PLN_FORECASTENTRY(预测单表体)：描述

名称 | T_PLN_FORECASTENTRY(预测单表体)
代码 | T_PLN_FORECASTENTRY
注释 |
模型 | MFG制造
主键 | pk_PLN_FORECASTENTRY

### T_PLN_FORECASTENTRY(预测单表体)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键 | FENTRYID | int |  | TRUE |
单据内码 | FID | int |  | FALSE |
行号 | FSEQ | int |  | FALSE |
客户名称 | FCUSTID | int |  | FALSE |
物料代码 | FMATERIALID | int |  | FALSE |
BOM编号 | FBOMID | int |  | FALSE |
单位 | FUNITID | int |  | FALSE |
数量 | FQTY | decimal(23,10) | 23 | FALSE |
优先级 | FPRIORITY | int |  | TRUE |
预测开始日期 | FSTARTDATE | datetime |  | FALSE |
预测结束日期 | FENDDATE | datetime |  | FALSE |
计划跟踪号 | FMTONO | nvarchar(255) | 255 | FALSE |
订单关联数量 | FORDERQTY | decimal(23,10) | 23 | FALSE |
冲销执行数量 | FWRITEOFFQTY | decimal(23,10) | 23 | FALSE |
备注 | FREMARK | nvarchar(255) | 255 | FALSE |
基本计量单位 | FBASEUNITID | int |  | FALSE |
基本单位数量 | FBASEQTY | decimal(23,10) | 23 | FALSE |
基本单位订单关联数量 | FBASEORDERQTY | decimal(23,10) | 23 | FALSE |
基本单位冲销执行数量 | FBASEWRITEOFFQTY | decimal(23,10) | 23 | FALSE |
预留类型 | FRESERVETYPE | char(1) | 1 | FALSE | 与物料上的枚举数值保持一致
辅助属性 | FAUXPROPID | int |  | FALSE |
业务流程 | FBFLOWID | varchar(36) | 36 | FALSE |
关闭状态 | FCLOSESTATUS | char(1) | 1 | FALSE |
均化类型 | FAVERATYPE | char(1) | 1 | TRUE | D:天,W:周,M:月,N:不均化
均化周期 | FAVERACYCLE | int |  | TRUE |
关联生产委外数量 | FSELPRDQTY | decimal(23,10) | 23 | TRUE |
基本单位关联生产委外数量 | FBASESELPRDQTY | decimal(23,10) | 23 | TRUE |
供应组织 | FSUPPLYORGID | int |  | FALSE |
库存组织 | FSTOCKORGID | int |  | FALSE |
货主类型 | FOWNERTYPEID | varchar(36) | 36 | FALSE |
货主 | FOWNERID | int |  | FALSE |
产品类型 | FPRODUCTTYPE | char(1) | 1 | TRUE |
父项分录ID | FPARENTROWID | varchar(36) | 36 | FALSE |
分录ID | FROWID | varchar(36) | 36 | FALSE |
父项物料 | FPARENTMTRLID | int |  | TRUE |

### T_PLN_FORECASTENTRY(预测单表体)：脚本代码

if exists (select 1
from sysindexes
where id = object_id('T_PLN_FORECASTENTRY')
and name = 'idx_PLN_FOREE_FENDDATE'
and indid > 0
and indid < 255)
drop index T_PLN_FORECASTENTRY.idx_PLN_FOREE_FENDDATE
go
if exists (select 1
from sysindexes
where id = object_id('T_PLN_FORECASTENTRY')
and name = 'idx_PLN_FOREE_FSTARTDATE'
and indid > 0
and indid < 255)
drop index T_PLN_FORECASTENTRY.idx_PLN_FOREE_FSTARTDATE
go
if exists (select 1
from sysindexes
where id = object_id('T_PLN_FORECASTENTRY')
and name = 'idx_PLN_FOREE_FMATERIAID'
and indid > 0
and indid < 255)
drop index T_PLN_FORECASTENTRY.idx_PLN_FOREE_FMATERIAID
go
if exists (select 1
from sysindexes
where id = object_id('T_PLN_FORECASTENTRY')
and name = 'idx_PLN_FOREE_FCUSTOMID'
and indid > 0
and indid < 255)
drop index T_PLN_FORECASTENTRY.idx_PLN_FOREE_FCUSTOMID
go
if exists (select 1
from sysindexes
where id = object_id('T_PLN_FORECASTENTRY')
and name = 'idx_PLN_FOREE_FID'
and indid > 0
and indid < 255)
drop index T_PLN_FORECASTENTRY.idx_PLN_FOREE_FID
go
if exists (select 1
from sysobjects
where id = object_id('T_PLN_FORECASTENTRY')
and type = 'U')
drop table T_PLN_FORECASTENTRY
go
/*==============================================================*/
/* Table: T_PLN_FORECASTENTRY */
/*==============================================================*/
create table T_PLN_FORECASTENTRY (
FENTRYID int not null default 0,
FID int null,
FSEQ int null,
FCUSTID int null,
FMATERIALID int null,
FBOMID int null,
FUNITID int null,
FQTY decimal(23,10) null,
FPRIORITY int not null default 0,
FSTARTDATE datetime null,
FENDDATE datetime null,
FMTONO nvarchar(255) null,
FORDERQTY decimal(23,10) null,
FWRITEOFFQTY decimal(23,10) null,
FREMARK nvarchar(255) null,
FBASEUNITID int null,
FBASEQTY decimal(23,10) null,
FBASEORDERQTY decimal(23,10) null,
FBASEWRITEOFFQTY decimal(23,10) null,
FRESERVETYPE char(1) null default '',
FAUXPROPID int null,
FBFLOWID varchar(36) null default ' ',
FCLOSESTATUS char(1) null default '0',
FAVERATYPE char(1) not null default 'N',
FAVERACYCLE int not null default 1,
FSELPRDQTY decimal(23,10) not null default 0,
FBASESELPRDQTY decimal(23,10) not null default 0,
FSUPPLYORGID int null,
FSTOCKORGID int null,
FOWNERTYPEID varchar(36) null,
FOWNERID int null,
FPRODUCTTYPE char(1) not null default '0',
FPARENTROWID varchar(36) null,
FROWID varchar(36) null,
FPARENTMTRLID int not null default 0,
constraint PK_PLN_FORECASTENTRY primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'与物料上的枚举数值保持一致',
'user', @CurrentUser, 'table', 'T_PLN_FORECASTENTRY', 'column', 'FRESERVETYPE'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'D:天,W:周,M:月,N:不均化',
'user', @CurrentUser, 'table', 'T_PLN_FORECASTENTRY', 'column', 'FAVERATYPE'
go
/*==============================================================*/
/* Index: idx_PLN_FOREE_FID */
/*==============================================================*/
create index idx_PLN_FOREE_FID on T_PLN_FORECASTENTRY (
FID ASC
)
go
/*==============================================================*/
/* Index: idx_PLN_FOREE_FCUSTOMID */
/*==============================================================*/
create index idx_PLN_FOREE_FCUSTOMID on T_PLN_FORECASTENTRY (
FCUSTID ASC
)
go
/*==============================================================*/
/* Index: idx_PLN_FOREE_FMATERIAID */
/*==============================================================*/
create index idx_PLN_FOREE_FMATERIAID on T_PLN_FORECASTENTRY (
FMATERIALID ASC
)
go
/*==============================================================*/
/* Index: idx_PLN_FOREE_FSTARTDATE */
/*==============================================================*/
create index idx_PLN_FOREE_FSTARTDATE on T_PLN_FORECASTENTRY (
FSTARTDATE ASC
)
go
/*==============================================================*/
/* Index: idx_PLN_FOREE_FENDDATE */
/*==============================================================*/
create index idx_PLN_FOREE_FENDDATE on T_PLN_FORECASTENTRY (
FENDDATE ASC
)
go

### T_PLN_FORECASTENTRY(预测单表体)：键值定义

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

### T_PLN_FORECASTENTRY(预测单表体)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
idx_PLN_FOREE_FID | idx_PLN_FOREE_FID | FALSE | FALSE | FALSE | FALSE | FALSE | T_PLN_FORECASTENTRY(预测单表体)
idx_PLN_FOREE_FCUSTOMID | idx_PLN_FOREE_FCUSTOMID | FALSE | FALSE | FALSE | FALSE | FALSE | T_PLN_FORECASTENTRY(预测单表体)
idx_PLN_FOREE_FMATERIAID | idx_PLN_FOREE_FMATERIAID | FALSE | FALSE | FALSE | FALSE | FALSE | T_PLN_FORECASTENTRY(预测单表体)
idx_PLN_FOREE_FSTARTDATE | idx_PLN_FOREE_FSTARTDATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_PLN_FORECASTENTRY(预测单表体)
idx_PLN_FOREE_FENDDATE | idx_PLN_FOREE_FENDDATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_PLN_FORECASTENTRY(预测单表体)

上一页

主页

下一页