From 52ba6b195a4126df405ef453d52ba6eaab6521da Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期五, 17 四月 2026 17:37:32 +0800
Subject: [PATCH] 优化3-4楼提升机以及添加报错接口
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
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 87e298c..b039aac 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"
@@ -1286,6 +1286,7 @@
{
throw new NotImplementedException();
}
+
public WebResponseContent InboundElevatorExit(string LocationCode, string containerCode)
{
WebResponseContent content = new WebResponseContent();
@@ -1868,5 +1869,36 @@
return content.Error($"鏇存柊绔欏彴鐘舵�佸け璐ワ細{ex.Message}");
}
}
+
+
+ /// <summary>
+ /// PLC鎶ヨ淇℃伅
+ /// </summary>
+ /// <param name="ErrorMsg"></param>
+ /// <returns></returns>
+ public WebResponseContent PLCAlarmtoWMS(string ErrorMsg)
+ {
+ PLCAlarmDTO PLCAlarmDTO = new PLCAlarmDTO();
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(PLCAlarmDTO)) ?? throw new Exception("鏈壘鍒癙LC鎶ヨ淇℃伅鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
+ PLCAlarmDTO.errorMsg = ErrorMsg;
+ string response = HttpHelper.Post(apiInfo.ApiAddress, PLCAlarmDTO.Serialize());
+ content.OK(data: response);
+ WMSReturn wMSReturn = response.DeserializeObject<WMSReturn>();
+ if (wMSReturn == null) throw new Exception("WMS杩斿洖缁撴灉杞崲澶辫触锛�");
+ if (!wMSReturn.success) throw new Exception(wMSReturn.message);
+ return content.OK();
+ }
+ catch (Exception ex)
+ {
+ return content.Error(ex.Message);
+ }
+ finally
+ {
+ _trackloginfoService.AddTrackLog(PLCAlarmDTO, content, "PLC鎶ヨ淇℃伅涓婃姤WMS", "", "");
+ }
+ }
}
}
--
Gitblit v1.9.3