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 | 68 +++++++++++++++++++++++++++++----
1 files changed, 59 insertions(+), 9 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 89cb35a..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"
@@ -843,7 +843,32 @@
#endregion 閲嶅啓鏂规硶
-
+ #region
+ public WebResponseContent UpWheelsFlow(SaveModel saveModel)
+ {
+ WebResponseContent webResponse = new WebResponseContent();
+ try
+ {
+ string CZTM = saveModel.MainData["CZTM"].ToString();
+ string TargetAddress = saveModel.MainData["TargetAddress"].ToString();
+ List<Dt_Task> taskt = BaseDal.QueryData(x => x.task_CZInfo == CZTM).ToList();
+ if (taskt.Count() == 0)
+ return webResponse.Error($"鏈壘鍒板搴旇溅杞达細{CZTM}鐨勮溅杞嚭搴撲俊鎭�");
+ foreach (var item in taskt)
+ {
+ item.Towhereabouts = TargetAddress;
+ }
+ BaseDal.UpdateData(taskt);
+ return webResponse.OK("淇敼鎴愬姛锛�");
+ }
+ catch (Exception ex)
+ {
+ // 濡傛灉鍙戠敓寮傚父锛屽垯璋冪敤content.Error鏂规硶锛岃褰曢敊璇俊鎭紝骞惰緭鍑洪敊璇俊鎭�
+ webResponse.Error(ex.Message);
+ return webResponse;
+ }
+ }
+ #endregion
@@ -914,7 +939,7 @@
//璇诲彇鐢宠锛岀粰agv涓嬪彂浠诲姟
- public WebResponseContent GetAGVTaskdistribution(string TargetAddress)
+ public WebResponseContent GetAGVTaskdistribution(string TargetAddress,string Number)
{
WebResponseContent content = new WebResponseContent();
@@ -927,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