From 140768c21ee2191ba5b390ef4173c15044f11433 Mon Sep 17 00:00:00 2001 From: czw <selecti@yeah.net> Date: 星期五, 27 六月 2025 12:58:25 +0800 Subject: [PATCH] 11 --- 2025年6月12日/AuxAllWCS/Build/Project/代码/ViewModel.cs | 37 ++++++++++++++++++++++++++++++------- 1 files changed, 30 insertions(+), 7 deletions(-) diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/ViewModel.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/ViewModel.cs" index 0d391e4..3b6c8bb 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/ViewModel.cs" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/ViewModel.cs" @@ -142,6 +142,7 @@ List<string> cntrs = wcsTask.S_CNTRS.Split(',').ToList(); bool bobe = false; + //model.method = model.method?.ToLower(); switch (model.method) { case "start": @@ -154,7 +155,9 @@ bobe = true; } break; + case "outBin": case "outbin": + model.method = model.method?.ToLower(); LogHelper.Info($"娴峰悍杞︿换鍔$姸鎬佸彉鏇翠负鍙栬揣瀹屾垚锛屼换鍔″彿涓猴細{model.taskCode}", "agv鏉弶浜や簰鏃ュ織"); wcsTask.S_B_STATE = "鍙栬揣瀹屾垚"; @@ -184,9 +187,12 @@ } else if (device.deviceType == 2) { - var inde = device.location.ToList().FindIndex(x => x == wcsTask.S_START_LOC) == 0; - string V = inde ? "D1224" : "D1225"; - Conn.榛樿Redis.SetValue(device.deviceName + "." + V, "0", device.deviceName + "Queue"); + //Task.Run(() => + //{ + // var inde = device.location.ToList().FindIndex(x => x == wcsTask.S_START_LOC) == 0; + // string V = inde ? "D1224" : "D1225"; + // Conn.榛樿Redis.SetValue(device.deviceName + "." + V, "0", device.deviceName + "Queue"); + //}); } } //LocationHelper.UnLockLoc(wcsTask.S_START_LOC); @@ -244,11 +250,15 @@ } } else if (device2.deviceType == 2) + { if (device2.deviceName.Contains("Js鎹烽『")) { - var inde = device2.location.ToList().FindIndex(x => x == wcsTask.S_END_LOC) == 0; - string V = inde ? "D1224" : "D1225"; - Conn.榛樿Redis.SetValue(device2.deviceName + "." + V, "1", device2.deviceName + "Queue"); + Task.Run(() => + { + var inde = device2.location.ToList().FindIndex(x => x == wcsTask.S_END_LOC) == 0; + string V = inde ? "D1224" : "D1225"; + Conn.榛樿Redis.SetValue(device2.deviceName + "." + V, "1", device2.deviceName + "Queue"); + }); var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new { @@ -265,6 +275,19 @@ // else tag.Js2.D1225 = 1; //} } + var ssloc = device2.deviceNo[1]; + var endloc = locrep.FindEntity(x => x.S_LOC_CODE == ssloc); + LogHelper.Info($"鎹烽『鍗歌揣鍚庯紝 鏌ョ湅缂撳瓨浣�{ssloc}-{endloc?.N_CURRENT_NUM}>0? 鍒欑敵璇穖es鎼蛋銆�); + if (endloc != null && endloc.N_CURRENT_NUM == 1) + { + var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new + { + requestType = 3, + startBit = ssloc + })); + LogHelper.Info($"{ssloc}鐢宠mes浠诲姟缁撴灉{str}"); + } + } } //LocationMethod.JudgeLocation(wcsTask); @@ -364,7 +387,7 @@ } else { - LogHelper.Info($"褰撳墠浠诲姟鍙蜂换鍔′笉瀛樺湪{model.taskCode}", "agv鏉弶浜や簰鏃ュ織"); + LogHelper.Info($"褰撳墠浠诲姟鍙蜂换鍔′笉瀛樺湪{model.taskCode} agv鏉弶浜や簰鏃ュ織"); } #endregion [鑷畾涔夋寚浠[20250324165239206][OperateHKTaskStatus] } -- Gitblit v1.9.1