Browse Source

商品查询修改

storemanagement
zhaoy 9 months ago
parent
commit
f79921077b
4 changed files with 9 additions and 5 deletions
  1. +1
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsQueryDto.cs
  2. +3
    -1
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs
  3. +1
    -0
      BPA.SAAS.Manage.Application/System/Dtos/MenuTreeOutput.cs
  4. +4
    -4
      BPA.SAAS.Manage.Application/System/Services/MenuService.cs

+ 1
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsQueryDto.cs View File

@@ -11,6 +11,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods
public class GoodsQueryDto: PageInputBase
{
public string Name { get; set; }
public string DeviceId { get; set; }
public string Code { get; set; }
public string Design { get; set; }
public string GoodsTypeId { get; set; }


+ 3
- 1
BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs View File

@@ -97,7 +97,8 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
Design = a.Design,
IsWeigh = a.IsWeigh,
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);
@@ -108,6 +109,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
};
return util;
}
/// <summary>
/// 查询所有商品
/// </summary>


+ 1
- 0
BPA.SAAS.Manage.Application/System/Dtos/MenuTreeOutput.cs View File

@@ -17,6 +17,7 @@ namespace BPA.SAAS.Manage.Application.System.Dtos
/// </summary>
public string Key { get; set; }
public string value { get; set; }
public string type { get; set; }
/// <summary>
/// 子菜单
/// </summary>


+ 4
- 4
BPA.SAAS.Manage.Application/System/Services/MenuService.cs View File

@@ -329,32 +329,32 @@ namespace BPA.SAAS.Manage.Application.System.Services
Key = t.Id,
Title = t.Name,
value = t.Id,
type=t.Type,
Children = AllMenus.Where(x => x.Pid == t.Id).Select(x => new MenuTreeOutput
{
Key = x.Id,
Title = x.Name,
value = x.Id,
type = x.Type,
Children = AllMenus.Where(y => y.Pid == x.Id).Select(y => new MenuTreeOutput
{
Key = y.Id,
Title = y.Name,
value = y.Name,
type = y.Type,
}).ToList()
}).ToList()
}).ToList();
var da = new List<MenuTreeOutput>();
data.ForEach(x =>
{
if (x.Children.Count() > 0)
if (x.Children.Count() > 0 || x.type== type)
{
da.Add(x);
}

});


return da;

}

}


Loading…
Cancel
Save