From 5b2116c1a2eea3f8aad69f62c6467ec881ab029c Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Tue, 23 Jul 2024 09:24:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E5=8F=91=E6=96=99?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=9A=84=20=E5=BA=93=E4=BD=8D=E8=B5=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ateUpdateDataExchangeInterfaceConfigDto.cs | 3 +++ .../Dtos/DataExchangeInterfaceConfigDto.cs | 3 ++- .../DataExchangeInterfaceConfigAppService.cs | 7 ++++++ .../Enums/EnumStatus.cs | 13 ++++++++++ .../DataExchangeInterfaceConfig.cs | 3 ++- .../AssembleIssueNoteAppService.cs | 24 +++++++++++++++++-- .../CoatingIssueNoteAppService.cs | 24 +++++++++++++++++-- .../InjectionIssueNoteAppService.cs | 24 +++++++++++++++++-- .../KittingIssueNoteAppService.cs | 24 +++++++++++++++++-- .../SparePartIssueNoteAppService.cs | 24 +++++++++++++++++-- 10 files changed, 137 insertions(+), 12 deletions(-) create mode 100644 InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain.Shared/Enums/EnumStatus.cs diff --git a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/CreateUpdateDataExchangeInterfaceConfigDto.cs b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/CreateUpdateDataExchangeInterfaceConfigDto.cs index e54a33b91..e39940e71 100644 --- a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/CreateUpdateDataExchangeInterfaceConfigDto.cs +++ b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/CreateUpdateDataExchangeInterfaceConfigDto.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel; +using Dy_Exchange.Enums; using WinIn.FasterZ.Inventory.AppBase.FasterBaseDto; namespace Dy_Exchange.Z_Business.Dtos; @@ -36,4 +37,6 @@ public class CreateUpdateDataExchangeInterfaceConfigDto: FasterCreateUpdateBaseD /// [DisplayName("DataExchangeInterfaceConfigRemark")] public string? Remark { get; set; } + + public EnumStatus Status { get; set; } } \ No newline at end of file diff --git a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/DataExchangeInterfaceConfigDto.cs b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/DataExchangeInterfaceConfigDto.cs index e78519da3..b6082149b 100644 --- a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/DataExchangeInterfaceConfigDto.cs +++ b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application.Contracts/Z_Business/Dtos/DataExchangeInterfaceConfigDto.cs @@ -1,4 +1,5 @@ using System; +using Dy_Exchange.Enums; using Volo.Abp.Application.Dtos; namespace Dy_Exchange.Z_Business.Dtos; @@ -26,5 +27,5 @@ public class DataExchangeInterfaceConfigDto : AuditedEntityDto public string? Remark { get; set; } - public int? Status { get; set; } + public EnumStatus Status { get; set; } } \ No newline at end of file diff --git a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application/Z_Business/DataExchangeInterfaceConfigAppService.cs b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application/Z_Business/DataExchangeInterfaceConfigAppService.cs index 324ef6872..459cb63f7 100644 --- a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application/Z_Business/DataExchangeInterfaceConfigAppService.cs +++ b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Application/Z_Business/DataExchangeInterfaceConfigAppService.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Dy_Exchange.Permissions; using Dy_Exchange.Z_Business.Dtos; using Volo.Abp.Application.Dtos; @@ -27,4 +28,10 @@ public class DataExchangeInterfaceConfigAppService : ZbxBase UpdateAsync(Guid id, CreateUpdateDataExchangeInterfaceConfigDto input) + { + + + return base.UpdateAsync(id, input); + } } diff --git a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain.Shared/Enums/EnumStatus.cs b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain.Shared/Enums/EnumStatus.cs new file mode 100644 index 000000000..80b8eab67 --- /dev/null +++ b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain.Shared/Enums/EnumStatus.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace Dy_Exchange.Enums +{ + public enum EnumStatus + { + [Display(Name = "运行中")] Running = 0, + [Display(Name = "已关闭")] Closed = 1, + } +} diff --git a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain/Z_Business/DataExchangeInterfaceConfig/DataExchangeInterfaceConfig.cs b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain/Z_Business/DataExchangeInterfaceConfig/DataExchangeInterfaceConfig.cs index 22e7a4acb..435ff1f92 100644 --- a/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain/Z_Business/DataExchangeInterfaceConfig/DataExchangeInterfaceConfig.cs +++ b/InterFaceContorl/Dy_Exchange/src/Dy_Exchange.Domain/Z_Business/DataExchangeInterfaceConfig/DataExchangeInterfaceConfig.cs @@ -1,4 +1,5 @@ using System; +using Dy_Exchange.Enums; using Volo.Abp.Domain.Entities.Auditing; namespace Dy_Exchange.Z_Business; @@ -18,5 +19,5 @@ public class DataExchangeInterfaceConfig public string? Remark { get; set; } - public int? Status { get; set; } + public EnumStatus Status { get; set; } } \ No newline at end of file diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs index ec42d0293..769a8bcb4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -25,13 +26,14 @@ public class AssembleIssueNoteAppService : IAssembleIssueNoteAppService { private readonly IAssembleIssueNoteManager _assembleIssueNoteManager; + private readonly ILocationAppService _locationAppService; public AssembleIssueNoteAppService( IAssembleIssueNoteRepository repository, - IAssembleIssueNoteManager assembleIssueNoteManager - ) : base(repository) + IAssembleIssueNoteManager assembleIssueNoteManager, ILocationAppService locationAppService) : base(repository) { _assembleIssueNoteManager = assembleIssueNoteManager; + _locationAppService = locationAppService; } [HttpPost("")] @@ -39,6 +41,24 @@ public class AssembleIssueNoteAppService : public override async Task CreateAsync(AssembleIssueNoteEditInput input) { var entity = ObjectMapper.Map(input); + + foreach (var detail in entity.Details) + { + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + + detail.HandledFromLocationArea = fromLocationDto.AreaCode; + detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode; + detail.HandledFromLocationErpCode= fromLocationDto.ErpLocationCode; + detail.HandledFromWarehouseCode= fromLocationDto.WarehouseCode; + + detail.HandledToLocationArea = toLocationDto.AreaCode; + detail.HandledToLocationGroup = toLocationDto.LocationGroupCode; + detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode; + detail.HandledToWarehouseCode = toLocationDto.WarehouseCode; + } + await _assembleIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs index e028685eb..98e33bcd0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -25,13 +26,14 @@ public class CoatingIssueNoteAppService : ICoatingIssueNoteAppService { private readonly ICoatingIssueNoteManager _coatingIssueNoteManager; + private readonly ILocationAppService _locationAppService; public CoatingIssueNoteAppService( ICoatingIssueNoteRepository repository, - ICoatingIssueNoteManager coatingIssueNoteManager - ) : base(repository) + ICoatingIssueNoteManager coatingIssueNoteManager, ILocationAppService locationAppService) : base(repository) { _coatingIssueNoteManager = coatingIssueNoteManager; + _locationAppService = locationAppService; } [HttpPost("")] @@ -39,6 +41,24 @@ public class CoatingIssueNoteAppService : public override async Task CreateAsync(CoatingIssueNoteEditInput input) { var entity = ObjectMapper.Map(input); + + foreach (var detail in entity.Details) + { + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + + detail.HandledFromLocationArea = fromLocationDto.AreaCode; + detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode; + detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode; + detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode; + + detail.HandledToLocationArea = toLocationDto.AreaCode; + detail.HandledToLocationGroup = toLocationDto.LocationGroupCode; + detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode; + detail.HandledToWarehouseCode = toLocationDto.WarehouseCode; + } + await _coatingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs index 51d87aab3..c86fadd68 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -25,13 +26,14 @@ public class InjectionIssueNoteAppService : IInjectionIssueNoteAppService { private readonly IInjectionIssueNoteManager _injectionIssueNoteManager; + private readonly ILocationAppService _locationAppService; public InjectionIssueNoteAppService( IInjectionIssueNoteRepository repository, - IInjectionIssueNoteManager injectionIssueNoteManager - ) : base(repository) + IInjectionIssueNoteManager injectionIssueNoteManager, ILocationAppService locationAppService) : base(repository) { _injectionIssueNoteManager = injectionIssueNoteManager; + _locationAppService = locationAppService; } [HttpPost("")] @@ -39,6 +41,24 @@ public class InjectionIssueNoteAppService : public override async Task CreateAsync(InjectionIssueNoteEditInput input) { var entity = ObjectMapper.Map(input); + + foreach (var detail in entity.Details) + { + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + + detail.HandledFromLocationArea = fromLocationDto.AreaCode; + detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode; + detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode; + detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode; + + detail.HandledToLocationArea = toLocationDto.AreaCode; + detail.HandledToLocationGroup = toLocationDto.LocationGroupCode; + detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode; + detail.HandledToWarehouseCode = toLocationDto.WarehouseCode; + } + await _injectionIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs index d5b2ce396..4808781f2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -25,13 +26,14 @@ public class KittingIssueNoteAppService : IKittingIssueNoteAppService { private readonly IKittingIssueNoteManager _kittingIssueNoteManager; + private readonly ILocationAppService _locationAppService; public KittingIssueNoteAppService( IKittingIssueNoteRepository repository, - IKittingIssueNoteManager kittingIssueNoteManager - ) : base(repository) + IKittingIssueNoteManager kittingIssueNoteManager, ILocationAppService locationAppService) : base(repository) { _kittingIssueNoteManager = kittingIssueNoteManager; + _locationAppService = locationAppService; } [HttpPost("")] @@ -39,6 +41,24 @@ public class KittingIssueNoteAppService : public override async Task CreateAsync(KittingIssueNoteEditInput input) { var entity = ObjectMapper.Map(input); + + foreach (var detail in entity.Details) + { + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + + detail.HandledFromLocationArea = fromLocationDto.AreaCode; + detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode; + detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode; + detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode; + + detail.HandledToLocationArea = toLocationDto.AreaCode; + detail.HandledToLocationGroup = toLocationDto.LocationGroupCode; + detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode; + detail.HandledToWarehouseCode = toLocationDto.WarehouseCode; + } + await _kittingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/SparePartIssueNotes/SparePartIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/SparePartIssueNotes/SparePartIssueNoteAppService.cs index fa6908815..870390e3b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/SparePartIssueNotes/SparePartIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/SparePartIssueNotes/SparePartIssueNoteAppService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -25,13 +26,14 @@ public class SparePartIssueNoteAppService : ISparePartIssueNoteAppService { private readonly ISparePartIssueNoteManager _sparePartIssueNoteManager; + private readonly ILocationAppService _locationAppService; public SparePartIssueNoteAppService( ISparePartIssueNoteRepository repository, - ISparePartIssueNoteManager sparePartIssueNoteManager - ) : base(repository) + ISparePartIssueNoteManager sparePartIssueNoteManager, ILocationAppService locationAppService) : base(repository) { _sparePartIssueNoteManager = sparePartIssueNoteManager; + _locationAppService = locationAppService; } [HttpPost("")] @@ -39,6 +41,24 @@ public class SparePartIssueNoteAppService : public override async Task CreateAsync(SparePartIssueNoteEditInput input) { var entity = ObjectMapper.Map(input); + + foreach (var detail in entity.Details) + { + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + + detail.HandledFromLocationArea = fromLocationDto.AreaCode; + detail.HandledFromLocationGroup = fromLocationDto.LocationGroupCode; + detail.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode; + detail.HandledFromWarehouseCode = fromLocationDto.WarehouseCode; + + detail.HandledToLocationArea = toLocationDto.AreaCode; + detail.HandledToLocationGroup = toLocationDto.LocationGroupCode; + detail.HandledToLocationErpCode = toLocationDto.ErpLocationCode; + detail.HandledToWarehouseCode = toLocationDto.WarehouseCode; + } + await _sparePartIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto;