From acc57630416a1328ea722a3f80d1b2b8519c8d5f Mon Sep 17 00:00:00 2001 From: cjs <2216046164@qq.com> Date: 星期五, 30 五月 2025 17:24:07 +0800 Subject: [PATCH] 111 --- ams/Hanhe.iWCS.JingmenGEMTwoProtocol/PLCControl.cs | 36 ++++++++++++++++++++++++++++-------- 1 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/PLCControl.cs b/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/PLCControl.cs index d79d552..b6de37b 100644 --- a/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/PLCControl.cs +++ b/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/PLCControl.cs @@ -981,7 +981,7 @@ if (req) { - ProcessHelper.deleteInfo(plc.location + "-澶嶇О鍏ョ紦瀛樻灦"); + ProcessHelper.deleteInfo(plc.location + "-澶嶇О涓嬬嚎"); var queryList = MongoDBSingleton.Instance.Find<packageInfoModel>(Query.And(Query.EQ("machineNo", model.machince), Query.EQ("trayCode", model.ext2), Query.EQ("weight2", "")), "packageInfoModel"); if (queryList.Count > 0) { @@ -1027,6 +1027,10 @@ MongoDBSingleton.Instance.Update<ProductList>(Query.And(Query.EQ("Date", DateTime.Now.ToString("yyyy-MM-dd")), Query.EQ("machine", model.machince)), Update.Set("percentOfPass", proInfo.percentOfPass).Set("qualifiedQuantity", proInfo.qualifiedQuantity), UpdateFlags.None); } } + else + { + ProcessHelper.recordInfo(plc.location + "-澶嶇О涓嬬嚎", "褰撳墠鍗婃垚鍝佸簱鍖烘湭鑾峰彇鍒板彲鐢ㄨ揣浣嶏紝妫�煡鏄惁宸叉弧"); + } } if (result.result[2] == 2) @@ -1037,7 +1041,7 @@ req = WMSHelper.WMSIn(plc.location, model.ext2, ref wmstaskno, ref traycode, timeStamp); if (req) { - ProcessHelper.deleteInfo(plc.location + "-澶嶇О鍏ョ紦瀛樻灦"); + ProcessHelper.deleteInfo(plc.location + "-澶嶇О涓嬬嚎"); var wirte = OITcpHelper.RegisterWriteOutPut(new OITcpHelper.RegisterWriteOutPutModel { addr = plc.writeAddr + 3, @@ -1083,7 +1087,11 @@ else CMMLog.Debug($"packageInfoModel鏈壘鍒版暟鎹紝machineNo:{model.machince},trayCode:{model.ext2}"); } } - else CMMLog.Debug($"澶嶇О鍏ョ紦瀛樻灦NG娴佺▼锛歐MS鐢熸垚浠诲姟澶辫触锛�); + else + { + ProcessHelper.recordInfo("澶嶇О涓嬬嚎", "褰撳墠NG搴撳尯鏈幏鍙栧埌鍙敤璐т綅锛屾鏌ユ槸鍚﹀凡婊�); + CMMLog.Debug($"澶嶇О鍏ョ紦瀛樻灦NG娴佺▼锛歐MS鐢熸垚浠诲姟澶辫触锛�); + } } string PlcBit02 = Settings.GetPlcInfo().Where(a => a.deviceType == "2").FirstOrDefault().location; UpdateBuilder update = Update.Set("ng", result.result[2]); @@ -1501,6 +1509,7 @@ string ChangeBit = WMSHelper.WmsUpdateWay(taskInfo.CN_S_SOURCE_NO, plc.Extend); if (!string.IsNullOrEmpty(ChangeBit)) { + ProcessHelper.deleteInfo("鍙犲寘NG"); CMMLog.Info($"璧风偣锛歿taskInfo.CN_S_END_BIT}"); CMMLog.Info($"缁堢偣锛歿ChangeBit}"); int[] parms = { StockInstance.Instance.GetAGVCodeForBitCode(taskInfo.CN_S_END_BIT), StockInstance.Instance.GetAGVCodeForBitCode(ChangeBit) }; @@ -1511,12 +1520,15 @@ TSHelper.GoToAGV(taskNo, 10, 8); MongoDBSingleton.Instance.Update<TN_I_TASK_MST>(Query.EQ("CN_S_TASK_NO", taskNo), Update.Set("CN_S_END_BIT", ChangeBit).Set("CN_S_START_BIT", taskInfo.CN_S_END_BIT), "TN_I_TASK_MST", UpdateFlags.None); - + MongoDBSingleton.Instance.Remove<WMSInfo>(Query.EQ("trayCode", taskInfo.CN_S_BATCH_NO), RemoveFlags.Single); } - else CMMLog.Debug($"璋冪敤WMS鏀归亾鎺ュ彛锛屾湭鑾峰彇鍒板彲鐢ㄧ偣浣嶃�"); - //Console.WriteLine($"璇荤爜淇℃伅姣斿缁撴灉锛氭潯鐮佷笌浼犻�鐨勬暟鎹笉涓�嚧"); + else + { + CMMLog.Debug($"璋冪敤WMS鏀归亾鎺ュ彛锛屾湭鑾峰彇鍒板彲鐢ㄧ偣浣嶃�"); + ProcessHelper.recordInfo("鍙犲寘NG","NG搴撳尯鏈幏鍙栧埌鍙敤璐т綅锛屾鏌G搴撳尯鏄惁宸叉弧"); + } } } @@ -1863,8 +1875,16 @@ string wmstaskno = ""; string traycode = ""; bool req = WMSHelper.WMSIn(plc.location, "", ref wmstaskno, ref traycode); - if (req) CMMLog.Debug($"璋冪敤WMS鑾峰彇涓夋ゼ鍙犵洏鏈虹敓鎴愪换鍔℃垚鍔燂紒"); - else CMMLog.Debug($"璋冪敤WMS鑾峰彇涓夋ゼ鍙犵洏鏈虹敓鎴愪换鍔″け璐ワ紒"); + if (req) + { + CMMLog.Debug($"璋冪敤WMS鑾峰彇涓夋ゼ鍙犵洏鏈虹敓鎴愪换鍔℃垚鍔燂紒"); + ProcessHelper.deleteInfo("鍙犵洏涓嬬嚎"); + } + else + { + ProcessHelper.recordInfo("鍙犵洏涓嬬嚎", "鍙犵洏鏈轰笅绾垮簱鍖烘湭鏌ヨ鍒板彲鐢ㄨ揣浣嶏紝妫�煡鍙犵洏鏈轰笅绾垮簱鍖烘槸鍚﹀凡婊�); + CMMLog.Debug($"璋冪敤WMS鑾峰彇涓夋ゼ鍙犵洏鏈虹敓鎴愪换鍔″け璐ワ紒"); + } } } } -- Gitblit v1.9.1