新增MES库区管理功能,包含免密接口、数据处理逻辑及相关控制器、服务和实体的实现。支持库区的增删改查操作,优化用户体验并增强系统的实时数据同步能力。

This commit is contained in:
geht
2026-05-12 14:06:07 +08:00
parent cffe32d896
commit b737dddb2a
74 changed files with 4937 additions and 174 deletions

View File

@@ -237,6 +237,15 @@ public class RawMaterialEntryService : IRawMaterialEntryService, ISingletonDepen
return null;
}
public IReadOnlyList<MesXslRawMaterialEntry> GetCachedSnapshot()
{
// 注意:不允许直接返回 _localCache 引用,避免外部修改污染缓存;用 Clone 做深拷贝。
lock (_cacheLock)
{
return _localCache.Select(Clone).ToList();
}
}
// ─── Remote ────────────────────────────────────────────────────────────────
private async Task<List<MesXslRawMaterialEntry>> FetchRemoteListAsync(CancellationToken ct)
@@ -570,6 +579,9 @@ public class RawMaterialEntryService : IRawMaterialEntryService, ISingletonDepen
SupplierName = e.SupplierName, ManufacturerMaterialName = e.ManufacturerMaterialName,
ShelfLife = e.ShelfLife, TotalWeight = e.TotalWeight, TotalPortions = e.TotalPortions,
PortionWeight = e.PortionWeight, PortionPackages = e.PortionPackages,
PortionWarehouseLocations = e.PortionWarehouseLocations,
PortionDetailIds = e.PortionDetailIds,
PortionCardFlags = e.PortionCardFlags,
TestResult = e.TestResult, TestStatus = e.TestStatus, PrintFlag = e.PrintFlag,
StockBalance = e.StockBalance, WarehouseLocation = e.WarehouseLocation,
UnloadOperator = e.UnloadOperator, IsSpecialAdoption = e.IsSpecialAdoption,