|
|
|
@ -23,6 +23,7 @@ namespace Admin.Core.Service.Service_New
|
|
|
|
|
_baseBomInfoRepository = baseBomInfoRepository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 查询计划执行信息
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查询计划执行信息
|
|
|
|
|
/// </summary>
|
|
|
|
@ -31,19 +32,46 @@ namespace Admin.Core.Service.Service_New
|
|
|
|
|
public async Task<List<PlanMaintenanceView>> QueryPlanInfo()
|
|
|
|
|
{
|
|
|
|
|
List<ProductPlanInfo> planList = await _dal.QueryAsync();
|
|
|
|
|
List<BaseBomInfo> orderinfoList= await _baseBomInfoRepository.QueryAsync();
|
|
|
|
|
List<BaseBomInfo> bomInfoList = await _baseBomInfoRepository.QueryAsync();
|
|
|
|
|
|
|
|
|
|
var list = (from p in planList
|
|
|
|
|
join o in orderinfoList on p.PlanCode equals o.PlanCode
|
|
|
|
|
select new PlanMaintenanceView
|
|
|
|
|
{
|
|
|
|
|
PlanCode=p.PlanCode,
|
|
|
|
|
MaterialCode=p.MaterialCode,
|
|
|
|
|
MaterialName=p.MaterialName,
|
|
|
|
|
OrderCode=p.OrderCode,
|
|
|
|
|
PlanAmount = p.PlanAmount,
|
|
|
|
|
ResidueAmount = p.PlanAmount-p.CompleteAmount
|
|
|
|
|
}).ToList();
|
|
|
|
|
join o in bomInfoList on p.PlanCode equals o.PlanCode
|
|
|
|
|
select new PlanMaintenanceView
|
|
|
|
|
{
|
|
|
|
|
PlanCode = p.PlanCode,
|
|
|
|
|
MaterialCode = p.MaterialCode,
|
|
|
|
|
MaterialName = p.MaterialName,
|
|
|
|
|
OrderCode = p.OrderCode,
|
|
|
|
|
PlanAmount = p.PlanAmount,
|
|
|
|
|
ResidueAmount = p.PlanAmount - p.CompleteAmount
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取打印信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
|
|
public async Task<List<PlanMaintenanceView>> QueryPrintInfo()
|
|
|
|
|
{
|
|
|
|
|
List<ProductPlanInfo> planList = await _dal.QueryAsync();
|
|
|
|
|
List<BaseBomInfo> bomInfoList = await _baseBomInfoRepository.QueryAsync();
|
|
|
|
|
|
|
|
|
|
var list = (from p in planList
|
|
|
|
|
join b in bomInfoList on p.PlanCode equals b.PlanCode
|
|
|
|
|
select new PlanMaintenanceView
|
|
|
|
|
{
|
|
|
|
|
PlanCode = p.PlanCode,
|
|
|
|
|
MaterialCode = b.MaterialCode,
|
|
|
|
|
MaterialName = b.MaterialName,
|
|
|
|
|
OrderCode = p.OrderCode,
|
|
|
|
|
PlanAmount = b.StandardAmount,
|
|
|
|
|
ResidueAmount = p.PlanAmount - p.CompleteAmount
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|