using RB_MES_API.Context;
using System.ComponentModel.DataAnnotations;
namespace RB_MES_API.Models.Cloud
{
///
/// 生产入库单
///
public class PRD_INSTOCK
{
///
/// 实体主键(无需填写,保存时自动添加)
///
public int FID { get; set; }
///
/// 单据类型 (必填项)
///
public Dictionary FBillType { get; set; } = new Dictionary() {
{ "FNUMBER","SCRKD02_SYS"}
};
///
/// 日期 (必填项)
///
[DataType(DataType.DateTime)]
public string FDate { get; set; } = DateTime.Now.ToShortDateString();
///
/// 入库组织 (必填项)
///
public Dictionary FStockOrgId { get; set; } = new Dictionary() {
{ "FNUMBER",LocalStaticRequest.DefaultOrg}
};
///
/// 仓库
///
public Dictionary FStockId0 { get; set; } = new Dictionary() {
{ "FNUMBER",""}
};
///
/// 生产组织
///
public Dictionary FPrdOrgId { get; set; } = new Dictionary() {
{ "FNUMBER",""}
};
///
/// 车间
///
public Dictionary FWorkShopId { get; set; } = new Dictionary() {
{ "FNUMBER",""}
};
///
/// 货主类型
///
[StringLength(36)]
public string FOwnerTypeId0 { get; set; } = "BD_OwnerOrg";
///
/// 货主 (必填项)
///
public Dictionary FOwnerId0 { get; set; } = new Dictionary() {
{ "FNUMBER",""}
};
///
/// 仓管员
///
public Dictionary FSTOCKERID { get; set; } = new Dictionary() {
{ "FNAME",""}
};
///
/// 备注
///
[StringLength(36)]
public string FDescription { get; set; }
///
/// 组织委托加工
///
public bool FIsEntrust { get; set; } = false;
///
/// 本位币
///
public Dictionary FCurrId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 委托组织入库单Id
///
public int FEntrustInStockId { get; set; }
///
/// 序列号上传
///
[StringLength(36)]
public string FScanBox { get; set; }
///
/// MES唯一标识
///
[StringLength(36)]
public string F_SBMI_QUEUE_ID { get; set; }
public List FEntity { get; set; } = new List();
///
/// 明细
///
public class Entity
{
///
/// 实体主键
///
public int FEntryID { get; set; }
///
/// 源单分录内码
///
public int FSrcEntryId { get; set; }
///
/// 辅助属性
///
public AuxpropId FAuxPropId { get; set; }
public class AuxpropId
{
public Dictionary FAUXPROPID__FF100001 { get; set; } = new Dictionary() {
{ "FNumber",""} };
}
///
/// 是否新增行
///
public bool FIsNew { get; set; } = false;
///
/// 物料编码 (必填项)
///
public Dictionary FMaterialId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 产品检验(弃用)
///
public bool FCheckProduct { get; set; } = false;
///
/// 产品类型
///
[StringLength(36)]
public string FProductType { get; set; }
///
/// 入库类型 (必填项)
///
[StringLength(36)]
public string FInStockType { get; set; }
///
/// 单位 (必填项)
///
public Dictionary FUnitID { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 应收数量
///
public decimal FMustQty { get; set; }
///
/// 实收数量
///
public decimal FRealQty { get; set; }
///
/// 成本权重
///
public int FCostRate { get; set; }
///
/// 基本单位 (必填项)
///
public Dictionary FBaseUnitId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 基本单位应收数量
///
public decimal FBaseMustQty { get; set; }
///
/// 基本单位库存实收数量
///
public decimal FBaseRealQty { get; set; }
///
/// 货主类型 (必填项)
///
[StringLength(36)]
public string FOwnerTypeId0 { get; set; }
///
/// 货主 (必填项)
///
public Dictionary FOwnerId { get; set; } = new Dictionary() {
{ "FNumber",LocalStaticRequest.DefaultOrg}
};
///
/// 仓库 (必填项)
///
public Dictionary FStockId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
public StockLocId FStockLocId { get; set; }
///
/// 仓位
///
public class StockLocId
{
public Dictionary FSTOCKLOCID__FF100001 { get; set; } = new Dictionary() {
{ "FNumber",""}
};
public Dictionary FSTOCKLOCID__FF100002 { get; set; } = new Dictionary() {
{ "FNumber",""}
};
}
///
/// BOM版本
///
public Dictionary FBomId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 批号
///
public Dictionary FLot { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 倒冲领料
///
public bool FISBACKFLUSH { get; set; } = false;
///
/// 计划跟踪号
///
[StringLength(36)]
public string FMtoNo { get; set; }
///
/// 项目编号
///
[StringLength(36)]
public string FProjectNo { get; set; }
///
/// 生产车间
///
public Dictionary FWorkShopId1 { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 产线
///
public Dictionary FLINEID { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 班组
///
public Dictionary FShiftGroupId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 生产订单编号 (必填项)
///
[StringLength(36)]
public string FMoBillNo { get; set; }
///
/// 生产订单内码
///
public int FMoId { get; set; }
///
/// 生产订单分录内码
///
public int FMoEntryId { get; set; }
///
/// 生产订单行号
///
public int FMoEntrySeq { get; set; }
///
/// 备注
///
[StringLength(36)]
public string FMemo { get; set; }
///
/// 辅助属性
///
// public class FAuxpropId
// {
// public Dictionary FAUXPROPID__FF100002 { get; set; } = new Dictionary() {
// { "FNumber",""}
//};
// }
///
/// 库存单位
///
public Dictionary FStockUnitId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 库存单位实收数量
///
public decimal FStockRealQty { get; set; }
///
/// 辅助单位
///
public Dictionary FSecUnitId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 辅助单位实收数量
///
public int FSecRealQty { get; set; }
///
/// 源单类型
///
[StringLength(36)]
public string FSrcBillType { get; set; }
///
/// 源单内码
///
public int FSrcInterId { get; set; }
///
/// 源单编号
///
[StringLength(36)]
public string FSrcBillNo { get; set; }
///
/// 基本单位生产实收数量
///
public decimal FBasePrdRealQty { get; set; }
///
/// 完工
///
public bool FIsFinished { get; set; } = false;
///
/// 库存状态 (必填项)
///
public Dictionary FStockStatusId { get; set; } = new Dictionary() {
{ "FNumber","KCZT01_SYS"}
};
///
/// 源单行号
///
public int FSrcEntrySeq { get; set; }
///
/// 生产订单主产品分录
///
public int FMOMAINENTRYID { get; set; } = 0;
///
/// 保管者类型 (必填项)
///
[StringLength(36)]
public string FKeeperTypeId { get; set; } = "BD_KeeperOrg";
///
/// 保管者 (必填项)
///
public Dictionary FKeeperId { get; set; } = new Dictionary() {
{ "FNumber",LocalStaticRequest.DefaultOrg}
};
///
/// 生产日期
///
[DataType(DataType.Date)]
public string FProduceDate { get; set; } //= DateTime.Now.ToShortDateString();
///
/// 有效期至
///
[DataType(DataType.Date)]
public string FExpiryDate { get; set; }
///
/// 退库选单数
///
public int FSelReStkQty { get; set; }
///
/// 基本单位退库选单数量
///
public int FBaseSelReStkQty { get; set; }
///
/// 业务来源类型
///
[StringLength(36)]
public string FSrcBusinessType { get; set; }
///
/// 组织间结算跨法人
///
public bool FIsOverLegalOrg { get; set; } = false;
///
/// 直送标识
///
[StringLength(36)]
public string FSendRowId { get; set; }
///
/// 更新库存标志
///
//public string FStockFlag { get; set; } = "1";
public Dictionary F_PNDR_BASE_QTR { get; set; } = new Dictionary() { { "FNumber", "" } };
///
/// 关联关系表
///
public List FEntity_Link { get; set; } = new List();
public class Entity_Link
{
///
/// 实体主键,新建时为空,由系统自动填充
///
public string FLinkId { get; set; }
public string FEntity_Link_FFlowId { get; set; } /*= "466b5e95-19b7-4195-b9e2-1c36006331a3";*/
public string FEntity_Link_FFlowLineId { get; set; }
public string FEntity_Link_FRuleId { get; set; } = "PRD_MO2INSTOCK";
public int FEntity_Link_FSTableId { get; set; } = 0;
public string FEntity_Link_FSTableName { get; set; } = "T_PRD_MOENTRY";
///
/// 系统源单内码
///
public int FEntity_Link_FSBillId { get; set; } //要二次查询,或者由MES提供。一般二次查询...
///
/// 系统源单分录内码
///
public int FEntity_Link_FSId { get; set; } //要二次查询,或者由MES提供。一般二次查询...
public decimal FEntity_Link_FBaseActualQtyOld { get; set; } //应发数量
public decimal FEntity_Link_FBaseActualQty { get; set; } //实发数量
}
///
/// 序列号子单据体
///
public List FSerialSubEntity { get; set; } = new List();
public class SerialSubEntity
{
///
/// 实体主键
///
public int FDetailID { get; set; }
///
/// 序列号
///
[StringLength(36)]
public string FSerialNo { get; set; }
///
/// 序列号
///
public Dictionary FSerialId { get; set; } = new Dictionary() {
{ "FNumber",""}
};
///
/// 数量
///
public int FQty { get; set; }
///
/// 基本单位数量
///
public int FBaseSNQty { get; set; }
///
/// 备注
///
[StringLength(36)]
public string FSerialNote { get; set; }
}
}
}
}