新增MES库区管理功能,包含免密接口、数据处理逻辑及相关控制器、服务和实体的实现。支持库区的增删改查操作,优化用户体验并增强系统的实时数据同步能力。
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user