From a9a3f943efb083de8ed88b293897886b3ef612a2 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期一, 11 八月 2025 17:37:09 +0800
Subject: [PATCH] 功能增添优化
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
index 6ac4be6..7042b06 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
@@ -334,7 +334,14 @@
Dt_LocationInfo? nearLocation;
if (palletTypeInfo.IsOdd)
{
- nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
+ if (warehouse.WarehouseCode==WarehouseEnum.HA154.ToString())
+ {
+ nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column - 1);
+ }
+ else
+ {
+ nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
+ }
}
else
{
@@ -457,8 +464,11 @@
int row = location.Row;
for (int j = location.Depth + 1; j <= maxDepth; j++)
{
- row += 1;
- Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row);
+ Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == (row + 1));
+ if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
+ {
+ locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
+ }
if (locationInfo != null)
{
groupLocations.Add(locationInfo);
@@ -467,8 +477,11 @@
for (int j = location.Depth - 1; j >= 1; j--)
{
- row -= 1;
- Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row);
+ Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == (row -1));
+ if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
+ {
+ locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
+ }
if (locationInfo != null)
{
groupLocations.Add(locationInfo);
@@ -492,6 +505,10 @@
for (int j = location.Depth + 1; j <= maxDepth; j++)
{
Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
+ if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
+ {
+ locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
+ }
if (locationInfo != null)
{
groupLocations.Add(locationInfo);
@@ -501,6 +518,10 @@
for (int j = location.Depth - 1; j >= 1; j--)
{
Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
+ if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
+ {
+ locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
+ }
if (locationInfo != null)
{
groupLocations.Add(locationInfo);
--
Gitblit v1.9.3