zhaowc
2024-08-23 e2446696b08dff7dfe3df21c8a58acf768203287
Wms/WMS.BLL/SysServer/MaterialsServer.cs
@@ -57,18 +57,20 @@
        {
            return Db.Queryable<SysMaterials>()
                     .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
                     .LeftJoin<SysPackag>((a, b,c) => a.PackagNo == c.PackagNo)
                     //.Where((a,b,c) => c.IsDel == "0")
                     .LeftJoin<SysPackag>((a, b,c) => a.PackagNo == c.PackagNo)
                     .LeftJoin<SysUnit> ((a,b,c,d)=>a.UnitNo == d.UnitNo)
                     .LeftJoin<SysMaterialCategory>((a,b,c,d,e)=>a.CategoryNo == e.CategoryNo)
                     .Where((a,b,c,d,e) => d.IsDel == "0" && e.IsDel =="0")
                     .WhereIF(!string.IsNullOrEmpty(skuNo), a => a.SkuNo.Contains(skuNo))
                     .WhereIF(!string.IsNullOrEmpty(skuName), a => a.SkuNo.Contains(skuName))
                     .WhereIF(!string.IsNullOrEmpty(skuName), a => a.SkuName.Contains(skuName))
                     .WhereIF(!string.IsNullOrEmpty(auditStatusNo), a => a.AuditStatusNo == auditStatusNo)
                     .WhereIF(!string.IsNullOrEmpty(type), a => a.Type == type)
                     .WhereIF(!string.IsNullOrEmpty(isControlled), a => a.IsControlled == isControlled)
                     .WhereIF(!string.IsNullOrEmpty(isInspect), a => a.IsInspect == isInspect)
                     .WhereIF(!string.IsNullOrEmpty(environment), a => a.Environment == environment)
                     .WhereIF(!string.IsNullOrEmpty(categoryNo), a => a.CategoryNo == categoryNo)
                     .Where(a => a.IsDel == "0")
                     .Select<MaterialsDto>((a, b, c) => new MaterialsDto() { CreateUserName = b.RealName,PackagName = c.PackagName }, true)
                     .Where(a => a.IsDel == "0" )
                     .Select<MaterialsDto>((a, b, c,d,e) => new MaterialsDto() { CreateUserName = b.RealName,PackagName = c.PackagName }, true)
                     .ToListAsync();
        }