|
|
|
@ -36,7 +36,7 @@ namespace SlnMesnac.Repository.service.Impl
|
|
|
|
|
{
|
|
|
|
|
private AppConfig _appConfig;
|
|
|
|
|
|
|
|
|
|
public MesProductPlanServiceImpl(Repository<MesProductPlan> rep, AppConfig appConfig):base(rep)
|
|
|
|
|
public MesProductPlanServiceImpl(Repository<MesProductPlan> rep, AppConfig appConfig) : base(rep)
|
|
|
|
|
{
|
|
|
|
|
_appConfig = appConfig;
|
|
|
|
|
}
|
|
|
|
@ -172,10 +172,13 @@ namespace SlnMesnac.Repository.service.Impl
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
// plan.StationId == _appConfig.stationId &&
|
|
|
|
|
var info = base._rep.AsQueryable()
|
|
|
|
|
.LeftJoin<MesProductOrder>((plan, order) => plan.ProductOrderId == order.ProductOrderId)
|
|
|
|
|
.LeftJoin<BaseMaterialInfo>((plan, order, material) => plan.MaterialId == material.MaterialId)
|
|
|
|
|
.Where(plan => plan.StationId == _appConfig.stationId && plan.PlanStatus != PlanStatusEnum.已完成)
|
|
|
|
|
.Where((plan, order) =>
|
|
|
|
|
plan.PlanStatus != PlanStatusEnum.已完成 &&
|
|
|
|
|
(order.DispatchId ==2))
|
|
|
|
|
.Select((plan, order, material) => new MesProductPlanDto
|
|
|
|
|
{
|
|
|
|
|
PlanId = plan.PlanId,
|
|
|
|
@ -202,7 +205,8 @@ namespace SlnMesnac.Repository.service.Impl
|
|
|
|
|
MaterialUnitId = material.MaterialUnitId,
|
|
|
|
|
}).ToList();
|
|
|
|
|
return info;
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
throw new InvalidOperationException($"获取MES计划详细信息异常:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|