Switch warehouse matching to use IDs

This commit is contained in:
2026-06-24 23:25:06 +08:00
parent 4670220614
commit bd9b5a6f4d
27 changed files with 776 additions and 419 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ namespace BLL
from mat in mm.DefaultIfEmpty()
join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id into masters
from master in masters.DefaultIfEmpty()
join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode, master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock.ProjectId } into st
join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseId, master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseId, stock.ProjectId } into st
from stock in st.DefaultIfEmpty()
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&