From 612708d072e271099a9968601a2135d96fc2385c Mon Sep 17 00:00:00 2001 From: liuwf Date: Wed, 3 Jan 2024 21:23:46 +0800 Subject: [PATCH] change. --- .../ViewModels/FoamMonitorPageViewModel.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs index 23848209..f6bcb366 100644 --- a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs +++ b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs @@ -342,7 +342,7 @@ namespace Aucma.Core.BoxFoam.ViewModels else { // 白夜班切换 - ShiftChangeAsync(productLineCode, currentTeamTime); + ShiftChangeAsync(productLineCode); } } @@ -422,7 +422,7 @@ namespace Aucma.Core.BoxFoam.ViewModels } } - private async void ShiftChangeAsync(string productLineCode, CurrentTeamTime currentTeamTime) + private async void ShiftChangeAsync(string productLineCode) { try { @@ -434,9 +434,11 @@ namespace Aucma.Core.BoxFoam.ViewModels //更新计划表操作 - //CurrentTeamTime currentTeamTime = await _currentTeamTimeServices.FirstAsync(); + CurrentTeamTime currentTeamTime = await _currentTeamTimeServices.FirstAsync(); + + // 更新当班时间 - currentTeamTime.TeamName = currentTeamTimeList.FirstOrDefault().TeamName; + currentTeamTime.TeamName = currentTeamTimeList.First().TeamName; currentTeamTime.StartTime = currentTeamTimeList.Min(d => d.StartTime); currentTeamTime.EndTime = currentTeamTimeList.Max(d => d.EndTime); bool result = await _currentTeamTimeServices.UpdateAsync(currentTeamTime);