From b45155e1a5d76ca95d138025ab458fe2f3689748 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期三, 28 一月 2026 11:19:54 +0800
Subject: [PATCH] 1

---
 项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 062769d..abcbd34 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -200,6 +200,7 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
+                WriteLog.Write_Log("瀹瑰櫒鍏ュ簱鍒涘缓浠诲姟", $"杈撻�佺嚎淇℃伅", "寮�濮嬪叆搴�", $"鎵樼洏鍙穥containerFlowDTO.ContainerCode}锛岃澶噞deviceCode}");
                 List<Dt_LocationInfo> locationInfos = _locationInfoRepository.QueryData();
                 Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.PalletCode == containerFlowDTO.ContainerCode);
                 if (locationInfo != null) throw new Exception($"搴撲綅鏂欑鍙穥containerFlowDTO.ContainerCode}宸插瓨鍦�");
@@ -221,13 +222,14 @@
                     _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { taskOld.TaskNum }, $"{oldSlotCode}鎹㈣嚦{containerFlowDTO.SlotCode}鍏ュ簱");
                     return content.OK();
                 }
-                else if(taskOld != null)
+                else if (taskOld != null)
                 {
-                    throw new Exception($"鏂欑鍙穥containerFlowDTO.ContainerCode}" + (taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "鍏ュ簱AGV鎵ц涓�": "鍑哄簱AGV鎵ц涓�"));
+                    throw new Exception($"鏂欑鍙穥containerFlowDTO.ContainerCode}" + (taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "鍏ュ簱AGV鎵ц涓�" : "鍑哄簱AGV鎵ц涓�"));
                 }
                 Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
                 if (noInLocation == null) throw new Exception($"鍙敤璐т綅涓嶈冻!");
                 Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && x.StationDeviceCode == deviceCode);
+                WriteLog.Write_Log("瀹瑰櫒鍏ュ簱鍒涘缓浠诲姟", $"绔欏彴淇℃伅", "鏌ヨ绔欏彴", $"绔欏彴鍙穥stationManger.StationCode}锛岃澶噞stationManger.StationDeviceCode}");
                 //鍒涘缓浠诲姟
                 Dt_Task task = new Dt_Task();
                 task.PalletCode = containerFlowDTO.ContainerCode;
@@ -242,7 +244,8 @@
                 task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt();
                 
                 //娣诲姞浠诲姟
-                BaseDal.AddData(task);
+                int taskId = BaseDal.AddData(task);
+                WriteLog.Write_Log("瀹瑰櫒鍏ュ簱鍒涘缓浠诲姟", $"浠诲姟淇℃伅", "鍒涘缓鍏ュ簱", $"浠诲姟鍙凤細{taskId},鎵樼洏缂栧彿锛歿task.PalletCode}");
                 if (type > 0)
                 {
                     _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "鎵嬪姩鎸夐挳鍏ュ簱");
@@ -255,6 +258,7 @@
             }
             catch (Exception ex)
             {
+                WriteLog.Write_Log("瀹瑰櫒鍏ュ簱鍒涘缓浠诲姟", $"浠诲姟", "鍒涘缓鍏ュ簱", $"澶辫触锛歿ex.Message}");
                 content.Error($"閿欒淇℃伅:{ex.Message}");
             }
             return content;

--
Gitblit v1.9.3