苏州瑞玛APS项目web后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
5.9 KiB

// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
package ap
import (
"leit.com/LAPP_CHEERSSON_BACKEND/grmi"
"xorm.io/core"
)
/******************************************************************************
*
* @Struct Name : ArticleDemand
*-----------------------------------------------------------------------------
*
* @Description : ArticleDemand的实体映射
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-08 17:47:11
*
******************************************************************************/
type ArticleDemand struct {
PlantNr int `xorm:"pk int 'PlantNr'" json:"AP_ArticleDemand-PlantNr"`
ArtId string `xorm:"pk nvarchar(40) 'ArtId'" json:"AP_ArticleDemand-ArtId"` //零件号
DemandKey string `xorm:"pk int 'DemandKey'" json:"AP_ArticleDemand-DemandKey"` //格式 2021.1 表示2021年第一
DemandPeriodType string `xorm:"nvarchar(1) 'DemandPeriodType' not null" json:"AP_ArticleDemand-DemandPeriodType"` // W 周 Y 年 M 月
CustomerId string `xorm:"nvarchar(40) 'CustomerId' not null" json:"AP_ArticleDemand-CustomerId"` //客户
DemandDate grmi.Date `xorm:"date 'DemandDate' not null" json:"AP_ArticleDemand-DemandDate"` //日期
DemandYear int `xorm:"int 'DemandYear' not null" json:"AP_ArticleDemand-DemandYear"` //年
DemandWeek int `xorm:"int 'DemandWeek' not null" json:"AP_ArticleDemand-DemandWeek"` //月
DemandMonth int `xorm:"int 'DemandMonth' not null" json:"AP_ArticleDemand-DemandMonth"` //日
ForecastDemandQty float64 `xorm:"float 'ForecastDemandQty'" json:"AP_ArticleDemand-ForecastDemandQty"` //预测需求
OrderQty float64 `xorm:"float 'OrderQty'" json:"AP_ArticleDemand-OrderQty"` //订单需求
OutSourcingQty float64 `xorm:"float 'OutSourcingQty'" json:"AP_ArticleDemand-OutSourcingQty"` //外购需求
IndependentDemandQty float64 `xorm:"float 'IndependentDemandQty'" json:"AP_ArticleDemand-IndependentDemandQty"` //独立需求
WipQty float64 `xorm:"float 'WipQty'" json:"AP_ArticleDemand-WipQty"` //在制量
OpeningInventory float64 `xorm:"float 'OpeningInventory'" json:"AP_ArticleDemand-OpeningInventory"` //期初库存
TargetInventory float64 `xorm:"float 'TargetInventory'" json:"AP_ArticleDemand-TargetInventory"` //目标库存
MinInventory float64 `xorm:"float 'MinInventory'" json:"AP_ArticleDemand-MinInventory"` //最低库存
NetDemandQty float64 `xorm:"float 'NetDemandQty'" json:"AP_ArticleDemand-NetDemandQty"` // 净生产量 mps
EndingInventory float64 `xorm:"float 'EndingInventory'" json:"AP_ArticleDemand-EndingInventory"` //期末库存
PublishedVersionNr string `xorm:"nvarchar(40) 'PublishedVersionNr'" json:"AP_ArticleDemand-PublishedVersionNr"` //期末库存
Status int `xorm:"int 'Status' not null" json:"AP_ArticleDemand-Status"` //0未发布 1 发布中 2 已发布
ZaituQty float64 `xorm:"float 'ZaituQty'" json:"AP_ArticleDemand-ZaituQty"` //在途量
WeiwaiQty float64 `xorm:"float 'WeiwaiQty'" json:"AP_ArticleDemand-WeiwaiQty"` //委外量
//不显示
OriginOutSourcingQty float64 `xorm:"float 'OriginOutSourcingQty'" json:"AP_ArticleDemand-OriginOutSourcingQty"` //原始外购需求
MidBatchQuantity int `xorm:"-" json:"AP_ArticleDemand-MidBatchQuantity"` //每次削减量
ResourceId string `xorm:"nvarchar(40) 'ResourceId' not null" json:"AP_ArticleDemand-ResourceId"` // 资源Id
ProjectId string `xorm:"nvarchar(40) 'ProjectId' not null" json:"AP_ArticleDemand-ProjectId"`
Status1 int `xorm:"int 'Status1' not null" json:"AP_ArticleDemand-Status1"`
Status2 int `xorm:"int 'Status2' not null" json:"AP_ArticleDemand-Status2"`
LastModify grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"AP_ArticleDemand-LastModify"`
LastUser string `xorm:"nvarchar(20) 'LastUser' not null" json:"AP_ArticleDemand-LastUser"`
CreateTime grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"AP_ArticleDemand-CreateTime"`
NeedQty float64 `xorm:"-" json:"AP_ArticleDemand-NeedQty"` //需求
MpsWorkTime float64 `xorm:"-" json:"AP_ArticleDemand-MpsWorkTime"` //mps产能 单位hour
MinCoverPeriod float64 `xorm:"-" json:"AP_ArticleDemand-MinCoverPeriod"`
MaxCoverPeriod float64 `xorm:"-" json:"AP_ArticleDemand-MaxCoverPeriod"`
MinCoverPeriodType string `xorm:"-" json:"AP_ArticleDemand-MinCoverPeriodType"`
ResourceWorkTime float64 `xorm:"-" json:"AP_ArticleDemand-ResourceWorkTime"` //资源产量
CanWrite bool `xorm:"-" json:"AP_ArticleDemand-CanWrite"` //是否可以编辑
LockWeeks int `xorm:"-" json:"AP_ArticleDemand-LockWeeks"` //前置期
}
/******************************************************************************
*
* @Function Name : GetKey
*-----------------------------------------------------------------------------
*
* @Description : 获取实体的主键
*
* @Return Value : 实体的主键
*
* @Author : 代码生成器创建
*
* @Date : 2021-10-08 17:47:11
*
******************************************************************************/
func (self *ArticleDemand) GetKey() core.PK {
return core.PK{self.PlantNr, self.ArtId, self.DemandKey}
}