From 1181f9f764b14abd6e9f598f89f8507b4bbfad0d Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 09 三月 2026 09:47:10 +0800
Subject: [PATCH] 设置登录默认值;添加数据传输对象;更新服务器作业
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 32 +++++++++++++-------------------
1 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
index 8e323e3..c48396e 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
@@ -1,6 +1,4 @@
-锘縰sing SqlSugar;
-using WIDESEA_Common.CommonEnum;
-using WIDESEA_Common.LocationEnum;
+锘縰sing WIDESEA_Common.LocationEnum;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
@@ -115,12 +113,10 @@
EnableStatus = EnableStatusEnum.Normal.GetHashCode(),
LocationStatus = LocationStatusEnum.Free.GetHashCode(),
LocationType = LocationTypeEnum.Undefined.GetHashCode(),
- LocationCode = $"{roadwayNo}-{row:D3}-{col:D3}-{layer:D3}-{depth:D2}",
+ LocationCode = $"{row:D3}-{col:D3}-{layer:D3}", //$"{roadwayNo}-{row:D3}-{col:D3}-{layer:D3}-{depth:D2}"
LocationName = $"{roadwayNo}宸烽亾{row:D3}琛寋col:D3}鍒梴layer:D3}灞倇depth:D2}娣�"
};
}
-
-
/// <summary>
/// 鑾峰彇绌洪棽璐т綅淇℃伅(鏍规嵁宸烽亾鏌ヨ)
@@ -134,7 +130,7 @@
return locations?
.OrderBy(x => x.Layer)
- .ThenBy(x => x.Depth)
+ .ThenByDescending(x => x.Depth)
.ThenBy(x => x.Column)
.ThenBy(x => x.Row)
.FirstOrDefault();
@@ -148,9 +144,9 @@
return await BaseDal.QueryFirstAsync(x => x.RoadwayNo == roadwayNo && x.LocationCode == locationCode);
}
- public async Task<Dt_LocationInfo> GetLocationInfoAsync( string locationCode)
+ public async Task<Dt_LocationInfo> GetLocationInfoAsync(string locationCode)
{
- return await BaseDal.QueryFirstAsync(x=>x.LocationCode == locationCode);
+ return await BaseDal.QueryFirstAsync(x => x.LocationCode == locationCode);
}
/// <summary>
@@ -161,14 +157,14 @@
return await BaseDal.UpdateDataAsync(locationInfo);
}
-
/// <summary>
/// 妫�鏌ュ苟鐢熸垚绉诲簱浠诲姟鎴栬繑鍥炲嚭搴撲换鍔�
/// </summary>
/// <param name="locationID">浠诲姟鍙�</param>
/// <returns>浠诲姟瀵硅薄</returns>
- public async Task<Dt_Task> TransferCheckAsync(int taskNum)
+ public async Task<WebResponseContent> TransferCheckAsync(int taskNum)
{
+ WebResponseContent content = new WebResponseContent();
try
{
// 鏍规嵁浠诲姟鍙疯幏鍙栦换鍔�
@@ -190,22 +186,21 @@
// 濡傛灉鏂扮殑搴撲綅娌℃湁鎵惧埌瀵瑰簲鐨勪换鍔�
if (internalTransferTask == null)
{
- return await HandleNoTaskAtLocation(outboundTask.SourceAddress, newLocationID, outboundTask);
+ return content.OK("鑾峰彇鍒扮Щ搴撲换鍔�", await HandleNoTaskAtLocation(outboundTask.SourceAddress, newLocationID, outboundTask));
}
// 鐩存帴杩斿洖涓�娣变綅鍑哄簱浠诲姟
- return internalTransferTask;
+ return content.OK("鑾峰彇鍒颁竴娣变綅鍑哄簱浠诲姟", internalTransferTask);
}
// 杩斿洖褰撳墠搴撲綅鐨勫嚭搴撲换鍔�
- return outboundTask;
+ return content.OK("褰撳墠鍑哄簱浠诲姟", outboundTask);
}
- catch (Exception)
+ catch (Exception ex)
{
- return null;
+ return content.Error($"鍙戠敓閿欒:{ex.Message}");
}
}
-
#region 绉诲簱鏂规硶
@@ -295,6 +290,5 @@
}
#endregion 绉诲簱鏂规硶
-
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3