From eb7405f413c3102533b5640cbdc6b1d33772207e Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期一, 05 二月 2024 15:06:21 +0800
Subject: [PATCH] Merge branch 'yyk'

---
 Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs |   53 +++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
index c5f314f..4011efa 100644
--- a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -612,6 +612,9 @@
 
                 #endregion
                 var modelList = new List<BllBoxInfo>();
+
+                var addLotNo = "";
+
                 if (packLevel == 1)
                 {
                     #region 涓�绾у寘瑁�
@@ -690,9 +693,10 @@
                         }
                     }
 
+                    addLotNo = maxLotNoStr;
                     #endregion
 
-                    
+
 
                     for (int i = 1; i <= labelNum; i++)
                     {
@@ -836,9 +840,10 @@
                         }
                     }
 
+                    addLotNo = maxCodestr2;
                     #endregion
 
-                     
+
 
                     for (int i = 1; i <= labelNum2; i++)//绠辩爜鏍囩
                     {
@@ -916,6 +921,9 @@
                                 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 labelModel = new BllBoxInfo()
                             {
@@ -923,7 +931,7 @@
                                 ASNDetailNo = asnList.Id,
                                 BoxNo = maxboxcode2,
                                 BoxNo3 = maxboxcode3,
-                                Qty = int.Parse(d.ToString()),
+                                Qty = sss,
                                 FullQty = bNum,
                                 Status = "0",
                                 SkuNo = asnList.SkuNo,
@@ -954,7 +962,20 @@
 
                     #endregion
                 }
-
+                if (string.IsNullOrWhiteSpace(asnList.LotNo))
+                {
+                    asnList.LotNo = addLotNo;
+                    Db.Updateable(asnList).ExecuteCommand();
+                }
+                else
+                {
+                    if (!asnList.LotNo.Contains(addLotNo))
+                    {
+                        asnList.LotNo += ";" + addLotNo;
+                        Db.Updateable(asnList).ExecuteCommand();
+                    } 
+                }
+                
                 return modelList;
 
 
@@ -1014,7 +1035,7 @@
 
                             model.BoxNo = data.BoxNo;                 // 绠卞彿     
 
-                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo,260, 15,true);
+                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo,160, 40,false);
 
                             // 娣诲姞鍒發ist闆嗗悎
                             printModelList.Add(model);
@@ -1069,7 +1090,7 @@
 
                                 model.BoxNo = data.BoxNo;                 // 绠卞彿     
 
-                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                                 // 娣诲姞鍒發ist闆嗗悎
                                 printModelList.Add(model);
@@ -1121,7 +1142,7 @@
 
                             model.BoxNo = data.BoxNo3;                 // 鏀彿     
 
-                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                             // 娣诲姞鍒發ist闆嗗悎
                             printModelList.Add(model);
@@ -1173,7 +1194,7 @@
 
                                 model.BoxNo = data.BoxNo3;                 // 绠卞彿     
 
-                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                                 // 娣诲姞鍒發ist闆嗗悎
                                 printModelList.Add(model);
@@ -1237,7 +1258,7 @@
                                     model1.Qty = dataList.Sum(m=>m.Qty);// 鏁伴噺
                                     model1.BoxNo = data.BoxNo;                 // 绠卞彿     
 
-                                    model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 15, true);
+                                    model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
 
                                     // 娣诲姞鍒發ist闆嗗悎
                                     printModelList.Add(model1);
@@ -1256,7 +1277,7 @@
                                     model.Qty = data.Qty;// 鏁伴噺
                                     model.BoxNo = data.BoxNo3;                 // 鏀彿     
 
-                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                                     // 娣诲姞鍒發ist闆嗗悎
                                     printModelList.Add(model);
@@ -1303,7 +1324,7 @@
                                     model.Qty = data.Sum(m => m.Qty);     // 鏁伴噺
                                     model.BoxNo = boxData.BoxNo;                 // 鏀彿     
 
-                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                                     // 娣诲姞鍒發ist闆嗗悎
                                     printModelList.Add(model);
@@ -1325,7 +1346,7 @@
                                         model1.Qty = item.Qty;// 鏁伴噺
                                         model1.BoxNo = item.BoxNo3;                 // 鏀彿     
 
-                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 15, true);
+                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
 
                                         // 娣诲姞鍒發ist闆嗗悎
                                         printModelList.Add(model);
@@ -1371,7 +1392,7 @@
                                 model.Qty = data.Sum(m => m.Qty);     // 鏁伴噺
                                 model.BoxNo = boxData.BoxNo;                 // 鏀彿     
 
-                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                                 // 娣诲姞鍒發ist闆嗗悎
                                 printModelList.Add(model);
@@ -1395,7 +1416,7 @@
                                         model1.Qty = item.Qty;     // 鏁伴噺
                                         model1.BoxNo = item.BoxNo3;                 // 鏀彿     
 
-                                        model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 15, true);
+                                        model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
 
 
                                         // 娣诲姞鍒發ist闆嗗悎
@@ -1463,7 +1484,7 @@
                                 model.Qty = data.Sum(m => m.Qty);     // 鏁伴噺
                                 model.BoxNo = boxData.BoxNo;                 // 鏀彿     
 
-                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 15, true);
+                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
 
                                 // 娣诲姞鍒發ist闆嗗悎
                                 printModelList.Add(model);
@@ -1491,7 +1512,7 @@
                                         model1.Qty = item.Qty;// 鏁伴噺
                                         model1.BoxNo = item.BoxNo3;                 // 鏀彿     
 
-                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 15, true);
+                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
 
                                         // 娣诲姞鍒發ist闆嗗悎
                                         printModelList.Add(model1);

--
Gitblit v1.8.0