From 8fcd7a67e4391a5f1fbdb590c2a3f913aeb2a0a0 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 31 三月 2026 14:11:23 +0800
Subject: [PATCH] PP平库功能上线,PDA优化,部分问题点优化
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 37 +++++++++++++++++++++++++++++++++----
1 files changed, 33 insertions(+), 4 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 289db11..ad8d9ae 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"
@@ -36,7 +36,7 @@
Dt_PalletTypeInfo? palletTypeInfo = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.PalletType == palletType && x.WarehouseId == warehouseId);
if (palletTypeInfo == null)
{
- if (warehouse.WarehouseCode == WarehouseEnum.HA153.ToString() && warehouse.WarehouseCode == WarehouseEnum.HA71.ToString() && warehouse.WarehouseCode == WarehouseEnum.HA60.ToString())
+ if (warehouse.WarehouseCode == WarehouseEnum.HA153.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA71.ToString())
{
palletTypeInfo = new Dt_PalletTypeInfo()
{
@@ -59,6 +59,7 @@
"HA153" => AssignLocation(roadwayNo),
"HA71" or "HA72" or "HA73" => AssignLocation(roadwayNo),
"HA60" => AssignLocation(roadwayNo),
+ "HA581" => AssignLocation_PPPK(roadwayNo,palletTypeInfo.PalletType),
_ => throw new Exception($"鏈壘鍒颁粨搴撹揣浣嶅垎閰嶆柟娉�")
};
}
@@ -274,9 +275,9 @@
List<Dt_PalletTypeInfo> palletTypeInfos = _basicRepository.PalletTypeInfoRepository.QueryData(x => x.WarehouseId == warehousId);
Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehousId);
Dt_PalletTypeInfo? palletTypeInfo = palletTypeInfos.FirstOrDefault(x => x.PalletType == palletType && x.WarehouseId == warehousId);
- if (palletTypeInfo == null || warehouse.WarehouseCode == WarehouseEnum.HA60.ToString())
+ if (palletTypeInfo == null)
{
- if (warehouse.WarehouseCode == WarehouseEnum.HA153.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA71.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA60.ToString())
+ if (warehouse.WarehouseCode == WarehouseEnum.HA153.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA71.ToString())
{
palletTypeInfo = new Dt_PalletTypeInfo()
{
@@ -329,7 +330,7 @@
}
}
- if (palletTypeInfos.FirstOrDefault(x => x.LocaitonCount == 2) != null)
+ if (palletTypeInfo.LocaitonCount == 2)
{
Dt_LocationInfo? nearLocation;
if (palletTypeInfo.IsOdd)
@@ -675,6 +676,34 @@
}
return groupLocations;
}
+
+
+ public Dt_LocationInfo? AssignLocation_PPPK(string roadwayNo, int palletType)
+ {
+ lock (_locker)
+ {
+ List<LocationCache> removeItems = locationCaches.Where(x => (DateTime.Now - x.DateTime).TotalMinutes > 5).ToList();//鏌ヨ娣诲姞闈欐�佸彉閲忚秴杩�5鍒嗛挓鐨勮揣浣�
+ int count = removeItems.Count;
+ for (int i = 0; i < count; i++)
+ {
+ locationCaches.Remove(removeItems[i]);//绉婚櫎鏌ヨ娣诲姞闈欐�佸彉閲忚秴杩�5鍒嗛挓鐨勮揣浣�
+ }
+
+ List<string> lockLocations = locationCaches.Select(x => x.LocationCode).ToList();
+
+ List<Dt_LocationInfo> locationInfos = BaseDal.QueryData(x => x.RoadwayNo == roadwayNo);//鏌ヨ宸烽亾鎵�鏈夎揣浣嶄俊鎭�
+
+ Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>()
+ {
+ { nameof(Dt_LocationInfo.Layer),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Column),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Depth),OrderByType.Desc },
+ { nameof(Dt_LocationInfo.Row),OrderByType.Asc }
+ };
+
+ return BaseDal.QueryFirst(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && x.LocationType == palletType && !lockLocations.Contains(x.LocationCode), orderBy);
+ }
+ }
}
}
--
Gitblit v1.9.3