@@ -11,6 +11,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods | |||||
public class GoodsQueryDto: PageInputBase | public class GoodsQueryDto: PageInputBase | ||||
{ | { | ||||
public string Name { get; set; } | public string Name { get; set; } | ||||
public string DeviceId { get; set; } | |||||
public string Code { get; set; } | public string Code { get; set; } | ||||
public string Design { get; set; } | public string Design { get; set; } | ||||
public string GoodsTypeId { get; set; } | public string GoodsTypeId { get; set; } | ||||
@@ -97,7 +97,8 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services | |||||
Design = a.Design, | Design = a.Design, | ||||
IsWeigh = a.IsWeigh, | IsWeigh = a.IsWeigh, | ||||
DefaultMate = a.DefaultMate, | DefaultMate = a.DefaultMate, | ||||
IsAttrubute = a.IsAttrubute | |||||
IsAttrubute = a.IsAttrubute, | |||||
Goodstechnology = SqlFunc.Subqueryable<BPA_GoodsTechnologyAction>().Where(p => p.GoodsId == a.Id).WhereIF(!string.IsNullOrWhiteSpace(dto.DeviceId),p=>p.DeviceId== dto.DeviceId).ToList(), | |||||
}) | }) | ||||
.ToPageListAsync(dto.Current, dto.PageSize, total); | .ToPageListAsync(dto.Current, dto.PageSize, total); | ||||
@@ -108,6 +109,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services | |||||
}; | }; | ||||
return util; | return util; | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 查询所有商品 | /// 查询所有商品 | ||||
/// </summary> | /// </summary> | ||||
@@ -17,6 +17,7 @@ namespace BPA.SAAS.Manage.Application.System.Dtos | |||||
/// </summary> | /// </summary> | ||||
public string Key { get; set; } | public string Key { get; set; } | ||||
public string value { get; set; } | public string value { get; set; } | ||||
public string type { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 子菜单 | /// 子菜单 | ||||
/// </summary> | /// </summary> | ||||
@@ -329,32 +329,32 @@ namespace BPA.SAAS.Manage.Application.System.Services | |||||
Key = t.Id, | Key = t.Id, | ||||
Title = t.Name, | Title = t.Name, | ||||
value = t.Id, | value = t.Id, | ||||
type=t.Type, | |||||
Children = AllMenus.Where(x => x.Pid == t.Id).Select(x => new MenuTreeOutput | Children = AllMenus.Where(x => x.Pid == t.Id).Select(x => new MenuTreeOutput | ||||
{ | { | ||||
Key = x.Id, | Key = x.Id, | ||||
Title = x.Name, | Title = x.Name, | ||||
value = x.Id, | value = x.Id, | ||||
type = x.Type, | |||||
Children = AllMenus.Where(y => y.Pid == x.Id).Select(y => new MenuTreeOutput | Children = AllMenus.Where(y => y.Pid == x.Id).Select(y => new MenuTreeOutput | ||||
{ | { | ||||
Key = y.Id, | Key = y.Id, | ||||
Title = y.Name, | Title = y.Name, | ||||
value = y.Name, | value = y.Name, | ||||
type = y.Type, | |||||
}).ToList() | }).ToList() | ||||
}).ToList() | }).ToList() | ||||
}).ToList(); | }).ToList(); | ||||
var da = new List<MenuTreeOutput>(); | var da = new List<MenuTreeOutput>(); | ||||
data.ForEach(x => | data.ForEach(x => | ||||
{ | { | ||||
if (x.Children.Count() > 0) | |||||
if (x.Children.Count() > 0 || x.type== type) | |||||
{ | { | ||||
da.Add(x); | da.Add(x); | ||||
} | } | ||||
}); | }); | ||||
return da; | return da; | ||||
} | } | ||||
} | } | ||||