From 0ee010291cf15316a78498bdc154ff8efbc5792b Mon Sep 17 00:00:00 2001 From: gwbvipvip Date: Sat, 24 Feb 2024 14:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Device/Dtos/DeviceVesion/DeviceVesionBaseDto.cs | 9 +++++++++ .../Device/Dtos/DeviceVesion/DeviceVesionModel.cs | 11 +++++++++++ .../Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs | 2 ++ .../Device/Services/DeviceVesionService.cs | 10 +++++++++- BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs | 2 +- 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionBaseDto.cs b/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionBaseDto.cs index 9847b8b..48cc7ea 100644 --- a/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionBaseDto.cs +++ b/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionBaseDto.cs @@ -11,6 +11,15 @@ namespace BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion public string Id { get; set; } public string Vesion { get; set; } public string ProductId { get; set; } + /// + /// 仓位数量 + /// + public int ProductNumber { get; set; } + + /// + /// 仓位图片 + /// + public string ProductUrl { get; set; } /// /// 模版路径 diff --git a/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionModel.cs b/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionModel.cs index d91755c..b826dfa 100644 --- a/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionModel.cs +++ b/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionModel.cs @@ -23,6 +23,17 @@ namespace BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion /// 产品标签 /// public string ProductCode { get; set; } + + /// + /// 仓位数量 + /// + public int ProductNumber { get; set; } + + /// + /// 仓位图片 + /// + public string ProductUrl { get; set; } + /// /// 模版路径 /// diff --git a/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs b/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs index 5882c43..480e93a 100644 --- a/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs +++ b/BPA.SAAS.Manage.Application/Device/Dtos/DeviceVesion/DeviceVesionQueryInputDto.cs @@ -10,6 +10,8 @@ namespace BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion public class DeviceVesionQueryInputDto : PageInputBase { public string ProductName { get; set; } + + public string Vesion { get; set; } } } diff --git a/BPA.SAAS.Manage.Application/Device/Services/DeviceVesionService.cs b/BPA.SAAS.Manage.Application/Device/Services/DeviceVesionService.cs index 0a6fd78..70dd786 100644 --- a/BPA.SAAS.Manage.Application/Device/Services/DeviceVesionService.cs +++ b/BPA.SAAS.Manage.Application/Device/Services/DeviceVesionService.cs @@ -38,6 +38,8 @@ namespace BPA.SAAS.Manage.Application.Device.Services Id=a.Id.SelectAll(), ProductName=b.Name, ProductCode=b.Code, + ProductNumber=a.ProductNumber, + ProductUrl=a.ProductUrl, }) .ToPageListAsync(inputDto.Current, inputDto.PageSize, total); @@ -64,6 +66,8 @@ namespace BPA.SAAS.Manage.Application.Device.Services Vesion = inputDto.Vesion, ProductId = inputDto.ProductId, TemplatePath = inputDto.TemplatePath, + ProductNumber = inputDto.ProductNumber, + ProductUrl = inputDto.ProductUrl, Status = CommonStatus.ENABLE }).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync(); var Product = _db.Queryable().Where(x => x.Id == inputDto.ProductId).First(); @@ -227,6 +231,8 @@ namespace BPA.SAAS.Manage.Application.Device.Services { var res = _db.Updateable().SetColumns(t => t.Vesion == inputDto.Vesion) .SetColumns(t => t.TemplatePath == inputDto.TemplatePath) + .SetColumns(t => t.ProductNumber == inputDto.ProductNumber) + .SetColumns(t => t.ProductUrl == inputDto.ProductUrl) .SetColumns(t => t.ProductId == inputDto.ProductId) .SetColumns(t => t.Status == (CommonStatus)inputDto.Status).Where(t => t.Id == inputDto.Id) .ExecuteCommandHasChange(); @@ -272,7 +278,9 @@ namespace BPA.SAAS.Manage.Application.Device.Services /// public async Task> GetDeviceVesionList() { - var resEntity =await _db.Queryable().Select(a => new BPA_ProductVesion() { Id = a.Id.SelectAll() }).ToListAsync(); + var resEntity =await _db.Queryable() + .Select(a => new BPA_ProductVesion() { Id = a.Id.SelectAll() }) + .ToListAsync(); return resEntity; } } diff --git a/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs b/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs index 5563d73..9401182 100644 --- a/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs +++ b/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs @@ -31,7 +31,7 @@ namespace BPA.SAAS.Manage.Core.Product /// /// 仓位图片 /// - public int ProductUrl { get; set; } + public string ProductUrl { get; set; } /// /// 状态 0启用 1禁用