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 @@ false false true - http://localhost:8080/ + http://127.0.0.1:8080/ http://www.siasun.com zh-Hans 智能物流调度系统WCS客户端 @@ -33,13 +33,12 @@ 智能物流调度系统WCS true pub.htm - 5 + 14 1.0.0.%2a false true true true - Relative C:\Program Files %28x86%29\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 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 } } + /// + /// + /// + /// + /// + 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) {