From e0e8c8f0b0abc141b116779afbcee970e091caaf Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 05 十二月 2025 09:48:09 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu

---
 项目代码/WCS/WCSClient/src/extension/taskinfo/task.js                         |   28 +++++++++++++
 项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs |   13 ++++++
 项目代码/WCS/WCSClient/config/buttons.js                                      |    9 ++++
 项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs            |   40 +++++++++++++++++++
 项目代码/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs          |    7 +++
 5 files changed, 95 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/config/buttons.js"
index 50c4dfd..611eadd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/config/buttons.js"
@@ -42,6 +42,15 @@
     }
 },
 {
+    name: "浠� 鍔� 閲� 鏂� 涓� 鍙�",
+    icon: '',
+    class: '',
+    type: 'success',
+    value: 'ResendTask',
+    onClick: function () {
+    }
+},
+{
     name: "浠诲姟鍙栨秷",
     icon: '',
     class: '',
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/extension/taskinfo/task.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/extension/taskinfo/task.js"
index b0882c4..04e1039 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/extension/taskinfo/task.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/extension/taskinfo/task.js"
@@ -42,7 +42,33 @@
                     this.$refs.gridBody.open(row);
                 }
             },);
-            
+
+            let ResendTaskBtn = this.buttons.find(x => x.value == 'ResendTask');
+            if (ResendTaskBtn) {
+                ResendTaskBtn.onClick = function () {
+                    this.$confirm("鏄惁纭閲嶆柊涓嬪彂浠诲姟", "閲嶆柊涓嬪彂浠诲姟璀﹀憡", {
+                        confirmButtonText: "纭畾",
+                        cancelButtonText: "鍙栨秷",
+                        type: "warning",
+                        center: true,
+                    }).then(() => {
+                        let rows = this.$refs.table.getSelected();
+                        if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+                        if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                        var param = rows[0].taskNum;
+                        this.http
+                            .post("api/Task/ResendTask?taskNum=" + param, "")
+                            .then((x) => {
+                                if (x.status) {
+                                    this.$Message.success('浠诲姟閲嶆柊涓嬪彂');
+                                    this.refresh();
+                                } else {
+                                    return this.$error(x.message);
+                                }
+                            });
+                    });
+                }
+            }
         },
         onInited() {
             //妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index ee3aadd..1f44b21 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -145,6 +145,13 @@
         WebResponseContent TaskCompleted(int taskNum);
 
         /// <summary>
+        /// 浠诲姟閲嶆柊涓嬪彂
+        /// </summary>
+        /// <param name="taskNum">浠诲姟鍙�</param>
+        /// <returns></returns>
+        WebResponseContent ResendTask(int taskNum);
+
+        /// <summary>
         /// 鏍规嵁璁惧缂栧彿銆佷换鍔$被鍨嬪垎缁�(鍙��)鎸夌収浼樺厛绾т互鍙婂垱寤烘椂闂存帓搴忔煡璇换鍔℃睜鏂板鐨勪换鍔�
         /// </summary>
         /// <param name="deviceNo">璁惧缂栧彿</param>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
index 7169de3..367dc18 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
@@ -41,6 +41,17 @@
             return Service.ReceiveWMSTask(taskDTOs);
         }
 
+        /// <summary>
+        /// 浠诲姟閲嶆柊涓嬪彂
+        /// </summary>
+        /// <param name="taskNum"></param>
+        /// <returns></returns>
+        [HttpPost,HttpGet,Route("ResendTask"),AllowAnonymous]
+        public WebResponseContent ResendTask(int taskNum)
+        {
+            return Service.ResendTask(taskNum);
+        }
+
         [HttpPost, HttpGet, Route("RequestAssignLocation"), AllowAnonymous]
         public string? RequestAssignLocation(int taskNum, string roadwayNo)
         {
@@ -125,6 +136,8 @@
         {
             return Service.RecWMSTaskCompleted(taskNum);
         }
+
+
         [HttpPost, HttpGet, Route("YLPurchasePush"), AllowAnonymous]
         public WebResponseContent YLPurchasePush(string code)
         {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index df327ec..820e628 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -18,7 +18,6 @@
 using Newtonsoft.Json;
 using SqlSugar;
 using System.Diagnostics.CodeAnalysis;
-using System.Net.Http.Headers;
 using WIDESEA_DTO.Agv;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.APIEnum;
@@ -130,7 +129,46 @@
             {
                 return WebResponseContent.Instance.Error(ex.Message);
             }
+        }   
+
+        /// <summary>
+        /// 浠诲姟閲嶆柊涓嬪彂
+        /// </summary>
+        /// <param name="taskNum"></param>
+        /// <returns></returns>
+        public WebResponseContent ResendTask(int taskNum)
+        {
+            try
+            {
+                Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
+                if (task != null)
+                {
+                    if (task.TaskState == (int)TaskStatusEnum.SC_Executing)
+                    {
+                        task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+                    }
+                    else if(task.TaskState == (int)TaskStatusEnum.AGV_Executing)
+                    {
+                        task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
+                    }
+                    else
+                    {
+                        return WebResponseContent.Instance.Error($"姝や换鍔� { taskNum } 鏆傛椂涓嶈兘閲嶆柊涓嬪彂浠诲姟");
+                    }
+                    BaseDal.UpdateData(task);
+                }
+                else
+                {
+                    return WebResponseContent.Instance.Error($"鏈壘鍒颁换鍔℃秷鎭�");
+                }
+                return WebResponseContent.Instance.OK("浠诲姟閲嶆柊涓嬪彂鎴愬姛");  
+            }
+            catch (Exception ex)
+            {
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
         }
+
         /// <summary>
         /// 鎺ユ敹WMS浠诲姟淇℃伅
         /// </summary>

--
Gitblit v1.9.3