From caaa702b4455439216bbd615b8067eec90e9bab7 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期三, 21 八月 2024 11:55:19 +0800
Subject: [PATCH] 修改接口和所需参数问题
---
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
index 8c2988c..fa7aa45 100644
--- a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -529,7 +529,7 @@
}
//鑾峰彇鏍囩淇℃伅(鐢熸垚鏍囩)
- public List<BllBoxInfo> AddLabelBox(int imId, string isReset, decimal arriveQty, string productionTime, string expirationTime, string storeTime, int userId)
+ public List<BllBoxInfo> AddLabelBox(int imId, string isReset, decimal arriveQty, string productionTime, string expirationTime, string storeTime,string supplierLot, int userId)
{
try
{
@@ -681,12 +681,13 @@
{
throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
}
- maxLotNoStr = label.Max(a => a.LotNo);
- maxBoxCode = label.Max(a => a.BoxNo);
+ maxLotNoStr = labelCount.Max(a => a.LotNo);
+
if (string.IsNullOrWhiteSpace(maxLotNoStr))
{
maxLotNoStr = toDayTime.Substring(2, 6) + "0001";
}
+ maxBoxCode = label.Where(m => m.LotNo == maxLotNoStr).Max(a => a.BoxNo);
}
}
@@ -756,7 +757,7 @@
ASNNo = asnList.ASNNo,
ASNDetailNo = asnList.Id,
BoxNo = maxBoxCode,
- Qty = int.Parse(boxQty.ToString()),
+ Qty = boxQty,
FullQty = bNum,
Status = "0",
SkuNo = asnList.SkuNo,
@@ -764,10 +765,10 @@
LotNo = maxLotNoStr,
Standard = asnList.Standard,
PackageStandard = packStr,
- SupplierLot = asnList.SupplierLot,
+ SupplierLot = supplierLot,
InspectMark = "0",
BitBoxMark = bNum > boxQty ? "1":"0",
- InspectStatus = "",
+ InspectStatus = "0",
ProductionTime = DateTime.Parse(productionTime),
StoreTime = DateTime.Parse(storeTime),
@@ -846,13 +847,14 @@
{
throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
}
- maxCodestr2 = label.Max(a => a.LotNo); ;
- maxboxcode2 = label.Max(a => a.BoxNo);//绠卞彿;
- maxboxcode3 = label.Max(a => a.BoxNo3);//鏀彿;
+ maxCodestr2 = labelCount.Max(a => a.LotNo); ;
+
if (string.IsNullOrWhiteSpace(maxCodestr2))
{
maxCodestr2 = toDayTime2.Substring(2, 6) + "0001";
}
+ maxboxcode2 = label.Where(m => m.LotNo == maxCodestr2).Max(a => a.BoxNo);//绠卞彿;
+ maxboxcode3 = label.Where(m => m.LotNo == maxCodestr2).Max(a => a.BoxNo3);//鏀彿;
}
}
@@ -960,8 +962,8 @@
maxboxcode3 = maxboxcode3.Substring(0, 11) + (int.Parse(maxboxcode3.Substring(11, 4)) + 1).ToString().PadLeft(4, '0');
}
- var ssss = d.ToString("0");
- var sss = int.Parse(ssss);
+ //var ssss = d.ToString("0");
+ //var sss = int.Parse(ssss);
// 灏嗘潯鐮佷繚瀛樺埌鍘熸枡鏉$爜琛�
var labelModel = new BllBoxInfo()
@@ -970,7 +972,7 @@
ASNDetailNo = asnList.Id,
BoxNo = maxboxcode2,
BoxNo3 = maxboxcode3,
- Qty = sss,
+ Qty = d,
FullQty = bNum,
Status = "0",
SkuNo = asnList.SkuNo,
--
Gitblit v1.8.0