From 0c2c95c670373e1370e06d2b2096fe837a7b5930 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Mon, 17 Jun 2024 09:45:18 +0800 Subject: [PATCH 01/24] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=8C=89=E7=B1=BB=E5=88=AB=E5=90=8D=E7=A7=B0=E6=9F=A5=E6=89=BE?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Stores/InjectionPlanRequestController.cs | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs index 904a3f8ed..19010f161 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; @@ -52,16 +53,29 @@ public class InjectionPlanRequestController : AbpController } /// - /// 获取物品类别列表 + /// 获取物品类别名称 + /// + /// + [HttpGet("item-category-name")] + public virtual async Task> GetItemCategoryNameAsync() + { + var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); + var categoryNames = entities.Select(p => p.Category).Distinct().ToList(); + + return categoryNames; + } + + /// + /// 根据类别名称获取物品类别列表 /// - /// + /// /// [HttpGet("list/item-category")] - public virtual async Task> GetItemCategoryListAsync() + public virtual async Task> GetItemCategoryListAsync(string categoryName) { - var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); + var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); - return entities; + return entities.Where(p=>p.Category== categoryName).ToList(); } } From 7add3765ec760c87bee25574aab73951c1025c10 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Mon, 17 Jun 2024 11:53:11 +0800 Subject: [PATCH 02/24] =?UTF-8?q?=E6=98=A0=E5=B0=84=E5=BF=BD=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Jobs/ThirdLocationJobAutoMapperProfile.cs | 18 +++++++++++++++++- .../ThirdLocationNoteAutoMapperProfile.cs | 4 ++++ .../ThirdLocationRequestAutoMapperProfile.cs | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs index c2b532e1f..1416fa618 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs @@ -17,7 +17,12 @@ public partial class StoreEventAutoMapperProfile : Profile .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) - .Ignore(x => x.Number); + .Ignore(x => x.Number) + + + .Ignore(x => x.IssueTime) + .Ignore(x => x.ReceiptTime) + ; CreateMap() .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) @@ -43,6 +48,8 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationGroup) .Ignore(x => x.ToLocationErpCode) + + ; CreateMap() @@ -63,6 +70,11 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.Confirmed) .Ignore(x => x.JobNumber) .Ignore(x => x.ActiveDate) + + .Ignore(x => x.Workshop) + .Ignore(x => x.RequestType) + .Ignore(x => x.UseOnTheWayLocation) + ; CreateMap() .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) @@ -85,6 +97,10 @@ public partial class StoreEventAutoMapperProfile : Profile .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest)) + + .Ignore(x => x.SingleCodeJob) + .Ignore(x => x.PositionCode) + .Ignore(x => x.RecommendType) ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs index 2196ffd10..7a5ab62ff 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs @@ -25,6 +25,10 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.CallBusinessType) .Ignore(x => x.CallRequestNumber) .Ignore(x => x.CallJobNumber) + + .Ignore(x => x.UseOnTheWayLocation) + .Ignore(x => x.Confirmed) + .Ignore(x => x.ConfirmTime) ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs index 1ed9f4fe5..3a1e0e3b8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs @@ -57,6 +57,8 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.CompleteUserName) .Ignore(x => x.CompleteTime) .Ignore(x => x.Details) + + .Ignore(x => x.UseOnTheWayLocation) ; CreateMap() @@ -101,6 +103,9 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.HandledSupplierBatch) .Ignore(x => x.RecommendFromLocationCode) .Ignore(x => x.RecommendLot) + + .Ignore(x => x.PositionCode) + .Ignore(x => x.RecommendType) .IgnoreIHasRecommendAndHandledFrom(); CreateMap() From 47d9392ffdb53b6169ab413ded619a7ec1987b2a Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Mon, 17 Jun 2024 15:24:07 +0800 Subject: [PATCH 03/24] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/PublishProfiles/FolderProfile.pubxml | 6 +++--- .../DataExchanges/Issue/AssembleIssueNoteEventHandler.cs | 8 ++++---- .../DataExchanges/Issue/CoatingIssueNoteEventHandler.cs | 8 ++++---- .../DataExchanges/Issue/InjectionIssueNoteEventHandler.cs | 8 ++++---- .../DataExchanges/Issue/KittingIssueNoteEventHandler.cs | 8 ++++---- .../DataExchanges/Issue/SparePartIssueNoteEventHandler.cs | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml b/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml index 5eeeba510..df0967a6b 100644 --- a/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml +++ b/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml @@ -4,17 +4,17 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - true + false false true Release Any CPU FileSystem - .\..\..\..\OutPut\Core\ + D:\发布\WMS\core FileSystem net6.0 230d2ddc-4797-4c9b-a84c-9eb57aa16297 false - + \ No newline at end of file diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs index 841238749..bfe440962 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class AssembleIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - var entity = eventData.Entity; - await AddExchangeDataAsync(entity).ConfigureAwait(false); + //var entity = eventData.Entity; + //await AddExchangeDataAsync(entity).ConfigureAwait(false); } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; - await AddExchangeDataAsync(entities).ConfigureAwait(false); + //var entities = eventData.Entity; + //await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs index 698184507..498316eb2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class CoatingIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - var entity = eventData.Entity; - await AddExchangeDataAsync(entity).ConfigureAwait(false); + //var entity = eventData.Entity; + //await AddExchangeDataAsync(entity).ConfigureAwait(false); } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; - await AddExchangeDataAsync(entities).ConfigureAwait(false); + //var entities = eventData.Entity; + //await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs index 022d1d360..ca8cbca9d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class InjectionIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - var entity = eventData.Entity; - await AddExchangeDataAsync(entity).ConfigureAwait(false); + //var entity = eventData.Entity; + //await AddExchangeDataAsync(entity).ConfigureAwait(false); } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; - await AddExchangeDataAsync(entities).ConfigureAwait(false); + //var entities = eventData.Entity; + //await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs index 18b26002d..8e5555472 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class KittingIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - var entity = eventData.Entity; - await AddExchangeDataAsync(entity).ConfigureAwait(false); + //var entity = eventData.Entity; + //await AddExchangeDataAsync(entity).ConfigureAwait(false); } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; - await AddExchangeDataAsync(entities).ConfigureAwait(false); + //var entities = eventData.Entity; + //await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs index bc03a1ed9..ffdbd21dc 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class SparePartIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - var entity = eventData.Entity; - await AddExchangeDataAsync(entity).ConfigureAwait(false); + //var entity = eventData.Entity; + //await AddExchangeDataAsync(entity).ConfigureAwait(false); } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; - await AddExchangeDataAsync(entities).ConfigureAwait(false); + //var entities = eventData.Entity; + //await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) From 32a044f352c2ba8855a486184b2226266055689c Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Mon, 17 Jun 2024 15:49:35 +0800 Subject: [PATCH 04/24] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=AF=BC=E5=85=A5=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD=E9=94=99=E8=AF=AF=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExportAndImport/ClosedXmlExportImportService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs index 316297788..9e043395e 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs @@ -333,7 +333,7 @@ public class ClosedXmlExportImportService : IExportImportService else { SetCellStyle(row.Cell(1).SetValue("失败"), rowIndex, 1, fontColor: XLColor.Red); - var desc = string.Join("\n", errors.Select(o => $"{o.MemberNames?.First()} {o.ErrorMessage}")); + string desc = string.Join("\n", errors.Select(o => $"{(o.MemberNames.Any() ? o.MemberNames.First() : String.Empty)} {o.ErrorMessage}")); SetCellStyle(row.Cell(2).SetValue(desc), rowIndex, 2, fontColor: XLColor.Red); } } From 79fd22f6d3b2b5b106e0d6def9a3c49a584de4f8 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 18 Jun 2024 11:09:01 +0800 Subject: [PATCH 05/24] =?UTF-8?q?PDA=E4=B8=8A=E6=9E=B6=E5=89=8D=E9=80=80?= =?UTF-8?q?=E8=B4=A7=E8=AE=A2=E5=8D=95=E5=8F=B7=E5=8F=96=E5=80=BC=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Stores/PurchaseReturnNoteController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs index 1b5403630..988c531e5 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs @@ -148,7 +148,7 @@ public class PurchaseReturnNoteController : AbpController { var po = await _purchaseOrderAppService.GetListByNumberAndItemCodeAsync(poNumber, createInputDetail.ItemCode).ConfigureAwait(false); Check.NotNull(po, nameof(PurchaseOrderDTO)); - var detail = po.Details.FirstOrDefault(r => r.ItemCode == createInputDetail.ItemCode); + var detail = po.Details.FirstOrDefault(r => r.ItemCode == createInputDetail.ItemCode && r.Lot== createInputDetail.Lot); Check.NotNull(detail, nameof(PurchaseOrderDetailDTO)); createInputDetail.PoLine = detail.PoLine; } From 13f076fe34987878ae7f5ddca989cddd5933b524 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Tue, 18 Jun 2024 11:58:44 +0800 Subject: [PATCH 06/24] =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE=E6=8A=A5?= =?UTF-8?q?=E9=94=99bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseReceiptRequestController.cs | 15 +++++++ .../IPurchaseReceiptRequestAppService.cs | 17 ++++++-- .../PurchaseReceiptRequestAppService.cs | 42 ++++++++++++++++++- 3 files changed, 68 insertions(+), 6 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs index b7cdd062a..4de253506 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs @@ -48,4 +48,19 @@ public class PurchaseReceiptRequestController : AbpController { return await _purchaseReceiptRequestAppService.GetDetailByItemAndPackingAsync(itemCode, packingCode).ConfigureAwait(false); } + + /// + /// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码 + /// + /// + /// + /// + [HttpGet("detail-by-item-and-rootpacking")] + public virtual async Task GetDetailByItemAndRootPackingAsync(string itemCode, + string packingCode) + { + return await _purchaseReceiptRequestAppService.GetDetailByItemAndRootPackingAsync(itemCode, packingCode).ConfigureAwait(false); + } + + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs index 9bb0ff309..060ae62d9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs @@ -32,12 +32,21 @@ public interface IPurchaseReceiptRequestAppService string packingCode); /// - /// 修改请求状态 + /// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码 /// - /// - /// + /// + /// /// - Task UpdatePurchaseReceiptRequestAsync(string number, + Task GetDetailByItemAndRootPackingAsync(string itemCode, + string packingCode); + + /// + /// 修改请求状态 + /// + /// + /// + /// + Task UpdatePurchaseReceiptRequestAsync(string number, EnumRequestStatus enumRequestStatus); /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs index 9a9df2444..37b2887a8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs @@ -9,6 +9,7 @@ using Volo.Abp.Domain.Entities; using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; @@ -30,16 +31,20 @@ public class PurchaseReceiptRequestAppService : { private readonly IPurchaseReceiptRequestManager _purchaseReceiptRequestManager; + private readonly ISplitPackingRecManager _splitPackingRecManager; + + public PurchaseReceiptRequestAppService( IPurchaseReceiptRequestRepository repository, - IPurchaseReceiptRequestManager purchaseReceiptRequestManager - ) : base(repository, purchaseReceiptRequestManager) + IPurchaseReceiptRequestManager purchaseReceiptRequestManager, + ISplitPackingRecManager splitPackingRecManager) : base(repository, purchaseReceiptRequestManager) { _purchaseReceiptRequestManager = purchaseReceiptRequestManager; base.CreatePolicyName = PurchaseReceiptRequestPermissions.Create; base.UpdatePolicyName = PurchaseReceiptRequestPermissions.Update; base.DeletePolicyName = PurchaseReceiptRequestPermissions.Delete; + _splitPackingRecManager = splitPackingRecManager; } #region 东阳使用 @@ -88,6 +93,39 @@ public class PurchaseReceiptRequestAppService : } } + /// + /// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码 + /// + /// + /// + /// + [HttpGet("detail-by-item-and-rootpacking")] + public virtual async Task GetDetailByItemAndRootPackingAsync(string itemCode, + string packingCode) + { + var topObj = await _splitPackingRecManager.GetTopPackingCode(packingCode).ConfigureAwait(false); + if (topObj == null || string.IsNullOrEmpty(topObj.ToTopPackingCode)) + { + throw new UserFriendlyException($"根据箱码{packingCode}到拆箱记录表中没有取到顶级箱码!"); + } + + var entitysList = (await _repository.GetListAsync(p => p.Details.Any(y => y.ItemCode == itemCode && y.PackingCode == topObj.ToTopPackingCode), true).ConfigureAwait(false)); + + if (entitysList != null && entitysList.Any()) + { + var entity = entitysList.FirstOrDefault(); + + var detail = entity.Details.FirstOrDefault(y => y.ItemCode == itemCode && y.PackingCode == topObj.ToTopPackingCode); + + var dto = ObjectMapper.Map(detail); + + return dto; + } + else + { + throw new UserFriendlyException("未在到货通知中找到该箱码信息"); + } + } #endregion From d34ae609b35c05d0132113c1ce19791f35c97cf5 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 18 Jun 2024 13:45:19 +0800 Subject: [PATCH 07/24] =?UTF-8?q?=E5=8F=AB=E6=96=99=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssembleIssueRequests/AssembleIssueRequestAppService.cs | 2 +- .../CoatingIssueRequests/CoatingIssueRequestAppService.cs | 2 +- .../InjectionIssueRequests/InjectionIssueRequestAppService.cs | 2 +- .../KittingIssueRequests/KittingIssueRequestAppService.cs | 2 +- .../SparePartIssueRequests/SparePartIssueRequestAppService.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs index 971031b3b..ed7876029 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs @@ -188,7 +188,7 @@ public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || - p.JobStatus == EnumJobStatus.Partial)) + p.JobStatus == EnumJobStatus.Partial||p.JobStatus== EnumJobStatus.Wait)) { return; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs index 714651fd8..2bfd6d037 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs @@ -188,7 +188,7 @@ public class CoatingIssueRequestAppService : SfsStoreRequestAppServiceBase p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || - p.JobStatus == EnumJobStatus.Partial)) + p.JobStatus == EnumJobStatus.Partial|| p.JobStatus== EnumJobStatus.Wait)) { return; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs index d5736b7ba..51efdbeae 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs @@ -188,7 +188,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || - p.JobStatus == EnumJobStatus.Partial)) + p.JobStatus == EnumJobStatus.Partial|| p.JobStatus== EnumJobStatus.Wait)) { return; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs index 9b062b596..7f4b06bed 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs @@ -191,7 +191,7 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || - p.JobStatus == EnumJobStatus.Partial)) + p.JobStatus == EnumJobStatus.Partial||p.JobStatus== EnumJobStatus.Wait)) { return; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/SparePartIssueRequests/SparePartIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/SparePartIssueRequests/SparePartIssueRequestAppService.cs index ca0de939e..ba15d644e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/SparePartIssueRequests/SparePartIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/SparePartIssueRequests/SparePartIssueRequestAppService.cs @@ -184,7 +184,7 @@ public class SparePartIssueRequestAppService : SfsStoreRequestAppServiceBase p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || - p.JobStatus == EnumJobStatus.Partial)) + p.JobStatus == EnumJobStatus.Partial|| p.JobStatus== EnumJobStatus.Wait)) { return; } From 06f558c4788fed85860a3f94e77dce6a43060f18 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Tue, 18 Jun 2024 14:29:55 +0800 Subject: [PATCH 08/24] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A1=8C=E5=8F=B7?= =?UTF-8?q?=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Jobs/InspectJobs/InspectJobAppService.cs | 3 ++- .../Jobs/IssueJobs/IssueJobAppService.cs | 2 ++ .../Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs | 2 ++ .../PurchaseReceiptRequestAppService.cs | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs index 7d8fc7e2d..37bd73e5b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs @@ -217,7 +217,6 @@ public class InspectJobAppService { throw new UserFriendlyException($"根据PackingCode={input.FromPackingCode}取InspectDetail表为空!"); } - //插入目标箱 var newDetail = CommonHelper.CloneObj(detail); newDetail.SetId(GuidGenerator.Create()); @@ -226,6 +225,8 @@ public class InspectJobAppService newDetail.InspectQty = input.ToQty; newDetail.GoodQty = input.ToQty; //newDetail.CreationTime = CommonHelper.CurTime; + decimal maxPoLine = job.Details.Max(itm => itm.PoLine.TryToDecimalZero()); + newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增 job.Details.Add(newDetail); //修改源箱 detail.ReceiveQty = input.FromQty - input.ToQty; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs index d3ee9c10d..21627669b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs @@ -182,6 +182,8 @@ public class IssueJobAppService newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值 newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; //newDetail.CreationTime = CommonHelper.CurTime; + //decimal maxPoLine = job.Details.Max(itm => itm.PoLine.TryToDecimalZero()); + //newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增 job.Details.Add(newDetail); //修改源箱 detail.RecommendQty = input.FromQty - input.ToQty; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs index e63bb5d0e..2cab78db8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs @@ -253,6 +253,8 @@ public class PurchaseReceiptJobAppService : newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; //newDetail.CreationTime = CommonHelper.CurTime; newDetail.PurchaseReceiptInspectStatus = EnumPurchaseReceiptInspect.INSP; //俊城沟通,改成 未扫描 + decimal maxPoLine = job.Details.Max(itm => itm.PoLine.TryToDecimalZero()); + newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增 job.Details.Add(newDetail); //修改源箱 detail.RecommendQty = input.FromQty - input.ToQty; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs index 37b2887a8..1bfe1c39d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs @@ -228,6 +228,8 @@ public class PurchaseReceiptRequestAppService : newDetail.PackingCode = input.ToPackingCode; newDetail.Qty = input.ToQty; //newDetail.CreationTime = CommonHelper.CurTime; + decimal maxPoLine = request.Details.Max(itm => itm.PoLine.TryToDecimalZero()); + newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增 request.Details.Add(newDetail); //修改源箱 detail.Qty = input.FromQty - input.ToQty; From c88c78b5562c7668c4cd7c734e25a076749e6d40 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 18 Jun 2024 15:19:43 +0800 Subject: [PATCH 09/24] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PositionCodes/PositionCodeAppService.cs | 12 ++++++------ .../Enums/Inventory/EnumTransType.cs | 4 ---- .../Inputs/InventoryInitialNoteImportInput.cs | 8 ++++++++ .../Inputs/SparePartIssueRequestImportInput.cs | 3 +++ .../AssembleIssueJobs/AssembleIssueJobAppService.cs | 4 +++- .../CoatingIssueJobs/CoatingIssueJobAppService.cs | 4 +++- .../InjectionIssueJobAppService.cs | 4 +++- .../KittingIssueJobs/KittingIssueJobAppService.cs | 4 +++- .../SparePartIssueJobAppService.cs | 4 +++- .../InventoryInitialNoteAppService.cs | 4 ++++ 10 files changed, 36 insertions(+), 15 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs index d4390441c..0990cef3b 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs @@ -56,14 +56,14 @@ public class PositionCodeAppService var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false); if (existEntity != null) { - throw new UserFriendlyException($"{input.Code} 已存在"); + throw new UserFriendlyException($"位置码{input.Code} 已存在!"); } - var itemEntity = await _repository.FirstOrDefaultAsync(p => p.PartCode == input.PartCode).ConfigureAwait(false); - if(itemEntity != null) - { - throw new UserFriendlyException($"{input.PartCode} 物品已存在"); - } + //var itemEntity = await _repository.FirstOrDefaultAsync(p =>p.LocationCode==input.LocationCode && p.PartCode == input.PartCode&&p.Type==input.Type).ConfigureAwait(false); + //if(itemEntity != null) + //{ + // throw new UserFriendlyException($"类型{input.Type.ToString()}物品{input.PartCode}目标库位{input.LocationCode}已存在!"); + //} var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); Check.NotNull(itemBasic, "ERP料号", $"物品 {input.PartCode} 不存在"); diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs index f1faf5320..e01e910a5 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs @@ -174,8 +174,4 @@ public enum EnumTransType MesUnFreezed = 41, - - - - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/InventoryInitialNotes/Inputs/InventoryInitialNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/InventoryInitialNotes/Inputs/InventoryInitialNoteImportInput.cs index 96f27424d..25d037679 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/InventoryInitialNotes/Inputs/InventoryInitialNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/InventoryInitialNotes/Inputs/InventoryInitialNoteImportInput.cs @@ -10,6 +10,7 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty, /// 仓库代码 /// [Display(Name = "仓库代码")] + [Required(ErrorMessage = "{0}是必填项")] public string WarehouseCode { get; set; } /// @@ -22,6 +23,7 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty, /// ERP料号 /// [Display(Name = "ERP料号")] + [Required(ErrorMessage = "{0}是必填项")] public string ItemCode { get; set; } /// @@ -35,24 +37,28 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty, /// 单位 /// [Display(Name = "单位")] + [Required(ErrorMessage = "{0}是必填项")] public string Uom { get; set; } /// /// 批次 /// [Display(Name = "批次")] + [Required(ErrorMessage = "{0}是必填项")] public string Lot { get; set; } /// /// 库位代码 /// [Display(Name = "库位代码")] + [Required(ErrorMessage = "{0}是必填项")] public string LocationCode { get; set; } /// /// ERP库位 /// [Display(Name = "ERP库位")] + [Required(ErrorMessage = "{0}是必填项")] public string LocationErpCode { get; set; } /// @@ -72,11 +78,13 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty, /// 库区 /// [Display(Name = "库区")] + [Required(ErrorMessage = "{0}是必填项")] public string LocationArea { get; set; } /// /// 库位组 /// [Display(Name = "库位组")] + [Required(ErrorMessage = "{0}是必填项")] public string LocationGroup { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/SparePartIssueRequests/Inputs/SparePartIssueRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/SparePartIssueRequests/Inputs/SparePartIssueRequestImportInput.cs index 6c362dae4..ac1f6ee0e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/SparePartIssueRequests/Inputs/SparePartIssueRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/SparePartIssueRequests/Inputs/SparePartIssueRequestImportInput.cs @@ -13,18 +13,21 @@ public class SparePartIssueRequestImportInput : SfsStoreImportInputBase /// ERP料号 /// [Display(Name = "ERP料号")] + [Required(ErrorMessage = "{0}是必填项")] public string ItemCode { get; set; } /// /// 需求数量 /// [Display(Name = "需求数量")] + [Required(ErrorMessage = "{0}是必填项")] public decimal Qty { get; set; } /// /// 目标库位 /// [Display(Name = "目标库位")] + [Required(ErrorMessage = "{0}是必填项")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string ToLocationCode { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index e9e264da5..d45755a79 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -235,7 +235,9 @@ public class AssembleIssueJobAppService issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; assembleIssueJob.Details = new EditableList { issueJobDetail }; - + assembleIssueJob.CompleteUserId = _currentUser.Id; + assembleIssueJob.CompleteUserName = _currentUser.Name; + assembleIssueJob.CompleteTime = DateTime.Now; if (assembleIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 { if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index 0f796ca16..373273410 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -249,7 +249,9 @@ public class CoatingIssueJobAppService issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; coatingIssueJob.Details = new EditableList { issueJobDetail }; - + coatingIssueJob.CompleteUserId = _currentUser.Id; + coatingIssueJob.CompleteUserName = _currentUser.Name; + coatingIssueJob.CompleteTime = DateTime.Now; if (coatingIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 { if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs index 7edfa7635..b45b43e2a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs @@ -227,7 +227,9 @@ public class InjectionIssueJobAppService issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; injectionIssueJob.Details = new EditableList { issueJobDetail }; - + injectionIssueJob.CompleteUserId = _currentUser.Id; + injectionIssueJob.CompleteUserName = _currentUser.Name; + injectionIssueJob.CompleteTime = DateTime.Now; if (injectionIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 { if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index 1dcea8e63..dda5f1ffa 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -226,7 +226,9 @@ public class KittingIssueJobAppService issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; kittingIssueJob.Details = new EditableList { issueJobDetail }; - + kittingIssueJob.CompleteUserId = _currentUser.Id; + kittingIssueJob.CompleteUserName = _currentUser.Name; + kittingIssueJob.CompleteTime = DateTime.Now; if (kittingIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 { if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs index 140635d3e..5e9f7674d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs @@ -219,7 +219,9 @@ public class SparePartIssueJobAppService issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; sparePartIssueJob.Details = new EditableList { issueJobDetail }; - + sparePartIssueJob.CompleteUserId = _currentUser.Id; + sparePartIssueJob.CompleteUserName = _currentUser.Name; + sparePartIssueJob.CompleteTime = DateTime.Now; if (sparePartIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 { if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs index bbcb5d6be..fe2416939 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs @@ -61,6 +61,10 @@ public class InventoryInitialNoteAppService : request.ActiveDate = DateTime.Now; foreach (var detail in request.Details) { + if (string.IsNullOrEmpty(detail.PackingCode)) + { + detail.PackingCode = ""; + } var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); CheckItemBasic(itemBasicDto, detail.ItemCode); detail.ItemDesc1 = itemBasicDto.Desc1; From a39ad832f65f956230b208537b89443c188efad5 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 18 Jun 2024 16:43:03 +0800 Subject: [PATCH 10/24] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=94=B3=E8=AF=B7=E5=88=B0=E5=96=B7=E6=B6=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Stores/InjectionPlanRequestController.cs | 2 +- .../InjectionRequestController.cs | 2 +- .../IInjectionPlanRequestAppService.cs | 1 + .../InjectionPlanRequestAppService.cs | 77 ++++++++++--------- .../InjectionPlanRequestAutoMapperProfile.cs | 6 ++ 5 files changed, 51 insertions(+), 37 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs index 19010f161..ea9d93094 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs @@ -35,7 +35,7 @@ public class InjectionPlanRequestController : AbpController [HttpPost("")] public virtual async Task> CreateAsync(InjectionPlanRequestEditInput input) { - var result = await _injectionRequestAppService.CreateAsync(input).ConfigureAwait(false); + var result = await _injectionRequestAppService.CreateAndHandleAsync(input).ConfigureAwait(false); return Ok(result); } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs index d04c8024e..ae2a27efc 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs @@ -35,7 +35,7 @@ public class InjectionRequestController : AbpController } /// - /// Kitting叫料申请 + /// 注塑叫料申请 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/InjectionPlanRequests/IInjectionPlanRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/InjectionPlanRequests/IInjectionPlanRequestAppService.cs index 601af38d5..dfb3a139d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/InjectionPlanRequests/IInjectionPlanRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/InjectionPlanRequests/IInjectionPlanRequestAppService.cs @@ -16,6 +16,7 @@ public interface IInjectionPlanRequestAppService /// Task> GetItemCategoryListAsync(); + Task CreateAndHandleAsync(InjectionPlanRequestEditInput input); Task> GetUnCompletedRequestAsync(List p_list); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs index 876d6017b..371b5240d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs @@ -5,7 +5,10 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp; +using Volo.Abp.Domain.Repositories; +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.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -30,7 +33,8 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase CreateAsync(InjectionPlanRequestEditInput input) + [HttpPost("create-and-handle")] + public async Task CreateAndHandleAsync(InjectionPlanRequestEditInput input) { foreach (var item in input.Details) { @@ -67,53 +75,54 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase p.PartCode == detailInput.ItemCode && p.LocationCode == detailInput.ToLocationCode).ConfigureAwait(false); + + detailInput.ProdLine = productionLineDto.Code; detailInput.ToLocationArea = toLocationDto.AreaCode; detailInput.ToLocationGroup = toLocationDto.LocationGroupCode; detailInput.ToWarehouseCode = toLocationDto.WarehouseCode; - detailInput.ProdLine = detailInput.ToLocationCode; - detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; + detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; detailInput.ItemDesc1 = itemBasicDto.Desc1; detailInput.ItemDesc2 = itemBasicDto.Desc2; detailInput.ItemName = itemBasicDto.Name; - var itemContainerDto = await _itemContainerAppService.GetListByItemCodeAsync(detailInput.ItemCode) - .ConfigureAwait(false); - if (itemContainerDto.Count > 0) + var itemContainerDto = await _itemContainerAppService.GetByItemCodeAsync(detailInput.ItemCode).ConfigureAwait(false); + + if (itemContainerDto != null) { - detailInput.Uom = itemContainerDto[0].BasicUom; - detailInput.Qty = itemContainerDto[0].Qty; + detailInput.Uom = itemContainerDto.BasicUom; + detailInput.Qty = itemContainerDto.Qty; + detailInput.BoxQty = itemContainerDto.Qty; detailInput.StdPackQty = itemBasicDto.StdPackQty; } else { - detailInput.Uom = itemBasicDto.BasicUom; - detailInput.StdPackQty = itemBasicDto.StdPackQty; - detailInput.Qty = itemBasicDto.StdPackQty; + throw new UserFriendlyException($"ERP料号【{detailInput.ItemCode}】未配置收容数"); } - - detailInput.Status = EnumStatus.Open; - - //因为是刚创建的 所以发料数一定是0 + detailInput.Status = EnumStatus.Open; detailInput.IssuedQty = 0; + detailInput.RecommendType = EnumRecommendType.None; } await SetRequestAutoPropertiesAsync(input).ConfigureAwait(false); - var entity = ObjectMapper.Map(input); - - var result = await _injectionRequestManager.CreateByNumberAsync(entity).ConfigureAwait(false); - - var dto = ObjectMapper.Map(result); + var entity = ObjectMapper.Map(input); + var coatingIssueRequestDto = await _coatingIssueRequestAppService.CreateAndHandleAsync(entity).ConfigureAwait(false); - return dto; + return coatingIssueRequestDto; } /// @@ -131,17 +140,7 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase CreateAndHandleAsync(InjectionPlanRequestEditInput input) - { - var injectionRequestDto = await CreateAsync(input).ConfigureAwait(false); - - await HandleAsync(injectionRequestDto.Id).ConfigureAwait(false); - - return injectionRequestDto; - } + } /// /// 获取物品类别列表 @@ -210,5 +209,13 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase() + ; + + CreateMap() + ; + CreateMap() .ReverseMap(); From d4425f6965a1c752b842167dc108d6a427727e1c Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Tue, 18 Jun 2024 16:57:22 +0800 Subject: [PATCH 11/24] bug --- .../SplitPackings/SplitPackingRecManager.cs | 56 ++++++++++++------- .../PurchaseReceiptRequestAppService.cs | 9 ++- 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs index 04916ad6d..994c5308e 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs @@ -42,14 +42,6 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager { throw new UserFriendlyException("操作类型不是拆箱或合箱状态,源箱码和目标箱码必须相同!"); } - if (item.FromTopPackingCode.IsNullOrEmpty()) - { - item.FromTopPackingCode = item.FromPackingCode; - } - if (item.ToTopPackingCode.IsNullOrEmpty()) - { - item.ToTopPackingCode = item.FromPackingCode;// ToPackingCode; - } } #endregion @@ -91,6 +83,14 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager } else { + if (item.FromTopPackingCode.IsNullOrEmpty()) + { + item.FromTopPackingCode = item.FromPackingCode; + } + if (item.ToTopPackingCode.IsNullOrEmpty()) + { + item.ToTopPackingCode = item.FromPackingCode;// ToPackingCode; + } SplitPackingRec newEntity = CommonHelper.CloneObj(item); newEntity.SetId(GuidGenerator.Create()); var ret = await _repository.InsertAsync(newEntity, true).ConfigureAwait(false); @@ -202,24 +202,42 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager /// 取顶级箱码 /// /// 箱码历史 - /// 当前箱码 + /// 箱码,from to时都传入from /// private static string GetTopPackingCode(IQueryable historyQuery, string packingCode) { - var historyRec = historyQuery.Where(itm => itm.FromPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault(); - if (historyRec != null) - { - return historyRec.FromTopPackingCode; - } - else + var qry = historyQuery.Where(itm => itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox); + string ret = null; + SplitPackingRec? firstObj = null; + string toCode = packingCode; + while (1 == 1) { - historyRec = historyQuery.Where(itm => itm.ToPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault(); - if (historyRec != null) + firstObj = qry.FirstOrDefault(itm => itm.ToPackingCode == toCode); + if (firstObj == null) + { + ret = toCode; + break; + } + else { - return historyRec.ToTopPackingCode; + toCode = firstObj.FromPackingCode; } } - return null; + return ret; + //var historyRec = historyQuery.Where(itm => itm.FromPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault(); + //if (historyRec != null) + //{ + // return historyRec.FromTopPackingCode; + //} + //else + //{ + // historyRec = historyQuery.Where(itm => itm.ToPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault(); + // if (historyRec != null) + // { + // return historyRec.ToTopPackingCode; + // } + //} + //return null; } private static void SetBillNumber(IQueryable historyQuery, SplitPackingRec obj) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs index 1bfe1c39d..37ac275c1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs @@ -9,7 +9,6 @@ using Volo.Abp.Domain.Entities; using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; @@ -31,20 +30,20 @@ public class PurchaseReceiptRequestAppService : { private readonly IPurchaseReceiptRequestManager _purchaseReceiptRequestManager; - private readonly ISplitPackingRecManager _splitPackingRecManager; + private readonly ISplitPackingRecAppService _splitPackingRecAppService; public PurchaseReceiptRequestAppService( IPurchaseReceiptRequestRepository repository, IPurchaseReceiptRequestManager purchaseReceiptRequestManager, - ISplitPackingRecManager splitPackingRecManager) : base(repository, purchaseReceiptRequestManager) + ISplitPackingRecAppService splitPackingRecAppService) : base(repository, purchaseReceiptRequestManager) { _purchaseReceiptRequestManager = purchaseReceiptRequestManager; base.CreatePolicyName = PurchaseReceiptRequestPermissions.Create; base.UpdatePolicyName = PurchaseReceiptRequestPermissions.Update; base.DeletePolicyName = PurchaseReceiptRequestPermissions.Delete; - _splitPackingRecManager = splitPackingRecManager; + _splitPackingRecAppService = splitPackingRecAppService; } #region 东阳使用 @@ -103,7 +102,7 @@ public class PurchaseReceiptRequestAppService : public virtual async Task GetDetailByItemAndRootPackingAsync(string itemCode, string packingCode) { - var topObj = await _splitPackingRecManager.GetTopPackingCode(packingCode).ConfigureAwait(false); + var topObj = await _splitPackingRecAppService.GetTopPackingCode(packingCode).ConfigureAwait(false); if (topObj == null || string.IsNullOrEmpty(topObj.ToTopPackingCode)) { throw new UserFriendlyException($"根据箱码{packingCode}到拆箱记录表中没有取到顶级箱码!"); From 0438ec323074ca206c55a2c9ac1379152c7d4806 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Wed, 19 Jun 2024 09:30:06 +0800 Subject: [PATCH 12/24] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=BB=99PDA=E5=B8=A6=E5=87=BA=E6=94=B6?= =?UTF-8?q?=E5=AE=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Stores/InjectionPlanRequestController.cs | 25 +++++++++++++++-- .../Enums/Store/EnumIssueRequestType.cs | 6 ++++ .../InjectionPlanRequestAppService.cs | 28 ++++++++++--------- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs index ea9d93094..f37f32737 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs @@ -17,14 +17,16 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; public class InjectionPlanRequestController : AbpController { private readonly IInjectionPlanRequestAppService _injectionRequestAppService; + private readonly IItemContainerAppService _itemContainerAppService; /// /// /// /// - public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService) + public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService, IItemContainerAppService itemContainerAppService) { _injectionRequestAppService = InjectionPlanRequestAppService; + _itemContainerAppService = itemContainerAppService; } /// @@ -73,9 +75,26 @@ public class InjectionPlanRequestController : AbpController [HttpGet("list/item-category")] public virtual async Task> GetItemCategoryListAsync(string categoryName) { - var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); + var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); + + var itemEntities = entities.Where(p => p.Category == categoryName).ToList(); + foreach (var item in itemEntities) + { + var itemContainerDto = await _itemContainerAppService.GetByItemCodeAsync(item.Code).ConfigureAwait(false); + + if(itemContainerDto != null) + { + item.StdPackQty = itemContainerDto.Qty; + item.BasicUom = itemContainerDto.BasicUom; + } + else + { + item.StdPackQty = 1; + } + + } - return entities.Where(p=>p.Category== categoryName).ToList(); + return itemEntities; } } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs index d9b2baaee..6518de328 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs @@ -39,4 +39,10 @@ public enum EnumIssueRequestType /// [Display(Name = "EXCEL导入")] ExcelImport=5, + + /// + /// 注塑计划 + /// + [Display(Name = "EXCEL导入")] + InjectionPlan = 6, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs index 371b5240d..46cdee401 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs @@ -99,20 +99,22 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase Date: Wed, 19 Jun 2024 09:30:35 +0800 Subject: [PATCH 13/24] =?UTF-8?q?kitting=E5=8F=91=E6=96=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IKittingIssueRequestAppService.cs | 2 +- .../TransferLibRequests/ITransferLibRequestAppService.cs | 2 +- .../KittingIssueJobs/KittingIssueJobAppService.cs | 2 +- .../KittingIssueRequests/KittingIssueRequestAppService.cs | 8 ++++---- .../TransferLibRequests/TransferLibRequestAppService.cs | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs index bada4151d..d1a6e7350 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs @@ -11,7 +11,7 @@ public interface IKittingIssueRequestAppService { Task CreateAndHandleAsync(KittingIssueRequestEditInput input); - Task UpdateStatusCompletedAsync(string number); + Task UpdateStatusCompletedAsync(string number, string jobNumber); Task IsHasNewJobAsync(string requestNumber,List jobNumber); Task CreateImportExcelAsync(List inputs); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs index 191365e01..d93c634b8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs @@ -18,6 +18,6 @@ public interface ITransferLibRequestAppService CancellationToken cancellationToken = default); Task CompleteByJobAsync(string requestNumber); - Task CancelByCallRequestNumberAsync(string callRequestNumber); + Task CancelByCallRequestNumberAsync(string callJobNumber); Task CompleteByCallRequestNumberAsync(string callRequestNumber); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index dda5f1ffa..bbbcd902e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -622,7 +622,7 @@ public class KittingIssueJobAppService //await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false); - await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber) + await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber,kittingIssueJob.Number) .ConfigureAwait(false); await Task.CompletedTask.ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs index 7f4b06bed..f34043c7a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs @@ -179,11 +179,11 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase p.Number == number).ConfigureAwait(false); - await UpdateKittingIssueRequestDetailQtyAsync(kittingIssueRequest, new EditableList()) + await UpdateKittingIssueRequestDetailQtyAsync(kittingIssueRequest, jobNumber, new EditableList()) .ConfigureAwait(false); var kittingIssueJobDtos = await _kittingIssueJobAppService.GetByRequestNumberAsync(kittingIssueRequest.Number) @@ -281,7 +281,7 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase /// /// - private async Task UpdateKittingIssueRequestDetailQtyAsync(KittingIssueRequest kittingIssueRequest, + private async Task UpdateKittingIssueRequestDetailQtyAsync(KittingIssueRequest kittingIssueRequest,string jobNumber, List addKittingIssueJobDtos) { //原有任务 @@ -322,7 +322,7 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBasep.CallRequestNumber==callRequestNumber).ConfigureAwait(false); + var list=await _repository.GetListAsync(p=>p.CallJobNumber== callJobNumber).ConfigureAwait(false); foreach (var request in list) { await CancelAsync(request.Id).ConfigureAwait(false); From f0889b0a1e8b2428acce567fcca9f8da3f044749 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 19 Jun 2024 09:41:10 +0800 Subject: [PATCH 14/24] =?UTF-8?q?kitting=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index bbbcd902e..ee8077bce 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -273,7 +273,7 @@ public class KittingIssueJobAppService await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false); - await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber) + await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber, kittingIssueJob.Number) .ConfigureAwait(false); await _transferLibRequestAppService.CancelByCallRequestNumberAsync(kittingIssueJob.KittingRequestNumber) .ConfigureAwait(false); From 1458dd230f16db3fc7a8efb2620dbc5026b21154 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 19 Jun 2024 12:12:22 +0800 Subject: [PATCH 15/24] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Transactions/Transaction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/Transaction.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/Transaction.cs index 2996f4c6d..9829e129a 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/Transaction.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/Transaction.cs @@ -233,12 +233,12 @@ public class Transaction : SfsInventoryAggregateRootBase public void TrySetItemAndLocation(ItemBasicDTO item, LocationDTO location) { ManageType = item.ManageType; + StdPackQty = item.StdPackQty; if (string.IsNullOrEmpty(ItemName)) { ItemName = item.Name; ItemDesc1 = item.Desc1; - ItemDesc2 = item.Desc2; - StdPackQty = item.StdPackQty; + ItemDesc2 = item.Desc2; } if (string.IsNullOrEmpty(WarehouseCode)) { From 8bc6e7e5e5c6ccf061c28a520f6d9497f3f0bd35 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Wed, 19 Jun 2024 13:47:41 +0800 Subject: [PATCH 16/24] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=9C=AA=E6=94=B6=E8=8E=B7=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E8=AF=A5=E6=98=BE=E7=A4=BA=E4=B8=BA0?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E8=AF=A5=E9=80=9A=E8=BF=87=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E8=8E=B7=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseReceiptNoteAppService.cs | 9 ++++++++- .../InjectionPlanRequestAppService.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs index d8632cf2a..e9a98ff40 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs @@ -118,8 +118,15 @@ public class PurchaseReceiptNoteAppService : public virtual async Task> GetDetailListByNoReceiptAsync(Guid id) { var entity = await _repository.FindAsync(p => p.Id == id).ConfigureAwait(false); - return ObjectMapper.Map, List>(entity.Details + + var purchaseReceiptNoteDetailDTOS= ObjectMapper.Map, List>(entity.Details .Where(p => p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.NORECEIPT).ToList()); + foreach(var item in purchaseReceiptNoteDetailDTOS) + { + item.Qty = item.RecommendQty - item.HandledQty; + } + + return purchaseReceiptNoteDetailDTOS; } /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs index 46cdee401..dc0c2b592 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs @@ -75,7 +75,7 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase Date: Wed, 19 Jun 2024 17:15:47 +0800 Subject: [PATCH 17/24] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Stores/PurchaseReturnRequestController.cs | 5 ++--- .../Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs index 781dae313..9c52d5757 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs @@ -35,7 +35,7 @@ public class PurchaseReturnRequestController : AbpController /// 创建退货申请 /// [HttpPost("create-many")] - public virtual async Task CreateManyAsync(List input) + public virtual async Task> CreateManyAsync(List input) { List entitys = new List(); var groups = input.GroupBy(r => r.AsnNumber).ToList(); @@ -57,8 +57,7 @@ public class PurchaseReturnRequestController : AbpController } entitys.Add(entity); } - await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false); - return Ok(); + return await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false); } /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs index 3c6af9b48..b6f47916a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs @@ -16,7 +16,7 @@ public class ScrapRequestImportInput : SfsStoreImportInputBase [ImporterHeader(Name = "报废类型")] [ExporterHeader(DisplayName = "报废类型")] [ValueMapping("线边报废", EnumTransSubType.Scrap_WIP)] - [ValueMapping("原料报废", EnumTransSubType.Scrap_Manual)] + //[ValueMapping("原料报废", EnumTransSubType.Scrap_Manual)] [ValueMapping("完工报废", EnumTransSubType.Scrap_Product)] public string Type { get; set; } From c45dbfb6f5dc84116aa83bb4b431bc18ad9723ae Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Thu, 20 Jun 2024 10:21:22 +0800 Subject: [PATCH 18/24] =?UTF-8?q?=E5=90=8C=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SplitPackings/SplitPackingRecManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs index 994c5308e..a4564026f 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs @@ -48,8 +48,8 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager if (item.OprType == OprTypeEnum.SplitBox || item.OprType == OprTypeEnum.MergeBox) { //设置顶级箱码 - item.FromTopPackingCode = GetTopPackingCode(query, item.FromPackingCode); - item.ToTopPackingCode = GetTopPackingCode(query, item.FromPackingCode); //ToPackingCode + item.FromTopPackingCode = CalcuTopPackingCode(query, item.FromPackingCode); + item.ToTopPackingCode = CalcuTopPackingCode(query, item.FromPackingCode); //ToPackingCode if (item.FromTopPackingCode.IsNullOrEmpty()) { item.FromTopPackingCode = item.FromPackingCode; @@ -204,7 +204,7 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager /// 箱码历史 /// 箱码,from to时都传入from /// - private static string GetTopPackingCode(IQueryable historyQuery, string packingCode) + private static string CalcuTopPackingCode(IQueryable historyQuery, string packingCode) { var qry = historyQuery.Where(itm => itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox); string ret = null; From 5568ef577f27b7f20ca6d7b3cc56c2f13d64898f Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 20 Jun 2024 13:47:25 +0800 Subject: [PATCH 19/24] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E4=B8=8A=E6=9E=B6=E7=AE=B1=E7=A0=81=E7=BB=99?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=A0=E6=97=B6=EF=BC=8C=E4=BC=A0=E6=8B=86?= =?UTF-8?q?=E7=AE=B1=E5=89=8D=E7=9A=84=E7=AE=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Outgoing/ArriveConverter.cs | 2 +- .../Outgoing/ReturnConverter.cs | 2 +- .../PositionCodes/PositionCodeAppService.cs | 4 ++-- ...ionCodeDbContextModelCreatingExtensions.cs | 1 - .../PurchaseReturnNoteEventHandler.cs | 13 ++++++++++- .../DataExchanges/PutawayNoteEventHandler.cs | 23 +++++++++++++++---- 6 files changed, 35 insertions(+), 10 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs index 989eb2391..496e2efdc 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs @@ -114,7 +114,7 @@ public class ArriveConverter : IOutgoingConverter PlanBillNo = detail.PoNumber, ShipBillNo = detail.AsnNumber, DocNo = exchangeReceipt.Number, - DetailMatNo = detail.ToPackingCode, + DetailMatNo =string.IsNullOrEmpty(detail.Remark) ? detail.ToPackingCode: detail.Remark, ERP = detail.ItemCode, Qty = detail.Qty, HgQty = detail.Qty, diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs index cef94089a..058748ba5 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs @@ -80,7 +80,7 @@ public class ReturnConverter : IOutgoingConverter PlanBillNo = exchangeReturn.PoNumber, ShipBillNo = exchangeReturn.AsnNumber, DocNo = exchangeReturn.Number, - DetailMatNo = detail.PackingCode, + DetailMatNo = string.IsNullOrEmpty(detail.Remark)? detail.PackingCode: detail.Remark, ERP = detail.ItemCode, RtQty = detail.Qty, RtSon = detail.Reason, diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs index 0990cef3b..ad08bd229 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs @@ -59,8 +59,8 @@ public class PositionCodeAppService throw new UserFriendlyException($"位置码{input.Code} 已存在!"); } - //var itemEntity = await _repository.FirstOrDefaultAsync(p =>p.LocationCode==input.LocationCode && p.PartCode == input.PartCode&&p.Type==input.Type).ConfigureAwait(false); - //if(itemEntity != null) + //var itemEntity = await _repository.FirstOrDefaultAsync(p => p.LocationCode == input.LocationCode && p.PartCode == input.PartCode && p.Type == input.Type).ConfigureAwait(false); + //if (itemEntity != null) //{ // throw new UserFriendlyException($"类型{input.Type.ToString()}物品{input.PartCode}目标库位{input.LocationCode}已存在!"); //} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCodes/PositionCodeDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCodes/PositionCodeDbContextModelCreatingExtensions.cs index 33f7bd550..0110994ea 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCodes/PositionCodeDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCodes/PositionCodeDbContextModelCreatingExtensions.cs @@ -34,7 +34,6 @@ public static class PositionCodeDbContextModelCreatingExtensions //Indexes b.HasIndex(q => new { q.Code,q.PartCode,q.LocationCode }).IsUnique(); b.HasIndex(q => new { q.Code }).IsUnique(); - b.HasIndex(q => new { q.PartCode }).IsUnique(); }); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PurchaseReturnNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PurchaseReturnNoteEventHandler.cs index 5446353da..8c3a164bb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PurchaseReturnNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PurchaseReturnNoteEventHandler.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp.EventBus; using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -16,7 +17,11 @@ public class PurchaseReturnNoteEventHandler , ILocalEventHandler>> { private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.PurchaseReturn; - + private readonly ISplitPackingRecAppService _splitPackingRecAppService; + public PurchaseReturnNoteEventHandler(ISplitPackingRecAppService splitPackingRecAppService) + { + _splitPackingRecAppService = splitPackingRecAppService; + } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { @@ -37,6 +42,12 @@ public class PurchaseReturnNoteEventHandler foreach (var detail in dtos.SelectMany(dto => dto.Details)) { await detail.TrySetLocationAsync(LocationAclService, detail.LocationCode).ConfigureAwait(false); + var packingCode=await _splitPackingRecAppService.GetTopPackingCode(detail.PackingCode).ConfigureAwait(false); + detail.Remark = string.Empty; + if (!string.IsNullOrEmpty(packingCode?.FromTopPackingCode) &&detail.PackingCode!= packingCode?.FromTopPackingCode) + { + detail.Remark=packingCode.FromTopPackingCode; + } } //2023-12-6上架前退货不传入接口 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PutawayNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PutawayNoteEventHandler.cs index d0369abea..7ae2b3117 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PutawayNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PutawayNoteEventHandler.cs @@ -2,8 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.VisualBasic; +using Org.BouncyCastle.Crypto.Prng.Drbg; using Volo.Abp.EventBus; using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -17,7 +19,11 @@ public class PutawayNoteEventHandler , ILocalEventHandler>> { private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.Putaway; - + private readonly ISplitPackingRecAppService _splitPackingRecAppService; + public PutawayNoteEventHandler(ISplitPackingRecAppService splitPackingRecAppService) + { + _splitPackingRecAppService=splitPackingRecAppService; + } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { @@ -41,7 +47,16 @@ public class PutawayNoteEventHandler } //采购上架 - var putaway_Purchase = entities.Where(p => p.Type == EnumPutawayType.PurchasePutaway).ToList(); + var putaway_Purchase = dtos.Where(p => p.Type == EnumPutawayType.PurchasePutaway).ToList(); + foreach (var item in putaway_Purchase.SelectMany(dto => dto.Details)) + { + var packingCode = await _splitPackingRecAppService.GetTopPackingCode(item.ToPackingCode).ConfigureAwait(false); + item.Remark = string.Empty; + if (!string.IsNullOrEmpty(packingCode?.FromTopPackingCode) && item.ToPackingCode != packingCode?.FromTopPackingCode) + { + item.Remark = packingCode.FromTopPackingCode; + } + } if (putaway_Purchase.Count > 0) { var exchangeData_Purchase = @@ -56,10 +71,10 @@ public class PutawayNoteEventHandler } //半成品上架 - var putaway_Semi_temp = entities.Where(p => p.Type == EnumPutawayType.SemiPutaway).ToList(); + var putaway_Semi_temp = dtos.Where(p => p.Type == EnumPutawayType.SemiPutaway).ToList(); foreach (var putawayNoteTemp in putaway_Semi_temp) { - var putawayNoteDetails= new List(); + var putawayNoteDetails= new List(); foreach (var putawayNoteDetail_temp in putawayNoteTemp.Details) { From 66553ba41c4110671ecc07376323e932bf9a2f9e Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 21 Jun 2024 09:44:52 +0800 Subject: [PATCH 20/24] =?UTF-8?q?=E6=88=90=E5=93=81=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BD=A6=E7=89=8C=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FawtygAutoMapperProfile.cs | 1 - .../Incoming/DeliveryReader.cs | 4 +++- .../Outgoing/CustomerReturnNoteConverter.cs | 2 +- .../Outgoing/TyrpOutgoingBackgroundWorker.cs | 10 +++++----- .../Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json | 4 ++-- .../WMS/DeliverRequest/DeliverRequestExchangeDto.cs | 9 ++++++++- ...n_in.Sfs.Wms.DataExchange.Application.Contracts.xml | 10 ++++++++++ .../Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs | 5 +++++ .../Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs | 5 +++++ .../Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs | 5 +++++ .../Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs | 6 +++++- .../Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs | 4 ++++ .../DeliverRequests/Inputs/DeliverRequestEditInput.cs | 2 ++ .../Inputs/DeliverRequestImportInput.cs | 5 +++++ .../DeliverRequests/DeliverRequestAppService.cs | 8 ++++++++ .../Jobs/DeliverJobs/DeliverJob.cs | 4 ++++ .../Notes/DeliverNotes/DeliverNote.cs | 5 ++++- .../Requests/DeliverRequests/DeliverRequest.cs | 5 ++++- .../DeliverJobDbContextModelCreatingExtensions.cs | 1 + .../DeliverNoteDbContextModelCreatingExtensions.cs | 2 +- .../DeliverRequestDbContextModelCreatingExtensions.cs | 2 +- 21 files changed, 83 insertions(+), 16 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs index 7f5cc4065..e5fd5ef17 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs @@ -250,7 +250,6 @@ public class FawtygAutoMapperProfile : Profile .Ignore(x => x.StdPackQty); CreateMap() - .Ignore(x => x.DeliverPlanNumber) .Ignore(x => x.ExtraProperties) .Ignore(x => x.Details) .Ignore(x => x.CustomerAddressCode) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs index 6a5238413..1f6f35bbb 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs @@ -98,11 +98,13 @@ public class DeliveryReader : IReader var mesRequest = new DeliverRequestExchangeDto() { DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal, + DeliverPlanNumber= Delivery.mesout_delivery_type == "0" ? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan, CustomerCode = Delivery.mesout_delivery_customer, Number = Delivery.mesout_delivery_no, Worker = "MESFY", ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now, - DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now + DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now, + MesTruckNumber=Delivery.mesout_delivery_carno, }; var mesRequestDetail = new DeliverRequestDetailExchangeDto() { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs index 17c559965..2dcee1142 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs @@ -41,7 +41,7 @@ public class CustomerReturnNoteConverter : IOutgoingConverter { var outgoingToExternalList = new List(); //获取要同步得数据 - var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.UnplannedReceipt, EnumSystemType.ERP).ConfigureAwait(false); + var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.CustomerReturn, EnumSystemType.ERP).ConfigureAwait(false); foreach (var outgoingFromWms in outgoingFromWmsList) { #region 主表 diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs index 038899008..809c11b66 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs @@ -156,12 +156,12 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase } #endregion - #region --接口以关闭-- 退货单 UnplannedReceipt wmsoutm + #region --接口以关闭-- 退货单 CustomerReturn wmsoutm //暂无此接口 - //Logger.LogInformation($"Write CustomerReturnNote");//退货单 - //var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService(); - //var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); - //await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); + Logger.LogInformation($"Write CustomerReturnNote");//退货单 + var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService(); + var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); + await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); #endregion #region 非生产领料单 UnplannedIssue wmsoutm diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json index 2e0324e5f..0f8bdf492 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json @@ -26,10 +26,10 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://localhost:59094/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://localhost:59095/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { "BaseUrl": "http://dev.ccwin-in.com:60082/" diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs index 7273c7ce0..d98237813 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs @@ -27,7 +27,14 @@ public class DeliverRequestExchangeDto /// 发货类型 /// public EnumDeliverRequestType DeliverRequestType { get; set; } - + /// + /// 看板件发货计划单号/JIS发货单号 + /// + public string DeliverPlanNumber { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 客户 /// diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml index 0799d6c0e..84bf66f23 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml @@ -626,6 +626,16 @@ 发货类型 + + + 看板件发货计划单号/JIS发货单号 + + + + + Mes车牌号 + + 客户 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs index 7c0feea34..7b2546cb4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs @@ -38,5 +38,10 @@ public class DeliverJobDTO : SfsJobDTOBase /// [Display(Name = "发货请求单号")] public string DeliverRequestNumber { get; set; } + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs index 2e8d7a2a8..66ffb8100 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs @@ -73,5 +73,10 @@ public class DeliverJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInp /// [Display(Name = "发货计划单号")] public string DeliverPlanNumber { get; set; } + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs index 0bc9f5a03..e91ba0574 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs @@ -54,6 +54,11 @@ public class DeliverNoteDTO : SfsStoreDTOBase /// [Display(Name = "打印次数")] public int CountPrint { get; set; } + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } /// /// 发货类型 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs index 38c0e9206..bd1154061 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs @@ -57,7 +57,11 @@ public class DeliverNoteEditInput : SfsStoreCreateOrUpdateInputBase /// [Display(Name = "发货类型")] public EnumDeliverRequestType DeliverRequestType { get; set; } - + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } /// /// 明细列表 /// 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 a3686c8a1..729272318 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 @@ -31,4 +31,8 @@ public class DeliverRequestDTO : SfsStoreRequestDTOBase /// [Display(Name = "客户地址")] public string CustomerAddressCode { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs index f58713e69..b612b97f3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs @@ -33,6 +33,8 @@ public class DeliverRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase [Display(Name = "发货类型")] public EnumDeliverRequestType DeliverRequestType { get; set; } + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } [Display(Name = "明细列表")] public List Details { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs index 917c5b910..cb66bb549 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs @@ -69,6 +69,11 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase [Display(Name = "Mes发货计划号")] public string MesDeliveryPlan { get; set; } /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } + /// /// 底盘号 /// [Display(Name = "底盘号")] 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 2146cf2d2..c4d6b30fe 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 @@ -72,6 +72,14 @@ IItemBasicAppService itemBasicAppService) { throw new UserFriendlyException($"同一发货类型、发货时间、客户的存在相同零件号!"); } + if(request.DeliverRequestType== EnumDeliverRequestType.FIS) + { + request.DeliverPlanNumber = request.Details.First().MesDeliveryNo; + } + else if (request.DeliverRequestType == EnumDeliverRequestType.Normal) + { + request.DeliverPlanNumber = request.Details.First().MesDeliveryPlan; + } foreach (var detail in request.Details) { var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs index d2bcfcdff..6b12186c6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs @@ -41,6 +41,10 @@ public class DeliverJob : SfsJobAggregateRootBase /// [IgnoreUpdate] public string DeliverPlanNumber { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 任务明细 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs index 6a60d8f74..4745cf029 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs @@ -60,7 +60,10 @@ public class DeliverNote : SfsStoreAggregateRootBase, IHasJob /// [Display(Name = "打印次数")] public int CountPrint { get; set; } - + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 明细列表 /// 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 a7d5cd8d1..e722611d3 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 @@ -20,7 +20,6 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase /// 发货计划单号 /// - [IgnoreUpdate] public string DeliverPlanNumber { get; set; } /// @@ -39,6 +38,10 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase public EnumDeliverRequestType DeliverRequestType { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 任务明细 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs index 7c20cec54..17e1ccf96 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs @@ -24,6 +24,7 @@ public static class DeliverJobDbContextModelCreatingExtensions b.Property(q => q.DeliverRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength); //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); //Indexes diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs index 5d71253f9..cb2807abb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs @@ -22,7 +22,7 @@ public static class DeliverNoteDbContextModelCreatingExtensions b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - + b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength); //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs index b6530b9ff..97fe98634 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs @@ -24,7 +24,7 @@ public static class DeliverRequestDbContextModelCreatingExtensions b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.DeliverPlanNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - + b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength); //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); From 619e3c19e78d4f425f81d890d78ad08d108c3d16 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 21 Jun 2024 12:04:25 +0800 Subject: [PATCH 21/24] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Incoming/TyrpIncomingBackgroundWorker.cs | 10 ++++++++++ .../Enums/Job/EnumJobStatus.cs | 4 ++-- .../Inputs/TransferRequestImportInput.cs | 4 +++- .../InjectionPlanJobs/InjectionPlanJobAppService.cs | 2 +- .../AssembleIssueJobs/AssembleIssueJobAppService.cs | 2 +- .../CoatingIssueJobs/CoatingIssueJobAppService.cs | 2 +- .../InjectionIssueJobs/InjectionIssueJobAppService.cs | 2 +- .../KittingIssueJobs/KittingIssueJobAppService.cs | 2 +- .../SparePartIssueJobs/SparePartIssueJobAppService.cs | 2 +- .../Jobs/InjectionPlanJobEventHandler.cs | 2 +- .../Jobs/Issue/AssembleIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/CoatingIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/InjectionIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/KittingIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/SparePartIssueJobEventHandler.cs | 2 +- 15 files changed, 27 insertions(+), 15 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs index 1f186a5c6..d4be75195 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs @@ -119,6 +119,16 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //转换Dictpj await dictConverter.ConvertAsync(dictpjOutsFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read ErpLocation");//ERP库位 + var ErpLocationReader = workerContext.ServiceProvider.GetRequiredService(); + var ErpLocationConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存ErpLocationItem + var erpLocationFromExternalList = await ErpLocationReader.ReadAsync().ConfigureAwait(false); + //转换ErpLocationItem + await ErpLocationConverter.ConvertAsync(erpLocationFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Customer");//客户资料 var CustomerReader = workerContext.ServiceProvider.GetRequiredService(); var CustomerConverter = workerContext.ServiceProvider.GetRequiredService(); diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs index 619e84684..b626f9ef6 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs @@ -48,8 +48,8 @@ public enum EnumJobStatus Cancelled = 9, /// - /// 等待 + /// 待库移 /// - [Display(Name = "等待")] + [Display(Name = "待库移")] Wait=30, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs index 6a9be79c9..4ac172314 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs @@ -1,3 +1,4 @@ +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; @@ -73,7 +74,8 @@ public class TransferRequestImportInput : SfsStoreImportInputBase /// [Display(Name = "状态")] [Required(ErrorMessage = "{0}是必填项")] - public EnumInventoryStatus Status { get; set; } + [ValueMapping("合格", EnumInventoryStatus.OK)] + public string Status { get; set; } #region 回调服务相关 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs index 5bd6066ae..1fc134ae3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs @@ -64,7 +64,7 @@ public class InjectionPlanJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index d45755a79..625c6c6d7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -564,7 +564,7 @@ public class AssembleIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index 373273410..c9f82ca58 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -559,7 +559,7 @@ public class CoatingIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs index b45b43e2a..4ee1530b1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs @@ -512,7 +512,7 @@ public class InjectionIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index ee8077bce..cbb97cbaf 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -509,7 +509,7 @@ public class KittingIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs index 5e9f7674d..a3e9b1b2f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs @@ -493,7 +493,7 @@ public class SparePartIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs index 18713e89c..62a3a90bd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs @@ -202,7 +202,7 @@ public class InjectionPlanJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs index c2ac70396..5e75579cd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs @@ -214,7 +214,7 @@ public class AssembleIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs index 7a445f6db..2d209e177 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs @@ -214,7 +214,7 @@ public class CoatingIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs index b6ccf84ca..2bf12c343 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs @@ -213,7 +213,7 @@ public class InjectionIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs index b2f17565f..8cd66b5d1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs @@ -213,7 +213,7 @@ public class KittingIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs index b46ef749b..5a3086456 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs @@ -213,7 +213,7 @@ public class SparePartIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// From b457742f55804676a35519f6426cfd5514f9bcf9 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Fri, 21 Jun 2024 13:54:50 +0800 Subject: [PATCH 22/24] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=99=A8=E5=85=B7=E8=A7=84=E6=A0=BC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=BF=9D=E5=AD=98=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dicts/DictAppService.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs index 828a8bba0..67c7941df 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs @@ -17,6 +17,7 @@ using System.Text; using DocumentFormat.OpenXml.Office2010.ExcelAc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; +using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; using Win_in.Sfs.Shared; @@ -60,9 +61,17 @@ public class DictAppService : SfsBaseDataWithCodeAppServiceBase UpdateAsync(Guid id, DictEditInput input) + public override async Task UpdateAsync(Guid id, DictEditInput input) { - return base.UpdateAsync(id, input); + //return await base.UpdateAsync(id, input).ConfigureAwait(false); //lyf at 0621, 更新报错所以注释 + var entity = await _repository.GetAsync(id).ConfigureAwait(false); + if (entity == null) + { + throw new UserFriendlyException($"根据Id取字典表为空:{id}"); + } + ObjectMapper.Map(input, entity); + await _repository.UpdateAsync(entity, true).ConfigureAwait(false); + return ObjectMapper.Map(entity); } [HttpPost("update")] From ea4022597cfc5d236849b7eead8486fee1a8330f Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Fri, 21 Jun 2024 14:45:25 +0800 Subject: [PATCH 23/24] =?UTF-8?q?=E6=9B=B4=E6=96=B0TYRP=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E9=80=80=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Outgoing/TyrpOutgoingBackgroundWorker.cs | 7 ++++ .../ExchangeDatas/EnumExchangeDataType.cs | 7 +++- ...erProductionReturnNoteAutoMapperProfile.cs | 6 +++ ...ustomerProductionReturnNoteEventHandler.cs | 40 +++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs index 038899008..d42f443ea 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs @@ -164,6 +164,13 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); #endregion + #region 客户退货单 CustomerReturn wmsoutm + Logger.LogInformation($"Write CustomerReturnNote");//退货单 + var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService(); + var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); + await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); + #endregion + #region 非生产领料单 UnplannedIssue wmsoutm Logger.LogInformation($"Write UnplannedIssueNote");//非生产领料单(汇总) var unplannedIssueNoteConvert = workerContext.ServiceProvider.GetRequiredService(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs index 547f89df8..eb36c9763 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs @@ -32,6 +32,9 @@ public enum EnumExchangeDataType //回收料调整 Item_Transform = 28, //半成品上架 - SemiPutaway = 29, - + SemiPutaway = 29, + /// + /// 客户退货 + /// + CustomerReturn = 30, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs index eaa70bea5..8e479aad1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs @@ -43,6 +43,12 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ReverseMap(); CreateMap(); + + CreateMap() + .ForMember(x => x.Customer, y => y.MapFrom(d => d.CustomerCode)) + ; + + CreateMap(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs new file mode 100644 index 000000000..b2d8cae6c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; + +public class CustomerProductionReturnNoteEventHandler + : StoreDataExchangeEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + +{ + private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.CustomerReturn; + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + await AddExchangeDataAsync(entity).ConfigureAwait(false); + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); + } + + protected override async Task AddExchangeDataAsync(List entities) + { + var dtos = ObjectMapper.Map, List>(entities); + var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, dtos).ConfigureAwait(false); + await AddManyAsync(exchangeData).ConfigureAwait(false); + } + +} From 5a80407e000527843b5da88e5c09be5eb2a5b1bc Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Fri, 21 Jun 2024 17:26:48 +0800 Subject: [PATCH 24/24] =?UTF-8?q?=E6=9B=B4=E6=96=B0TYRP=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataExchanges/Issue/KittingIssueNoteEventHandler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs index 8e5555472..18b26002d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class KittingIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - //var entity = eventData.Entity; - //await AddExchangeDataAsync(entity).ConfigureAwait(false); + var entity = eventData.Entity; + await AddExchangeDataAsync(entity).ConfigureAwait(false); } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - //var entities = eventData.Entity; - //await AddExchangeDataAsync(entities).ConfigureAwait(false); + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities)