From 4b931ff9caf0c578ed9563da88e3330d67fc1bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E9=93=AD=20=E5=90=95?= <896951544@qq.com> Date: Tue, 15 Apr 2025 10:24:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=8C=E4=B8=80=E8=B5=B7?= =?UTF-8?q?=E7=82=B9=E5=AD=98=E5=9C=A8=E5=A4=9A=E6=9D=A1=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=8C=E4=BB=BB=E5=8A=A1=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=9A=82=E5=81=9C=E6=89=A7=E8=A1=8C=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E7=AA=9C=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wcfControlMonitorClient.csproj | 5 +- WcfControlMonitorLib/CControl.cs | 92 ++++++++++++++++--- 2 files changed, 80 insertions(+), 17 deletions(-) diff --git a/ControlMonitorClient/wcfControlMonitorClient.csproj b/ControlMonitorClient/wcfControlMonitorClient.csproj index 79c8216..c5d9f0d 100644 --- a/ControlMonitorClient/wcfControlMonitorClient.csproj +++ b/ControlMonitorClient/wcfControlMonitorClient.csproj @@ -25,7 +25,7 @@ <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> - <InstallUrl>http://localhost:8080/</InstallUrl> + <InstallUrl>http://127.0.0.1:8080/</InstallUrl> <SupportUrl>http://www.siasun.com</SupportUrl> <TargetCulture>zh-Hans</TargetCulture> <ProductName>智能物流调度系统WCS客户端</ProductName> @@ -33,13 +33,12 @@ <SuiteName>智能物流调度系统WCS</SuiteName> <CreateWebPageOnPublish>true</CreateWebPageOnPublish> <WebPage>pub.htm</WebPage> - <ApplicationRevision>5</ApplicationRevision> + <ApplicationRevision>14</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <CreateDesktopShortcut>true</CreateDesktopShortcut> <PublishWizardCompleted>true</PublishWizardCompleted> <BootstrapperEnabled>true</BootstrapperEnabled> - <BootstrapperComponentsLocation>Relative</BootstrapperComponentsLocation> <BootstrapperComponentsUrl>C:\Program Files %28x86%29\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0</BootstrapperComponentsUrl> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> diff --git a/WcfControlMonitorLib/CControl.cs b/WcfControlMonitorLib/CControl.cs index 79d96d7..9889474 100644 --- a/WcfControlMonitorLib/CControl.cs +++ b/WcfControlMonitorLib/CControl.cs @@ -3253,6 +3253,38 @@ namespace WcfControlMonitorLib this.CControlError += string.Format("��������ʱ����ȡ���豸���꣡"); return false; } + #region ͬ�����ڶ����ȴ��·������쳣���� + if (deviceKind == 2)// + {//������,ֱ��,���� + int StartStation = GetMonitorStartStationfromMonitor(MonitorIndex);//���վ̨ + DataView taskMsgs = new DataView(); + //��ȡͬ���ĵȴ��·�����������Ϣ + taskMsgs = dbo.ExceSQL(string.Format("select F_ManageTaskIndex,F_MonitorIndex" + + " from T_Monitor_Task where F_NumParam1={0} and F_Status=0 ", + StartStation)).Tables[0].DefaultView; + //ɸѡ������Ҫ���·������� + int count = 0; + foreach (DataRowView taskMsg in taskMsgs) + { + var taskNumMin = dbo.ExceSQL(string.Format("select top 1 F_MonitorIndex" + + " from T_Monitor_Task where F_ManageTaskIndex={0} order by F_MonitorIndex", + taskMsg["F_ManageTaskIndex"])).Tables[0].DefaultView; + var MinTaskNum = taskNumMin[0]["F_MonitorIndex"].ToString(); + var NowTaskNum = taskMsg["F_MonitorIndex"].ToString(); + if (MinTaskNum == NowTaskNum) + {//��С����==��ǰ��������1 + count++; + } + } + if (count > 1) + { + AheadDetectUnallow.Clear(); + AheadDetectUnallow.Append(string.Format("��ǰ���������ڶ����ȴ��·��������봦���쳣����", deviceIdx)); + UpdateAheadDetectUnallow(AheadDetectUnallow, MonitorIndex); + return false; + } + } + #endregion if ((deviceKind == 1) || (deviceKind == 6)) { @@ -6128,21 +6160,53 @@ namespace WcfControlMonitorLib } } + /// <summary> + /// + /// </summary> + /// <param name="MonitorIdx"></param> + /// <returns></returns> + public int GetMonitorStartStationfromMonitor(int MonitorIdx) + { + DataView dv = new DataView(); + try + { + //20100108 + //20101124 + sql.Remove(0, sql.Length); + sql.Append("SELECT F_NumParam1 FROM T_Monitor_Task WHERE (F_MonitorIndex = ").Append(MonitorIdx).Append(")"); + dv = dbo.ExceSQL(sql.ToString()).Tables[0].DefaultView; + if (dv.Count > 0) + { + return Convert.ToInt32(dv[0]["F_NumParam1"]); + } + else + { + return -1; + } + } + catch (Exception ex) + {//20100108 + throw ex; + } + finally + {//20100108 + dv.Dispose(); + } + } - - /* - * ������:compareGoalAndSearchManageGoal - * �� �ߣ�LYJ - * �������ܣ��Ƚϴ����Ŀ��λ�úͽ�ȡ��Ŀ��λ���Ƿ�һ�£����һ�·���true����һ�·���false - * �������ܣ�goalcellcode�����Ŀ��λ�� - * �� �� ֵ������true��ʾ��ͬ��false��ʾ��ͬ - * ������ڣ�2018/01/15 - * ά����Ա�� - * ά�����ڣ� - * ά��ԭ�� - * ��ǰ�汾��1.0 - * ǰ�̰汾��1.0beta - */ + /* + * ������:compareGoalAndSearchManageGoal + * �� �ߣ�LYJ + * �������ܣ��Ƚϴ����Ŀ��λ�úͽ�ȡ��Ŀ��λ���Ƿ�һ�£����һ�·���true����һ�·���false + * �������ܣ�goalcellcode�����Ŀ��λ�� + * �� �� ֵ������true��ʾ��ͬ��false��ʾ��ͬ + * ������ڣ�2018/01/15 + * ά����Ա�� + * ά�����ڣ� + * ά��ԭ�� + * ��ǰ�汾��1.0 + * ǰ�̰汾��1.0beta + */ public bool compareGoalAndSearchManageGoal(string goalcellcode) {