From d41acebbd89f171b0eeb205fca4f68043ca85f95 Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期三, 03 十二月 2025 19:47:24 +0800
Subject: [PATCH] 选配与暂存
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 41 +++++++++++++++++++++++++++++++++--------
1 files changed, 33 insertions(+), 8 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index d91155a..eeef14e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -939,7 +939,7 @@
//璇诲彇鐢宠锛岀粰agv涓嬪彂浠诲姟
- public WebResponseContent GetAGVTaskdistribution(string TargetAddress)
+ public WebResponseContent GetAGVTaskdistribution(string TargetAddress,string Number)
{
WebResponseContent content = new WebResponseContent();
@@ -952,16 +952,41 @@
{
throw new InvalidOperationException("WMS IP 鏈厤缃�");
}
- var wmsIpAddress = wmsBase + completeTask;
- var taskDto = new RequestTaskDto()
+ IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1000");
+ CommonConveyorLine conveyorLine = (CommonConveyorLine)device;
+ DeviceProDTO? deviceProDTOt = conveyorLine.DeviceProDTOs.Find(x => x.DeviceChildCode == TargetAddress && x.DeviceProParamName == "ConveyorLineSingal");
+ if (conveyorLine.Communicator.Read<short>(deviceProDTOt.DeviceProAddress) == 1)
{
- RequestType = "999",
- Position = TargetAddress,
- };
- var result = HttpHelper.PostAsync(wmsIpAddress, taskDto.ToJsonString()).Result;
- content = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ var wmsIpAddress = wmsBase + completeTask;
+ var taskDto = new RequestTaskDto()
+ {
+ RequestType = "999",
+ Position = TargetAddress,
+ };
+
+
+ var result = HttpHelper.PostAsync(wmsIpAddress, taskDto.ToJsonString()).Result;
+ content = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ if (content.Status)
+ {
+ List<Dt_Task> tasks = BaseDal.QueryData(x => x.axle_czh == Number);
+ if (tasks.Count > 0)
+ {
+ foreach (var task in tasks)
+ {
+ task.Towhereabouts = TargetAddress;
+ }
+ BaseDal.UpdateData(tasks);
+ }
+ }
+ }
+ else
+ {
+ content.Error();
+ }
+
return content;
}
catch (Exception ex)
--
Gitblit v1.9.3