From e90b90632ffb71f9a46eaf366ce8370bf3fc8326 Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Thu, 28 Mar 2024 10:03:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoatingIssueJobs/CoatingIssueJobDTO.cs | 2 +- .../CoatingIssueJobAppService.cs | 87 +------------------ .../CoatingIssueNoteAppService.cs | 2 +- .../CoatingIssueNoteAutoMapperProfile.cs | 2 +- .../CoatingIssueNotes/CoatingIssueNote.cs | 2 +- .../CoatingMaterialRequest.cs | 2 +- 6 files changed, 6 insertions(+), 91 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs index 60b9b5dc9..2d61113ec 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs @@ -8,7 +8,7 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; /// 发料任务 /// [Display(Name = "发料任务")] -public class CoatingIssueJobDTO : SfsJobDTOBase +public class CoatingIssueJobDTO : SfsJobDTOBase { /// /// 叫料请求类型 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 58d7403ad..3d7d19faf 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 @@ -16,7 +16,7 @@ using Win_in.Sfs.Wms.Store.Application; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain.Shared; -namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobs; +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; [Authorize] [Route($"{StoreConsts.RootPath}coatingissue-job")] @@ -171,7 +171,6 @@ public class CoatingIssueJobAppService var detail = job.Details.FirstOrDefault(p => p.RecommendPackingCode == input.FromPackingCode); /*&& p.HandledQty == input.FromQty*/ if (detail == null) { - //throw new UserFriendlyException($"根据HandledPackingCode={input.FromPackingCode}取CoatingIssueJobDetail表为空!"); throw new UserFriendlyException($"根据RecommendPackingCode={input.FromPackingCode}取CoatingIssueJobDetail表为空!"); } //插入目标箱 @@ -192,89 +191,5 @@ public class CoatingIssueJobAppService } - /* - /// - /// - /// - /// - /// - [HttpPost("accept")] - public override async Task AcceptAsync(string jobNumber) - { - var input = new IssueJobCheckInput - { - JobStatuses = new List() { EnumJobStatus.New }, - }; - var dto = await CheckAsync(jobNumber, input); - await _issueJobManager.AcceptAsync(dto.Id, CurrentUser.Id ?? Guid.Empty); - - } - - /// - /// 执行任务时,修改实际数量 - /// - /// - /// - - [HttpPost("handle")] - public override async Task HandleAsync(IssueJobDTO dto) - { - var input = new IssueJobCheckInput - { - JobStatuses = new List() { EnumJobStatus.Pending }, - }; - - await CheckAsync(dto.Number, input); - - var entity = ObjectMapper.Map(dto); - await _issueJobManager.HandleAsync(entity, CurrentUser.Id ?? Guid.Empty); - } - - [HttpPost("check")] - public override async Task CheckAsync(string jobNumber, IssueJobCheckInput input) - { - var result = new AbpValidationResult(); - _issueJobManager.CheckFormat(jobNumber); - var dto = await GetByNumberAsync(jobNumber); - var entity = ObjectMapper.Map(dto); - _issueJobManager.CheckJobStatus(entity, input.JobStatuses, result); - _issueJobManager.CheckDetails(entity, result); - //TODO 添加其它校验 - if (result.Errors.Any()) - { - throw new AbpValidationException(result.Errors); - } - - return dto; - } - */ - - ///// - ///// 临时解决方案 解决创建补料的订阅事件无法返回错误信息的问题 - ///// - ///// - ///// - //[Authorize(IssueJobPermissions.Create)] - //[HttpPost("create-by-eto")] - //public virtual async Task CreateByEtoAsync(MaterialRequestHandledETO materialRequestHandledETO) - //{ - // await _issueJobManager.AddByEtoAsync(materialRequestHandledETO); - - // return new MaterialRequestHandledETO(); - //} - - ///// - ///// 临时解决方案 解决创建补料的订阅事件无法返回错误信息的问题 - ///// - ///// - ///// - //[Authorize(IssueJobPermissions.Create)] - //[HttpPost("create-by-eto2")] - //public virtual async Task CreateByEtoAsync2(MaterialRequestHandledETO materialRequestHandledETO) - //{ - // await _issueJobManager.TestError(); - - // return new IssueJobDTO(); - //} list-by } 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 8afa04e00..f95ca5eae 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 @@ -16,7 +16,7 @@ using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Notes.IssueNotes; -namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNotes; +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; [Authorize] [Route($"{StoreConsts.RootPath}coatingissue-note")] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs index 44f632c29..d6ce0f0fa 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs @@ -1,7 +1,7 @@ using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Wms.Store.Notes.IssueNotes; -using Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNotes; + namespace Win_in.Sfs.Wms.Store.Application; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs index 9a38b4d86..566be6629 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs @@ -8,7 +8,7 @@ using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; /// -/// 发料记录 +/// 喷涂叫料申请 /// public class CoatingIssueNote : SfsStoreAggregateRootBase, IHasJobNumber, IHasRequestNumber { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs index 4b78a9ab3..cd89d4c7a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs @@ -18,7 +18,7 @@ public class CoatingMaterialRequest : SfsStoreRequestAggregateRootBase - /// 备料计划单号 + /// 喷涂要料计划单号 /// [IgnoreUpdate] public string PreparationPlanNumber { get; set; } From 931709fdf74eba93493d6a5a4acdc14918b81bdc Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Thu, 28 Mar 2024 10:41:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StoreDbContextModelCreatingExtensions.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs index 999c52712..a69e04391 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs @@ -28,27 +28,21 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigurePurchaseOrder(options); builder.ConfigureSaleOrder(options); builder.ConfigureWorkOrder(options); - builder.ConfigureEquipmentRecord(options); //builder.ConfigureEquipmentLocCap(options); - - #endregion #region Plans - builder.ConfigureProductionPlan(options); builder.ConfigurePreparationPlan(options); builder.ConfigureDeliverPlan(options); builder.ConfigureCountPlan(options); builder.ConfigureSupplierAsn(options); builder.ConfigureCustomerAsn(options); - #endregion #region Requests - builder.ConfigureItemTransformRequest(options); builder.ConfigureTransferRequest(options); builder.ConfigureTransferLibRequest(options); @@ -71,11 +65,9 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureCoatingIssueNote(options); builder.ConfigureCoatingMaterialRequest(options); builder.ConfigureCoatingIssueJob(options); - #endregion #region Notes - builder.ConfigureItemTransformNote(options); builder.ConfigureRecycledMaterialReceiptNote(options); builder.ConfigureTransferNote(options); @@ -111,7 +103,6 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureNoOkConvertOKNote(options); builder.ConfigureInventoryInitialNote(options); builder.ConfigureWipWarehouseAdjustNote(options); - #endregion #region Jobs