Administrator
2024-02-22 d34d36d5c0478d1e5f56b92fc5b38fc5ca379e5c
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -1438,12 +1438,19 @@
                            #endregion
                            break;
                        case "0":
                        case "0":
                            var noticeDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == item.ASNDetailNo);
                            if (noticeDetail == null)
                            {
                                throw new Exception("未查询到托盘绑定的入库单明细信息");
                            }
                            var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo);
                            if (notice == null)
                            {
                                throw new Exception("未查询到托盘绑定的入库单信息");
                            }
                            string ownerNo = notice.CustomerNo;//货主编码
                            string ownerName = notice.CustomerName;//货主名称
                            var sku1 = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == noticeDetail.SkuNo);
                            string isinspect = "0";
@@ -1460,7 +1467,7 @@
                            {
                                LotNo = item.LotNo,
                                LotText = noticeDetail.LotText,
                                SupplierLot = noticeDetail.SupplierLot,
                                SupplierLot = noticeDetail.SupplierLot,
                                SkuNo = noticeDetail.SkuNo,
                                SkuName = noticeDetail.SkuName,
                                Standard = noticeDetail.Standard,
@@ -1488,6 +1495,9 @@
                                PackagNo = noticeDetail.PackagNo,
                                IsBale = item.IsBale,
                                IsBelt = item.IsBelt,
                                OwnerNo = ownerNo,
                                OwnerName = ownerName,
                                IsDel = "0",
                                CreateUser = 0,
@@ -1577,6 +1587,9 @@
                                    LockQty = 0,
                                    FrozenQty = 0,
                                    OwnerNo = ownerNo,
                                    OwnerName = ownerName,
                                    IsDel = "0",
                                    CreateUser = userId,
                                    CreateTime = comTime
@@ -1598,8 +1611,7 @@
                            var asnDetailNum = Db.Queryable<BllArrivalNoticeDetail>()
                                .Count(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo && m.Status != "2");
                            if (asnDetailNum == 0)
                            {
                                var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo);
                            {
                                notice.Status = "2";
                                notice.CompleteTime = comTime;
                                Db.Updateable(notice).ExecuteCommand();