Administrator
2024-03-06 65ecd34acf0a3d33e6c1e10c93e351716d749e2f
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -156,12 +156,20 @@
                switch (model.Type)//0:原料 1:包材 2:成品 3:耗材 4:半成品
                {
                    case "0"://成品入库
                        skuType = "(2)";
                        break;
                    case "3"://退货入库
                        skuType = "(2)";
                        break;
                    case "5"://其它入库
                        skuType = "(0,1,3)";
                        break;
                    case "6"://代储入库
                        skuType = "(2)";
                        break;
                    case "1"://采购入库
                        skuType = "(0,1,3)";
                        break;
                    case "4"://车间余料退回入库
                        skuType = "(0,1,3)";
                        break;
@@ -169,7 +177,7 @@
                        skuType = "(4)";
                        break;
                    case "7"://寄存入库
                        skuType = "(0,1,2,3,4)";
                        skuType = "(3)";
                        break;
                    default: //其它
                        skuType = "(0,1,2,3,4)";
@@ -643,6 +651,11 @@
                //{
                //    throw new Exception("参数异常,请检查状态是否为执行完成");
                //}
                var palletBind = Db.Queryable<BllPalletBind>().Where(m => m.IsDel == "0" && m.ASNNo == notice.ASNNo && m.Status != "2").ToList();
                if (palletBind != null && palletBind.Count > 0)
                {
                    throw new Exception("存在未入库完成托盘信息,不允许关单");
                }
                var sqlString = "";
@@ -739,16 +752,35 @@
                    }
                    var info = boxInfo.First(m => m.BindNo == item.Id);
                    if (!msgS.Contains(info.SkuNo))
                    //获取托盘绑定对应单据
                    var noticeDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.Id == item.ASNDetailNo);
                    if (info != null)
                    {
                        msgS += info.SkuNo + ";";
                    }
                        if (!msgS.Contains(info.SkuNo))
                        {
                            msgS += info.SkuNo + ";";
                        }
                    if (!msgL.Contains(info.LotNo))
                        if (!msgL.Contains(info.LotNo))
                        {
                            msgL += info.LotNo + ";";
                        }
                    }
                    else
                    {
                        msgL += info.LotNo + ";";
                        if (!msgS.Contains(noticeDetail.SkuNo))
                        {
                            msgS += noticeDetail.SkuNo + ";";
                        }
                        if (!msgL.Contains(noticeDetail.LotNo))
                        {
                            msgL += noticeDetail.LotNo + ";";
                        }
                    }
                }
                var time = DateTime.Now;
                var log = new BllAuditLog()
@@ -940,6 +972,10 @@
                {
                    throw new Exception("未查询到单据信息");
                }
                if (notice.Status != "3")
                {
                    throw new Exception("复核失败,单据非关闭状态");
                }
                var detail = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.ASNNo == notice.ASNNo && m.IsDel == "0").ToList();
                if (detail.Count == 0)
                {