From 64ec1a7fb55389d8db371d112e49f741de866796 Mon Sep 17 00:00:00 2001 From: lss <Lss@HanInfo> Date: 星期三, 18 六月 2025 16:41:26 +0800 Subject: [PATCH] 业务开发与优化 --- HH.WCS.Mobox3/HH.WCS.Mobox3.DaYang/api/MoboxController.cs | 43 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.DaYang/api/MoboxController.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.DaYang/api/MoboxController.cs index c489f0b..e3061ad 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.DaYang/api/MoboxController.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.DaYang/api/MoboxController.cs @@ -64,7 +64,7 @@ { HttpHelper http = new HttpHelper(); var CancelResult = http.CancelTask(task, url.url); - if (CancelResult != null && CancelResult.Code ==200) + if (CancelResult != null && CancelResult.Code == 200) { WCSHelper.UpdateStatus(model.TaskNo, 4); result.resultMsg = "浠诲姟鍙栨秷宸蹭笅鍙�; @@ -78,7 +78,7 @@ { LogHelper.Info($"浠诲姟鍙栨秷锛屾湭鎵惧埌瀵瑰簲鍙栨秷浠诲姟鎺ュ彛锛岃妫�煡閰嶇疆鏂囦欢"); } - + } else { @@ -93,8 +93,42 @@ } return result; } + /// <summary> - /// 浠诲姟寮哄埗瀹屾垚锛堢洰鍓嶆敮鎸乶dc锛�+ /// 鍙犵洏鏈虹姸鎬佸垏鎹�+ /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost] + public SimpleResult CancelTask(MoboxChangeStatus model) + { + var result = new SimpleResult(); + //鍒囨崲鍙犵洏鏈虹姸鎬侊紝鍘昏皟鐢╳cs鎺ュ彛 + HttpHelper http = new HttpHelper(); + var url = Settings.tableUrls.Find(a => a.id == 5); + if (url != null) + { + var changeResult = http.ChangeStatus(model.Type, url.url); + if (changeResult.Code == 200) + { + result.resultCode = 0; + result.resultMsg = "鍒囨崲鎴愬姛"; + } + else + { + result.resultCode = changeResult.Code; + result.resultMsg = "鍒囨崲澶辫触锛� + result.resultMsg; + } + } + else + { + result.resultCode = 1; + result.resultMsg = "鏍规嵁閰嶇疆鏂囦欢鏈幏鍙栧埌鍙犵洏鏈虹姸鎬佸垏鎹㈡帴鍙o紝璇锋鏌ラ厤缃枃浠�; + } + return result; + } + /// <summary> + /// 浠诲姟寮哄埗瀹屾垚 /// </summary> /// <param name="model"></param> /// <returns></returns> @@ -102,6 +136,7 @@ public SimpleResult CompleteTask(MoboxTaskBase model) { var result = new SimpleResult(); + return result; } @@ -168,6 +203,7 @@ return ApiHelper.SortingResultCheck(models); } + /// <summary> /// 鍒ゆ柇鏄惁鏄暣鎵樺垎鎷� /// </summary> @@ -176,7 +212,6 @@ public SimpleResult CheckSortingWholeCntr(CheckSortingWholeCntr model) { return ApiHelper.CheckSortingWholeCntr(model); - } } } -- Gitblit v1.9.1