From 6d509fff5d9ea43236cff723fbf0bea3d045d1b6 Mon Sep 17 00:00:00 2001 From: wenjy Date: Fri, 12 Jan 2024 12:12:28 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=8F=91=E6=B3=A1MES=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=AE=8C=E5=B7=A5=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service_New/ProductPlanInfoServices.cs | 13 ++++++++++--- .../RecordBoxFoamFixtureComplateServices.cs | 2 +- Aucma.Core.BoxFoam/Business/TeamSwitchBusiness.cs | 4 ++-- .../ViewModels/SplitPlanViewModel.cs | 2 ++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs b/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs index f2a5b019..b27d6b30 100644 --- a/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs +++ b/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs @@ -64,10 +64,17 @@ namespace Admin.Core.Service ProductPlanInfo planInfo = null; try { - Expression> exp = s1 => true; - exp = exp.And(x => x.PlanCode == planCode); + //Expression> exp = s1 => true; + //exp = exp.And(x => x.PlanCode == planCode); + + //var info = await _dal.QueryAsync(exp); + + var info = _dal.Query(x=>x.PlanCode == planCode); - planInfo = await _dal.FirstAsync(exp); + if (info != null) + { + planInfo = info.OrderBy(x => x.CreatedTime).First(); + } logHelper.Info($"根据计划编号{planCode};获取到的计划信息:{planInfo.ToJson()}"); } diff --git a/Admin.Core.Service/Service_New/RecordBoxFoamFixtureComplateServices.cs b/Admin.Core.Service/Service_New/RecordBoxFoamFixtureComplateServices.cs index 0123f412..f4bf345c 100644 --- a/Admin.Core.Service/Service_New/RecordBoxFoamFixtureComplateServices.cs +++ b/Admin.Core.Service/Service_New/RecordBoxFoamFixtureComplateServices.cs @@ -122,7 +122,7 @@ namespace Admin.Core.Service.Service_New foreach (var boxFoamType in boxFoamTypeList) { - var boxPlanList = _boxFoamPlanServices.Query(x => x.ProductLineCode == productLineCode && x.StationCode == stationCode && x.MaterialCode == boxFoamType && x.PlanAmount > x.CompleteAmount); + var boxPlanList = _boxFoamPlanServices.Query(x => x.ProductLineCode == productLineCode && x.StationCode == stationCode && x.MaterialCode == boxFoamType && x.PlanAmount > x.CompleteAmount && x.ShiftType == 1); if (boxPlanList != null) { if (boxPlanList.Count > 0) diff --git a/Aucma.Core.BoxFoam/Business/TeamSwitchBusiness.cs b/Aucma.Core.BoxFoam/Business/TeamSwitchBusiness.cs index 5a7762be..18b74064 100644 --- a/Aucma.Core.BoxFoam/Business/TeamSwitchBusiness.cs +++ b/Aucma.Core.BoxFoam/Business/TeamSwitchBusiness.cs @@ -240,12 +240,13 @@ namespace Aucma.Core.BoxFoam.Business log.Warn("班组切换小时数据记录保存失败"); } //当班计划,班组计划设为0 - var planInfoList = _boxFoamPlanServices.QueryAsync(x => x.ProductLineCode == "CX_02" && x.StationCode == "1005").Result; + var planInfoList = _boxFoamPlanServices.QueryAsync(x => x.ProductLineCode == "CX_02" && x.StationCode == "1005" && x.ShiftType == 1).Result; if (planInfoList != null) { foreach (var plan in planInfoList) { + plan.ShiftType = 0; bool updateFlag = _boxFoamPlanServices.UpdateAsync(plan).Result; @@ -274,7 +275,6 @@ namespace Aucma.Core.BoxFoam.Business { log.Warn($"计划:{plan.OrderCode},班组切换标识更新失败"); } - } } } diff --git a/Aucma.Core.OldBoxFoam/ViewModels/SplitPlanViewModel.cs b/Aucma.Core.OldBoxFoam/ViewModels/SplitPlanViewModel.cs index b33e8533..24b3a744 100644 --- a/Aucma.Core.OldBoxFoam/ViewModels/SplitPlanViewModel.cs +++ b/Aucma.Core.OldBoxFoam/ViewModels/SplitPlanViewModel.cs @@ -63,6 +63,7 @@ namespace Aucma.Core.OldBoxFoam.ViewModels PlanAmount = item.PlanAmount, ResidueAmount = item.PlanAmount - item.CompleteAmount, SpliteResidueAmount = item.PlanAmount - residue, + CompleteAmount = item.CompleteAmount, StartDate = item.BeginTime }); i++; @@ -95,6 +96,7 @@ namespace Aucma.Core.OldBoxFoam.ViewModels PlanAmount = item.PlanAmount, ResidueAmount = item.PlanAmount - item.CompleteAmount, SpliteResidueAmount = item.PlanAmount - residue, + CompleteAmount = item.CompleteAmount, StartDate = item.BeginTime }); i++;