From 7c274192786484237d4260aa2590cbbb6a64a95d Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期五, 19 十二月 2025 11:42:29 +0800
Subject: [PATCH] 修改成品拣货逻辑
---
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 7480d26..987c28e 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -746,7 +746,7 @@
VBELN = notice.OrderCode,
WERKS = notice.CustomerNo,
LFART = notice.Type,
- WADAT_IST = Convert.ToDateTime(notice.CompleteTime).ToString("yyyy-MM-dd"),
+ WADAT_IST = Convert.ToDateTime(notice.UpdateTime).ToString("yyyy-MM-dd"),
ITEM = list
};
#region 閫氳繃鎺ュ彛鍙戦�佽嚦erp
@@ -1941,6 +1941,13 @@
foreach (var d in noticeDetail)
{
+ if (notice.Type == "0")//鎴愬搧鍑哄簱锛岃鍒掓暟閲忓拰鎷h揣鏁伴噺蹇呴』涓�鑷�
+ {
+ if (d.CompleteQty != d.Qty)
+ {
+ throw new Exception($"鍏冲崟澶辫触,鐗╂枡:{d.SkuNo}璁″垝鏁伴噺鍜屾嫞璐ф暟閲忎笉涓�鑷达紒");
+ }
+ }
#region MyRegion
//鏇存敼搴撳瓨鏄庣粏閿佸畾鏁伴噺
//var orders = dataContext.WmsExportOrder.Where(o => o.ExportDetailId == d.Id
@@ -2263,8 +2270,8 @@
switch (level)
{
case 1: strr[i] = comDetail[i].BoxNo + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime); break;
- case 2: strr[i] = comDetail[i].BoxNo3 + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime); break;
- case 3: strr[i] = comDetail[i].BoxNo2 + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime); break;
+ case 2: strr[i] = comDetail[i].BoxNo2 + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime); break;
+ case 3: strr[i] = comDetail[i].BoxNo3 + "," + comDetail[i].SONo + "," + userinfo + "," + Convert.ToString(comDetail[i].CreateTime); break;
default: break;
}
pars.Add(strr[i]);
@@ -2971,7 +2978,10 @@
decimal needQty = detail.Qty - (detail.AllotQty == null ? 0 : decimal.Parse(detail.AllotQty.ToString()));
//鎺掗櫎杞﹂棿搴撳瓨
- List<string> areaNoList = new List<string>() { "B06", "B07", "B09", "B24", "B26", "B27", "B28", "B29" };
+ string areaNoSql = $@"select AreaNo from SysStorageArea where IsDel='0' and AreaType='1'";
+ DataTable areaNoDt = Db.Ado.GetDataTable(areaNoSql);
+ List<string> areaNoList = areaNoDt.Rows.Cast<DataRow>().Select(e => e["AreaNo"] + "").ToList();
+
//搴撳瓨鏄庣粏 Status 0锛氬緟鍒嗛厤 1锛氶儴鍒嗗垎閰� 2锛氬凡鍒嗛厤
var stockDetail = Db.Queryable<DataStockDetail>().Where(m => m.SkuNo == detail.SkuNo && (m.Qty - m.FrozenQty - m.LockQty + m.InspectQty) > 0 && (m.Status == "0" || m.Status == "1") && m.IsDel == "0" && !areaNoList.Contains(m.AreaNo)).ToList();
--
Gitblit v1.8.0