1
This commit is contained in:
@@ -27,9 +27,11 @@ namespace BLL
|
||||
var q = from x in Funs.DB.Tw_OutputDetail
|
||||
join y in Funs.DB.HJGL_Pipeline_Component on x.PipelineComponentId equals y.PipelineComponentId into yy
|
||||
from y in yy.DefaultIfEmpty()
|
||||
join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm
|
||||
join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm
|
||||
from mat in mm.DefaultIfEmpty()
|
||||
join stock in Funs.DB.Tw_MaterialStock on x.MaterialCode equals stock.PipeLineMatCode into st
|
||||
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} equals new { MaterialCode=stock.PipeLineMatCode,stock.WarehouseCode } into st
|
||||
from stock in st.DefaultIfEmpty()
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
@@ -48,7 +50,8 @@ namespace BLL
|
||||
MaterialName = mat.MaterialName,
|
||||
StockNum = stock.StockNum ?? 0,
|
||||
DiffNum = (x.ActNum??0) - (x.PlanNum??0),
|
||||
}
|
||||
MaterialDef = mat.MaterialDef
|
||||
}
|
||||
;
|
||||
|
||||
return q;
|
||||
|
||||
Reference in New Issue
Block a user