From a8367fa42d18c40407408c79e8a5fd32cd09f05c Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 21 四月 2026 11:21:03 +0800
Subject: [PATCH] 更新WMS接口文档,添加修改出入口站台类型接口,优化接口日志记录方法
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 47 insertions(+), 1 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..efac0c2 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();
@@ -1405,6 +1406,7 @@
{
stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
stationManger.Remark = "";
+ _stationMangerService.UpdateData(stationManger);
FOURBOToccupyStation fOURBOToccupyStation = new FOURBOToccupyStation()
{
stationCode = wMSContainerFlow.slotCode,
@@ -1413,7 +1415,6 @@
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
content.OK(data: fOURBOTReturn);
if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
- _stationMangerService.UpdateData(stationManger);
}
return content.OK();
}
@@ -1424,6 +1425,20 @@
finally
{
_trackloginfoService.AddTrackLog(wMSContainerFlow, content, "瀹瑰櫒娴佸姩璇锋眰", "", "");
+ }
+ }
+ public WebResponseContent UpStationType(UpStationTypeDTO stationTypeDTO)
+ {
+ try
+ {
+ Dt_StationManger stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == stationTypeDTO.stationCode) ?? throw new Exception($"鏈壘鍒扮珯鍙扮紪鍙枫�恵stationTypeDTO.stationCode}銆戜俊鎭�");
+ stationManger.StationType = stationTypeDTO.stationType;
+ _stationMangerService.Repository.UpdateData(stationManger);
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
}
}
/// <summary>
@@ -1868,5 +1883,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