From 07365e817f4336db78a2cd24a45ad081d9d27de9 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: Mon, 7 Apr 2025 13:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A0=86=E5=9E=9B=E6=9C=BA=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WcfControlMonitorLib/CControl.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/WcfControlMonitorLib/CControl.cs b/WcfControlMonitorLib/CControl.cs index 966f190..a52df44 100644 --- a/WcfControlMonitorLib/CControl.cs +++ b/WcfControlMonitorLib/CControl.cs @@ -849,6 +849,7 @@ namespace WcfControlMonitorLib int order = ccf.GetDeviceOrderFromMonitor(TaskIdx); int StartDevice = _StartDevice;//当前调度任务起点 int EndDevice = _EndDevice;//当前调度任务终点 + string BarCode = ccf.GetBarCodeFromMonitor(TaskIdx); #region 补充顶升机不在高位的顶升命令 //if ((DeviceIdx >= 35000) && (DeviceIdx <= 35003)&&(order ==4)) //{//20120110补充顶升机不在高位的顶升命令 @@ -2096,6 +2097,7 @@ namespace WcfControlMonitorLib { AheadDetectUnallow.Append("12051入库模式!"); UpdateAheadDetectUnallow(AheadDetectUnallow, minMidx); + return false; } } else if (CONTROLTASKTYPE == 2 &&StartDevice == 13008 && EndDevice != 12051) @@ -2106,6 +2108,7 @@ namespace WcfControlMonitorLib { AheadDetectUnallow.Append("12051出库模式!"); UpdateAheadDetectUnallow(AheadDetectUnallow, minMidx); + return false; } } @@ -2118,6 +2121,7 @@ namespace WcfControlMonitorLib { AheadDetectUnallow.Append("12004入库模式!"); UpdateAheadDetectUnallow(AheadDetectUnallow, minMidx); + return false; } } else if (CONTROLTASKTYPE == 2 && StartDevice == 14004 && EndDevice != 12004) @@ -2128,9 +2132,28 @@ namespace WcfControlMonitorLib { AheadDetectUnallow.Append("12004出库模式!"); UpdateAheadDetectUnallow(AheadDetectUnallow, minMidx); + return false; } } + #endregion + + #region 山东时代堆垛机扫码检测,需要PLCASK和任务条码一致 lzm + + if (CONTROLTASKTYPE == 2 && order == 3&&DeviceKind==1) { //3:送货任务 + DataView data = new DataView(); + // var device = Model.CGetInfo.GetDeviceInfo(dcode); + data = dbo.ExceSQL(string.Format("SELECT F_BarCode FROM T_Base_PLC_Ask WHERE F_BindingDevice={0})", DeviceIdx)).Tables[0].DefaultView;//从视图表获取任务条码 + if (data.Count > 0) + { + if (data[0]["F_BarCode"].ToString() != BarCode.ToString())//条码和扫码结果一致正常回复 + { + AheadDetectUnallow.Append($"堆垛机设备{DeviceIdx}任务条码{data[0]["F_BarCode"].ToString()}与实物条码{BarCode.ToString()}不一致"); + UpdateAheadDetectUnallow(AheadDetectUnallow, minMidx); + return false; + } + } + } #endregion #region lzm20250225 注释其他项目 //20101011