From 359ba4ff99244b2c02c3a095cdd1dd56fcf25f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Mon, 30 Dec 2024 15:26:23 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E9=80=80=E8=B4=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Jobs/AgvJobs/AgvJobOutputService.cs | 25 +++---------- .../CustomerProductionReturnNoteAppService.cs | 36 ++++++++++--------- 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs index 0a4fa332a..63908b2f6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs @@ -38,13 +38,7 @@ public class AgvJobOutputService : ApplicationService private readonly IHttpClientFactory _httpClientFactory; private readonly IOptions _options; private readonly ILogger _logger; - private readonly AssembleIssueJobAppService _assembleIssueJobAppService; - private readonly CoatingIssueJobAppService _coatingIssueJobAppService; - private readonly InjectionIssueJobAppService _injectionIssueJobAppService; - private readonly KittingIssueJobAppService _kittingIssueJobAppService; - private readonly SparePartIssueJobAppService _sparePartIssueJobAppService; - private readonly UnplannedIssueJobAppService _unplannedIssueJobAppService; - private readonly UnplannedReceiptJobAppService _unplannedReceiptJobAppService; + private readonly IOptions _agvOptions; @@ -53,29 +47,18 @@ public class AgvJobOutputService : ApplicationService IHttpClientFactory httpClientFactory, IOptions options, ILogger logger, - AssembleIssueJobAppService assembleIssueJobAppService, - CoatingIssueJobAppService coatingIssueJobAppService, - InjectionIssueJobAppService injectionIssueJobAppService, - KittingIssueJobAppService kittingIssueJobAppService, - SparePartIssueJobAppService sparePartIssueJobAppService, - UnplannedIssueJobAppService unplannedIssueJobAppService, - UnplannedReceiptJobAppService unplannedReceiptJobAppService + IOptions agvOptions ) { - _assembleIssueJobAppService = assembleIssueJobAppService; - _coatingIssueJobAppService = coatingIssueJobAppService; - _injectionIssueJobAppService = injectionIssueJobAppService; - _kittingIssueJobAppService = kittingIssueJobAppService; - _sparePartIssueJobAppService = sparePartIssueJobAppService; - _unplannedIssueJobAppService = unplannedIssueJobAppService; - _unplannedReceiptJobAppService = unplannedReceiptJobAppService; + _logger = logger; _unitOfWorkManager = unitOfWorkManager; _httpClientFactory = httpClientFactory; _options = options; + _agvOptions = agvOptions; } [HttpPost("test-callagv-Coating")] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs index 2af06fcc7..71d460828 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs @@ -96,33 +96,35 @@ public class CustomerProductionReturnNoteAppService : throw new UserFriendlyException($"未{entity.CustomerCode}查到客户信息!"); } + var parts= input.Details.Select(itm => itm.ItemCode).Distinct(); + + var custitmDetail = await _customerItemAppService.GetListByPartsAsync(parts.ToList()).ConfigureAwait(false); + + #region 20241230修改 + var query = from itm in custitmDetail + join itm1 in custitmDetail on itm.ItemCode equals itm1.ItemCode + where itm.CustomerCode != itm1.CustomerCode + select itm; + var diff= query.ToList(); + if (diff.Count > 0) + { + var diffparts=diff.Select(p => p.ItemCode).Distinct().ToList(); + throw new UserFriendlyException($"零件编号{string.Join(",",diffparts)},对应多个客户不能进行退货,请查看客户零件关系表!"); + } + #endregion + #region 20241230修改 - /// - /// 客户名称 - /// - - var parts= input.Details.Select(itm => itm.ItemCode).Distinct(); - //var ls=await IsExistCustomerItemPrice(parts.ToList(),input.CustomerCode).ConfigureAwait(false); + #endregion - //if (ls.Count > 0) - //{ - // throw new UserFriendlyException($"销售价格表中没有查到客户为{input.CustomerCode}零件号为{string.Join(",", ls.ToArray())}的零件关系和价格"); - //} - //var errlist= await CheckCustomerItem(parts.ToList(), input.CustomerCode).ConfigureAwait(false); - // if (errlist.Count > 0) - // { - // throw new UserFriendlyException($"客户零件关系表中没有查到客户为{input.CustomerCode}零件号为{string.Join(",", ls.ToArray())}的零件关系"); - // } - var custitmDetail = await _customerItemAppService.GetListByPartsAsync(parts.ToList()).ConfigureAwait(false); - var checkPart= from itm in entity.Details.ToList() + var checkPart = from itm in entity.Details.ToList() join itm1 in custitmDetail on itm.ItemCode equals itm1.ItemCode into temp From 6707a8f0736ea2835ea31cf7634feb6969ac2b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 09:08:42 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=8F=91=E8=BF=90=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeliverRequestAppService.cs | 80 ++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs index 124ba207e..c6afd39bd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; +using Org.BouncyCastle.Asn1.Ocsp; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; @@ -15,6 +16,7 @@ using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.ObjectMapping; using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -37,20 +39,35 @@ public class DeliverRequestAppService : private readonly ICustomerAppService _customerApp; private readonly ICustomerAddressAppService _customerAddressApp; private readonly IItemBasicAppService _itemBasicAppService; + private readonly ICustomerItemAppService _customerItemAppService; + private readonly ISalePriceSheetRepository _salePriceSheetRepository; + + + + public DeliverRequestAppService( IDeliverRequestRepository repository , IDeliverRequestManager deliverRequestManager , IAreaAppService areaApp , ICustomerAppService customerApp - , ICustomerAddressAppService customerAddressApp, -IItemBasicAppService itemBasicAppService) + , ICustomerAddressAppService customerAddressApp + , IItemBasicAppService itemBasicAppService, + ICustomerItemAppService customerItemAppService, + + ISalePriceSheetRepository salePriceSheetRepository + + ) : base(repository, deliverRequestManager) { + _customerItemAppService = customerItemAppService; + _deliverRequestManager = deliverRequestManager; _areaApp = areaApp; _customerApp = customerApp; _customerAddressApp = customerAddressApp; _itemBasicAppService = itemBasicAppService; + _customerItemAppService = customerItemAppService; + _salePriceSheetRepository = salePriceSheetRepository; } protected override async Task> ImportProcessingEntityAsync(Dictionary dictionary) @@ -76,8 +93,12 @@ IItemBasicAppService itemBasicAppService) { request.DeliverPlanNumber = request.Details.First().MesDeliveryPlan; } + + await CheckCustomerItem(request).ConfigureAwait(false); + foreach (var detail in request.Details) { + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); CheckItemBasic(itemBasicDto, detail.ItemCode); detail.ItemDesc1 = itemBasicDto.Desc1; @@ -90,6 +111,52 @@ IItemBasicAppService itemBasicAppService) return dictionary; } + private async Task CheckSalePrice(List requests) + { + List errors=new List(); + foreach (var request in requests) + { + foreach (var itm in request.Details) + { + var price = await _salePriceSheetRepository.FindAsync(p => p.ItemCode == itm.ItemCode && p.CustomerCode == request.CustomerCode).ConfigureAwait(false); + if (price == null) + { + errors.Add($"请求单号:{request.Number}零件编号:{itm.ItemCode}客户编号:{request.CustomerCode}"); + } + } + } + if (errors.Count > 0) + { + throw new UserFriendlyException($"{string.Format(",",errors.ToArray())+"销售价格单里不存在价格!"}"); + } + + + } + + private async Task CheckCustomerItem(DeliverRequest request) + { + List errors= new List(); + foreach (var detail in request.Details) + { + + var entity = await _customerItemAppService.GetByCustomerAndItemAsync(detail.ItemCode, request.CustomerCode).ConfigureAwait(false); + if (entity == null) + { + errors.Add($"零件编号:{detail.ItemCode}客户编号:{request.CustomerCode}|"); + } + } + + if (errors.Count > 0) + { + throw new UserFriendlyException(string.Format(",",errors.ToArray())+ "在客户零件关系表里不存在!"); + } + + + + } + + + protected override async Task SaveImportAsync(Dictionary dict) { var addList = dict.Where(p => p.Value == EntityState.Added).Select(p => p.Key).ToList(); @@ -182,6 +249,11 @@ IItemBasicAppService itemBasicAppService) entitys.ForEach(r => { r.MesTruckNumber = truckNumber; }); Check.NotNull(entitys, typeof(DeliverRequest).Name); + + + + await CheckSalePrice(entitys).ConfigureAwait(false); + var result = await _deliverRequestManager.HandleListAsync(entitys).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entitys); return dtos; @@ -209,6 +281,10 @@ IItemBasicAppService itemBasicAppService) { var entity = ObjectMapper.Map(input); await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); + + + await CheckCustomerItem(entity).ConfigureAwait(false); + await _deliverRequestManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); From d05b91726d2669cfca14dcac28d5cb3b2ee83e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 09:34:58 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeliverRequestAppService.cs | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs index c6afd39bd..781137787 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs @@ -111,10 +111,31 @@ public class DeliverRequestAppService : return dictionary; } - private async Task CheckSalePrice(List requests) + /// + /// 成品发运价格校验 + /// + /// + /// + /// + /// + [HttpPost("check-sale-price")] + public async Task> CheckSalePriceAsync(List ids, string truckNumber) { + if (string.IsNullOrEmpty(truckNumber)) + { + throw new UserFriendlyException($"车牌号不能为空"); + } + + var entitys = await _repository.GetListAsync(r => ids.Contains(r.Id), true).ConfigureAwait(false); + if (entitys.Select(r => r.CustomerCode).Distinct().Count() > 1) + { + throw new UserFriendlyException($"所选申请涉及多个客户不能创建为一个发货单,请重新选择!"); + } + //一车发运车牌号相同 + entitys.ForEach(r => { r.MesTruckNumber = truckNumber; }); + Check.NotNull(entitys, typeof(DeliverRequest).Name); List errors=new List(); - foreach (var request in requests) + foreach (var request in entitys) { foreach (var itm in request.Details) { @@ -125,12 +146,7 @@ public class DeliverRequestAppService : } } } - if (errors.Count > 0) - { - throw new UserFriendlyException($"{string.Format(",",errors.ToArray())+"销售价格单里不存在价格!"}"); - } - - + return errors; } private async Task CheckCustomerItem(DeliverRequest request) From b7322265b613f5a269a227e4dfbf6c509358a896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 09:35:48 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E6=97=B6=E6=A0=A1=E9=AA=8C=E4=BB=B7=E6=A0=BC=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Requests/DeliverRequests/DeliverRequestAppService.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs index 781137787..8120df6a9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs @@ -268,7 +268,6 @@ public class DeliverRequestAppService : - await CheckSalePrice(entitys).ConfigureAwait(false); var result = await _deliverRequestManager.HandleListAsync(entitys).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entitys); From 55c8f66d8f041c99c9296e9b5cec516299779c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 10:28:06 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E9=87=8D=E6=96=B0=E7=BC=96=E5=86=99?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=99=E5=BA=93=E4=BD=8D=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTOs/PostionLocationDTO.cs | 19 +++++++++++++++++++ .../PostionLocationAppService.cs | 19 +++++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs index 59a8cad02..8a9c91f01 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs @@ -27,3 +27,22 @@ public class PostionLocationDTO : SfsBaseDataDTOBase, IHasCode, IHasName [Required(ErrorMessage = "{0}是必填项")] public string LocationCode { get; set; } } +public class PostionLocationAgvDTO +{ + [Display(Name = "工作站编号")] + [Required(ErrorMessage = "{0}是必填项")] + public string Code { get; set; } + + /// + /// 名称 + /// + [Display(Name = "名称")] + public string Name { get; set; } + + /// + /// WMS库位 + /// + [Display(Name = "库位")] + [Required(ErrorMessage = "{0}是必填项")] + public string LocationCode { get; set; } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs index 83ca0dc0e..898432875 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs @@ -188,11 +188,22 @@ public class PostionLocationAppService } - [HttpGet("get-all-list")] - public async Task> GetAllListAsync() + [HttpPost("get-all-list")] + public async Task> GetAllListAsync() { - var result =await base.GetAllListByFilterAsync(new SfsBaseDataRequestInputBase() ).ConfigureAwait(false); - return result; + var result =await base.GetAllListByFilterAsync(new SfsBaseDataRequestInputBase()).ConfigureAwait(false); + List list = new List(); + foreach (var item in result) + { + PostionLocationAgvDTO dto = new PostionLocationAgvDTO(); + dto.LocationCode = item.LocationCode; + dto.Code= item.Code; + dto.Name = item.Name; + list.Add(dto); + } + + + return list; } From 885cd5af75deb6d6fc1822c5a911f297acec9b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 10:56:50 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9AGV=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PostionLocations/DTOs/PostionLocationDTO.cs | 7 +------ .../PostionLocations/PostionLocationAppService.cs | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs index 8a9c91f01..837c1f9e2 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PostionLocations/DTOs/PostionLocationDTO.cs @@ -33,12 +33,7 @@ public class PostionLocationAgvDTO [Required(ErrorMessage = "{0}是必填项")] public string Code { get; set; } - /// - /// 名称 - /// - [Display(Name = "名称")] - public string Name { get; set; } - + /// /// WMS库位 /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs index 898432875..e5595ba67 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs @@ -198,11 +198,8 @@ public class PostionLocationAppService PostionLocationAgvDTO dto = new PostionLocationAgvDTO(); dto.LocationCode = item.LocationCode; dto.Code= item.Code; - dto.Name = item.Name; list.Add(dto); } - - return list; } From 47e0141a635eee892221795db73550de2c505dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 14:25:57 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PostionLocationAppService.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs index e5595ba67..67aa5f73f 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs @@ -186,6 +186,25 @@ public class PostionLocationAppService return ObjectMapper.Map, List>(result); } + [HttpPost("get-loc-by-codes")] + public async Task> GetLocationByCodesAsync(List codes) + { + + var ls= await base.GetByCodesAsync(codes).ConfigureAwait(false); + List list = new List(); + foreach (var code in ls) + { + PostionLocationAgvDTO dto = new PostionLocationAgvDTO(); + dto.Code = code.Code; + dto.LocationCode = code.LocationCode; + list.Add(dto); + } + + + return list; + } + + [HttpPost("get-all-list")] From 6380edfaedc142f5ef0f90086ea00c4b784c37bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 31 Dec 2024 14:36:49 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PostionLocations/PostionLocationAppService.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs index 67aa5f73f..9d5dbe37a 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PostionLocations/PostionLocationAppService.cs @@ -187,10 +187,9 @@ public class PostionLocationAppService return ObjectMapper.Map, List>(result); } [HttpPost("get-loc-by-codes")] - public async Task> GetLocationByCodesAsync(List codes) + public async Task> GetLocationByCodesAsync(List codes) { - - var ls= await base.GetByCodesAsync(codes).ConfigureAwait(false); + var ls = await base.GetByCodesAsync(codes).ConfigureAwait(false); List list = new List(); foreach (var code in ls) { @@ -199,8 +198,6 @@ public class PostionLocationAppService dto.LocationCode = code.LocationCode; list.Add(dto); } - - return list; }