From 249d0c6be0c99d013ab68cdbf3bd24f17e9ca633 Mon Sep 17 00:00:00 2001 From: liuwf Date: Thu, 24 Oct 2024 15:27:29 +0800 Subject: [PATCH] =?UTF-8?q?fix-=E7=BB=9F=E8=AE=A1=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=97=A5=E6=9C=9F=E6=8E=92=E5=BA=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/Impl/MesProductPlanServiceImpl.cs | 10 +++++++--- SlnMesnac.WPF/Page/ProdMgmtPage.xaml | 4 ++-- SlnMesnac.WPF/ViewModel/ProdStatisticsViewModel.cs | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/SlnMesnac.Repository/service/Impl/MesProductPlanServiceImpl.cs b/SlnMesnac.Repository/service/Impl/MesProductPlanServiceImpl.cs index f9320ef..5433b71 100644 --- a/SlnMesnac.Repository/service/Impl/MesProductPlanServiceImpl.cs +++ b/SlnMesnac.Repository/service/Impl/MesProductPlanServiceImpl.cs @@ -36,7 +36,7 @@ namespace SlnMesnac.Repository.service.Impl { private AppConfig _appConfig; - public MesProductPlanServiceImpl(Repository rep, AppConfig appConfig):base(rep) + public MesProductPlanServiceImpl(Repository 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((plan, order) => plan.ProductOrderId == order.ProductOrderId) .LeftJoin((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}"); } diff --git a/SlnMesnac.WPF/Page/ProdMgmtPage.xaml b/SlnMesnac.WPF/Page/ProdMgmtPage.xaml index 9a0f275..ba35eec 100644 --- a/SlnMesnac.WPF/Page/ProdMgmtPage.xaml +++ b/SlnMesnac.WPF/Page/ProdMgmtPage.xaml @@ -240,8 +240,8 @@ -