From 5d55a31d8ce95e511ffb408f38ed06e81742b67e Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 27 三月 2026 16:17:30 +0800
Subject: [PATCH] 1
---
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
index 7336179..b939037 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using System.IO;
using System.Text;
using WIDESEA_External.Model;
using WIDESEAWCS_Common.TaskEnum;
@@ -88,11 +89,12 @@
// WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
// if (!responseContent.Status) throw new Exception(responseContent.Message);
//}
+ WriteLog.Write_Log("涓�鏈熷鍣ㄦ祦鍔ㄥ叆搴撴帴鍙�", "浠诲姟淇℃伅", $"杩斿洖杈撻�佺嚎{stationManger.PickStationCode}", $"杩斿洖缁欒緭閫佺嚎鐨勪换鍔′俊鎭細{containerFlowDTO.ToJson()}");
commonConveyorLine.Communicator.Write("22", (containerFlowDTO.Direction == "100" ? new byte[] { 1, 0 } : new byte[] { 2, 0 }));
}
else
{
- Thread.Sleep(500);
+
CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim();
@@ -101,17 +103,15 @@
if (containerFlowDTO.Direction == "100")
{
short W_PickToHode = commonConveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.W_PickToHode, stationManger.StationCode);
- if (W_PickToHode == 300)
+ if (W_PickToHode != 300)
{
- WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
- if (!responseContent.Status) throw new Exception(responseContent.Message);
+ commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, stationManger.StationCode);
+ WriteLog.Write_Log("浜屾湡瀹瑰櫒娴佸姩鍏ュ簱鎺ュ彛", "浠诲姟淇℃伅", $"PLC淇″彿300", $"杈撻�佹枡鐘舵�侊細{W_PickToHode}锛屼笉婊¤冻鍏ュ簱鏉′欢锛屽己鍒跺叆搴撳啓鍏�300");
}
- else
- {
- throw new Exception($"浼犲叆鏂欑鐮亄containerFlowDTO.ContainerCode}锛岃緭閫佹枡鐘舵�侊細{W_PickToHode}锛屼笉婊¤冻鍏ュ簱鏉′欢");
- }
+ WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
+ if (!responseContent.Status) throw new Exception(responseContent.Message);
}
- WriteLog.Write_Log($"瀹瑰櫒娴佸姩{stationManger.StationCode}", $"杈撻�佺嚎淇℃伅", "寮�濮嬪叆搴�", $"鐘舵�亄containerFlowDTO.Direction}锛屾枡绠辩爜{containerFlowDTO.ContainerCode}");
+ WriteLog.Write_Log("浜屾湡瀹瑰櫒娴佸姩鍏ュ簱鎺ュ彛", "浠诲姟淇℃伅", $"杩斿洖杈撻�佺嚎{stationManger.PickStationCode}", $"杩斿洖缁欒緭閫佺嚎鐨勪换鍔′俊鎭細{containerFlowDTO.ToJson()}");
commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode);
}
content.OK();
@@ -204,5 +204,15 @@
{
return Service.ResetAllExceptionTask(taskNum);
}
+
+ /// <summary>
+ /// WMS寮傚父鎭㈠
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("WmsRecovery"), AllowAnonymous]
+ public WebResponseContent WmsRecovery()
+ {
+ return Service.WmsRecovery();
+ }
}
}
--
Gitblit v1.9.3