@@ -1,5 +1,6 @@ | |||||
using BPA.SAAS.Manage.Application.Device.Dtos.Device; | using BPA.SAAS.Manage.Application.Device.Dtos.Device; | ||||
using BPA.SAAS.Manage.Core.Base; | using BPA.SAAS.Manage.Core.Base; | ||||
using BPA.SAAS.Manage.Core.Device; | |||||
using BPA.SAAS.Manage.Core.Product; | using BPA.SAAS.Manage.Core.Product; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -13,6 +14,7 @@ namespace BPA.SAAS.Manage.Application.Device.Interface | |||||
{ | { | ||||
Task<PageUtil> GetProductPage(ProductQueryInputDto inputDto); | Task<PageUtil> GetProductPage(ProductQueryInputDto inputDto); | ||||
Task<List<BPA_Product>> GetProductList(); | Task<List<BPA_Product>> GetProductList(); | ||||
Task<BPA_DeviceInfo> GetDevice(string productId); | |||||
Task<bool> AddProduct(ProductBaseDto inputDto); | Task<bool> AddProduct(ProductBaseDto inputDto); | ||||
Task<bool> DeProduct(List<string> inputList); | Task<bool> DeProduct(List<string> inputList); | ||||
Task<bool> UpdateProduct(ProductBaseDto inputDto); | Task<bool> UpdateProduct(ProductBaseDto inputDto); | ||||
@@ -1,6 +1,7 @@ | |||||
using BPA.SAAS.Manage.Application.Device.Dtos.Device; | using BPA.SAAS.Manage.Application.Device.Dtos.Device; | ||||
using BPA.SAAS.Manage.Application.Device.Interface; | using BPA.SAAS.Manage.Application.Device.Interface; | ||||
using BPA.SAAS.Manage.Core.Base; | using BPA.SAAS.Manage.Core.Base; | ||||
using BPA.SAAS.Manage.Core.Device; | |||||
using BPA.SAAS.Manage.Core.Product; | using BPA.SAAS.Manage.Core.Product; | ||||
using Microsoft.AspNetCore.Components.Forms; | using Microsoft.AspNetCore.Components.Forms; | ||||
using System; | using System; | ||||
@@ -39,6 +40,16 @@ namespace BPA.SAAS.Manage.Application.Device | |||||
return await _productService.GetProductList(); | return await _productService.GetProductList(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 根据产品id查询产品信息 | |||||
/// </summary> | |||||
/// <param name="productId"></param> | |||||
/// <returns></returns> | |||||
[HttpGet("/api/product/getdevice")] | |||||
public async Task<BPA_DeviceInfo> GetDevice(string productId) | |||||
{ | |||||
return await _productService.GetDevice(productId); | |||||
} | |||||
/// <summary> | |||||
/// 添加 | /// 添加 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="inputDto"></param> | /// <param name="inputDto"></param> | ||||
@@ -74,6 +74,11 @@ namespace BPA.SAAS.Manage.Application.Device.Services | |||||
}) .ToListAsync(); | }) .ToListAsync(); | ||||
return data; | return data; | ||||
} | } | ||||
public async Task<BPA_DeviceInfo> GetDevice(string productId) | |||||
{ | |||||
var data = await _db.Queryable<BPA_DeviceInfo>().Where(x => x.Id == productId).FirstAsync(); | |||||
return data; | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 添加 | /// 添加 | ||||
/// </summary> | /// </summary> | ||||