IqcAcceptedReceipt.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. namespace Admin.NET.Plugin.AiDOP.MaterialWarehouse.InventoryPosting.Receipt;
  2. /// <summary>
  3. /// 标准化「IQC 合格收货」命令(C2 输入)。由上游 C1 判定 + Phase 4 幂等认领 + 取号后构造。
  4. /// 对齐 Phase 6A LIVE 取证:IQC 收货 TransType=`rct-po`(进可用库存),留样另加 `iss-unp`(负数)。
  5. /// </summary>
  6. public sealed class IqcAcceptedReceipt
  7. {
  8. public long TenantId { get; set; }
  9. public string DomainCode { get; set; } = string.Empty;
  10. /// <summary>Phase 4 过账头 Id(幂等锚)。</summary>
  11. public long PostingId { get; set; }
  12. /// <summary>本次过账事务组 Id(同批流水共用)。</summary>
  13. public long TransactionGroupId { get; set; }
  14. /// <summary>新收货号(C4 取号 @RctNbr)→ 流水 OrderNbr。</summary>
  15. public string RctNbr { get; set; }
  16. public string ItemNum { get; set; } = string.Empty;
  17. public string Location { get; set; } = string.Empty;
  18. public string LotSerial { get; set; } = string.Empty;
  19. public string Refs { get; set; } = string.Empty;
  20. /// <summary>接受收货数(= @QtyAcc)。</summary>
  21. public decimal AcceptedQty { get; set; }
  22. /// <summary>留样数(InsSampleQty=CompQty+QtyIssued;0=无留样)。</summary>
  23. public decimal SampleQty { get; set; }
  24. public decimal UmConversion { get; set; } = 1m;
  25. // C6 回写与追溯
  26. public string PurOrd { get; set; }
  27. public int PurLine { get; set; }
  28. public string Potype { get; set; }
  29. /// <summary>采购订购数(QtyOrded,C6 对账用;由上游读 PurOrdDetail 提供)。</summary>
  30. public decimal OrderedQty { get; set; }
  31. /// <summary>变动前已收数(PurOrdDetail.RctQty,C6 对账用)。</summary>
  32. public decimal BeforeReceivedQty { get; set; }
  33. /// <summary>已退货数(PurOrdDetail.QtyReturned,C6 完成判据用)。</summary>
  34. public decimal ReturnedQty { get; set; }
  35. public string WorkOrd { get; set; }
  36. public string RctQcNbr { get; set; }
  37. public string Receiver { get; set; }
  38. public string Fbillno { get; set; }
  39. public string User { get; set; }
  40. // 留样前置(LIVE 744-762 单独 Guard)
  41. public string CheckNo { get; set; }
  42. public string CostCtr { get; set; }
  43. }
  44. /// <summary>一次 IQC 过账的库存命令批(Phase 6A:先构完整 batch 再一次性调 C5)。</summary>
  45. public sealed class InventoryPostingBatch
  46. {
  47. public List<Inventory.InventoryTransactionCommand> Commands { get; } = new();
  48. }