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 | 53 ++++++++++++++++++++++++++--------------------------- 1 files changed, 26 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 1409687..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> @@ -2145,6 +2136,8 @@ /// 璁惧鎶ヨ鍙嶉妯″瀷 /// </summary> public class DeviceAlertorFeedbackModel { + public string reqId { get; set; } + public string reqTime { get; set; } public string deviceNo { get; set; } // 璁惧鍙� public string errCode { get; set; } // 閿欒鐮� public string errMsg { get; set; } // 閿欒淇℃伅 @@ -2155,6 +2148,8 @@ /// 鑾峰彇鎵樼洏鐗╂枡淇℃伅妯″瀷 /// </summary> public class FindTrayItemInfoModel { + public string reqId { get; set; } + public string reqTime { get; set; } public string cntrNo { get; set; } // 鎵樼洏鍙� } @@ -2162,6 +2157,8 @@ /// 鐢宠缁堢偣妯″瀷 /// </summary> public class ApplyDestinationModel { + public string reqId { get; set; } + public string reqTime { get; set; } public string taskNo { get; set; } // 浠诲姟鍙� public string loc { get; set; } // 褰撳墠璐т綅 public int applyType { get; set; } // 鐢宠绫诲瀷 1锛氬爢鍨涙満鏀捐揣寮傚父鐢宠鏂扮粓鐐癸紱2锛氳緭閫佺嚎鍒拌揪鎺ラ┏浣嶇敵璇风粓鐐癸紱3锛�@@ -2180,6 +2177,8 @@ /// 浠诲姟鐘舵�鍙嶉妯″瀷 /// </summary> public class TaskStatusFeedbackModel { + public string reqId { get; set; } + public string reqTime { get; set; } public string taskNo { get; set; } // 浠诲姟鍙� public string subTaskNo { get; set; } // 瀛愪换鍔″彿 public int status { get; set; } // 浠诲姟鐘舵� 1锛氬紑濮�鎵ц涓紱2:瀹屾垚锛�锛氬噯澶囧彇璐э紱4锛氬彇璐у畬鎴愶紱5锛氬噯澶囧嵏璐э紱6锛氬嵏璐у畬鎴愶紱7锛氬紓甯稿彇娑堬紱8锛氬己鍒跺畬鎴� -- Gitblit v1.9.1