| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using SqlSugar;
- namespace Admin.NET.Plugin.AiDOP.MaterialWarehouse.InventoryPosting.Entity;
- /// <summary>
- /// DOP-L3 库位/批次库存明细(影子)。**非旧 LocationDetail**。
- /// 自然键据 pr_SFM_InventoryTransactionProcessing2 实核(L33-35 JOIN / L370-371 UPDATE):
- /// Domain + ItemNum + Location + LotSerial + Refs 五维。
- /// ⚠️ 非批控物料 LotSerial/Refs 旧系统落**空串 ''(非 NULL)**并以空串占位唯一(L332-333 显式写 '',JOIN 用 IsNull(x,''))。
- /// 故 lot_serial / refs 必须 NOT NULL DEFAULT '',否则 MySQL「多 NULL 不冲突」会让同库位非批控物料重复建行。
- /// </summary>
- [SugarTable("ado_inventory_location_detail", "DOP-L3库位批次库存明细(影子,非旧LocationDetail)")]
- [SugarIndex("uk_ado_inv_loc_detail",
- nameof(TenantId), OrderByType.Asc,
- nameof(DomainCode), OrderByType.Asc,
- nameof(ItemNum), OrderByType.Asc,
- nameof(Location), OrderByType.Asc,
- nameof(LotSerial), OrderByType.Asc,
- nameof(Refs), OrderByType.Asc,
- IsUnique = true)]
- public class AdoInventoryLocationDetail : AdoInvEntityBase
- {
- [SugarColumn(ColumnName = "item_num", ColumnDescription = "物料号", Length = 50, IsNullable = false, DefaultValue = "")]
- public string ItemNum { get; set; }
- [SugarColumn(ColumnName = "location", ColumnDescription = "库位", Length = 30, IsNullable = false, DefaultValue = "")]
- public string Location { get; set; }
- /// <summary>批次/序列号。非批控物料落空串 ''(NOT NULL DEFAULT ''),空串占位唯一。</summary>
- [SugarColumn(ColumnName = "lot_serial", ColumnDescription = "批次/序列号(空批落空串非NULL)", Length = 50, IsNullable = false, DefaultValue = "")]
- public string LotSerial { get; set; }
- /// <summary>旧 Refs 维度(唯一键第 6 维;空落空串 '')。</summary>
- [SugarColumn(ColumnName = "refs", ColumnDescription = "Refs维度(空落空串非NULL)", Length = 50, IsNullable = false, DefaultValue = "")]
- public string Refs { get; set; }
- [SugarColumn(ColumnName = "qty_on_hand", ColumnDescription = "在手库存", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal QtyOnHand { get; set; }
- [SugarColumn(ColumnName = "avail_status_qty", ColumnDescription = "非限制/可用库存", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal AvailStatusQty { get; set; }
- [SugarColumn(ColumnName = "assay_qty", ColumnDescription = "质检库存", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal AssayQty { get; set; }
- [SugarColumn(ColumnName = "freeze_qty", ColumnDescription = "冻结库存", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
- public decimal FreezeQty { get; set; }
- }
|