From 257d09aff7ec7b858b037607869d23ec61ac75bc Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 19 八月 2025 09:03:49 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs | 52 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 11 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs"
index 2d3addd..ffb741f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs"
@@ -58,14 +58,22 @@
throw new Exception($"鏈壘鍒拌揣浣嶄俊鎭�");
}
int maxDepth = locationInfos.Max(x => x.Depth);
- int mathCurrentRow = beRelocation.Row - Convert.ToInt32(Math.Ceiling(beRelocation.Row / maxDepth / 2.0)) * maxDepth * 2;
- if (mathCurrentRow <= maxDepth)
+ //int mathCurrentRow = beRelocation.Row - Convert.ToInt32(Math.Ceiling(beRelocation.Row / maxDepth / 2.0)) * maxDepth * 2;
+ //if (mathCurrentRow <= maxDepth)
+ //{
+ // locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 <= maxDepth).ToList();
+ //}
+ //else
+ //{
+ // locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 > maxDepth).ToList();
+ //}
+ if (beRelocation.Row <= maxDepth)
{
- locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 <= maxDepth).ToList();
+ locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
}
- else
+ else if (beRelocation.Row > maxDepth)
{
- locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 > maxDepth).ToList();
+ locationInfos = locationInfos.Where(x => x.Row > maxDepth).ToList();
}
}
@@ -106,10 +114,13 @@
{
continue;
}
- Dt_PalletTypeInfo palletTypeInfoDepth = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.WarehouseId == locationInfoExist.WarehouseId && x.PalletType == locationInfoExist.LocationType);
- if (palletTypeInfoDepth != null && palletTypeInfoDepth.LocaitonCount != palletTypeInfo.LocaitonCount)
+ if (locationInfoExist.LocationType > 0)
{
- continue;
+ Dt_PalletTypeInfo palletTypeInfoDepth = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.WarehouseId == locationInfoExist.WarehouseId && x.PalletType == locationInfoExist.LocationType);
+ if (palletTypeInfoDepth != null && palletTypeInfoDepth.LocaitonCount != palletTypeInfo.LocaitonCount)
+ {
+ continue;
+ }
}
}
else
@@ -129,12 +140,23 @@
{
continue;
}
- Dt_PalletTypeInfo palletTypeInfoDepth = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.WarehouseId == locationInfoExist.WarehouseId && x.PalletType == locationInfoExist.LocationType);
- if (palletTypeInfoDepth != null && palletTypeInfoDepth.LocaitonCount != palletTypeInfo.LocaitonCount)
+ if (locationInfoExist.LocationType > 0)
+ {
+ Dt_PalletTypeInfo palletTypeInfoDepth = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.WarehouseId == locationInfoExist.WarehouseId && x.PalletType == locationInfoExist.LocationType);
+ if (palletTypeInfoDepth != null && palletTypeInfoDepth.LocaitonCount != palletTypeInfo.LocaitonCount)
+ {
+ continue;
+ }
+ }
+ if (locationInfoExist.LocationStatus != LocationStatusEnum.Free.ObjToInt() || locationInfoExist.EnableStatus != EnableStatusEnum.Normal.ObjToInt())
{
continue;
}
- if (locationInfoExist.LocationStatus != LocationStatusEnum.Free.ObjToInt() || locationInfoExist.EnableStatus != EnableStatusEnum.Normal.ObjToInt())
+ }
+ if (palletTypeInfo.IsOdd)
+ {
+ Dt_LocationInfo? locationInfoExist = locationInfoDepth.FirstOrDefault(x => x.Row == locationInfo.Row && x.Column == (locationInfo.Column-1) && x.Layer == locationInfo.Layer);
+ if (locationInfoExist!=null && locationInfoExist.LocationStatus!= LocationStatusEnum.Free.ObjToInt() && locationInfoExist.LocationStatus != LocationStatusEnum.FreeLock.ObjToInt())
{
continue;
}
@@ -203,6 +225,14 @@
continue;
}
}
+ if (palletTypeInfo.IsOdd)
+ {
+ Dt_LocationInfo? locationInfoExist = locationInfoDepth.FirstOrDefault(x => x.Row == locationInfo.Row && x.Column == (locationInfo.Column - 1) && x.Layer == locationInfo.Layer);
+ if (locationInfoExist != null && locationInfoExist.LocationStatus != LocationStatusEnum.Free.ObjToInt() && locationInfoExist.LocationStatus != LocationStatusEnum.FreeLock.ObjToInt())
+ {
+ continue;
+ }
+ }
locationCaches_ZH.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now });
return locationInfo;
}
--
Gitblit v1.9.3