From 01cc5773457f68274ef1b2d9d9daca8983761828 Mon Sep 17 00:00:00 2001 From: 杨前锦 <1010338399@qq.com> Date: 星期四, 05 六月 2025 17:33:03 +0800 Subject: [PATCH] 佳通bug优化 --- HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/api/ApiHelper.cs | 45 ++++++++++++++++++--------------------------- 1 files changed, 18 insertions(+), 27 deletions(-) diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/api/ApiHelper.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/api/ApiHelper.cs index 3ec4343..e51ab71 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/api/ApiHelper.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/api/ApiHelper.cs @@ -813,7 +813,7 @@ return responseResult; } - middleLoc = WMSHelper.GetMinTaskTransfeLoc(startLoc.S_AREA_CODE, "1", "2"); + middleLoc = WMSHelper.GetMinTaskTransfeLoc(startLoc.S_AREA_CODE, 2 , 2); if (middleLoc == null) { WMSHelper.addAlarmRecord("娴佺▼寮傚父", "楂�, $"MES鍙枡浠诲姟{mesTask.ID},绔嬪簱鎺ラ┏浣嶅彲鑳藉浜庨攣瀹氭垨绂佺敤鐘舵�锛岃鏌ョ湅"); responseResult.code = 1; @@ -1238,7 +1238,7 @@ wmsEndLoc = WMSHelper.getInStockEndLoc(null, container.N_DETAIL_COUNT == 0 ? 0 : 1, container.N_TYPE); if (wmsEndLoc != null) { - agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, "1", "1", "2"); // 1.绔嬪簱鎺ラ┏浣�1.鍏ュ簱 2.闈炵洿杩�+ agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, 1, 2); // 1.绔嬪簱鎺ラ┏浣�1.鍏ュ簱 2.闈炵洿杩� if (agvEndLoc != null) { LogHelper.Info($"鍒涘缓绔嬪簱绔欏彴鍒扮珛搴撶殑棰勫垱寤轰换鍔★紝agv缁堢偣璐т綅:{agvEndLoc.S_CODE},绔嬪簱缁堢偣璐т綅:{wmsEndLoc.S_CODE}", "AGV"); @@ -1314,7 +1314,7 @@ wmsEndLoc = WMSHelper.getInStockEndLoc(null, container.N_DETAIL_COUNT == 0 ? 0 : 1, container.N_TYPE); if (wmsEndLoc != null) { - agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, "1", "1", "2"); // 1.绔嬪簱鎺ラ┏浣�1.鍏ュ簱 2.闈炵洿杩�+ agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, 1, 2); // 1.绔嬪簱鎺ラ┏浣�1.鍏ュ簱 2.闈炵洿杩� if (agvEndLoc != null) { LogHelper.Info($"鍒涘缓绔嬪簱绔欏彴鍒扮珛搴撶殑棰勫垱寤轰换鍔★紝agv缁堢偣璐т綅:{agvEndLoc.S_CODE},绔嬪簱缁堢偣璐т綅:{wmsEndLoc.S_CODE}", "AGV"); @@ -1448,7 +1448,7 @@ } } - middleLoc = WMSHelper.GetTransfeRelevanceLoc(startLoc.S_AREA_CODE, "1" , "2"); + middleLoc = WMSHelper.GetTransfeRelevanceLoc(startLoc.S_AREA_CODE, 1 , 2); if (middleLoc != null) { @@ -1680,7 +1680,7 @@ wmsEndLoc = WMSHelper.getInStockEndLoc(null, container.N_DETAIL_COUNT == 0 ? 0 : 1, container.N_TYPE); if (wmsEndLoc != null) { - agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, "1", "1", "2"); // 1.绔嬪簱鎺ラ┏浣�1.鍏ュ簱 2.闈炵洿杩�+ agvEndLoc = WMSHelper.GetMinTaskTransfeLoc(wmsEndLoc.S_AREA_CODE, 1, 2); // 1.绔嬪簱鎺ラ┏浣�1.鍏ュ簱 2.闈炵洿杩� if (agvEndLoc != null) { // 棰勫厛鐢熸垚鍏ュ簱绔欏彴-绔嬪簱缁堢偣鐨勬惉杩愪换鍔�@@ -2025,41 +2025,32 @@ /// </summary> /// <param name="model"></param> /// <returns></returns> - public static bool switchStationAttribute(SwitchStationAttributeModel model) + public static ResponseResult switchStationAttribute(SwitchStationAttributeModel model) { - bool result = false; + ResponseResult responseResult = new ResponseResult(); var task = WCSHelper.GetTaskByStartOrEnd(model.locCode); - if (task == null) + if (task == null) { - var transfeRelevance= WMSHelper.GetTransfeRelevance(model.locCode); // 鎺ラ┏浣嶅睘鎬�+ var transfeRelevance = WMSHelper.GetTransfeRelevance(model.locCode); // 鎺ラ┏浣嶅睘鎬� LogHelper.Info($"鍘熺珯鍙板睘鎬э細{JsonConvert.SerializeObject(transfeRelevance)}", "WMS"); - if (transfeRelevance != null && transfeRelevance.S_TYPE == "1") + if (transfeRelevance != null && transfeRelevance.N_PROPERTY == 2) { if (model.signalType == "1") { - if (transfeRelevance.S_PROPERTY == "2") - { - result = true; - } - else - { - result = WMSHelper.updateTransfeLocProperty(model.locCode, "2"); - } + WMSHelper.updateTransfeLocProperty(model.locCode, 0); } if (model.signalType == "2") { - if (transfeRelevance.S_PROPERTY == "3") - { - result = true; - } - else - { - result = WMSHelper.updateTransfeLocProperty(model.locCode, "3"); - } + WMSHelper.updateTransfeLocProperty(model.locCode, 1); } } } - return result; + else + { + responseResult.code = 1; + responseResult.msg = "鎺ラ┏浣嶅瓨鍦ㄦ湭瀹屾垚鐨勪换鍔★紝鏃犳硶鍒囨崲绔欏彴灞炴�"; + } + return responseResult; } /// <summary> -- Gitblit v1.9.1