From c31f8d129b7dae62ce381f664cee2eb5bda1468c Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 24 Jul 2024 17:16:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=93=81=E5=8F=91=E8=BF=90=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=A0=E9=99=A4=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDeliverRequestAppService.cs | 1 + .../DeliverRequestAppService.cs | 21 +++++++++++++++++++ .../DeliverRequestFisAppService.cs | 20 ++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs index 82231c58d..c5d3e0e85 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/IDeliverRequestAppService.cs @@ -10,5 +10,6 @@ public interface IDeliverRequestAppService { + Task DeleteByIdAsync(Guid id); Task> HandleListAsync(List ids, string truckNumber); } 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 79afa8653..124ba207e 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 @@ -214,6 +214,27 @@ IItemBasicAppService itemBasicAppService) var dto = ObjectMapper.Map(entity); return dto; } + /// + /// 删除 + /// + /// + /// + [HttpPost("delete-by-id")] + public new async Task DeleteByIdAsync(Guid id) + { + bool result; + try + { + await base.DeleteAsync(id).ConfigureAwait(false); + result = true; + } + catch (Exception) + { + + result = false; + } + return result; + } private async Task SetRequestAutoPropertiesAsync(DeliverRequest entity) { //普通件 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs index 30d437190..bffe6693f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs @@ -56,7 +56,27 @@ public class DeliverRequestFisAppService : _balanceAppService = balanceAppService; _itemBasicAppService = itemBasicAppService; } + /// + /// 删除 + /// + /// + /// + [HttpPost("delete-by-id")] + public new async Task DeleteByIdAsync(Guid id) + { + bool result; + try + { + await base.DeleteAsync(id).ConfigureAwait(false); + result = true; + } + catch (Exception) + { + result = false; + } + return result; + } #region 东阳 private async Task SetRequestAutoPropertiesAsync(DeliverRequest entity)