diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index 51d45a06..c2e634a6 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs b/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs index 4f3e753f..aa357836 100644 --- a/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs +++ b/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs @@ -17,12 +17,13 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { + string PipeArea= WarehouseCode == "工厂预制"?"1":"2"; ///所需材料数量列表 var NeedOutMateriaList = from x in db.HJGL_PipeLineMat join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId - where z.ProjectId == projectid && (string.IsNullOrEmpty(materialCode) || x.MaterialCode .Contains( materialCode)) - group x by x.MaterialCode + where z.ProjectId == projectid && (string.IsNullOrEmpty(materialCode) || x.MaterialCode .Contains( materialCode)) && z.PipeArea== PipeArea + group x by x.MaterialCode into g select new { @@ -31,18 +32,23 @@ namespace BLL }; ///实际材料入库数量列表 var RealInMateriaList = from x in db.Tw_InputDetail - join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + join master in db.Tw_InputMaster on x.InputMasterId equals master.Id + join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + where master.ProjectId== projectid && master.WarehouseCode== WarehouseCode group x by x.MaterialCode into g - where (string.IsNullOrEmpty(materialCode) || g.Key.Contains( materialCode)) + where (string.IsNullOrEmpty(materialCode) || g.Key.Contains( materialCode)) select new { g.Key, RealNum = g.Sum(x => x.ActNum) ?? 0, }; + //库存数量 var tw_MaterialStock=from x in db.Tw_MaterialStock - where x.WarehouseCode==WarehouseCode - select x; + where x.WarehouseCode==WarehouseCode && x.ProjectId== projectid + 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() diff --git a/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs b/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs index f88c0779..4507a6b8 100644 --- a/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs @@ -22,7 +22,7 @@ namespace FineUIPro.Web.CLGL drpWarehouse.DataBind(); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); // 绑定表格 - this.BindGrid(); + // this.BindGrid(); } } @@ -36,7 +36,11 @@ namespace FineUIPro.Web.CLGL if (tb.Count() > 0) { - lbRate.Text = "总体匹配率:" + Math.Round(tb.Sum(x => x.MatchRate) * 100 / tb.Count(), 4) + "%"; + decimal needNum = 0; + decimal realNum = 0; + needNum = tb.Sum(x => x.NeedNum); + realNum = tb.Sum(x => x.RealNum > x.NeedNum ? x.NeedNum : x.RealNum); + lbRate.Text = "总体匹配率:" + Math.Round(realNum * 100 / needNum, 4) + "%"; } else { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx index a759843e..7ddbd463 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx @@ -63,7 +63,7 @@ + EnableColumnLines="true" DataIDField="ID" > @@ -85,7 +85,7 @@ + EnableColumnLines="true" DataIDField="ID" Height="400">