From 2744064f23c2233fb700970801d2ddc802f38160 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 03 三月 2026 10:28:32 +0800
Subject: [PATCH] 优化四向车任务下发

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs                  |   32 +++++++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs            |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs                    |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs                 |  105 ++++++++++++++++++-------
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs   |   19 ++++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json                     |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs           |   10 ++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs                       |    6 +
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs            |   17 +--
 10 files changed, 147 insertions(+), 50 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs"
index ec65295..bca85c8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs"
@@ -1,10 +1,13 @@
-锘縰sing System;
+锘縰sing SqlSugar;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Common.LocationEnum;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
+using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_IBasicInfoService;
 using WIDESEAWCS_Model.Models;
 
@@ -15,7 +18,19 @@
         public HKLocationInfoService(IRepository<Dt_HKLocationInfo> BaseDal) : base(BaseDal)
         {
         }
-
+        private Dictionary<string, OrderByType> _emptyAssignOrderBy = new Dictionary<string, OrderByType>()
+        {
+            { nameof(Dt_HKLocationInfo.Depth), OrderByType.Desc },
+            { nameof(Dt_HKLocationInfo.Layer), OrderByType.Asc },
+            { nameof(Dt_HKLocationInfo.Column), OrderByType.Asc },
+            { nameof(Dt_HKLocationInfo.Row), OrderByType.Asc },
+        };
         public IRepository<Dt_HKLocationInfo> Repository => BaseDal;
+
+        public Dt_HKLocationInfo? GetFreeLocationInfo(string toAreaCode)
+        {
+            Dt_HKLocationInfo hKLocationInfo = BaseDal.QueryFirst(x => x.WarehouseId.ToString() == toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt(), _emptyAssignOrderBy);
+            return hKLocationInfo;
+        }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs"
index 547d78d..7ed2fc7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs"
@@ -12,5 +12,7 @@
     public interface IHKLocationInfoService : IService<Dt_HKLocationInfo>
     {
         public IRepository<Dt_HKLocationInfo> Repository { get; }
+
+        Dt_HKLocationInfo? GetFreeLocationInfo(string toAreaCode);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
index 5278bb4..2fac1c4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
@@ -66,7 +66,7 @@
         /// </summary>
         [ImporterHeader(Name = "鍖哄煙")]
         [ExporterHeader(DisplayName = "鍖哄煙")]
-        [SugarColumn(IsNullable = true, Length = 10, ColumnDescription = "鍖哄煙")]
+        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "鍖哄煙")]
         public string Roadway { get; set; }
 
         /// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
index 2ac621f..c18c31b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
@@ -33,7 +33,7 @@
     "DBSeedEnable": false,
     "QuartzDBSeedEnable": false,
     "LogDeubgEnable": true, //鏄惁璁板綍璋冭瘯鏃ュ織
-    "PrintSql": false, //鎵撳嵃SQL璇彞
+    "PrintSql": true, //鎵撳嵃SQL璇彞
     "LogAOPEnable": true, //鏄惁璁板綍AOP鏃ュ織
     "WebSocketEnable": true, //鏄惁寮�鍚疻ebSocket鏈嶅姟
     "WebSocketPort": 9296 //WebSocket鏈嶅姟绔彛
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
index 9b80de4..5b0ff58 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
@@ -27,10 +27,8 @@
         {
             try
             {
-                int containerType = taskDTO.containerCode.Contains("LX") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();
                 //鑾峰彇璐т綅淇℃伅
-                Dt_HKLocationInfo? kLSLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType);
-                if (kLSLocationInfo == null) throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
+                Dt_HKLocationInfo? hKLocationInfo = _hKLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode) ?? throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�"); ;
                 Dt_Task dt_Task = new Dt_Task()
                 {
                     TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
@@ -38,19 +36,19 @@
                     //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                     Grade = taskDTO.taskPriority,
                     PalletCode = taskDTO.containerCode,
-                    Roadway = kLSLocationInfo.RoadwayNo,
+                    Roadway = hKLocationInfo.RoadwayNo,
                     TaskState = TaskStatusEnum.New.ObjToInt(),
                     TaskType = taskType,
                     SourceAddress = taskDTO.fromLocationCode,
                     CurrentAddress = taskDTO.fromLocationCode,
-                    NextAddress = kLSLocationInfo.LocationCode,
-                    TargetAddress = kLSLocationInfo.LocationCode,
+                    NextAddress = hKLocationInfo.LocationCode,
+                    TargetAddress = hKLocationInfo.LocationCode,
                     Creater = "WMS",
                 };
