From 84f3655d820a9e42f2caff1f3ed117678a88e7b9 Mon Sep 17 00:00:00 2001 From: cjy Date: Sat, 12 Oct 2024 17:19:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=B6-=E8=BF=94=E5=9B=9E=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Op/Dtos/SeaExportCopyRes.cs | 7 ++++++- .../DS.WMS.Core/Op/Method/SeaExportService.cs | 18 ++++++++++++++++-- .../Controllers/SeaExportController.cs | 13 ++++++++++++- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportCopyRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportCopyRes.cs index ed9fa5d8..1cef0495 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportCopyRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportCopyRes.cs @@ -1,4 +1,5 @@ -using System; +using DS.WMS.Core.Fee.Dtos; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,5 +12,9 @@ namespace DS.WMS.Core.Op.Dtos /// public class SeaExportCopyRes: SeaExportRes { + /// + /// 费用记录 + /// + public List FeeList { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs index 10fffb8f..b26cebca 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -11,6 +11,7 @@ using DS.Module.SqlSugar; using DS.Module.UserModule; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Code.Entity; +using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Fee.Entity; using DS.WMS.Core.HangfireJob.Interface; using DS.WMS.Core.Info.Entity; @@ -1052,10 +1053,23 @@ public partial class SeaExportService : ISeaExportService item.BusinessId = 0; } } - if (template.IsNotNull()) + if (req.IsCopyFee) { - + var fees = await tenantDb.Queryable().Where(x => x.BusinessId == id).ToListAsync(); + if (fees.IsNotNull() && fees.Count > 0) + { + foreach (var item in fees) + { + item.Id = 0; + item.BusinessId = 0; + } + data.FeeList = fees.Adapt>(); + } } + //if (template.IsNotNull()) + //{ + + //} return await Task.FromResult(DataResult.Success("复制成功!", data, MultiLanguageConst.DataCopySuccess)); } #endregion diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs index df117f0b..7a53b8bb 100644 --- a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs +++ b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs @@ -88,7 +88,18 @@ public class SeaExportController : ApiController var res = await _invokeService.EditSeaExport(req); return res; } - + /// + /// 业务单据复制-返回前端 + /// + /// + /// + [HttpPost] + [Route("GetSeaExportCopyInfo")] + public async Task> GetSeaExportCopyInfo([FromBody] SeaExportCopyReq req) + { + var res = await _invokeService.GetSeaExportCopyInfo(req); + return res; + } /// /// 详情 ///