From f42ca2f5b5320c710ffbc9275d1bc070f99bd2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 10:55:01 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransferNotes/TransferNoteAppService.cs | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index fb6ee6529..b6be21a1f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -64,6 +64,8 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase private readonly IPostionLocationAppService _postionLocationAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly UnitOfWorkManager _unitOfWorkManager; @@ -84,6 +86,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase IPostionLocationAppService postionLocationAppService, IItemBasicAppService itemBasicAppService, UnitOfWorkManager unitOfWorkManager, + IProductionLineAppService _productionLineAppService, IExpectOutAppService expectOutAppService) : base(repository) { _unitOfWorkManager = unitOfWorkManager; @@ -718,27 +721,39 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase } LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); - if (tolocation == null) { errors.Add($"结束点{detail.EndPosition}库位没查到"); } - switch (tolocation.WarehouseCode) + var productionline=await _productionLineAppService.GetByCodeAsync(tolocation.Code).ConfigureAwait(false); + if (productionline == null) { - case "APA-KWZ":// 装配线边库位组 - transfer.Type = EnumTransSubType.Transfer_Assemble.ToString(); - break; - case "PPA-KWZ"://涂装线边库位组 - transfer.Type = EnumTransSubType.Transfer_Coating.ToString(); - break; - case "IPA-KWZ"://注塑线边库位组 - transfer.Type = EnumTransSubType.Transfer_Injection.ToString(); - break; - default: - throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!"); - + errors.Add($"结束点{detail.EndPosition}库位不在生产线中!"); } + + + transfer.Type = productionline.ProductionLineType.ToString(); + + + + + //switch (tolocation.WarehouseCode) + //{ + // case "APA-KWZ":// 装配线边库位组 + // transfer.Type = EnumTransSubType.Transfer_Assemble.ToString(); + // break; + // case "PPA-KWZ"://涂装线边库位组 + // transfer.Type = EnumTransSubType.Transfer_Coating.ToString(); + // break; + // case "IPA-KWZ"://注塑线边库位组 + // transfer.Type = EnumTransSubType.Transfer_Injection.ToString(); + // break; + // default: + // throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!"); + + //} + var item = await _itemBasicAppService.GetByCodeAsync(detail.MatCode).ConfigureAwait(false); if (item == null) { From 7e3464599ea237065c3c1becfea7c62eda31f115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 11:03:42 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Notes/TransferNotes/TransferNoteAppService.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index cbdb65603..a180ae29f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -58,8 +58,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase private readonly IPostionLocationAppService _postionLocationAppService; private readonly IProductionLineAppService _productionLineAppService; - private readonly IProductionLineAppService _productionLineAppService; - private readonly UnitOfWorkManager _unitOfWorkManager; From 40a36614b7b41b623fd1e26b3110818a5ef0b175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 13:30:58 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B7=9F=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerProductionReturnNoteAppService.cs | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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 71d460828..8480dd421 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 @@ -9,6 +9,7 @@ using Volo.Abp; using Volo.Abp.Application.Dtos; using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; @@ -32,7 +33,7 @@ public class CustomerProductionReturnNoteAppService : private readonly ICustomerItemAppService _customerItemAppService; private readonly ICustomerAppService _customerAppService; - + private readonly ICustomerItemRepository _customerItemRepository; private readonly ISalePriceSheetAppService _salePriceSheetAppService; public CustomerProductionReturnNoteAppService( @@ -40,10 +41,12 @@ public class CustomerProductionReturnNoteAppService : , ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager , ICustomerItemAppService customerItemAppService, ISalePriceSheetAppService salePriceSheetAppService, - ICustomerAppService customerAppService + ICustomerAppService customerAppService, + ICustomerItemRepository customerItemRepository ) : base(repository) { + _customerItemRepository = customerItemRepository; _customerItemAppService = customerItemAppService; @@ -89,6 +92,7 @@ public class CustomerProductionReturnNoteAppService : if (customerlist.Count > 0) { + entity.CustomerName = customerlist.FirstOrDefault().Name; } else @@ -114,7 +118,17 @@ public class CustomerProductionReturnNoteAppService : #endregion #region 20241230修改 - + foreach (var itm in input.Details) + { + var part= custitmDetail.FirstOrDefault(p => p.CustomerCode == entity.CustomerCode && p.ItemCode==itm.ItemCode); + if (part == null) + { + throw new UserFriendlyException($"零件编号{itm.ItemCode}客户编码{entity.CustomerCode}在零件关系表中不存在!"); + } + } + + + From 7964eb45bd5e0aadc44c95a604a6acf02e49be7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 14:03:35 +0800 Subject: [PATCH 4/5] =?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 --- .../Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs | 5 +++++ .../DeliverRequests/DeliverRequestAutoMapperProfile.cs | 1 + .../Requests/DeliverRequests/DeliverRequest.cs | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs index 1e8b57ba5..b2eef205b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs @@ -36,6 +36,11 @@ public class DeliverRequestDTO : SfsStoreRequestDTOBase /// Mes车牌号 /// public string MesTruckNumber { get; set; } + + [Display(Name = "Mes器具号")] + public string MesDeliveryContainer { get; set; } + + /// /// 发货类型 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs index 1fe9e1b56..62b11ea95 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs @@ -29,6 +29,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() + // .ForMember(x => x.DeliverRequestType, y => y.MapFrom(t => EnumDeliverRequestType.Normal)) .Ignore(x => x.CustomerAddressCode) .Ignore(x => x.DeliverPlanNumber) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs index e722611d3..ea9655cc1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs @@ -43,6 +43,12 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase public string MesTruckNumber { get; set; } + /// + /// 器具编号 + /// + public string MesDeliveryContainer { get; set; } + + /// /// 任务明细 /// From 53dba7197a1ac28ca9dfa9e938fd60dc53f1fc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Jan 2025 14:59:24 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=90=E5=93=81?= =?UTF-8?q?=E4=B8=BB=E8=A1=A8=E5=8F=91=E8=BF=90=E5=99=A8=E5=85=B7=E5=8F=B7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Requests/DeliverRequests/DeliverRequestAppService.cs | 3 +++ 1 file changed, 3 insertions(+) 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 8120df6a9..c2499ec2e 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 @@ -135,6 +135,9 @@ public class DeliverRequestAppService : entitys.ForEach(r => { r.MesTruckNumber = truckNumber; }); Check.NotNull(entitys, typeof(DeliverRequest).Name); List errors=new List(); + + + foreach (var request in entitys) { foreach (var itm in request.Details)