From e880a68169b62dfaad14db7b6cdd4c8e0d3fcb75 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期日, 12 一月 2025 01:33:15 +0800
Subject: [PATCH] 1
---
/dev/null | 0
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs | 34 +++++++++++++++++++++++++++++++---
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bf8cf5bc-82f5-4dba-96c7-5fd79b33c418.vsidx | 0
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e4c6b3e1-f737-41da-b6c2-b936ca7e1d6d.vsidx | 0
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 14 +++++++++++---
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx | 0
6 files changed, 42 insertions(+), 6 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e4c6b3e1-f737-41da-b6c2-b936ca7e1d6d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e4c6b3e1-f737-41da-b6c2-b936ca7e1d6d.vsidx"
new file mode 100644
index 0000000..d85dd3e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e4c6b3e1-f737-41da-b6c2-b936ca7e1d6d.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0f1270a-ac4e-4e2b-b52d-3beb9a80089a.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0f1270a-ac4e-4e2b-b52d-3beb9a80089a.vsidx"
deleted file mode 100644
index 5ae21ab..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0f1270a-ac4e-4e2b-b52d-3beb9a80089a.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 5be3edc..5bb7519 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -217,9 +217,17 @@
}
else
{
- task.NextAddress = "";
- task.DeviceCode = "";
- }
+ List<Dt_Router> dt_Routers = _routerService.QueryNextRoutes(item.SourceAddress, item.RoadWay, item.TaskType);
+ if(dt_Routers != null && dt_Routers.Count > 0)
+ {
+ task.NextAddress = dt_Routers.FirstOrDefault().NextPosi;
+ task.DeviceCode = dt_Routers.FirstOrDefault().ChildPosiDeviceCode;
+ }
+ else
+ {
+ task.NextAddress = "";
+ task.DeviceCode = "";
+ } }
}
else
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
index b028806..de05365 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
@@ -81,6 +81,17 @@
{
if (conveyorLineInfoRead.TaskNum == 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))//閲囪喘鍏ュ簱
{
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && (x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.New.ObjToInt()));
+ if(task != null)
+ {
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
List<Dt_Router> routers = _routerExtension.GetEndPoint(item.StationCode, TaskTypeEnum.Inbound.ObjToInt());
List<string> stations = routers.Select(x => x.NextPosi).ToList();
@@ -88,10 +99,20 @@
WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations);
if (responseContent.Status)
{
- WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
+ WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode, responseContent.Data.ToString());
if (content.Status)
{
- device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && (x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.New.ObjToInt()));
+ if (task != null)
+ {
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
}
}
}
@@ -100,13 +121,20 @@
Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType)); // 甯︿换鍔″彿鏌ヨ浠诲姟
if (task != null)
{
+ Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == item.StationCode);
+ if(router == null)
+ {
+ WriteError(item.StationName, $"鏈壘鍒板搴旇矾鐢变俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ }
+
Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
if (stationManger == null)
{
WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
continue;
}
- string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
+
+ string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, router.NextPosi);
if (string.IsNullOrEmpty(locationCode))
{
WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx"
new file mode 100644
index 0000000..d9643f1
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8418c4b5-1bc9-4cbc-b42e-fc61309bcce6.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8418c4b5-1bc9-4cbc-b42e-fc61309bcce6.vsidx"
deleted file mode 100644
index ec43b15..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8418c4b5-1bc9-4cbc-b42e-fc61309bcce6.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bf8cf5bc-82f5-4dba-96c7-5fd79b33c418.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bf8cf5bc-82f5-4dba-96c7-5fd79b33c418.vsidx"
new file mode 100644
index 0000000..707061d
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bf8cf5bc-82f5-4dba-96c7-5fd79b33c418.vsidx"
Binary files differ
--
Gitblit v1.9.3