From 969aafa8bd335025da4caf5939a1626bad4f4236 Mon Sep 17 00:00:00 2001 From: chengsc <11752@DESKTOP-DS49RCP> Date: 星期四, 19 六月 2025 16:54:03 +0800 Subject: [PATCH] Merge branch 'csc' --- Admin.NET/WCS.Application/Util/FourWayCarUtil.cs | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Admin.NET/WCS.Application/Util/FourWayCarUtil.cs b/Admin.NET/WCS.Application/Util/FourWayCarUtil.cs index 596b8d0..0a8fe55 100644 --- a/Admin.NET/WCS.Application/Util/FourWayCarUtil.cs +++ b/Admin.NET/WCS.Application/Util/FourWayCarUtil.cs @@ -7,6 +7,7 @@ using System.Text; using System.Threading.Tasks; using WCS.Application.Entity; +using static Elastic.Clients.Elasticsearch.JoinField; using static SKIT.FlurlHttpClient.Wechat.Api.Models.CustomServiceKfSessionGetWaitCaseResponse.Types; namespace WCS.Application.Util; @@ -25,6 +26,10 @@ /// <returns></returns> public static List<CarModel> GetCarPathUp(List<CarModel> list, int moveType) { + if (list == null) + { + return null; + } for (int i = 0; i < list.Count; i++) { if (i >= 0 && i < list.Count - 1) @@ -162,6 +167,15 @@ } + /// <summary> + /// + /// </summary> + /// <param name="data">褰撳墠浠诲姟鎬昏矾寰�</param> + /// <param name="kXCarList">鎵�鏈夊皬杞�</param> + /// <param name="assignCar">褰撳墠鍒嗛厤灏忚溅</param> + /// <param name="waitTask">褰撳墠鎬讳换鍔�</param> + /// <param name="moveType">0鍘诲彇璐т换鍔� 1鍘绘斁璐�</param> + /// <returns></returns> public static bool AddCarTask(List<CarModel> data, List<CarInfo> kXCarList, CarInfo assignCar, WcsTask waitTask,int moveType) { #region 鑾峰彇閫傚悎鎵ц褰撳墠浠诲姟鐨勫皬杞� 鐢熸垚璺緞锛堥渶鑰冭檻灏忚溅闃婚樆鎸★級 @@ -324,7 +338,7 @@ var lastPath = lastPathList[lastPathList.Length - 2]; var lastPath2 = lastPath.Substring(0,6); - //濡傛灉姝ゆ鍒嗛厤璺緞鍖呭惈閱夎垶涓渶缁堣妭鐐硅矾寰勶紝娣诲姞绉昏蛋灏忚溅 + //濡傛灉姝ゆ鍒嗛厤璺緞鍖呭惈浠诲姟涓渶缁堣妭鐐硅矾寰勶紝娣诲姞绉昏蛋灏忚溅 if (path.Contains(lastPath2)) { @@ -423,7 +437,6 @@ } - /// <summary> /// 鑾峰彇灏忚溅璺緞 /// </summary> @@ -491,7 +504,7 @@ if (current.Equals(end)) { - Log.Error(ReconstructPath(cameFrom, current).ToString()); + Log.Error("灏忚溅璺緞鍒嗛厤锛�" +ReconstructPath(cameFrom, current).ToString()); return ReconstructPath(cameFrom, current); } @@ -611,6 +624,28 @@ } /// <summary> + /// 鑾峰彇鎬讳换鍔¤〃涓嬪彂ID涓婚敭 + /// </summary> + /// <returns></returns> + public static int GetTaskId() + { + var list = _db.Queryable<WcsTask>().ToList(); + var maxNo = list.Max(m => m.TaskId); + + if (maxNo != null && maxNo > 0) + { + if (maxNo++ > 99999999) + { + return 1; + } + + return (int)maxNo++; + } + + return 1; + } + + /// <summary> /// 璁$畻鏇煎搱椤胯窛绂� /// </summary> /// <param name="start">璧峰浣嶇疆</param> -- Gitblit v1.8.0