zhaoy преди 9 месеца
родител
ревизия
3e8ca41561
променени са 4 файла, в които са добавени 13 реда и са изтрити 5 реда
  1. +1
    -1
      BPA.SAAS.Manage.Application/Device/DeviceServices.cs
  2. +1
    -1
      BPA.SAAS.Manage.Application/Device/Interface/IDeviceService.cs
  3. +4
    -3
      BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs
  4. +7
    -0
      BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs

+ 1
- 1
BPA.SAAS.Manage.Application/Device/DeviceServices.cs Целия файл

@@ -35,7 +35,7 @@ namespace BPA.SAAS.Manage.Application.Device
/// </summary>
/// <returns></returns>
[HttpGet("/api/device/list")]
public async Task<List<ListSelectQuery>> GetDeviceList()
public async Task<List<ListSelectDeviceQuery>> GetDeviceList()
{
return await _deviceService.GetDeviceList();
}


+ 1
- 1
BPA.SAAS.Manage.Application/Device/Interface/IDeviceService.cs Целия файл

@@ -12,7 +12,7 @@ namespace BPA.SAAS.Manage.Application.Device.Interface
public interface IDeviceService
{
Task<PageUtil> GetDeviceInfoPage(DeviceQueryInputDto inputDto);
Task<List<ListSelectQuery>> GetDeviceList();
Task<List<ListSelectDeviceQuery>> GetDeviceList();
Task<bool> AddDevice(DeviceInfoBaseDto inputDto);
Task<bool> UpdateDevice(DeviceInfoBaseDto inputDto);
Task<bool> DelDeviceInfo(List<string> inputList);


+ 4
- 3
BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs Целия файл

@@ -62,15 +62,16 @@ namespace BPA.SAAS.Manage.Application.Device.Services
/// 查询设备列表
/// </summary>
/// <returns></returns>
public async Task<List<ListSelectQuery>> GetDeviceList()
public async Task<List<ListSelectDeviceQuery>> GetDeviceList()
{
RefAsync<int> total = 0;
var data = await _db.Queryable<BPA_DeviceInfo>()
.Select(a=> new ListSelectQuery
.Select(a=> new ListSelectDeviceQuery
{
Id = a.Id,
Name = a.DeviceName,
AutoKey=a.AutoKey.ToString()
AutoKey=a.AutoKey.ToString(),
Vesion=SqlFunc.Subqueryable<BPA_ProductVesion>().Where(x=>x.Id==a.ProductVersionId).First().Vesion,
}) .ToListAsync();
return data;
}


+ 7
- 0
BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs Целия файл

@@ -12,4 +12,11 @@ namespace BPA.SAAS.Manage.Comm.Model
public string Name { get; set; }
public string AutoKey { get; set; }
}
public class ListSelectDeviceQuery
{
public string Id { get; set; }
public string Name { get; set; }
public string AutoKey { get; set; }
public string Vesion { get; set; }
}
}

Зареждане…
Отказ
Запис