From 7154cc02c0fa9ef6786a19da0281bf6982fa61bd Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期一, 30 三月 2026 16:02:49 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/RuiShiGe/LingPaoCheShenKu
---
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestInboundRoadWayNo.cs | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestInboundRoadWayNo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestInboundRoadWayNo.cs"
index 5f55914..68967e2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestInboundRoadWayNo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestInboundRoadWayNo.cs"
@@ -28,8 +28,24 @@
WebResponseContent response = new WebResponseContent();
try
{
+ //濡備换鍔″凡瀛樺湪鍒� 杩斿洖姝や换鍔�
+ var checkTask = _taskRepository.QueryFirst(x => x.PalletCode == json.PalletCode && x.PVI == json.PVI);
+ if (checkTask != null)
+ {
+ return response.OK("鐢宠鍏ュ簱鎴愬姛", data: checkTask);
+ }
+
//灞忚斀MES
- TZPassZZ(json);
+ if (json.Position == "EL01RB")
+ {
+ //鐒婅鎻愬崌鏈�
+ HZPassTZ(json);
+ }
+ else
+ {
+ ///娑傝鎻愬崌鏈�
+ TZPassZZ(json);
+ }
var carInfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI && x.PalletCode == json.PalletCode);
@@ -44,7 +60,6 @@
// };
//}
-
List<Dt_RoadWay> roadWays = new List<Dt_RoadWay>();
if (carInfo.CarType == 1)
{
@@ -55,15 +70,23 @@
roadWays = _roadWayRepository.QueryData(x => x.WirteCar == 2);
}
+ //var locations = _locationRepository.QueryData(x => (x.LocationType == carInfo.CarType || x.LocationType == 3) && x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == (int)EnableEnum.Enable);
+
var maxGroup = _locationRepository.QueryData(x => (x.LocationType == carInfo.CarType || x.LocationType == 3) && x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == (int)EnableEnum.Enable)
.GroupBy(x => x.RoadwayNo)
.OrderByDescending(g => g.Count()) // 鏍规嵁姣忎釜缁勭殑鍏冪礌鏁伴噺鎺掑簭
.ToList(); // 鍙栧嚭鏁伴噺鏈�澶氱殑缁�
+ if (maxGroup.Count == 0) return response.Error(12, "鏃犲彲鐢ㄥ簱浣�");
+
Dictionary<string, int> result = new Dictionary<string, int>();
foreach (var item in maxGroup)
{
- var number = _taskRepository.QueryData(x => x.TargetAddress == item.Key).Count();
+ var number = _taskRepository.QueryData(x => x.RoadwayNo == item.Key && x.CarType == carInfo.CarType && (x.TaskType == (int)TaskInboundTypeEnum.Inbound || x.TaskType == (int)TaskInboundTypeEnum.InTray)).Count();
+ if (item.Count() - number <= 0)
+ {
+ continue;
+ }
result.Add(item.Key, item.Count() - number);
}
@@ -75,7 +98,7 @@
if (stationList.Count > 1)
{
- var task = _taskRepository.QueryData(x => x.Roadway == stationList.FirstOrDefault().Roadway).OrderByDescending(x => x.CreateDate).FirstOrDefault();
+ var task = _taskRepository.QueryData(x => x.Roadway == stationList.FirstOrDefault().Roadway && x.TaskType == (int)TaskInboundTypeEnum.Inbound).OrderByDescending(x => x.CreateDate).FirstOrDefault();
if (task != null) station = stationList.Where(x => x.stationChildCode != task.NextAddress && x.stationChildCode != task.CurrentAddress).FirstOrDefault();
else station = stationList.FirstOrDefault();
}
@@ -106,7 +129,8 @@
TaskNum = _taskRepository.GetTaskNo().Result,
Creater = "Systeam",
PVI = json.PVI,
-
+ CarType = carInfo.CarType,
+ RoadwayNo = station.RoadwayNo
};
_unitOfWorkManage.BeginTran();
--
Gitblit v1.9.3