1
yuyou_x
2024-02-02 1403ec7e5c62962fd5d20123defedae97a4abb75
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -1548,6 +1548,9 @@
                {
                    throw new Exception("-1:托盘号不可为空!");
                }
                //判断物料数量是否为0 为0判断箱码信息 不为0继续
                if (model.SkuQty == 0)
                {
                if (string.IsNullOrEmpty(model.BoxNo))
                {
                    throw new Exception("-1:箱码信息不可为空!");
@@ -1561,6 +1564,8 @@
                    }
                }
                }
                #endregion
                // 验证入库单总表
                var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == model.AsnNo);
@@ -1774,7 +1779,7 @@
                // 更改入库单明细已组数量
                var sqlString = string.Empty;
                sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{factQty}' where id = '{model.AsnDetailId}';";
                sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{bind.Qty}' where id = '{model.AsnDetailId}';";
                Db.Ado.ExecuteCommand(sqlString);
                // 更改入库单及入库明细状态
@@ -1821,6 +1826,8 @@
                {
                    throw new Exception("-1:托盘号不可为空!");
                }
                if (model.SkuQty == 0)
                {
                if (string.IsNullOrEmpty(model.BoxNo))
                {
                    throw new Exception("-1:箱码信息不可为空!");
@@ -1842,6 +1849,8 @@
                    }
                }
                }
                #endregion
                Db.BeginTran();
@@ -1923,7 +1932,7 @@
                        PalletNo = model.PalletNo,
                        PalletNo2 = "",
                        PalletNo3 = "",
                        Qty = 0,
                        Qty = model.SkuQty,
                        FullQty = pNum,
                        Status = "0",
                        Type = "0",
@@ -1949,9 +1958,11 @@
                }
                #region 箱码信息
                var msgStr = $"箱号为{model.BoxNo}";
                var boxInfoList = new List<BllLabelBoxNo>();
                var msgStr = $"箱号为{model.BoxNo}";
                decimal factQty = 0.00m;//托盘总数量
                if (model.SkuQty == 0)
                {
                //首箱
                var boxInfo = Db.Queryable<BllLabelBoxNo>().Where(m => m.IsDel == "0" && m.BoxNo == model.BoxNo && m.IsUse == "0" && m.Level == "1").ToList();
                if (boxInfo.Count == 0)
@@ -2022,10 +2033,12 @@
                    }
                    boxInfoList.AddRange(boxInfo);
                }
                #endregion
                #endregion
                // 更改箱支关系表
                decimal factQty = 0.00m;//托盘总数量
                var boxGroup = boxInfoList.GroupBy(m => m.BoxNo).ToList();
                foreach (var g in boxGroup)
                {
@@ -2061,7 +2074,7 @@
                    }
                }
                Db.Updateable(boxInfoList).ExecuteCommand();
                }
                // 更新托盘绑定表
                bind.Qty += factQty;
                if (bind.FullQty < bind.Qty)
@@ -2077,7 +2090,7 @@
                // 更改入库单明细已组数量
                var sqlString = string.Empty;
                sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{factQty}' where id = '{model.AsnDetailId}';";
                sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{bind.Qty}' where id = '{model.AsnDetailId}';";
                Db.Ado.ExecuteCommand(sqlString);
                // 更改入库单及入库明细状态