yuyou_x
2024-02-05 eb7405f413c3102533b5640cbdc6b1d33772207e
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -415,7 +415,7 @@
                    .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.SupplierLot)
                    .AndIF(!string.IsNullOrWhiteSpace(model.ProductionTime), it => it.ProductionTime >= Convert.ToDateTime(model.ProductionTime))
                    .AndIF(!string.IsNullOrWhiteSpace(model.ProductionTime), it => it.ProductionTime <= Convert.ToDateTime(model.ProductionTime).AddDays(1))
                    .And(it => it.IsDel == "0")
                    .And(it => it.IsDel == "0" && it.Origin == "WMS生成")
                    .ToExpression();
                
                var total = 0;
@@ -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,100, 25);
                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo,160, 40,false);
                            // 添加到list集合
                            printModelList.Add(model);
@@ -1069,7 +1090,7 @@
                                model.BoxNo = data.BoxNo;                 // 箱号     
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                                // 添加到list集合
                                printModelList.Add(model);
@@ -1121,7 +1142,7 @@
                            model.BoxNo = data.BoxNo3;                 // 支号     
                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                            model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                            // 添加到list集合
                            printModelList.Add(model);
@@ -1173,7 +1194,7 @@
                                model.BoxNo = data.BoxNo3;                 // 箱号     
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                                // 添加到list集合
                                printModelList.Add(model);
@@ -1237,7 +1258,7 @@
                                    model1.Qty = dataList.Sum(m=>m.Qty);// 数量
                                    model1.BoxNo = data.BoxNo;                 // 箱号     
                                    model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 100, 25);
                                    model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
                                    // 添加到list集合
                                    printModelList.Add(model1);
@@ -1256,7 +1277,7 @@
                                    model.Qty = data.Qty;// 数量
                                    model.BoxNo = data.BoxNo3;                 // 支号     
                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                                    // 添加到list集合
                                    printModelList.Add(model);
@@ -1303,7 +1324,7 @@
                                    model.Qty = data.Sum(m => m.Qty);     // 数量
                                    model.BoxNo = boxData.BoxNo;                 // 支号     
                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                                    model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                                    // 添加到list集合
                                    printModelList.Add(model);
@@ -1325,7 +1346,7 @@
                                        model1.Qty = item.Qty;// 数量
                                        model1.BoxNo = item.BoxNo3;                 // 支号     
                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 100, 25);
                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
                                        // 添加到list集合
                                        printModelList.Add(model);
@@ -1371,7 +1392,7 @@
                                model.Qty = data.Sum(m => m.Qty);     // 数量
                                model.BoxNo = boxData.BoxNo;                 // 支号     
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                                // 添加到list集合
                                printModelList.Add(model);
@@ -1395,7 +1416,7 @@
                                        model1.Qty = item.Qty;     // 数量
                                        model1.BoxNo = item.BoxNo3;                 // 支号     
                                        model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 100, 25);
                                        model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
                                        // 添加到list集合
@@ -1463,7 +1484,7 @@
                                model.Qty = data.Sum(m => m.Qty);     // 数量
                                model.BoxNo = boxData.BoxNo;                 // 支号     
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 100, 25);
                                model.ImgStr = BarcodeHelper.GetCodeBarBase64(model.BoxNo, 160, 40, false);
                                // 添加到list集合
                                printModelList.Add(model);
@@ -1491,7 +1512,7 @@
                                        model1.Qty = item.Qty;// 数量
                                        model1.BoxNo = item.BoxNo3;                 // 支号     
                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 100, 25);
                                        model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
                                        // 添加到list集合
                                        printModelList.Add(model1);