diff --git a/.vs/HighWayIot/FileContentIndex/39edaf52-553a-42de-b8ef-71b26cc84b76.vsidx b/.vs/HighWayIot/FileContentIndex/39edaf52-553a-42de-b8ef-71b26cc84b76.vsidx new file mode 100644 index 00000000..48bf851f Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/39edaf52-553a-42de-b8ef-71b26cc84b76.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/c821ff03-0f8a-4879-b795-257253d2ccb0.vsidx b/.vs/HighWayIot/FileContentIndex/c821ff03-0f8a-4879-b795-257253d2ccb0.vsidx new file mode 100644 index 00000000..4983bbbc Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/c821ff03-0f8a-4879-b795-257253d2ccb0.vsidx differ diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo index 9de77f68..39bc08b1 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 faf88e2f..95ada858 100644 --- a/Aucma.Scada.Business/InStoreBusiness.cs +++ b/Aucma.Scada.Business/InStoreBusiness.cs @@ -4,6 +4,7 @@ using HighWayIot.Config; using HighWayIot.Log4net; using HighWayIot.Repository.service; using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -170,12 +171,12 @@ namespace Aucma.Scada.Business /// private void PassDownShellTask() { - RealTaskInfo taskInfo = GetAwaitSendTask(appConfig.shellStoreCode); + RealTaskInfo taskInfo = GetAwaitSendTask(appConfig.foamStoreCode); if (taskInfo != null) { PrintLogInfoMessage($"下发泡后入库任务:{taskInfo.taskCode};仓库{taskInfo.storeCode};货道:{taskInfo.spaceCode}"); //taskHandle.SendShellTask_InStore(taskInfo); - + Thread.Sleep(200); if (taskHandle.SendShellTask_InStore(taskInfo)) { PrintLogInfoMessage($"泡后入库任务:{taskInfo.taskCode};下发成功,等待PLC执行反馈"); @@ -206,10 +207,8 @@ namespace Aucma.Scada.Business else { PrintLogInfoMessage("未获取到需要下发的泡后入库任务"); - - Thread.Sleep(5000); } - + Thread.Sleep(5000); } /// @@ -225,11 +224,11 @@ namespace Aucma.Scada.Business { taskInfo = _taskInfoService.GetTaskInfoByStoreCode(storeCode, 1); - if (taskInfo != null) - { - taskInfo.taskStatus = 2; - _taskInfoService.UpdateTaskInfo(taskInfo); - } + //if (taskInfo != null) + //{ + // taskInfo.taskStatus = 2; + // _taskInfoService.UpdateTaskInfo(taskInfo); + //} } catch (Exception ex) @@ -326,5 +325,10 @@ namespace Aucma.Scada.Business return result; } + + public List GetInStoreTask() + { + return _taskInfoService.GetTaskInfosByStoreCode(new string[] { appConfig.foamStoreCode }, 1); + } } } diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll index 0e59dabf..85d5a407 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 6875aac6..7d573f50 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.dll b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll index 0e59dabf..85d5a407 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 6875aac6..7d573f50 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.UI/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll index 0e59dabf..85d5a407 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 6875aac6..7d573f50 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 2991f951..fa84ce10 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 3123cc99..8b4761e7 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 45f81c55..01317f01 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 2991f951..fa84ce10 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 3123cc99..8b4761e7 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/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref index 46f22ffa..f3caf620 100644 --- a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref +++ b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref @@ -1,4 +1,4 @@ -E:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\obj\Debug\GeneratedInternalTypeHelper.g.cs + FE:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\App.xaml;; FE:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\Page\AssemblyPlan\AssemblyPlanControl.xaml;; FE:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\Page\AssemblyPlan\PlanInfoEditWindow.xaml;; diff --git a/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs b/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs index c65238fb..ffa4e1ed 100644 --- a/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs +++ b/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs @@ -1,2 +1,62 @@ - +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace XamlGeneratedNamespace { + + + /// + /// GeneratedInternalTypeHelper + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { + + /// + /// CreateInstance + /// + protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { + return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) + | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); + } + + /// + /// GetPropertyValue + /// + protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { + return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); + } + + /// + /// SetPropertyValue + /// + protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { + propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); + } + + /// + /// CreateDelegate + /// + protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { + return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod + | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { + delegateType, + handler}, null))); + } + + /// + /// AddEventHandler + /// + protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { + eventInfo.AddEventHandler(target, handler); + } + } +} diff --git a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs index 5e2167ca..911c3705 100644 --- a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs +++ b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs @@ -185,7 +185,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo try { - listItems.Add($"{DateTime.Now.ToString("HH:mm:ss")}==>{message}"); + listItems.Add($"{DateTime.Now.ToString("HH:mm:ss.ss")}==>{message}"); LogInfoListBox = listItems.OrderByDescending(x => x); } @@ -200,6 +200,11 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo /// public void Query() { + var info = inStoreBusiness.GetInStoreTask(); + if (info != null) + { + info.ForEach(x => RefreshInStoreTask(x)); + } if (materialTypeCombox == "箱壳") { materialTypeCombox = "X-001"; @@ -232,6 +237,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo /// public void Init() { + Query(); + MaterialNameList = new List() { "SC232",