-                kLSLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt();
+                hKLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt();
                 Db.Ado.BeginTran();
                 BaseDal.AddData(dt_Task);
-                _hKLocationInfoService.Repository.UpdateData(kLSLocationInfo);
+                _hKLocationInfoService.Repository.UpdateData(hKLocationInfo);
                 Db.Ado.CommitTran();
                 return WebResponseContent.Instance.OK();
             }
@@ -70,8 +68,7 @@
         {
             try
             {
-                Dt_HKLocationInfo? hKLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode);
-                if (hKLocationInfo == null) throw new Exception($"鏈壘鍒拌捣鐐瑰簱浣嶃�恵taskDTO.fromLocationCode}銆戯紒");
+                Dt_HKLocationInfo? hKLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode) ?? throw new Exception($"鏈壘鍒拌捣鐐瑰簱浣嶃�恵taskDTO.fromLocationCode}銆戯紒");
                 if (hKLocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) throw new Exception($"璧风偣搴撲綅銆恵taskDTO.fromLocationCode}銆戝綋鍓嶅簱浣嶇姸鎬佷笉鍙嚭搴擄紒");
                 Dt_Task dt_Task = new Dt_Task()
                 {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
index b799926..e842337 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
@@ -103,7 +103,15 @@
         #region 5 璺ㄦゼ灞傝繍杈撲换鍔″垱寤�
         public WebResponseContent CarryTask(TaskDTO taskDTO, int taskType)
         {
-            return WebResponseContent.Instance.OK();
+            try
+            {
+
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                throw new Exception(ex.Message);
+            }
         }
         #endregion
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs"
index bc40d17..f3da0ab 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs"
@@ -1,18 +1,46 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection.Metadata;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_DTO.AGV.HIKROBOT;
 using WIDESEAWCS_Model.Models;
 
 namespace WIDESEAWCS_Tasks
 {
     public partial class TaskJob
     {
-        #region 涓嬪彂娴峰悍AGV浠诲姟
-        public void SendHIKROBOTTask(List<Dt_Task> tasks)
+        #region 澶勭悊娴峰悍AGV浠诲姟
+        public void HIKROBOTTask(List<Dt_Task> tasks)
         {
+            foreach (var item in tasks)
+            {
+                SendHIKROBOTTask(item);
+            }
+        }
+        #endregion
 
+        #region 涓嬪彂娴峰悍AGV浠诲姟
+        public void SendHIKROBOTTask(Dt_Task task)
+        {
+            WebResponseContent content = new WebResponseContent();
+            HIKROBOTTaskSubmit hIKROBOTTaskSubmit = new HIKROBOTTaskSubmit();
+            try
+            {
+                hIKROBOTTaskSubmit.taskType = "";
+                hIKROBOTTaskSubmit.targetRoute = new List<TargetRouteDto> { new TargetRouteDto() };
+                hIKROBOTTaskSubmit.initPriority = task.Grade;
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            finally
+            {
+
+            }
         }
         #endregion
     }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs"
index ea6d384..23e4393 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs"
@@ -7,6 +7,7 @@
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.LocationEnum;
 using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_DTO;
 using WIDESEAWCS_DTO.RGV.FOURBOT;
@@ -128,56 +129,98 @@
         /// <param name="tasks"></param>
         public void SendCheckShapeingOkTask(List<Dt_Task> tasks)
         {
-            FOURBOTnewMovePodTask fOURBOTnewMovePodTask = new();
             try
             {
                 Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(FOURBOTnewMovePodTask)) ?? throw new Exception("鏈壘鍒板洓鍚戣溅浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
-                List<Dt_RGVLocationInfo> rGVLocationInfos = new List<Dt_RGVLocationInfo>();
-                List<Dt_StationManger> stationMangers = new List<Dt_StationManger>();
+                var tasksToUpdate = new List<Dt_Task>();
+                var locationsToUpdate = new List<Dt_RGVLocationInfo>();
+                var stationsToUpdate = new List<Dt_StationManger>();
+                #region 浠诲姟涓嬪彂
                 foreach (var item in tasks)
                 {
-                    #region 鑾峰彇璐т綅
-                    var rGVLocationInfo = _rGVLocationInfoService.GetFreeLocationInfo(item.Roadway);
-                    if (rGVLocationInfo == null)
+                    try
                     {
-                        item.ExceptionMessage = $"鏈壘鍒扮粓鐐瑰簱鍖恒�恵item.Roadway}銆戝彲鐢ㄧ┖璐т綅锛�";
-                    }
-                    #endregion
-                    else
-                    {
+                        #region 鑾峰彇璐т綅
+                        var rGVLocationInfo = _rGVLocationInfoService.GetFreeLocationInfo(item.Roadway);
+                        if (rGVLocationInfo == null)
+                        {
+                            item.ExceptionMessage = $"鏈壘鍒扮粓鐐瑰簱鍖恒�恵item.Roadway}銆戝彲鐢ㄧ┖璐т綅锛�";
+                            continue;
+                        }
+                        #endregion
+                        var fOURBOTnewMovePodTask = new FOURBOTnewMovePodTask
+                        {
+                            priority = item.Grade,
+                            podID = item.PalletCode,
+                            destination = rGVLocationInfo.LocationCode,
+                            desExt = new { unload = 1 }, // 鏄惁鏀句笅瀹瑰櫒,0鍚�1鏄�
+                            desType = 2
+                        };
                         item.CurrentAddress = item.NextAddress;
                         item.NextAddress = rGVLocationInfo.LocationCode;
                         item.Roadway = rGVLocationInfo.RoadwayNo;
-                        fOURBOTnewMovePodTask.priority = item.Grade;
-                        fOURBOTnewMovePodTask.podID = item.PalletCode;
-                        fOURBOTnewMovePodTask.destination = item.NextAddress;
-                        fOURBOTnewMovePodTask.desExt = new
-                        {
-                            unload = 1//鏄惁鏀句笅瀹瑰櫒,0鍚�1鏄�
-                        };
-                        fOURBOTnewMovePodTask.desType = 2;
+
                         string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
-                        FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
+                        var fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
+
                         if (fOURBOTReturn.returnCode == 0)
                         {
-                            FOURBOTnewMovePodTaskResponseData fOURBO = fOURBOTReturn.data as FOURBOTnewMovePodTaskResponseData ?? throw new Exception("鏈幏鍙栧埌鍥涘悜杞﹁繑鍥炵殑浠诲姟ID");
+                            var data = fOURBOTReturn.data.ToString();
+                            var fOURBO = data.DeserializeObject<FOURBOTnewMovePodTaskResponseData>();
+
                             item.RGVTaskId = fOURBO.taskID;
                             item.TaskState = (int)TaskStatusEnum.Puting;
+
                             rGVLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt();
-                            rGVLocationInfos.Add(rGVLocationInfo);
+                            locationsToUpdate.Add(rGVLocationInfo);
+
                             #region 閲婃斁鍏ュ簱绔欏彴
-                            Dt_StationManger stationManger = _stationMangerService.GetInStationInfo(item.SourceAddress);
-                            stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
-                            stationMangers.Add(stationManger);
+                            var stationManger = _stationMangerService.GetInStationInfo(item.SourceAddress);
+                            if (stationManger != null)
+                            {
+                                stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
+                                stationsToUpdate.Add(stationManger);
+                            }
                             #endregion
                         }
+                        else
+                        {
+                            item.ExceptionMessage = $"鍥涘悜杞︽帴鍙h繑鍥為敊璇細{fOURBOTReturn.returnMsg}";
+                            // 璁板綍澶辫触鐨勪换鍔�
+                        }
                     }
-                }
-                _taskService.Db.Ado.BeginTran();
-                _taskService.UpdateData(tasks);
-                _rGVLocationInfoService.UpdateData(rGVLocationInfos);
-                _stationMangerService.UpdateData(stationMangers);
-                _taskService.Db.Ado.CommitTran();
+                    catch (Exception ex)
+                    {
+                        item.ExceptionMessage = $"澶勭悊浠诲姟寮傚父锛歿ex.Message}";
+                        WriteError($"{nameof(TaskJob)}-{item.TaskId}", ex.Message, ex);
+                    }
+                    tasksToUpdate.Add(item);
+                } 
+                #endregion
+                #region 鏇存柊鏁版嵁
+                // 濡傛灉鏈夐渶瑕佹洿鏂扮殑鏁版嵁锛屾墠鎵ц浜嬪姟
+                if (tasksToUpdate.Any() || locationsToUpdate.Any() || stationsToUpdate.Any())
+                {
+                    try
+                    {
+                        _unitOfWorkManage.BeginTran();
+
+                        if (tasksToUpdate.Any())
+                            _taskService.UpdateData(tasksToUpdate);
+                        if (locationsToUpdate.Any())
+                            _rGVLocationInfoService.UpdateData(locationsToUpdate);
+                        if (stationsToUpdate.Any())
+                            _stationMangerService.UpdateData(stationsToUpdate);
+
+                        _unitOfWorkManage.CommitTran();
+                    }
+                    catch (Exception ex)
+                    {
+                        _unitOfWorkManage.RollbackTran();
+                        WriteError(nameof(TaskJob), ex.Message, ex);
+                    }
+                } 
+                #endregion
             }
             catch (Exception ex)
             {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
index 78e48f6..d14788a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
@@ -39,7 +39,7 @@
                     
                     #region 鏌ユ壘娴峰悍AGV浠诲姟
                     Tasks = newTasks.Where(x => x.TaskType == (int)TaskTypeEnum.Carry || x.TaskType == (int)TaskTypeEnum.CJCarry || x.TaskType == (int)TaskTypeEnum.CJInbound || x.TaskType == (int)TaskTypeEnum.CJOutbound).ToList();
-                    if (Tasks.Count > 0) SendHIKROBOTTask(Tasks);
+                    if (Tasks.Count > 0) HIKROBOTTask(Tasks);
                     #endregion
                 }
             }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs"
index 2c8265a..62f4f3c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs"
@@ -4,6 +4,7 @@
 using Microsoft.VisualBasic.FileIO;
 using Quartz;
 using SixLabors.ImageSharp.PixelFormats;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -13,6 +14,7 @@
 using System.Threading.Tasks;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Communicator;
+using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_IBasicInfoService;
 using WIDESEAWCS_ITaskInfoService;
@@ -31,14 +33,16 @@
         private readonly IRGVLocationInfoService _rGVLocationInfoService;
         private readonly IStationMangerService _stationMangerService;
         private readonly ITrackloginfoService _trackloginfoService;
+        private readonly IUnitOfWorkManage _unitOfWorkManage;
 
-        public TaskJob(ITaskService taskService, IApiInfoService apiInfoService, IRGVLocationInfoService rGVLocationInfoService, IStationMangerService stationMangerService, ITrackloginfoService trackloginfoService)
+        public TaskJob(ITaskService taskService, IApiInfoService apiInfoService, IRGVLocationInfoService rGVLocationInfoService, IStationMangerService stationMangerService, ITrackloginfoService trackloginfoService, IUnitOfWorkManage unitOfWorkManage)
         {
             _taskService = taskService;//娉ㄥ叆
             _apiInfoService = apiInfoService;
             _rGVLocationInfoService = rGVLocationInfoService;
             _stationMangerService = stationMangerService;
             _trackloginfoService = trackloginfoService;
+            _unitOfWorkManage = unitOfWorkManage;
         }
 
         public Task Execute(IJobExecutionContext context)

--
Gitblit v1.9.3