From b2d25faa69ee7e9f24b6ac98d3b4dcbddada70bc Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期四, 14 三月 2024 13:37:15 +0800
Subject: [PATCH] 修改pda托盘绑定同一物料多批次 无法具体选中批次问题。
---
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
index e65f09e..13d05b0 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -890,6 +890,11 @@
{
string EndLocat = string.Empty;//鐩爣浣嶇疆
+ var log = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.PalletNo == palletNo && (w.Status == "0" || w.Status == "1"));
+ if (log != null)
+ {
+ throw new Exception("璇ユ墭鐩樺凡鏈夊皬杞︾瓑寰呮墽琛屾垨姝e湪鎵ц鐨勪换鍔�!");
+ }
var stockDetail = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == palletNo);
if (stockDetail == null)
{
@@ -902,7 +907,7 @@
{
throw new Exception("鎵�閫夊尯鍩熶俊鎭笉瀛樺湪,璇锋鏌�!");
}
- EndLocat = GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo);
+ EndLocat = GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo,palletNo);
}
else
{
@@ -1002,6 +1007,12 @@
}
try
{
+ var log = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.PalletNo == palletNo && (w.Status == "0" || w.Status == "1"));
+ if (log != null)
+ {
+ throw new Exception("璇ユ墭鐩樺凡鏈夊皬杞︾瓑寰呮墽琛屾垨姝e湪鎵ц鐨勪换鍔�!");
+ }
+
var notice = Db.Queryable<BllExportNotice>().First(w => w.IsDel == "0" && w.SONo == soNo);
if (notice == null)
{
@@ -1041,7 +1052,7 @@
throw new Exception("鎵�閫夊尯鍩熶俊鎭笉瀛樺湪,璇锋鏌�!");
}
string EndLocat = string.Empty;//鐩爣浣嶇疆
- EndLocat= GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo);
+ EndLocat= GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo,palletNo);
//寮�鍚簨鍔�
Db.BeginTran();
@@ -1095,7 +1106,14 @@
throw new Exception(ex.Message);
}
}
- private string GetLocat(string areaNo,string skuNo,string lotNo)
+ /// <summary>
+ /// 鏍规嵁鍖哄煙鍒嗛厤鍌ㄤ綅
+ /// </summary>
+ /// <param name="areaNo"></param>
+ /// <param name="skuNo"></param>
+ /// <param name="lotNo"></param>
+ /// <returns></returns>
+ private string GetLocat(string areaNo,string skuNo,string lotNo,string palletNo)
{
try
{
@@ -1103,7 +1121,7 @@
//褰撶劧鍖哄煙鎵�鏈夊偍浣嶄俊鎭�
var storageLocatList = Db.Queryable<SysStorageLocat>().Where(w => w.WareHouseNo == "W02" && w.AreaNo == areaNo).ToList();
//鍚屽尯鍩熷悓鎵规鐗╂枡鐨勫偍浣嶄俊鎭�
- List<string> locatList = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.SkuNo == skuNo && w.LotNo == lotNo && w.WareHouseNo == "W02" && w.AreaNo == areaNo)
+ List<string> locatList = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.SkuNo == skuNo && w.LotNo == lotNo && w.WareHouseNo == "W02" && w.AreaNo == areaNo && w.PalletNo != palletNo)
.OrderByDescending(o=>o.LocatNo).Select(s=>s.LocatNo).Distinct().ToList();
foreach (var item in locatList)
{
--
Gitblit v1.8.0