Browse Source

Merge branch 'master' into groupmealmanage

groupmealmanage
zhaoy 10 months ago
parent
commit
6af1ec0900
7 changed files with 52 additions and 10 deletions
  1. +7
    -0
      BPA.SAAS.Manage.Application/Device/Dtos/ProductTopics/ProductTopicsQueryInputDto.cs
  2. +7
    -0
      BPA.SAAS.Manage.Application/Device/Interface/IProductTopicsService.cs
  3. +11
    -0
      BPA.SAAS.Manage.Application/Device/ProductTopicsServices.cs
  4. +7
    -2
      BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs
  5. +10
    -0
      BPA.SAAS.Manage.Application/Device/Services/ProductTopicsService.cs
  6. +8
    -8
      BPA.SAAS.Manage.Application/System/Services/MenuService.cs
  7. +2
    -0
      BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs

+ 7
- 0
BPA.SAAS.Manage.Application/Device/Dtos/ProductTopics/ProductTopicsQueryInputDto.cs View File

@@ -15,4 +15,11 @@ namespace BPA.SAAS.Manage.Application.Device.Dtos.ProductTopics
public string ProductVesionId { get; set; }
public bool IsDefault { get; set; }
}
public class ProductTopicsQueryDto
{
public string ProductId { get; set; }
public string ProductVesionId { get; set; }
public bool IsDefault { get; set; }
}
}

+ 7
- 0
BPA.SAAS.Manage.Application/Device/Interface/IProductTopicsService.cs View File

@@ -1,6 +1,7 @@
using BPA.SAAS.Manage.Application.Device.Dtos.Device;
using BPA.SAAS.Manage.Application.Device.Dtos.ProductTopics;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Product;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -17,6 +18,12 @@ namespace BPA.SAAS.Manage.Application.Device.Interface
/// <param name="inputDto"></param>
/// <returns></returns>
Task<PageUtil> GetProductTopicsPage(ProductTopicsQueryInputDto inputDto);
/// <summary>
/// 查询topics列表
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
Task<List<BPA_ProductTopics>> GetProductTopicList(ProductTopicsQueryDto inputDto);
/// <summary>
/// 添加
/// </summary>


+ 11
- 0
BPA.SAAS.Manage.Application/Device/ProductTopicsServices.cs View File

@@ -2,6 +2,7 @@
using BPA.SAAS.Manage.Application.Device.Dtos.ProductTopics;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Product;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Collections.Generic;
@@ -30,6 +31,16 @@ namespace BPA.SAAS.Manage.Application.Device
return await _productTopicsService.GetProductTopicsPage(inputDto);
}
/// <summary>
/// 查询topics列表
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
[HttpPost("/api/producttopics/list")]
public async Task<List<BPA_ProductTopics>> GetProductTopicList(ProductTopicsQueryDto inputDto)
{
return await _productTopicsService.GetProductTopicList(inputDto);
}
/// <summary>
/// 添加
/// </summary>
/// <param name="inputDto"></param>


+ 7
- 2
BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs View File

@@ -71,9 +71,14 @@ namespace BPA.SAAS.Manage.Application.Device.Services
Id = a.Id,
Name = a.DeviceName,
AutoKey=a.AutoKey.ToString(),
Vesion=SqlFunc.Subqueryable<BPA_ProductVesion>().Where(x=>x.Id==a.ProductVersionId).First().Vesion,
PrductKey = SqlFunc.Subqueryable<BPA_Product>().Where(x => x.Id == a.ProductId).First().Key,
ProductVersionId=a.ProductVersionId,
ProductId=a.ProductId,
}) .ToListAsync();
data.ForEach(x =>
{
x.Vesion = _db.Queryable<BPA_ProductVesion>().Where(s => s.Id == x.ProductVersionId).First()?.Vesion;
x.PrductKey = _db.Queryable<BPA_Product>().Where(s => s.Id == x.ProductId).First()?.Key;
});
return data;
}
public async Task<BPA_DeviceInfo> GetDevice(string productId)


+ 10
- 0
BPA.SAAS.Manage.Application/Device/Services/ProductTopicsService.cs View File

@@ -42,6 +42,16 @@ namespace BPA.SAAS.Manage.Application.Device.Services

};
}
public async Task<List<BPA_ProductTopics>> GetProductTopicList(ProductTopicsQueryDto inputDto)
{
var total = new RefAsync<int>();
var data = await _db.Queryable<BPA_ProductTopics>().Where(x => x.ProductId == inputDto.ProductId && x.ProductVesionId == inputDto.ProductVesionId && x.IsDefault == inputDto.IsDefault)
.OrderBy(x => x.CreateAt, OrderByType.Desc)
.ToListAsync();

return data;
}
/// <summary>
/// 添加
/// </summary>


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

@@ -347,15 +347,15 @@ namespace BPA.SAAS.Manage.Application.System.Services
}).ToList()
}).ToList();
var da = new List<MenuTreeOutput>();
data.ForEach(x =>
{
if (x.Children.Count() > 0 || x.type== type)
{
da.Add(x);
}
//data.ForEach(x =>
//{
// if (x.Children.Count() > 0 || x.type== type)
// {
// da.Add(x);
// }

});
return da;
//});
return data;
}

}


+ 2
- 0
BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs View File

@@ -17,6 +17,8 @@ namespace BPA.SAAS.Manage.Comm.Model
public string Id { get; set; }
public string Name { get; set; }
public string AutoKey { get; set; }
public string ProductVersionId { get; set; }
public string ProductId { get; set; }
public string Vesion { get; set; }
public string PrductKey { get; set; }
}


Loading…
Cancel
Save