test
16 小时以前 27742f9fa3339984db3bc821b027cce4d69c2536
修改创建出库单据,客户信息
1个文件已修改
26 ■■■■ 已修改文件
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -332,17 +332,33 @@
                //获取库存
                var stockList = Db.Queryable<DataStock>().Where(s => skuNos.Contains(s.SkuNo) && (s.Qty - s.FrozenQty - s.LockQty) > 0).ToList();
                //string CustomerName = string.Empty;
                //if (!string.IsNullOrEmpty(model.customerNo))
                //{
                //    //客户信息
                //    var customer = Db.Queryable<SysCustomer>().First(m => m.IsDel == "0" && m.CustomerNo == model.customerNo);
                //    if (customer == null)
                //    {
                //        throw new Exception("客户信息不存在!");
                //    }
                //    CustomerName = customer.CustomerName;
                //}
                string CustomerName = string.Empty;
                if (!string.IsNullOrEmpty(model.customerNo))
                {
                    //客户信息
                    var customer = Db.Queryable<SysCustomer>().First(m => m.IsDel == "0" && m.CustomerNo == model.customerNo);
                    if (customer == null)
                    if (customer != null)
                    {
                        throw new Exception("客户信息不存在!");
                        CustomerName = customer.CustomerName;
                    }
                    CustomerName = customer.CustomerName;
                }
                    else
                    {
                        // 记录日志,便于排查
                        Console.WriteLine($"警告:客户信息不存在,customerNo={model.customerNo}");
                        // 可设置默认客户名称或其他处理,根据业务决定
                        CustomerName = "默认客户";
                    }
                }
                //承运商信息
                //var logistics = Db.Queryable<SysLogisticsInfo>().First(m => m.IsDel == "0" && m.CarrierName == model.LogisticsNo);
                //int? logisticsId = null;