| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using SqlSugar;
- namespace Admin.NET.Plugin.AiDOP.MaterialWarehouse.InventoryPosting.Entity;
- /// <summary>
- /// DOP-L3 采购收货回写(C6 shadow)。承载 `pr_WMS_UpdatePurOrdRctTransactionProcessing2` 的收货数量/状态回写语义,
- /// 但**不写旧 ERP `PurOrd*` 表**(DOP 实体直指旧同名表,属读模型;路线 B 态②禁开旧表写路径)。
- /// 记录本次过账对采购单/行的意图回写,供 Phase 8 对账;真实回写旧表待正式方案(Phase 5B/后续)。
- /// </summary>
- [SugarTable("ado_purchase_receipt_writeback", "DOP-L3采购收货回写(C6 shadow,非旧PurOrd*)")]
- [SugarIndex("uk_ado_pr_writeback", nameof(TenantId), OrderByType.Asc, nameof(DomainCode), OrderByType.Asc,
- nameof(PostingId), OrderByType.Asc, nameof(PurOrd), OrderByType.Asc, nameof(PurLine), OrderByType.Asc, IsUnique = true)]
- public class AdoPurchaseReceiptWriteback : AdoInvEntityBase
- {
- [SugarColumn(ColumnName = "posting_id", ColumnDescription = "过账头Id")]
- public long PostingId { get; set; }
- [SugarColumn(ColumnName = "rct_nbr", ColumnDescription = "收货号", Length = 50, IsNullable = true)]
- public string RctNbr { get; set; }
- [SugarColumn(ColumnName = "pur_ord", ColumnDescription = "采购单号", Length = 60, IsNullable = false, DefaultValue = "")]
- public string PurOrd { get; set; }
- [SugarColumn(ColumnName = "pur_line", ColumnDescription = "采购单行号", DefaultValue = "0")]
- public int PurLine { get; set; }
- [SugarColumn(ColumnName = "potype", ColumnDescription = "采购类型(PurOrdDetail 键之一)", Length = 30, IsNullable = true)]
- public string Potype { get; set; }
- [SugarColumn(ColumnName = "accepted_qty", ColumnDescription = "接受收货数(本次 delta)", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal AcceptedQty { get; set; }
- [SugarColumn(ColumnName = "sample_qty", ColumnDescription = "留样数", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal SampleQty { get; set; }
- // ── L4 对账字段(前值→delta→后值 + 未收余量 + 完成,据 C6 LIVE 计算)──
- [SugarColumn(ColumnName = "qty_ordered", ColumnDescription = "采购订购数", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal QtyOrdered { get; set; }
- [SugarColumn(ColumnName = "returned_qty", ColumnDescription = "已退货数", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal ReturnedQty { get; set; }
- [SugarColumn(ColumnName = "before_received_qty", ColumnDescription = "变动前已收数", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal BeforeReceivedQty { get; set; }
- [SugarColumn(ColumnName = "after_received_qty", ColumnDescription = "变动后已收数", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal AfterReceivedQty { get; set; }
- [SugarColumn(ColumnName = "before_outstanding_qty", ColumnDescription = "变动前未收余量", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal BeforeOutstandingQty { get; set; }
- [SugarColumn(ColumnName = "after_outstanding_qty", ColumnDescription = "变动后未收余量", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal AfterOutstandingQty { get; set; }
- [SugarColumn(ColumnName = "detail_completed", ColumnDescription = "明细是否收完((收-退)>=订)", DefaultValue = "0")]
- public bool DetailCompleted { get; set; }
- [SugarColumn(ColumnName = "qc_nbr", ColumnDescription = "检验单号", Length = 100, IsNullable = true)]
- public string QcNbr { get; set; }
- [SugarColumn(ColumnName = "receiver", ColumnDescription = "收货单号", Length = 50, IsNullable = true)]
- public string Receiver { get; set; }
- [SugarColumn(ColumnName = "fbillno", ColumnDescription = "来料检验单号", Length = 50, IsNullable = true)]
- public string FbillNo { get; set; }
- [SugarColumn(ColumnName = "qc_status", ColumnDescription = "QC状态(YES/NO)", Length = 10, IsNullable = true)]
- public string QcStatus { get; set; }
- }
|