材料管理修改
This commit is contained in:
@@ -12,7 +12,7 @@ namespace BLL
|
||||
{
|
||||
public class TwArrivalStatisticsService
|
||||
{
|
||||
public static List<Tw_ArrivalStatisticsOutPut> GetStatistics(string projectid,string materialCode)
|
||||
public static List<Tw_ArrivalStatisticsOutPut> GetStatistics(string projectid,string materialCode,string WarehouseCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -39,14 +39,16 @@ namespace BLL
|
||||
g.Key,
|
||||
RealNum = g.Sum(x => x.ActNum) ?? 0,
|
||||
};
|
||||
|
||||
var tw_MaterialStock=from x in db.Tw_MaterialStock
|
||||
where x.WarehouseCode==WarehouseCode
|
||||
select x;
|
||||
var StatisticsList =(from x in NeedOutMateriaList
|
||||
join y in RealInMateriaList on x.Key equals y.Key into gg
|
||||
from y in gg.DefaultIfEmpty()
|
||||
join z in db.HJGL_MaterialCodeLib on x.Key equals z.MaterialCode into zz
|
||||
from z in zz.DefaultIfEmpty()
|
||||
join m in db.Tw_MaterialStock on x.Key equals m.PipeLineMatCode into mm
|
||||
from m in mm.DefaultIfEmpty()
|
||||
join m in tw_MaterialStock on x.Key equals m.PipeLineMatCode into mm
|
||||
from m in mm.DefaultIfEmpty()
|
||||
select new Tw_ArrivalStatisticsOutPut
|
||||
{
|
||||
MaterialCode = x.Key,
|
||||
@@ -80,7 +82,7 @@ namespace BLL
|
||||
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
||||
join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
||||
where z.ProjectId == projectid && pipelineIds.Contains(z.PipelineId)
|
||||
where z.ProjectId == projectid && pipelineIds.Contains(z.PipelineId) && x.PrefabricatedComponents!= "" //x.PrefabricatedComponents!="" 用于筛选非散件材料
|
||||
select new Tw_PipeMatMatchOutput
|
||||
{
|
||||
Id= Guid.NewGuid().ToString(),
|
||||
|
||||
Reference in New Issue
Block a user