From e81c782b3e7a632ffb8e32be56fce931a8c89ae6 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期一, 09 二月 2026 08:55:42 +0800
Subject: [PATCH] 修复bug
---
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs | 5 +----
1 files changed, 1 insertions(+), 4 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 abcbd34..e8403f1 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,13 +200,13 @@
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}宸插瓨鍦�");
Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode);
if (taskOld !=null && taskOld.PalletCode == containerFlowDTO.ContainerCode && taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() && taskOld.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && taskOld.DeviceCode == deviceCode)
{
+ Thread.Sleep(500);
return content.OK();
}
if (taskOld != null && taskOld.PalletCode == containerFlowDTO.ContainerCode && taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() && taskOld.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && taskOld.DeviceCode != deviceCode)
@@ -229,7 +229,6 @@
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;
@@ -245,7 +244,6 @@
//娣诲姞浠诲姟
int taskId = BaseDal.AddData(task);
- WriteLog.Write_Log("瀹瑰櫒鍏ュ簱鍒涘缓浠诲姟", $"浠诲姟淇℃伅", "鍒涘缓鍏ュ簱", $"浠诲姟鍙凤細{taskId},鎵樼洏缂栧彿锛歿task.PalletCode}");
if (type > 0)
{
_taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "鎵嬪姩鎸夐挳鍏ュ簱");
@@ -258,7 +256,6 @@
}
catch (Exception ex)
{
- WriteLog.Write_Log("瀹瑰櫒鍏ュ簱鍒涘缓浠诲姟", $"浠诲姟", "鍒涘缓鍏ュ簱", $"澶辫触锛歿ex.Message}");
content.Error($"閿欒淇℃伅:{ex.Message}");
}
return content;
--
Gitblit v1.9.3