diff --git a/.vs/HighWayIot/FileContentIndex/2d270758-b86e-4fba-a20c-82cbf6bbd2d9.vsidx b/.vs/HighWayIot/FileContentIndex/2d270758-b86e-4fba-a20c-82cbf6bbd2d9.vsidx new file mode 100644 index 00000000..9b08473f Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/2d270758-b86e-4fba-a20c-82cbf6bbd2d9.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/30aa79a7-558b-4e9f-b1ad-538ed06754e8.vsidx b/.vs/HighWayIot/FileContentIndex/30aa79a7-558b-4e9f-b1ad-538ed06754e8.vsidx new file mode 100644 index 00000000..7aa4cd38 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/30aa79a7-558b-4e9f-b1ad-538ed06754e8.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/b3603837-c8fd-45ca-b642-606c11829d0d.vsidx b/.vs/HighWayIot/FileContentIndex/b3603837-c8fd-45ca-b642-606c11829d0d.vsidx deleted file mode 100644 index dbf4c7dc..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/b3603837-c8fd-45ca-b642-606c11829d0d.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/b8f0b7ce-2f91-4c8e-b268-4fa744af2c38.vsidx b/.vs/HighWayIot/FileContentIndex/b8f0b7ce-2f91-4c8e-b268-4fa744af2c38.vsidx deleted file mode 100644 index fc79b7a6..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/b8f0b7ce-2f91-4c8e-b268-4fa744af2c38.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo index 6cf9b4ec..faf1d0ed 100644 Binary files a/.vs/HighWayIot/v17/.suo and b/.vs/HighWayIot/v17/.suo differ diff --git a/Aucma.Scada.Business/InStoreBusiness.cs b/Aucma.Scada.Business/InStoreBusiness.cs index d7f7de56..155a9400 100644 --- a/Aucma.Scada.Business/InStoreBusiness.cs +++ b/Aucma.Scada.Business/InStoreBusiness.cs @@ -77,6 +77,7 @@ namespace Aucma.Scada.Business /// public delegate void RefreshLogMessage(string message); public event RefreshLogMessage RefreshLogMessageEvent; + #endregion private InStoreBusiness() @@ -89,8 +90,8 @@ namespace Aucma.Scada.Business grabImage.RefreshLogMessageEvent += PrintLogInfoMessage; StartPassDown(); - InStore(appConfig.shellStoreCode, "B236000007811019001"); - InStore(appConfig.linerStoreCode, "L236000007881019001"); + //InStore(appConfig.shellStoreCode, "B236000007811019001"); + //InStore(appConfig.linerStoreCode, "L236000007881019001"); } /// @@ -213,6 +214,8 @@ namespace Aucma.Scada.Business _taskInfoService.UpdateTaskInfo(taskInfo); + RefreshInStoreTaskEvent?.Invoke(taskInfo); + //if (shellSemaphore.Wait(TimeSpan.FromSeconds(20))) //{ // // 收到反馈 @@ -226,6 +229,8 @@ namespace Aucma.Scada.Business shellSemaphore.Wait(); //一直堵塞直到信号量释放 PrintLogInfoMessage($"箱壳入库任务:{taskInfo.taskCode};执行完成"); + + RefreshInStoreTaskEvent?.Invoke(taskInfo); } else { @@ -259,6 +264,8 @@ namespace Aucma.Scada.Business _taskInfoService.UpdateTaskInfo(taskInfo); + RefreshInStoreTaskEvent?.Invoke(taskInfo); + //if (shellSemaphore.Wait(TimeSpan.FromSeconds(20))) //{ // // 收到反馈 @@ -272,6 +279,8 @@ namespace Aucma.Scada.Business linerSemaphore.Wait(); //一直堵塞直到信号量释放 PrintLogInfoMessage($"内胆入库任务:{taskInfo.taskCode};执行完成"); + + RefreshInStoreTaskEvent?.Invoke(taskInfo); } else { diff --git a/Aucma.Scada.Business/OutStoreBusiness.cs b/Aucma.Scada.Business/OutStoreBusiness.cs index 9e22478f..9913ed7b 100644 --- a/Aucma.Scada.Business/OutStoreBusiness.cs +++ b/Aucma.Scada.Business/OutStoreBusiness.cs @@ -281,6 +281,7 @@ namespace Aucma.Scada.Business { while (true) { + Thread.Sleep(10000); PassDownTaskInfo(); Thread.Sleep(1000); } @@ -342,13 +343,13 @@ namespace Aucma.Scada.Business linerCode = item.materialCode; } + _taskInfoService.UpdateTaskInfo(item); RefreshScanMateriaCodeEvent?.Invoke(item.materialCode, item.materialType, item.spaceName, item.storeCode); } if (iFlag == taskInfoList.Count) { - _taskInfoService.UpdateRangeTaskInfo(taskInfoList); //if (semaphore.Wait(TimeSpan.FromSeconds(20))) //{ @@ -485,9 +486,6 @@ namespace Aucma.Scada.Business var taskInfo = _taskInfoService.GetTaskInfoByTaskCode(taskCode, storeCode); if (taskInfo != null) { - //刷新界面 - RefreshScanMateriaCodeEvent?.Invoke(string.Empty, string.Empty, string.Empty, taskInfo.storeCode); - var spaceInfo = _spaceInfoService.GetSpaceInfoBySpaceCode(taskInfo.storeCode, taskInfo.spaceCode); if (spaceInfo != null) @@ -504,6 +502,9 @@ namespace Aucma.Scada.Business } //清除任务信息 _taskInfoService.DeleteTaskInfo(taskCode, storeCode); + + //刷新界面 + RefreshScanMateriaCodeEvent?.Invoke(string.Empty, string.Empty, string.Empty, taskInfo.storeCode); } } diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll index c76a981f..2adb8fdc 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb index 9a293519..73159a69 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache index 18ab5927..d8fcae21 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll index c76a981f..2adb8fdc 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb index 9a293519..73159a69 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache index ecbb88bd..af4fdb9e 100644 Binary files a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache and b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll index c76a981f..2adb8fdc 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb index 9a293519..73159a69 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe index 40a7bdba..83079ff6 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb index fb473389..3fddd301 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb differ diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache index dca3a9ac..995be94d 100644 Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe index 40a7bdba..83079ff6 100644 Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe differ diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb index fb473389..3fddd301 100644 Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb differ diff --git a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs index a21f5c0c..b49e5e0f 100644 --- a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs +++ b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs @@ -222,11 +222,33 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo /// public void Query() { + + #region 通过数据库获取数据进行刷新 var info = inStoreBusiness.GetInStoreTask(); if (info != null) { - info.ForEach(x => RefreshInStoreTask(x)); + taskItems = new ObservableCollection(); + //info.ForEach(x => RefreshInStoreTask(x)); + + try + { + foreach (var item in info) + { + + App.Current.Dispatcher.Invoke((Action)(() => + { + taskItems.Add(item); + InstoreTask = taskItems; + })); + } + } + catch (Exception ex) + { + logHelper.Error("入库任务列表刷新异常", ex); + } } + #endregion + if (materialTypeCombox == "箱壳") { materialTypeCombox = "X-001"; @@ -300,18 +322,19 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo /// private void RefreshInStoreTask(RealTaskInfo taskInfo) { - try - { - App.Current.Dispatcher.Invoke((Action)(() => - { - taskItems.Add(taskInfo); - InstoreTask = taskItems; - })); - } - catch (Exception ex) - { - logHelper.Error("入库任务列表刷新异常", ex); - } + //try + //{ + // App.Current.Dispatcher.Invoke((Action)(() => + // { + // taskItems.Add(taskInfo); + // InstoreTask = taskItems; + // })); + //} + //catch (Exception ex) + //{ + // logHelper.Error("入库任务列表刷新异常", ex); + //} + Query(); } /// diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache index 1c27ebb9..1abe3b60 100644 Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache index a86506c5..04a2a7a4 100644 Binary files a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache and b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache index 5d6cffec..76ccd000 100644 Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache index 6d933bdd..82278225 100644 Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache index 14cbd9c4..609e759c 100644 Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache differ diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache index 69908807..9b8f8486 100644 Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