|
|
@ -14,11 +14,13 @@ namespace Admin.Core.Service.Service_New
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly IBaseRepository<ProductPlanInfo> _dal;
|
|
|
|
private readonly IBaseRepository<ProductPlanInfo> _dal;
|
|
|
|
private readonly IProductOrderInfoRepository _productOrderInfoRepository;
|
|
|
|
private readonly IProductOrderInfoRepository _productOrderInfoRepository;
|
|
|
|
public ProductPlanInfoServices(IBaseRepository<ProductPlanInfo> dal, IProductOrderInfoRepository productOrderInfoRepository)
|
|
|
|
private readonly IBaseBomInfoRepository _baseBomInfoRepository;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ProductPlanInfoServices(IBaseRepository<ProductPlanInfo> dal, IBaseBomInfoRepository baseBomInfoRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._dal = dal;
|
|
|
|
this._dal = dal;
|
|
|
|
base.BaseDal = dal;
|
|
|
|
base.BaseDal = dal;
|
|
|
|
_productOrderInfoRepository = productOrderInfoRepository;
|
|
|
|
_baseBomInfoRepository = baseBomInfoRepository;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -29,7 +31,8 @@ namespace Admin.Core.Service.Service_New
|
|
|
|
public async Task<List<PlanMaintenanceView>> QueryPlanInfo()
|
|
|
|
public async Task<List<PlanMaintenanceView>> QueryPlanInfo()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<ProductPlanInfo> planList = await _dal.QueryAsync();
|
|
|
|
List<ProductPlanInfo> planList = await _dal.QueryAsync();
|
|
|
|
List<ProductOrderInfo> orderinfoList= await _productOrderInfoRepository.QueryAsync();
|
|
|
|
List<BaseBomInfo> orderinfoList= await _baseBomInfoRepository.QueryAsync();
|
|
|
|
|
|
|
|
|
|
|
|
var list = (from p in planList
|
|
|
|
var list = (from p in planList
|
|
|
|
join o in orderinfoList on p.PlanCode equals o.PlanCode
|
|
|
|
join o in orderinfoList on p.PlanCode equals o.PlanCode
|
|
|
|
select new PlanMaintenanceView
|
|
|
|
select new PlanMaintenanceView
|
|
|
@ -43,11 +46,6 @@ namespace Admin.Core.Service.Service_New
|
|
|
|
}).ToList();
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
//let sum = score.Chinese + score.Math + score.English //定义临时变量sum
|
|
|
|
|
|
|
|
//where sum / 3 > 60
|
|
|
|
|
|
|
|
//group stu by new { stu.Age } into result
|
|
|
|
|
|
|
|
//orderby result.Key.Age descending
|
|
|
|
|
|
|
|
//select new { Age = result.Key.Age, Count = result.Count() };
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|