From d57815781381a23be2255f1f93b480950c6c39a8 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 14 十一月 2025 17:20:24 +0800
Subject: [PATCH] 新增任务看板滚动功能及优化文档布局在 Home.vue中新增任务看板滚动显示功能,优化数据总览和图表样式新增 iconfont 字体文件及相关样式,提升页面视觉效果。在 TaskService.cs和 AGVSignal.cs中新增对RelocationGroup 的任务状态处理逻辑。新增EnumHelper.cs 中的枚举描述获取方法,支持动态描述解析优化按钮逻辑,统一“其他出库”和“调拨出库”的处理方式更新文档布局文件,调整引用路径、索引和视图状态。 在StockInfoService.cs中新增任务数据查询逻辑,支持任务状态描述返回。

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs |  101 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 69 insertions(+), 32 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs"
index cd322d0..0245713 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs"
@@ -964,6 +964,74 @@
     }
     #endregion 璇锋眰鍑哄簱锛堝疄鐩�&绌虹洏锛�
 
+    #region 璇锋眰绉诲簱浠诲姟
+    public async Task<WebResponseContent> RequestRelocationTaskAsync(string SourceAddress,string TargetAddress)
+    {
+        WebResponseContent content = new WebResponseContent();
+        try
+        {
+            var startLocation = await _locationRepository.QueryFirstAsync(x => x.LocationCode == SourceAddress);
+            var endLocation = await _locationRepository.QueryFirstAsync(x => x.LocationCode == TargetAddress);
+
+            if (!startLocation.IsNotEmptyOrNull() || !endLocation.IsNotEmptyOrNull())
+            {
+                return content.Error("搴撲綅淇℃伅涓嶅瓨鍦�");
+            }
+            if (endLocation.LocationStatus != (int)LocationEnum.Free)
+            {
+                return content.Error($"缁堢偣搴撲綅{endLocation.LocationCode}鏈浜庣┖闂茬姸鎬侊紝璇蜂汉宸ョ‘璁ゅ簱浣嶇姸鎬�");
+            }
+            if ((startLocation.AreaId == 1 || endLocation.AreaId == 1) && startLocation.AreaId != endLocation.AreaId)
+            {
+                return content.Error("绉诲簱璧风偣搴撲綅涓庣粓鐐瑰簱浣嶄笉鍦ㄥ悓涓�鍖哄煙");
+            }
+            if (startLocation.Floor != endLocation.Floor)
+            {
+                return content.Error("绉诲簱璧风偣搴撲綅涓庣粓鐐瑰簱浣嶄笉鍦ㄥ悓涓�妤煎眰");
+            }
+
+            var stock = await _stockInfoRepository.QueryFirstAsync(x => x.LocationCode == startLocation.LocationCode);
+            var taskNew = new Dt_Task
+            {
+                Grade = startLocation.Floor == "1F" ? 10 : 1,
+                Roadway = endLocation.RoadwayNo,
+                TargetAddress = endLocation.LocationCode,
+                Dispatchertime = DateTime.Now,
+                MaterialNo = "",
+                NextAddress = endLocation.LocationCode,
+                OrderNo = null,
+                PalletCode = stock == null ? "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000) : stock.PalletCode,
+                SourceAddress = startLocation.LocationCode,
+                CurrentAddress = startLocation.LocationCode,
+                TaskState = startLocation.AreaId == 1 ? (int)TaskRelocationStatusEnum.RelocationNew : (int)TaskRelocationStatusEnum.RelocationNewAGV,
+                TaskType = (int)TaskRelocationTypeEnum.Relocation,
+                TaskNum = BaseDal.GetTaskNo().Result,
+                CreateDate = DateTime.Now,
+                TaskId = 0,
+                AGVTaskNum = GenerateUniqueId(),
+                Floor = startLocation.Floor,
+            };
+
+
+            var result = AddTaskAsync(new List<Dt_Task>() { taskNew });
+            await _unitOfWorkManage.UseTranAsync(async () =>
+            {
+                await _locationStatusChangeRecordRepository.AddDataAsync(result.Item2);
+                await _locationRepository.UpdateDataAsync(result.Item1);
+                await BaseDal.AddDataAsync(taskNew);
+            });
+            await SendWCSTask(CreateListTaskDTO(taskNew));
+            return content.OK("鎴愬姛");
+        }
+        catch (Exception ex)
+        {
+            return content.Error(ex.Message);
+        }
+    }
+
+
+    #endregion
+
     #region 璇锋眰璺ㄦゼ灞�2浠诲姟
     /// <summary>
     /// 璇锋眰璺ㄦゼ灞�2浠诲姟
@@ -1258,7 +1326,7 @@
                             PalletCode = stock == null ? "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000) : stock.PalletCode,
                             SourceAddress = item.LocationCode,
                             CurrentAddress = item.LocationCode,
-                            TaskState = (int)TaskAGVCarryStatusEnum.CarryNew,
+                            TaskState = (int)TaskRelocationStatusEnum.RelocationNewAGV,
                             TaskType = (int)TaskRelocationTypeEnum.Relocation,
                             TaskNum = BaseDal.GetTaskNo().Result,
                             CreateDate = DateTime.Now,
@@ -1404,37 +1472,6 @@
         }
         return content;
     }
-    #endregion
-
-    #region 鑾峰彇浠诲姟鏁版嵁
-    public async Task<WebResponseContent> GetTaskData()
-    {
-        WebResponseContent content = new WebResponseContent();
-        try
-        {
-            var task = await BaseDal.QueryDataAsync(x => true);
-            var taskData = new List<TaskData>
-            {
-                new TaskData { Status = "宸插彇娑�", Count = task.Count+50 },
-                new TaskData { Status = "宸插畬鎴�", Count = 735 }
-            };
-
-            // 鏋勫缓绗﹀悎瑕佹眰鐨勬牸寮�
-            var result = taskData.Select(item => new
-            {
-                value = item.Count,
-                name = item.Status,
-                itemStyle = new { color = item.Status == "宸插彇娑�" ? "#FF0000" : "#00FF00" }
-            }).ToList();
-
-            return content.OK(data: result);
-        }
-        catch (Exception ex)
-        {
-            return content.Error(ex.Message);
-        }
-    }
-
     #endregion
 
     #endregion 澶栭儴鎺ュ彛鏂规硶

--
Gitblit v1.9.3