数字翻牌器

This commit is contained in:
qianhao.xu 2024-11-18 14:41:49 +08:00
parent d0b523f2d0
commit 0b6b10621a

View File

@ -22,7 +22,35 @@ namespace DOAN.Service.MES.bigScreen
.GroupBy(it => it.GroupCode).Count();
//今天产线
productBigScreen.TodayLineQuantity=Context.Queryable<ProWorkorder>().Where(it => it.WorkorderDate == DateTime.Today)
.GroupBy(it => it.LineCode).Count();
//今日计划产量
productBigScreen.TodayPlanQuantity = Context.Queryable<ProWorkorder>()
.Where(it => it.WorkorderDate == DateTime.Today)
.Sum(it => it.DeliveryNum ?? 0);
//今日实际产量
productBigScreen.TodayActionProductionQuantity = Context.Queryable<ProWorkorder>()
.LeftJoin<ProReportwork>((p, r) => p.Workorder == r.FkWorkorder)
.Where((p, r) => p.WorkorderDate == DateTime.Today)
.Sum((p, r) => r.FinishedNum ?? 0);
//今日产成品种类
productBigScreen.TodayProductTypeQuantity = Context.Queryable<ProWorkorder>()
.Where(it => it.WorkorderDate == DateTime.Today)
.GroupBy(it => it.ProductionCode)
.Count();
// 七日变更计划
productBigScreen.SevenDaysPriorPlanQuantity = Context.Queryable<ProWorkorderUpdateLog>()
.Where(it => it.ChangeTime <= DateTime.Today && it.ChangeTime >= DateTime.Today.AddDays(-7))
.Count();
return productBigScreen;
}