using RB_MES_API.Context; using System.ComponentModel.DataAnnotations; namespace RB_MES_API.Models.Cloud { public class SUB_PPBOMChange { /// /// 实体主键(无需填写,保存时自动添加) /// public int FID { get; set; } /// /// 单据编号 /// [StringLength(36)] public string FBillNo { get; set; } /// /// 单据类型 (必填项) /// public Dictionary FBillType { get; set; } = new Dictionary() { { "FNUMBER", "WWYLQDBGD01_SYS" } }; /// /// 日期 (必填项) /// [DataType(DataType.DateTime)] public string FDate { get; set; } = DateTime.Now.ToShortDateString(); /// /// 产品编码 (必填项) /// public Dictionary FMaterialID { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 数量 (必填项) /// public decimal FQty { get; set; } /// /// BOM版本 /// public Dictionary FBOMID { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 供应商 (必填项) /// public Dictionary FSupplierId { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 产品货主类型 /// [StringLength(36)] public string FParentOwnerTypeId { get; set; } = "BD_OwnerOrg"; /// /// 产品货主 /// public Dictionary FParentOwnerId { get; set; } = new Dictionary() { { "FNUMBER", LocalStaticRequest.DefaultOrg } }; /// /// 委外组织 (必填项) /// public Dictionary FSubOrgId { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 变更原因 /// public Dictionary FChangeReason { get; set; } = new Dictionary() { { "FNUMBER", "" } }; ///// ///// 备注 ///// //[StringLength(36)] //public string FDescription { get; set; } = "MES系统推送"; /// /// 委外订单内码 /// public int FSubReqId { get; set; } /// /// 委外订单行号 /// public int FSubReqEntrySeq { get; set; } /// /// 委外订单分录内码 /// public int FSubReqEntryId { get; set; } /// /// 委外订单编号 /// public string FSubReqBillNO { get; set; } /// /// 产品基本单位数量 /// public decimal FBASEQTY { get; set; } /// /// 委外订单类型 /// public Dictionary FSubReqType { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 产品基本单位 /// public Dictionary FBaseUnitID { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 单位 (必填项) /// public Dictionary FUnitID { get; set; } = new Dictionary() { { "FNUMBER", "" } }; public List FEntity { get; set; } = new List(); public class Entity { public bool FISMinIssueQty { get; set; } = false; /// /// 父级行主键 /// public string FParentRowId { get; set; } public int FSeq { get; set; } /// /// 项次,替代主料的行号 /// public int FReplaceGroup { get; set; } /// /// 实体主键(无需填写,保存时自动添加) /// public int FEntryID { get; set; } /// /// 变更类型 /// public string FChangeType { get; set; } /// /// 子项物料编码 (必填项) /// public Dictionary FMaterialID2 { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 分子 /// public decimal FNumerator { get; set; } = 1; /// /// 分母 /// public decimal FDenominator { get; set; } = 1; /// /// 子项单位 (必填项) /// public Dictionary FUnitID2 { get; set; } = new Dictionary() { { "FNUMBER", "" } }; /// /// 产品生产数量 /// public decimal FProduceQty { get; set; } /// /// 用量类型 /// public int FDosageType { get; set; } = 2; /// /// 需求日期 (必填项) /// [DataType(DataType.DateTime)] public string FNeedDate2 { get; set; } = DateTime.Now.ToShortDateString(); /// /// 子项类型 (必填项) /// [StringLength(36)] public string FMaterialType { get; set; } = "1"; /// /// 委外订单编号 /// public string FSubReqBillNO1 { get; set; } /// /// 委外订单分录行号 /// public int FSubReqEntrySeq1 { get; set; } /// /// 委外订单内码 /// public int FSubReqId1 { get; set; } /// /// 委外订单分录内码 /// public int FSubReqEntryId1 { get; set; } /// /// 委外用料清单内码 /// public int FSUBPPBOMId { get; set; } /// /// 委外用料清单分录内码 /// public int FSUBPPBOMEntryId { get; set; } /// /// 委外用料清单行号 /// public int FSUBPPBOMEntrySeq { get; set; } /// /// 委外用料清单单编号 /// public string FSUBPPBOMNo { get; set; } /// /// 货主类型 /// public string FOwnerTypeId { get; set; } = "BD_OwnerOrg"; /// /// 供应类型 /// public string FSupplyType { get; set; } = "C"; /// /// 货主 (必填项) /// public Dictionary FOwnerID { get; set; } = new Dictionary() { { "FNUMBER", LocalStaticRequest.DefaultOrg } }; ///// ///// 源单编号 ///// //public string FSrcBillNo { get; set; } //以下默认 /// /// 发料方式 /// public int FIssueType { get; set; } = 1; /// /// 超发控制方式 /// public int FOverControlMode { get; set; } = 1; /// /// 发料组织 (必填项) /// public Dictionary FSupplyOrg { get; set; } = new Dictionary() { { "FNUMBER", LocalStaticRequest.DefaultOrg } }; /// /// 替代策略 /// public string FReplacePolicy { get; set; } /// /// 替代方式 /// public string FReplaceType { get; set; } /// /// 替代优先级 /// public int FReplacePriority { get; set; } /// /// 位置号 /// public string FPositionNO { get; set; } /// /// 替代主料 /// public int FIsKeyItem { get; set; } /// /// 使用比例 /// public Decimal FUseRate { get; set; } public int FRowExpandType { get; set; } = 16; /// /// 需求数量 /// public decimal FNeedQty2 { get; set; } /// /// 应发数量 /// public decimal FMustQty { get; set; } ///// ///// 标准用量 ///// //public decimal FSTDQTY { get; set; } /// /// MRP运算 /// public bool FIsMrpRun { get; set; } = true; /// /// 指定项次 /// public int FInsertRow { get; set; } public List FEntity_Link { get; set; } public class Entity_Link { /// /// 实体主键,新建时为空,由系统自动填充 /// public string FLinkId { get; set; } public string FEntity_Link_FFlowId { get; set; } public string FEntity_Link_FFlowLineId { get; set; } public string FEntity_Link_FRuleId { get; set; } = "SUB_PPBOM2PPBOMCHANGE"; public int FEntity_Link_FSTableId { get; set; } public string FEntity_Link_FSTableName { get; set; } = "T_SUB_PPBOMENTRY"; /// /// 系统源单内码 /// public int FEntity_Link_FSBillId { get; set; } //委外用料清单内码... /// /// 系统源单分录内码 /// public int FEntity_Link_FSId { get; set; } //委外用料清单分录内码... public decimal FEntity_Link_FBaseStdQtyOld { get; set; } //原始携带量 public decimal FEntity_Link_FBaseStdQty { get; set; } //修改携带量 } } } }