11
This commit is contained in:
@@ -53,6 +53,7 @@ namespace FineUIPro.Web.common
|
||||
// 优化:一次性获取所有管线统计数据,避免 N+1 查询
|
||||
var pipelineCountByUnitWork = (from x in Funs.DB.View_HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
where x.UnitWorkId != null
|
||||
group x by x.UnitWorkId into g
|
||||
select new { UnitWorkId = g.Key, Count = g.Count(), TotalDin = g.Sum(x => x.TotalDin) })
|
||||
.ToDictionary(x => x.UnitWorkId, x => new { x.Count, x.TotalDin });
|
||||
|
||||
Reference in New Issue
Block a user