zhaoy 10 months ago
parent
commit
d1fe7798b3
1 changed files with 1 additions and 10 deletions
  1. +1
    -10
      BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs

+ 1
- 10
BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs View File

@@ -23,7 +23,6 @@ namespace BPA.SAAS.Manage.Application.Device.Services
{
public class DeviceService: IDeviceService, ITransient
{
private string BaseServerUrl=App.GetConfig<string>("baseurl");
ISqlSugarClient _db;
public DeviceService(ISqlSugarClient db)
{
@@ -36,14 +35,6 @@ namespace BPA.SAAS.Manage.Application.Device.Services
/// <returns></returns>
public async Task<PageUtil> GetDeviceInfoPage(DeviceQueryInputDto inputDto)
{
var getStoreurl = BaseServerUrl + "api/goodsattribute/getstorelist_alm";//获取商品属性
var responseGoodsAttribute = await getStoreurl.SetHeaders(new
{
groupId = App.User?.FindFirst(ClaimConst.GroupId)?.Value
}).SetHttpMethod(HttpMethod.Get).GetAsStringAsync();
var resStore = JsonConvert.DeserializeObject<ResponDataBase>(responseGoodsAttribute);
if (resStore.statusCode != "200") throw Oops.Oh("获取场景数据失败");
var dataStore = JsonConvert.DeserializeObject<List<StoreDto>>(resStore.data.ToString());
RefAsync<int> total =0;
var data = await _db.Queryable<BPA_DeviceInfo, BPA_Product>((a, b) => new JoinQueryInfos(JoinType.Left, a.ProductId == b.Id))

@@ -63,7 +54,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services
{
var Vesion = _db.Queryable<BPA_ProductVesion>().Where(c => c.Id == x.ProductVersionId).First();
x.ProductVersionName = Vesion?.Vesion;
x.StopName= dataStore?.Where(f=>f.Id==x.StopId).First()?.Name;
//x.StopName= dataStore?.Where(f=>f.Id==x.StopId).First()?.Name;
})
.ToPageListAsync(inputDto.Current, inputDto.PageSize, total);
return new PageUtil()


Loading…
Cancel
Save