diff --git a/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionBaseDto.cs b/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionBaseDto.cs index 2a61ab3..dd2c6e9 100644 --- a/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionBaseDto.cs +++ b/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionBaseDto.cs @@ -26,5 +26,6 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology public bool IsBatch { get; set; } = false; public string GoodsId { get; set; } public string DeviceId { get; set; } + public string WarehousrTemplateId { get; set; } } } diff --git a/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionListView.cs b/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionListView.cs index 9c2b466..e63c069 100644 --- a/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionListView.cs +++ b/BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionListView.cs @@ -9,6 +9,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology public class GoodsTechnologyActionListView { public string DeviceId { get; set; } + public string WarehousrTemplateId { get; set; } public string DeviceName { get; set; } public List Data { get; set; } } @@ -41,5 +42,6 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology public int Sort { get; set; } public string GoodsId { get; set; } public string DeviceId { get; set; } + public string WarehousrTemplateId { get; set; } } } diff --git a/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs b/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs index 5243bf6..b1b1dea 100644 --- a/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs +++ b/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs @@ -48,6 +48,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services StepName = inputDto[i].StepName, ChnologyId = inputDto[i].ChnologyId, CreateAt = DateTime.Now, + WarehousrTemplateId = inputDto[i].WarehousrTemplateId, IsDeleted = 0, GoodsAttributeId = inputDto[i].GoodsAttributeId, Sort = string.IsNullOrWhiteSpace(inputDto[i].Sort.ToString()) ? maxsort + (i + 1) : Convert.ToInt32(inputDto[i].Sort.ToString()), @@ -91,6 +92,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services ChnologyId = inputDto[i].ChnologyId, CreateAt = DateTime.Now, IsDeleted = 0, + WarehousrTemplateId = inputDto[i].WarehousrTemplateId, GoodsAttributeId = inputDto[i].GoodsAttributeId, Sort = string.IsNullOrWhiteSpace(inputDto[i].Sort.ToString()) ? maxsort + (i + 1) : Convert.ToInt32(inputDto[i].Sort.ToString()), IsBatch = inputDto[i].IsBatch, @@ -124,6 +126,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services var Devicelist = await _db.Queryable().ToListAsync(); var GoodsAttributeValue = await _db.Queryable().ToListAsync(); var sf = list.GroupBy(x => x.GoodsAttributeId).ToList(); + var sf1 = list.GroupBy(x => x.WarehousrTemplateId).ToList(); for (int i = 0; i < sf.Count; i++) { var sd = GoodsAttributeValue?.Where(x => sf[i].Key.Contains(x.Id)).Select(x => x.AttributeValue).ToArray(); @@ -134,30 +137,14 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services GoodsTechnologyActionListView item = new() { DeviceId = s[t].Key, + WarehousrTemplateId = sf1[t].Key, DeviceName = Devicelist?.FirstOrDefault(x => x.Id == s[t].Key).DeviceName+ "【"+ nane+"】", Data = s[t].AsQueryable().ToList(), }; goodsTechnologyActionListViews.Add(item); } - //GoodsTechnologyActionListView item = new() - //{ - // DeviceId = sf[i].Key, - // DeviceName = Devicelist?.FirstOrDefault(x => x.Id == sf[i].Key).DeviceName, - // Data = sf[i].AsQueryable().ToList(), - //}; - //goodsTechnologyActionListViews.Add(item); } - //var s = list.GroupBy(x => x.DeviceId).ToList(); - //for (int i = 0; i < s.Count; i++) - //{ - // GoodsTechnologyActionListView item = new() - // { - // DeviceId = s[i].Key, - // DeviceName = Devicelist?.FirstOrDefault(x => x.Id == s[i].Key).DeviceName, - // Data = s[i].AsQueryable().ToList(), - // }; - // goodsTechnologyActionListViews.Add(item); - //} + return goodsTechnologyActionListViews; } public async Task DeleteGoodsTechnologyAction(string id) 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/Dtos/WarehouseTemplate/WarehouseTemplatDto.cs b/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplatDto.cs new file mode 100644 index 0000000..ad9e324 --- /dev/null +++ b/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplatDto.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate +{ + public class WarehouseTemplatDto + { + public string Id { get; set; } + public string DeviceId { get; set; } + public string TemplateName { get; set; } + public List WarehousePostionData { get; set; } + } + public class WarehousePostion + { + public string Id { get; set; } + public string TemplateId { get; set; } + public string Code { get; set; } + public string BatchingId { get; set; } + } +} diff --git a/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplateQueryInputDto.cs b/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplateQueryInputDto.cs new file mode 100644 index 0000000..6aac86b --- /dev/null +++ b/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplateQueryInputDto.cs @@ -0,0 +1,15 @@ +using BPA.SAAS.Manage.Core.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate +{ + public class WarehouseTemplateQueryInputDto: PageInputBase + { + public string DeviceName { get; set; } + public string TemplateName { get; set; } + } +} diff --git a/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplateView.cs b/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplateView.cs new file mode 100644 index 0000000..39a5bcf --- /dev/null +++ b/BPA.SAAS.Manage.Application/Device/Dtos/WarehouseTemplate/WarehouseTemplateView.cs @@ -0,0 +1,21 @@ +using BPA.SAAS.Manage.Core.Device; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate +{ + public class WarehouseTemplateView + { + public string Id { get; set; } + public string DeviceId { get; set; } + public string DeviceName{ get; set; } + public string TemplateName { get; set; } + public DateTime CreateAt { get; set; } + public int ProductNumber{ get; set; } + public string ProductUrl { get; set; } + public List WarehousePostion { get; set; } + } +} diff --git a/BPA.SAAS.Manage.Application/Device/Interface/IWarehouseTemplateService.cs b/BPA.SAAS.Manage.Application/Device/Interface/IWarehouseTemplateService.cs new file mode 100644 index 0000000..419dcae --- /dev/null +++ b/BPA.SAAS.Manage.Application/Device/Interface/IWarehouseTemplateService.cs @@ -0,0 +1,19 @@ +using BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate; +using BPA.SAAS.Manage.Core.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Application.Device.Interface +{ + public interface IWarehouseTemplateService + { + Task GetWarehouseTemplatePage(WarehouseTemplateQueryInputDto inputDto); + Task> GetWarehouseTemplateList(string deviceId); + Task AddWarehouseTemplate(WarehouseTemplatDto inputDto); + Task DeWarehouseTemplate(List inputList); + Task UpdateWarehouseTemplate(WarehouseTemplatDto inputDto); + } +} diff --git a/BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs b/BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs index 470f54f..b8669e8 100644 --- a/BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs +++ b/BPA.SAAS.Manage.Application/Device/Services/DeviceService.cs @@ -77,6 +77,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services data.ForEach(x => { x.Vesion = _db.Queryable().Where(s => s.Id == x.ProductVersionId).First()?.Vesion; + x.ProductNumber = _db.Queryable().Where(s => s.Id == x.ProductVersionId).First()?.ProductNumber; x.PrductKey = _db.Queryable().Where(s => s.Id == x.ProductId).First()?.Key; }); return data; 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.Application/Device/Services/TechnologyService.cs b/BPA.SAAS.Manage.Application/Device/Services/TechnologyService.cs index dc23814..d114eb0 100644 --- a/BPA.SAAS.Manage.Application/Device/Services/TechnologyService.cs +++ b/BPA.SAAS.Manage.Application/Device/Services/TechnologyService.cs @@ -73,6 +73,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services public async Task> GetTechnologyList(string deviceId) { var device= _db.Queryable().Where(x=>x.Id== deviceId).First(); + if (device == null) return new List(); var data = await _db.Queryable().Where(x=>x.DeviceVersionId== device.ProductVersionId).Select(a => new TechnologyView { Id = a.Id, diff --git a/BPA.SAAS.Manage.Application/Device/Services/WarehouseTemplateService.cs b/BPA.SAAS.Manage.Application/Device/Services/WarehouseTemplateService.cs new file mode 100644 index 0000000..f6298e2 --- /dev/null +++ b/BPA.SAAS.Manage.Application/Device/Services/WarehouseTemplateService.cs @@ -0,0 +1,183 @@ +using BPA.SAAS.Manage.Application.Device.Dtos.Device; +using BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate; +using BPA.SAAS.Manage.Application.Device.Interface; +using BPA.SAAS.Manage.Comm.Enum; +using BPA.SAAS.Manage.Core.Base; +using BPA.SAAS.Manage.Core.Device; +using BPA.SAAS.Manage.Core.Product; +using NPOI.XSSF.UserModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Application.Device.Services +{ + public class WarehouseTemplateService : IWarehouseTemplateService, ITransient + { + ISqlSugarClient _db; + public WarehouseTemplateService(ISqlSugarClient db) + { + _db = db; + } + public async Task GetWarehouseTemplatePage(WarehouseTemplateQueryInputDto inputDto) + { + var total = new RefAsync(); + var data = await _db.Queryable((a,b,c) => new JoinQueryInfos(JoinType.Left,a.DeviceId==b.Id, JoinType.Left, b.ProductVersionId == c.Id)) + .WhereIF(!string.IsNullOrWhiteSpace(inputDto.TemplateName), (a, b, c) => a.TemplateName.Contains(inputDto.TemplateName)) + .WhereIF(!string.IsNullOrWhiteSpace(inputDto.DeviceName), (a, b, c) => a.DeviceId.Contains(inputDto.DeviceName)) + .Select((a,b,c)=>new WarehouseTemplateView + { + Id=a.Id, + DeviceId=a.DeviceId, + DeviceName=b.DeviceName, + TemplateName =a.TemplateName, + CreateAt =a.CreateAt, + ProductNumber=c.ProductNumber, + ProductUrl=c.ProductUrl + }) + .Mapper(x => + { + x.WarehousePostion= _db.Queryable ().Where(t=>t.TemplateId==x.Id).ToList(); + }) + .OrderBy(a => a.CreateAt, OrderByType.Desc) + .ToPageListAsync(inputDto.Current, inputDto.PageSize, total); + + return new PageUtil() + { + Data = data, + Total = total + + }; + } + public async Task> GetWarehouseTemplateList(string deviceId) + { + var total = new RefAsync(); + var data = await _db.Queryable((a, b, c) => new JoinQueryInfos(JoinType.Left, a.DeviceId == b.Id, JoinType.Left, b.ProductVersionId == c.Id)) + .WhereIF(!string.IsNullOrWhiteSpace(deviceId), (a, b, c) => a.DeviceId.Contains(deviceId)) + .Select((a, b, c) => new WarehouseTemplateView + { + Id = a.Id, + DeviceId = a.DeviceId, + DeviceName = b.DeviceName, + TemplateName = a.TemplateName, + CreateAt = a.CreateAt, + ProductNumber = c.ProductNumber, + ProductUrl = c.ProductUrl + }) + .Mapper(x => + { + x.WarehousePostion = _db.Queryable().Where(t => t.TemplateId == x.Id).ToList(); + }) + .OrderBy(a => a.CreateAt, OrderByType.Desc) + .ToListAsync(); + + return data; + } + /// + /// 新增 + /// + /// + + public async Task AddWarehouseTemplate(WarehouseTemplatDto inputDto) + { + try + { + _db.Ado.BeginTran(); + var check = _db.Queryable().Where(x => x.TemplateName == inputDto.TemplateName).Any(); + if (check) throw Oops.Oh("模板名称不能重复"); + var res = await _db.Insertable(new BPA_WarehouseTemplate + { + DeviceId = inputDto.DeviceId, + TemplateName = inputDto.TemplateName, + + }).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync(); + List list = new(); + for (int i = 0; i < inputDto.WarehousePostionData.Count; i++) + { + var tem = new BPA_WarehousePostion + { + TemplateId = res.Id, + Code = inputDto.WarehousePostionData[i].Code, + BatchingId = inputDto.WarehousePostionData[i].BatchingId, + }; + list.Add(tem); + } + var res1 = await _db.Insertable(list).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync(); + _db.Ado.CommitTran(); + return true; + } + catch (Exception e) + { + _db.Ado.RollbackTran(); + throw Oops.Oh("添加失败"); + } + + } + /// + /// 删除 + /// + /// + /// + public async Task DeWarehouseTemplate(List inputList) + { + try + { + _db.Ado.BeginTran(); + var datas = await _db.Queryable() + .Where(x => inputList.Contains(x.Id)) + .ToListAsync(); + var datas1 = await _db.Queryable() + .Where(x => inputList.Contains(x.TemplateId)) + .ToListAsync(); + _db.Deleteable(datas).ExecuteCommand(); + _db.Deleteable(datas1).ExecuteCommand(); + _db.Ado.CommitTran(); + return true; + } + catch (Exception) + { + _db.Ado.RollbackTran(); + throw Oops.Oh("删除失败"); + } + + } + /// + /// 修改 + /// + /// + public async Task UpdateWarehouseTemplate(WarehouseTemplatDto inputDto) + { + try + { + _db.Ado.BeginTran(); + var model = _db.Queryable().Where(x => x.Id == inputDto.Id).First(); + model.DeviceId= inputDto.DeviceId; + model.TemplateName= inputDto.TemplateName; + var res = await _db.Updateable(model).ExecuteCommandAsync(); + var warehousePostion = _db.Queryable().Where(x => x.TemplateId == inputDto.Id).ToList(); + await _db.Deleteable(warehousePostion).ExecuteCommandAsync(); + List list = new(); + for (int i = 0; i < inputDto.WarehousePostionData.Count; i++) + { + var tem = new BPA_WarehousePostion + { + TemplateId = inputDto.Id, + Code = inputDto.WarehousePostionData[i].Code, + BatchingId = inputDto.WarehousePostionData[i].BatchingId, + }; + list.Add(tem); + } + var res1 = await _db.Insertable(list).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync(); + _db.Ado.CommitTran(); + return true; + } + catch (Exception) + { + _db.Ado.RollbackTran(); + return false; + } + } + } +} diff --git a/BPA.SAAS.Manage.Application/Device/WarehouseTemplateServices.cs b/BPA.SAAS.Manage.Application/Device/WarehouseTemplateServices.cs new file mode 100644 index 0000000..821083f --- /dev/null +++ b/BPA.SAAS.Manage.Application/Device/WarehouseTemplateServices.cs @@ -0,0 +1,67 @@ +using BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate; +using BPA.SAAS.Manage.Application.Device.Interface; +using BPA.SAAS.Manage.Core.Base; +using Microsoft.AspNetCore.Components.Forms; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Application.Device +{ + [ApiDescriptionSettings("Device", Tag = "设备仓位模板")] + public class WarehouseTemplateServices : IDynamicApiController, ITransient + { + IWarehouseTemplateService _warehouseTemplateService; + public WarehouseTemplateServices(IWarehouseTemplateService warehouseTemplateService) + { + _warehouseTemplateService=warehouseTemplateService; + } + /// + /// 分页查询 + /// + /// + /// + [HttpPost("/api/warehousetemplate/page")] + public async Task GetWarehouseTemplatePage(WarehouseTemplateQueryInputDto inputDto) + { + return await _warehouseTemplateService.GetWarehouseTemplatePage(inputDto); + } + [HttpGet("/api/warehousetemplate/list")] + public async Task> GetWarehouseTemplateList(string deviceId) + { + return await _warehouseTemplateService.GetWarehouseTemplateList(deviceId); + } + /// + /// 添加 + /// + /// + /// + [HttpPost("/api/warehousetemplate/add")] + public async Task AddWarehouseTemplate(WarehouseTemplatDto inputDto) + { + return await _warehouseTemplateService.AddWarehouseTemplate(inputDto); + } + /// + /// 删除 + /// + /// + /// + [HttpPost("/api/warehousetemplate/del")] + public async Task DeWarehouseTemplate(List inputList) + { + return await _warehouseTemplateService.DeWarehouseTemplate(inputList); + } + /// + /// 更新 + /// + /// + /// + [HttpPost("/api/warehousetemplate/update")] + public async Task UpdateWarehouseTemplate(WarehouseTemplatDto inputDto) + { + return await _warehouseTemplateService.UpdateWarehouseTemplate(inputDto); + } + } +} diff --git a/BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs b/BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs index 7f5c8f1..42805c3 100644 --- a/BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs +++ b/BPA.SAAS.Manage.Comm/Model/ListSelectQuery.cs @@ -21,5 +21,6 @@ namespace BPA.SAAS.Manage.Comm.Model public string ProductId { get; set; } public string Vesion { get; set; } public string PrductKey { get; set; } + public int? ProductNumber { get; set; } } } diff --git a/BPA.SAAS.Manage.Core/DataBase/BPA_GoodsTechnologyAction.cs b/BPA.SAAS.Manage.Core/DataBase/BPA_GoodsTechnologyAction.cs index a263947..1071467 100644 --- a/BPA.SAAS.Manage.Core/DataBase/BPA_GoodsTechnologyAction.cs +++ b/BPA.SAAS.Manage.Core/DataBase/BPA_GoodsTechnologyAction.cs @@ -35,5 +35,9 @@ namespace BPA.SAAS.Manage.Core.DataBase public int Sort { get; set; } public string GoodsId { get; set; } public string DeviceId { get; set; } + /// + /// 仓位模板 + /// + public string WarehousrTemplateId { get; set; } } } diff --git a/BPA.SAAS.Manage.Core/Device/BPA_WarehousePostion.cs b/BPA.SAAS.Manage.Core/Device/BPA_WarehousePostion.cs new file mode 100644 index 0000000..aa51b3d --- /dev/null +++ b/BPA.SAAS.Manage.Core/Device/BPA_WarehousePostion.cs @@ -0,0 +1,20 @@ +using BPA.SAAS.Manage.Core.Base; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Core.Device +{ + [SugarTable("bpa_warehousepostion")] + public class BPA_WarehousePostion : IBaseEntity, IGroupId + { + public string TemplateId { get; set; } + public string Code { get; set; } + public string BatchingId { get; set; } + public string GroupId { get; set; } + + } +} diff --git a/BPA.SAAS.Manage.Core/Device/BPA_WarehouseTemplate.cs b/BPA.SAAS.Manage.Core/Device/BPA_WarehouseTemplate.cs new file mode 100644 index 0000000..8721bbb --- /dev/null +++ b/BPA.SAAS.Manage.Core/Device/BPA_WarehouseTemplate.cs @@ -0,0 +1,18 @@ +using BPA.SAAS.Manage.Core.Base; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Core.Device +{ + [SugarTable("bpa_warehousetemplate")] + public class BPA_WarehouseTemplate : IBaseEntity, IGroupId + { + public string DeviceId { get; set; } + public string TemplateName { get; set; } + public string GroupId { get; set; } + } +} diff --git a/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs b/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs index cf04d80..9401182 100644 --- a/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs +++ b/BPA.SAAS.Manage.Core/Product/BPA_ProductVesion.cs @@ -21,6 +21,18 @@ namespace BPA.SAAS.Manage.Core.Product /// 模版路径 /// public string TemplatePath { get; set; } + + + /// + /// 仓位数量 + /// + public int ProductNumber { get; set; } + + /// + /// 仓位图片 + /// + public string ProductUrl { get; set; } + /// /// 状态 0启用 1禁用 ///