using RB_MES_API.Context;
using System.ComponentModel.DataAnnotations;
namespace RB_MES_API.Models.Cloud
{
///
/// 工单物料需求
///
public class PRD_PPBOM
{
///
/// 实体主键(无需填写,保存时自动添加)
///
public int FID { get; set; }
///
/// 单据编号
///
[StringLength(36)]
public string FBillNo { get; set; }
///
/// 产品编码 (必填项)
///
public Dictionary FMaterialID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 辅助属性
///
public AuxPropIDHead FAuxPropIDHead = new AuxPropIDHead();
public class AuxPropIDHead
{
public Dictionary FAUXPROPIDHEAD__FF100001 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
}
///
/// 生产组织 (必填项)
///
public Dictionary FPrdOrgId { get; set; } = new Dictionary() { { "FNumber", LocalStaticRequest.DefaultOrg } };
///
/// 生产车间 (必填项)
///
public Dictionary FWorkshopID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 数量 (必填项)
///
public decimal FQty { get; set; }
///
/// 生产订单分录内码 (必填项)
///
public long FMOEntryID { get; set; }
///
/// 单位 (必填项)
///
public Dictionary FUnitID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 生产订单类型
///
public Dictionary FMOType { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 生产订单编号 (必填项)
///
[StringLength(36)]
public string FMOBillNO { get; set; }
///
/// 生产订单行号
///
public long FMOEntrySeq { get; set; }
///
/// 备注
///
[StringLength(36)]
public string FDescription { get; set; }
///
/// 基本单位数量
///
public decimal FBaseQty { get; set; }
///
/// 生产订单内码
///
public long FMoId { get; set; }
///
/// 基本单位
///
public Dictionary FBaseUnitID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 产品货主类型
///
[StringLength(36)]
public string FParentOwnerTypeId { get; set; }
///
/// 产品货主
///
public Dictionary FParentOwnerId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 委托组织
///
public Dictionary FEntrustOrgId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 生产订单行镜像
///
public Dictionary FMoEntryMirror { get; set; } = new Dictionary() { { "FNUMBER", "" } };
public Dictionary FBOMID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 销售订单ID
///
public long FSaleOrderId { get; set; }
///
/// 销售订单行号
///
public long FSaleOrderEntrySeq { get; set; }
///
/// 销售订单分录内码
///
public long FSaleOrderEntryId { get; set; }
///
/// 销售订单
///
[StringLength(36)]
public string FSALEORDERNO { get; set; }
///
/// 需求来源
///
[StringLength(36)]
public string FReqSrc { get; set; }
///
/// BOM日期
///
[DataType(DataType.Date)]
public string FGeneRateDate { get; set; }
///
/// 库存日期
///
[DataType(DataType.Date)]
public string FInventoryDate { get; set; }
///
/// 期初生产订单
///
public bool FIsQCMo { get; set; } = true;
public List FEntity { get; set; } = new List();
///
/// 子项明细
///
public class Entity
{
public int FSeq { get; set; }
///
/// 实体主键(无需填写,保存时自动添加)
///
public long FEntryID { get; set; } = 0;
///
/// 子项物料编码 (必填项)
///
public Dictionary FMaterialID2 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 子项类型 (必填项)
///
[StringLength(36)]
public string FMaterialType { get; set; } = "1";
///
/// 供应类型
///
[StringLength(36)]
public string FSupplyType { get; set; }
///
/// 用量类型 (必填项)
///
[StringLength(36)]
public string FDosageType { get; set; } = "2";
///
/// 分子
///
public long FNumerator { get; set; }
///
/// 分母
///
public long FDenominator { get; set; }
///
/// 子项单位 (必填项)
///
public Dictionary FUnitID2 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 固定损耗
///
public long FFixScrapQty { get; set; }
///
/// 变动损耗率%
///
public long FScrapRate { get; set; }
///
/// 需求日期
///
public string FNeedDate2 { get; set; }
///
/// 发料组织 (必填项)
///
public Dictionary FSupplyOrg { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 是否关键件
///
public bool FIsKeyComponent { get; set; } = false;
///
/// BOM版本
///
public Dictionary FBomId2 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 是否超发
///
public bool FAllowOver { get; set; } = false;
///
/// 子项工作日历
///
public Dictionary FWorkCalId2 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 基本单位分子
///
public long FBaseNumerator { get; set; }
///
/// 预留类型 (必填项)
///
[StringLength(36)]
public string FReserveType { get; set; } = "1";
///
/// 基本单位固定损耗数量
///
public long FBaseFixScrapQTY { get; set; }
///
/// 辅助属性
///
public AuxPropID FAuxPropID = new AuxPropID();
public class AuxPropID
{
public Dictionary FAUXPROPID__FF100001 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
}
///
/// 基本单位分母
///
public long FBASEDENOMINATOR { get; set; }
///
/// 超发控制方式 (必填项)
///
[StringLength(36)]
public string FOverControlMode { get; set; } = "1";
///
/// 货源
///
public Dictionary FSMId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 货源分录
///
public long FSMEntryId { get; set; }
///
/// 供应组织
///
public Dictionary FChildSupplyOrgId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 工序序列
///
[StringLength(36)]
public string FOptQueue { get; set; }
///
/// 库存状态
///
public Dictionary FStockStatusId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 产品货主
///
public Dictionary FEntrustPickOrgId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 工序
///
public long FOperID { get; set; }
///
/// 批号
///
public Dictionary FLot { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 偏置提前期
///
public long FOffsetTime { get; set; }
///
/// 偏置提前期单位 (必填项)
///
[StringLength(36)]
public string FTimeUnit2 { get; set; } = "1";
///
/// 作业
///
public Dictionary FProcessID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 发料方式 (必填项)
///
[StringLength(36)]
public string FIssueType { get; set; } = "1";
///
/// 仓库
///
public Dictionary FStockID { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 仓位
///
public class FStockLOCID
{
public Dictionary FSTOCKLOCID__FF100001 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
public Dictionary FSTOCKLOCID__FF100002 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
}
///
/// 拨出组织
///
public Dictionary FSrcTransOrgId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 拨出仓库
///
public Dictionary FSrcTransStockId { get; set; } = new Dictionary() { { "FNUMBER", "" } };
///
/// 拨出仓位
///
public class FSrcTransStockLocId
{
public Dictionary FSRCTRANSSTOCKLOCID__FF100001 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
public Dictionary FSRCTRANSSTOCKLOCID__FF100002 { get; set; } = new Dictionary() { { "FNUMBER", "" } };
}
///
/// 位置号
///
public string FPositionNO { get; set; }
///
/// 未领数量
///
public decimal FNoPickedQty { get; set; }
///
/// 可用库存
///
public decimal FInventoryQty { get; set; }
///
/// 跳层
///
public bool FIsSkip { get; set; } = false;
///
/// 领料考虑最小发料批量
///
public bool FISMinIssueQty { get; set; } = false;
///
/// 是否发损耗
///
public bool FIsGetScrap { get; set; } = false;
///
/// 用料清单类型
///
[StringLength(36)]
public string FPPBomEntryType { get; set; }
///
/// 最后更新人
///
public Dictionary FUPDATERID { get; set; } = new Dictionary() { { "FUserID", "" } };
///
/// 最后更新时间
///
[DataType(DataType.Date)]
public string FUPDateDate { get; set; }
///
/// 货主类型
///
[StringLength(36)]
public string FOwnerTypeId { get; set; } //= "BD_OwnerOrg";
///
/// 供料方式
///
[StringLength(36)]
public string FSupplyMode { get; set; }
///
/// 基本单位未领数量
///
public decimal FBaseNoPickedQty { get; set; }
///
/// MRP运算
///
public bool FIsMrpRun { get; set; } = true;
///
/// 原用料清单内码
///
public long FSrcPPBOMID { get; set; }
///
/// 原用料清单分录内码
///
public long FSrcPPBOMEntryId { get; set; }
///
/// 备料数量
///
public decimal FStockReadyQty { get; set; }
///
/// 基本单位备料数量
///
public decimal FBaseStockReadyQty { get; set; }
///
/// 子项基本单位
///
public Dictionary FBaseUnitID1 { get; set; } = new Dictionary() { { "FNumber", "" } };
///
/// 开单未退数量
///
public decimal FReturnNoOkQty { get; set; }
///
/// 生产订单类型
///
public Dictionary FMoType1 { get; set; } = new Dictionary() { { "FNumber", "" } };
///
/// 货主
///
public Dictionary FOwnerID { get; set; } = new Dictionary() { { "FNumber", "" } };
///
/// 分组货主
///
public Dictionary FGroupByOwnerId { get; set; } = new Dictionary() { { "FNumber", "" } };
///
/// 是否展开
///
public bool FIsExpand { get; set; } = false;
///
/// 生产退料检验
///
public bool FCheckReturnMtrl { get; set; } = false;
///
/// 基本单位生产退料请检选单数量
///
public decimal FBaseReturnAppSelQty { get; set; }
///
/// 生产退料请检选单数量
///
public decimal FReturnAppSelQty { get; set; }
///
/// 累计成品率
///
public decimal FBillAccuYieldRate { get; set; }
///
/// 应发数量
///
public decimal FMustQty { get; set; }
///
/// 需求数量
///
public decimal FNeedQty2 { get; set; }
///
/// 应发数量(最小发料批量)
///
public decimal FMinIssueQty { get; set; }
///
/// 基本单位应发数量(最小发料批量)
///
public decimal FBaseMinIssueQty { get; set; }
///
/// 初始化数量
///
public decimal FALLOCATEQTY { get; set; }
///
/// 基本单位初始化数量
///
public decimal FBASEALLOCATEQTY { get; set; }
///
/// 替代策略
///
public string FReplacePolicy { get; set; } = string.Empty;
///
/// 替代方式
///
public string FReplaceType { get; set; }
///
/// 替代优先级
///
public int FReplacePriority { get; set; }
///
/// 替代主料
///
public int FIsKeyItem { get; set; }
///
/// 项次,替代主料的行号
///
public int FReplaceGroup { get; set; }
///
/// 使用比例
///
public decimal FUseRate { get; set; } = 100;
public int FRowExpandType { get; set; } = 16;
}
}
}