diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs index 79ff81b08..a7210b64c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs @@ -5,10 +5,14 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Volo.Abp; using Volo.Abp.Caching; +using Volo.Abp.Domain.Repositories; +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.Shared.Domain.Shared; namespace Win_in.Sfs.Basedata.Application; @@ -35,6 +39,33 @@ public class ItemContainerAppService _manager = manager; } + /// + /// 用来重写 新增实体 + /// + /// + /// + /// + [HttpPost("")] + [UnitOfWork] + public override async Task CreateAsync(ItemContainerEditInput input) + { + var existEntity = await _repository.FirstOrDefaultAsync(p=>p.ContainerCode==input.ContainerCode).ConfigureAwait(false); + if (existEntity != null) + { + throw new UserFriendlyException($"{input.ContainerCode} 已存在"); + } + + var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); + Check.NotNull(itemBasic, "物品代码", $"物品 {input.ItemCode} 不存在"); + if(itemBasic != null) + { + input.BasicUom = itemBasic.BasicUom; + } + + + return await base.CreateAsync(input).ConfigureAwait(false); + } + [HttpPost("upsert")] public virtual async Task UpsertAsync(ItemContainerEditInput input) { diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs index 2ca7b36ab..1748f2fcf 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs @@ -67,6 +67,22 @@ public enum EnumTransSubType [Display(Name = "客户库位调拨(客户储位调拨)")] Transfer_Customer = 3105, + /// + /// 注塑完工转储 + /// + [Display(Name = "注塑完工转储")] + Transfer_Injection = 3106, + /// + /// 喷涂完工转储 + /// + [Display(Name = "喷涂完工转储")] + Transfer_Coating = 3107, + /// + /// 装配完工转储 + /// + [Display(Name = "装配完工转储")] + Transfer_Assemble = 3108, + /// /// 客户库位调拨(客户储位调拨) /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferNotes/ITransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferNotes/ITransferNoteAppService.cs index aceb3662a..515522c31 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferNotes/ITransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferNotes/ITransferNoteAppService.cs @@ -87,4 +87,7 @@ public interface ITransferNoteAppService : /// /// Task SplitPacking_IssueAsync(TransferNoteEditInput transferNoteEditInput, SplitPacking_UpdateJobDetailInput updateJobDetailInput); + Task> GetInjectionTransferListAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, CancellationToken cancellationToken = default); + Task> GetCoatingTransferListAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, CancellationToken cancellationToken = default); + Task> GetAssembleTransferListAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, CancellationToken cancellationToken = default); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index 2848d8650..0e2505fc9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -261,7 +261,30 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Inside, includeDetails, cancellationToken).ConfigureAwait(false); } - + [HttpPost("get-Injection-list")] + public virtual async Task> GetInjectionTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Injection, includeDetails, + cancellationToken).ConfigureAwait(false); + } + [HttpPost("get-coating-list")] + public virtual async Task> GetCoatingTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Coating, includeDetails, + cancellationToken).ConfigureAwait(false); + } + [HttpPost("get-assemble-list")] + public virtual async Task> GetAssembleTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Assemble, includeDetails, + cancellationToken).ConfigureAwait(false); + } /// /// 按条件获取客户储位间调拨的分页列表 /// request sample diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs index 74e382612..a841c2f0f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs @@ -144,7 +144,7 @@ public class PurchaseOrderAppService : var closeItemCode= input.Details.Select(r=>r.ItemCode).ToList(); foreach (var detail in olditem.Details) { - if (closeItemCode.Contains(detail.ItemCode)) + if (closeItemCode.Contains(detail.ItemCode)&& detail.PutAwayQty==0) { detail.LineStatus = EnumOrderStatus.Close; } @@ -266,6 +266,7 @@ public class PurchaseOrderAppService : [HttpPost("{id}/detail/close/{detailId}")] public virtual async Task CloseDetailAsync(Guid id, Guid detailId) { + await _purchaseOrderManager.CloseDetailAsync(id, detailId).ConfigureAwait(false); }