From 2acc93755ddc56beb46e08b655ec9d94968d829f Mon Sep 17 00:00:00 2001 From: 杨张扬 <634643841@qq.com> Date: 星期二, 03 六月 2025 17:21:43 +0800 Subject: [PATCH] 满托下线PDA呼叫,容器ID需转换成ASCII字符串 --- api/ApiHelper.cs | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/api/ApiHelper.cs b/api/ApiHelper.cs index 4040d48..e8a32c6 100644 --- a/api/ApiHelper.cs +++ b/api/ApiHelper.cs @@ -466,7 +466,7 @@ var allCount = allCg.Count; var waittime = SpecHelper.GetExportTime(model.Spe); - var okCount = allCg.Count(o => o.N_ITEM_STATE == 0 && o.S_ITEM_STATE == "鍚堟牸" && o.T_MODIFY.AddMinutes(waittime) <= System.DateTime.Now); + var okCount = allCg.Count(o => o.N_ITEM_STATE == 0 && o.S_ITEM_STATE == "鍚堟牸" && o.T_MODIFY.AddHours(waittime) <= System.DateTime.Now); return $"婊¤冻{model.Spe}瑙勬牸鐨勬�鎵樼洏鏁伴噺锛歿allCount}锛屽叾涓悎鏍间笖闈欑疆鏃堕棿宸茶繃鐨勬墭鐩樻暟閲忥細{okCount}"; } catch (Exception ex) @@ -638,6 +638,16 @@ LogHelper.Info("瑙﹀彂API锛歅DA婊℃墭涓嬬嚎鍏ュ簱" + JsonConvert.SerializeObject(model), "API"); try { + if( model.RfId.Length < 16) + { + result.resultCode = 1; + result.resultMsg = $"杈撳叆鐨凴FID锛岄暱搴︿笉澶燂紝瑕佸ぇ浜�6浣�; + LogHelper.Info(result.resultMsg); + return result; + } + + model.RfId = WMSHelper.ConvertHexToAscii(model.RfId); + //璇ヤ骇绾跨殑婊℃墭涓嬬嚎浣嶇疆锛岃捣鐐� var startPoint = Settings.ProductionLines.FirstOrDefault(a => a.PointOut == model.StartLoc); if (startPoint != null)//璧风偣瀛樺湪 @@ -822,7 +832,7 @@ } else { - result.resultCode = 9; + result.resultCode = 12; result.resultMsg = $"姝や綅缃細{startPoint.PointOut}宸查攣浣�; LogHelper.Info(result.resultMsg); return result; -- Gitblit v1.9.1