From 1b2d845b283094447ea317f5b5710d2d8ed0d113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Mon, 23 Sep 2024 11:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E5=BC=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Invoice/Dtos/InvoiceRequest.cs | 9 +- .../Invoice/Interface/IFreeInvoiceService.cs | 9 +- .../Invoice/Method/FreeInvoiceService.cs | 20 +- .../Invoice/Method/InvoiceService`1.cs | 319 ++++++++++-------- .../Settlement/Method/SettlementService`1.cs | 33 +- .../Controllers/FreeInvoiceController.cs | 15 +- .../Controllers/GeneralInvoiceController.cs | 2 + .../FolderProfile1.pubxml.user | 2 +- 8 files changed, 250 insertions(+), 159 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs b/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs index abd55f48..54905990 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs @@ -8,7 +8,7 @@ namespace DS.WMS.Core.Invoice.Dtos public class InvoiceRequest where TEntity : Entity.Invoice { /// - /// 发票 + /// 发票主体 /// public TEntity Invoice { get; set; } @@ -18,7 +18,12 @@ namespace DS.WMS.Core.Invoice.Dtos public List? Applications { get; set; } /// - /// 发票费用明细 + /// 按业务自由开票 + /// + public List? BizList { get; set; } + + /// + /// 按费用自由开票 /// public List? Details { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs b/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs index 8977f171..49750950 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs @@ -22,6 +22,13 @@ namespace DS.WMS.Core.Invoice.Interface /// 业务ID与业务类型 /// Task> GetFeesAsync(params FeeClient[] items); - + + /// + /// 根据业务编号及类型获取该票业务的币别 + /// + /// 业务ID与业务类型 + /// + Task> GetCurrenciesAsync(params FeeClient[] items); + } } diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs b/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs index 42b572cd..605fdb21 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs @@ -122,7 +122,7 @@ namespace DS.WMS.Core.Invoice.Method /// /// 业务ID与业务类型 /// - public async Task> GetFeesAsync(params FeeClient[] items) + public override async Task> GetFeesAsync(params FeeClient[] items) { var bizIds = items.Select(x => x.Id).Distinct(); var types = items.Select(x => x.BusinessType).Distinct(); @@ -156,6 +156,24 @@ namespace DS.WMS.Core.Invoice.Method return DataResult.Success(new InvoiceApplicaitonBiz(list)); } + /// + /// 根据业务编号及类型获取该票业务的币别 + /// + /// 业务ID与业务类型 + /// + public async Task> GetCurrenciesAsync(params FeeClient[] items) + { + var bizIds = items.Select(x => x.Id).Distinct(); + var types = items.Select(x => x.BusinessType).Distinct(); + var cIds = items.Select(x => x.CustomerId).Distinct(); + + var currencies = await TenantDb.Queryable() + .Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) && + AllowedStatus.Contains(f.FeeStatus)) + .Select(f => f.Currency).Distinct().ToArrayAsync(); + + return DataResult.Success(currencies); + } protected override async Task PreSaveAsync(Entity.Invoice invoice) { diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs b/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs index 5cf3bbde..44876a7d 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs @@ -10,6 +10,7 @@ using DS.WMS.Core.Invoice.Dtos; using DS.WMS.Core.Invoice.Interface; using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Interface; +using Mapster; using Microsoft.Extensions.DependencyInjection; using SqlSugar; @@ -157,6 +158,17 @@ namespace DS.WMS.Core.Invoice.Method return DataResult.Success(invoice); } + /// + /// 根据业务编号及类型获取费用记录 + /// + /// 业务ID与业务类型 + /// + public virtual Task> GetFeesAsync(params FeeClient[] items) + { + return Task.FromResult(DataResult.Success( + new InvoiceApplicaitonBiz(new List()))); + } + #pragma warning disable CS4014 @@ -191,176 +203,191 @@ namespace DS.WMS.Core.Invoice.Method invoice.OperatorId ??= long.Parse(User.UserId); - //按发票申请 - if (request.Applications != null && request.Applications.Count > 0) + if (request.Invoice.Mode == InvoiceMode.Applcation && request.Applications != null && request.Applications.Count > 0) //发票申请开出 { var ids = request.Applications.Select(x => x.ApplicationId); - var details = await TenantDb.Queryable() - .InnerJoin((x, y) => x.ApplicationId == y.Id) - .LeftJoin((x, y, z) => y.CustomerId == z.ClientId && z.Currency == invoice.Currency && z.IsInvoiceDefault == true) - .Where((x, y, z) => ids.Contains(x.ApplicationId) && x.Category == DetailCategory.InvoiceApplication) - .Select((x, y, z) => new - { - x.Id, - x.ApplicationId, - x.RecordId, - x.CustomerName, - x.FeeId, - x.FeeType, - x.FeeName, - x.ApplyAmount, - x.OriginalAmount, - x.Currency, - x.OriginalCurrency, - x.ProcessedAmount, - x.OriginalProcessedAmount, - - y.CustomerId, - y.TaxRate, - y.TaxID, - y.InvoiceHeader, - y.CustomerAddTel, - y.SaleDeptId, - y.PushMode, - y.CellPhoneNO, - y.Email, - - z.BankAccountNo, - z.BankName - }).ToListAsync(); - - //税率不一致 - if (details.GroupBy(x => x.TaxRate).Select(x => x.Key).Count() > 1) - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InvoiceCustomerOnlyOne)); - - invoice.Details ??= new List(details.Count); - foreach (var item in details) + if (request.Invoice.Mode == InvoiceMode.Applcation) //按发票申请 { - if (invoice.CustomerId == 0) - { - invoice.CustomerId = item.CustomerId; - invoice.CustomerName = item.CustomerName; - invoice.TaxRate = item.TaxRate; - invoice.InvoiceHeader = item.InvoiceHeader; - invoice.CustomerTaxID = item.TaxID; - invoice.CustomerAddressTel = item.CustomerAddTel; - invoice.CustomerAccount = item.BankAccountNo; - invoice.CustomerBankName = item.BankName; - invoice.SaleDeptId = item.SaleDeptId; - invoice.PushMode = item.PushMode; - invoice.CellPhoneNO = item.CellPhoneNO; - invoice.Email = item.Email; - } - else if (invoice.CustomerId != item.CustomerId) //校验开票单位是否一致 - { - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InvoiceCustomerOnlyOne)); - } - else if (invoice.TaxRate != item.TaxRate) //校验税率是否一致 - { - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InconsistentTaxRates)); - } + var details = await TenantDb.Queryable() + .InnerJoin((x, y) => x.ApplicationId == y.Id) + .LeftJoin((x, y, z) => y.CustomerId == z.ClientId && z.Currency == invoice.Currency && z.IsInvoiceDefault == true) + .Where((x, y, z) => ids.Contains(x.ApplicationId) && x.Category == DetailCategory.InvoiceApplication) + .Select((x, y, z) => new + { + x.Id, + x.ApplicationId, + x.RecordId, + x.CustomerName, + x.FeeId, + x.FeeType, + x.FeeName, + x.ApplyAmount, + x.OriginalAmount, + x.Currency, + x.OriginalCurrency, + x.ProcessedAmount, + x.OriginalProcessedAmount, + + y.CustomerId, + y.TaxRate, + y.TaxID, + y.InvoiceHeader, + y.CustomerAddTel, + y.SaleDeptId, + y.PushMode, + y.CellPhoneNO, + y.Email, + + z.BankAccountNo, + z.BankName + }).ToListAsync(); - //需转换为费用明细 - var detail = new ApplicationDetail - { - ApplicationId = invoice.Id, - RefId = item.ApplicationId, - DetailId = item.Id, - RecordId = item.RecordId, - Category = DetailCategory.InvoiceIssuance, - CustomerName = item.CustomerName, - FeeId = item.FeeId, - FeeName = item.FeeName, - FeeType = item.FeeType, - Currency = invoice.Currency, - OriginalCurrency = item.Currency, - ApplyAmount = item.ApplyAmount - item.ProcessedAmount, - OriginalAmount = item.OriginalAmount - item.OriginalProcessedAmount - }; + //税率不一致 + if (details.GroupBy(x => x.TaxRate).Select(x => x.Key).Count() > 1) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InconsistentTaxRates)); - var app = request.Applications.Find(x => x.ApplicationId == item.ApplicationId); - if (app != null) + invoice.Details ??= new List(details.Count); + foreach (var item in details) { - if (app.Currency == invoice.Currency) + if (invoice.CustomerId == 0) { - detail.ExchangeRate = 1m; + invoice.CustomerId = item.CustomerId; + invoice.CustomerName = item.CustomerName; + invoice.TaxRate = item.TaxRate; + invoice.InvoiceHeader = item.InvoiceHeader; + invoice.CustomerTaxID = item.TaxID; + invoice.CustomerAddressTel = item.CustomerAddTel; + invoice.CustomerAccount = item.BankAccountNo; + invoice.CustomerBankName = item.BankName; + invoice.SaleDeptId = item.SaleDeptId; + invoice.PushMode = item.PushMode; + invoice.CellPhoneNO = item.CellPhoneNO; + invoice.Email = item.Email; } - else if (string.IsNullOrEmpty(app.Currency)) //原币申请 + else if (invoice.CustomerId != item.CustomerId) //校验开票单位是否一致 { - detail.ExchangeRate = app.ExchangeRates.FirstOrDefault( - x => x.Currency == invoice.Currency)?.ExchangeRate; + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InvoiceCustomerOnlyOne)); } - else + else if (invoice.TaxRate != item.TaxRate) //校验税率是否一致 { - detail.ExchangeRate = app.ExchangeRates.FirstOrDefault( - x => x.Currency == invoice.Currency)?.ExchangeRate; + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InconsistentTaxRates)); } - } - if (!detail.ExchangeRate.HasValue) - detail.ExchangeRate = 1m; + //需转换为费用明细 + var detail = new ApplicationDetail + { + ApplicationId = invoice.Id, + RefId = item.ApplicationId, + DetailId = item.Id, + RecordId = item.RecordId, + Category = DetailCategory.InvoiceIssuance, + CustomerName = item.CustomerName, + FeeId = item.FeeId, + FeeName = item.FeeName, + FeeType = item.FeeType, + Currency = invoice.Currency, + OriginalCurrency = item.Currency, + ApplyAmount = item.ApplyAmount - item.ProcessedAmount, + OriginalAmount = item.OriginalAmount - item.OriginalProcessedAmount + }; + + var app = request.Applications.Find(x => x.ApplicationId == item.ApplicationId); + if (app != null) + { + if (app.Currency == invoice.Currency) + { + detail.ExchangeRate = 1m; + } + else if (string.IsNullOrEmpty(app.Currency)) //原币申请 + { + detail.ExchangeRate = app.ExchangeRates.FirstOrDefault( + x => x.Currency == invoice.Currency)?.ExchangeRate; + } + else + { + detail.ExchangeRate = app.ExchangeRates.FirstOrDefault( + x => x.Currency == invoice.Currency)?.ExchangeRate; + } + } + + if (!detail.ExchangeRate.HasValue) + detail.ExchangeRate = 1m; - if (detail.ExchangeRate.HasValue) - detail.ApplyAmount = detail.ApplyAmount * detail.ExchangeRate.Value; + if (detail.ExchangeRate.HasValue) + detail.ApplyAmount = detail.ApplyAmount * detail.ExchangeRate.Value; - invoice.Details.Add(detail); + invoice.Details.Add(detail); + } } } - //自由申请 - if (request.Details?.Count > 0) + else if (request.Invoice.Mode == InvoiceMode.Free) //自由开票 { - if (invoice.Id == 0 && invoice.CustomerId == 0) + if (request.BizList?.Count > 0) { - var first = request.Details[0]; - invoice.CustomerId = first.CustomerId; - invoice.CustomerName = first.CustomerName; + var result2 = await GetFeesAsync([.. request.BizList]); + if (result2.Data != null) + { + request.Details ??= []; + foreach (var item in result2.Data.Items) + request.Details.Add(item.Adapt()); + } } - var ids = request.Details.Select(x => x.RecordId).Distinct(); - var fees = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select(x => new { x.Id, x.TaxRate }).ToListAsync(); - //税率不一致 - if (fees.GroupBy(x => x.TaxRate).Select(x => x.Key).Count() > 1 || (invoice.Id > 0 && invoice.TaxRate != fees[0].TaxRate)) - return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InvoiceCustomerOnlyOne)); - - //将请求明细转换为数据库的费用明细 - invoice.Details = request.Details.Select(x => new ApplicationDetail + if (request.Details?.Count > 0) { - Id = x.Id, - ApplicationId = x.ApplicationId == 0 ? x.ApplicationId : invoice.Id, - RefId = x.RefId, - DetailId = x.Id == 0 ? null : x.Id, - RecordId = x.RecordId, - Category = DetailCategory.InvoiceIssuance, - CustomerName = x.CustomerName ?? invoice.CustomerName, - FeeId = x.FeeId, - FeeName = x.FeeName, - FeeType = x.FeeType, - Currency = x.Currency, - ApplyAmount = x.ApplyAmount, - ExchangeRate = x.ExchangeRate, - OriginalAmount = x.OriginalAmount, - OriginalCurrency = x.OriginalCurrency ?? (invoice.Currency.IsNullOrEmpty() ? x.Currency : invoice.Currency), - }).ToList(); + if (invoice.Id == 0 && invoice.CustomerId == 0) + { + var first = request.Details[0]; + invoice.CustomerId = first.CustomerId; + invoice.CustomerName = first.CustomerName; + } - //补充购方信息 - invoice.CustomerTaxID = await TenantDb.Queryable().Where(x => x.Id == invoice.CustomerId).Select(x => x.TaxNo).FirstAsync(); - var header = await TenantDb.Queryable().Where(x => x.RelativeId == invoice.CustomerId) - .OrderByDescending(x => x.Id).FirstAsync(); - if (header != null) - { - invoice.InvoiceHeader = header.Header; - invoice.CustomerAddressTel = header.AddressTel; - } - var clientBank = await TenantDb.Queryable().Where(x => x.ClientId == invoice.CustomerId && x.Currency == invoice.Currency) - .OrderByDescending(x => x.IsInvoiceDefault).Select(x => new + var ids = request.Details.Select(x => x.RecordId).Distinct(); + var fees = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select(x => new { x.Id, x.TaxRate }).ToListAsync(); + //税率不一致 + if (fees.GroupBy(x => x.TaxRate).Select(x => x.Key).Count() > 1 || (invoice.Id > 0 && invoice.TaxRate != fees[0].TaxRate)) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.InconsistentTaxRates)); + + //将请求明细转换为数据库的费用明细 + invoice.Details = request.Details.Select(x => new ApplicationDetail { - x.Account, - x.BankName - }).FirstAsync(); - if (clientBank != null) - { - invoice.CustomerAccount = clientBank.Account; - invoice.CustomerBankName = clientBank.BankName; + Id = x.Id, + ApplicationId = x.ApplicationId == 0 ? x.ApplicationId : invoice.Id, + RefId = x.RefId, + DetailId = x.Id == 0 ? null : x.Id, + RecordId = x.RecordId, + Category = DetailCategory.InvoiceIssuance, + CustomerName = x.CustomerName ?? invoice.CustomerName, + FeeId = x.FeeId, + FeeName = x.FeeName, + FeeType = x.FeeType, + Currency = x.Currency, + ApplyAmount = x.ApplyAmount, + ExchangeRate = x.ExchangeRate, + OriginalAmount = x.OriginalAmount, + OriginalCurrency = x.OriginalCurrency ?? (invoice.Currency.IsNullOrEmpty() ? x.Currency : invoice.Currency), + }).ToList(); + + //补充购方信息 + invoice.CustomerTaxID = await TenantDb.Queryable().Where(x => x.Id == invoice.CustomerId).Select(x => x.TaxNo).FirstAsync(); + var header = await TenantDb.Queryable().Where(x => x.RelativeId == invoice.CustomerId) + .OrderByDescending(x => x.Id).FirstAsync(); + if (header != null) + { + invoice.InvoiceHeader = header.Header; + invoice.CustomerAddressTel = header.AddressTel; + } + var clientBank = await TenantDb.Queryable().Where(x => x.ClientId == invoice.CustomerId && x.Currency == invoice.Currency) + .OrderByDescending(x => x.IsInvoiceDefault).Select(x => new + { + x.Account, + x.BankName + }).FirstAsync(); + if (clientBank != null) + { + invoice.CustomerAccount = clientBank.Account; + invoice.CustomerBankName = clientBank.BankName; + } } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs b/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs index 5d5d8d22..c57efa59 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Method/SettlementService`1.cs @@ -66,6 +66,7 @@ namespace DS.WMS.Core.Settlement.Method if (!result.Succeeded) return DataResult.Failed(result.Message, result.MultiCode); + List? details1 = null; //自由结算 if (request.Details?.Count > 0) { @@ -76,7 +77,7 @@ namespace DS.WMS.Core.Settlement.Method settlement.CustomerName = first.CustomerName; } - var details1 = request.Details.Select(x => new ApplicationDetail + details1 = request.Details.Select(x => new ApplicationDetail { RefId = x.ApplicationId, DetailId = x.Id, @@ -91,7 +92,6 @@ namespace DS.WMS.Core.Settlement.Method OriginalAmount = x.OriginalAmount, OriginalCurrency = x.OriginalCurrency ?? (settlement.Currency.IsNullOrEmpty() ? x.Currency : settlement.Currency), }).ToList(); - settlement.Details.AddRange(details1); } //按付费/发票申请结算 @@ -104,14 +104,31 @@ namespace DS.WMS.Core.Settlement.Method settlement.CustomerName = first.CustomerName; } + var ids = request.Documents.Select(x => x.Id); + + //收/付费申请结算 if (settlement.Mode == SettlementMode.Payment || settlement.Mode == SettlementMode.Charge) { - + details1 = await TenantDb.Queryable().Where(x => ids.Contains(x.ApplicationId) && x.Category == DetailCategory.PaidApplication) + .Select(x => new ApplicationDetail + { + RefId = x.ApplicationId, + DetailId = x.Id, + RecordId = x.RecordId, + CustomerName = x.CustomerName ?? settlement.CustomerName, + FeeId = x.FeeId, + FeeName = x.FeeName, + FeeType = x.FeeType, + ApplyAmount = x.ApplyAmount - x.SettlementAmount, + Currency = x.Currency, + ExchangeRate = x.ExchangeRate, + OriginalAmount = x.OriginalAmount, + }).ToListAsync(); } + //发票申请结算 else if (settlement.Mode == SettlementMode.InvoiceSettlement || settlement.Mode == SettlementMode.PaymentInvoiceSettlement) { - var ids = request.Documents.Select(x => x.Id); - var details1 = await TenantDb.Queryable().Where(x => ids.Contains(x.ApplicationId) && x.Category == DetailCategory.InvoiceApplication) + details1 = await TenantDb.Queryable().Where(x => ids.Contains(x.ApplicationId) && x.Category == DetailCategory.InvoiceApplication) .Select(x => new ApplicationDetail { RefId = x.ApplicationId, @@ -121,16 +138,18 @@ namespace DS.WMS.Core.Settlement.Method FeeId = x.FeeId, FeeName = x.FeeName, FeeType = x.FeeType, - //ApplyAmount = x.ApplyAmount - , + ApplyAmount = x.ApplyAmount - x.SettlementAmount, Currency = x.Currency, ExchangeRate = x.ExchangeRate, OriginalAmount = x.OriginalAmount, }).ToListAsync(); } - } + if (details1 != null && details1.Count > 0) + settlement.Details.AddRange(details1); + //金额禁止为0 if (settlement.Details.Exists(x => x.ApplyAmount == 0 || x.OriginalAmount == 0)) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero)); diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs index 5570b8ce..57710646 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs @@ -1,4 +1,5 @@ using DS.Module.Core; +using DS.Module.Core.Enums; using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Invoice.Dtos; @@ -57,17 +58,29 @@ namespace DS.WMS.FeeApi.Controllers return await _service.GetFeesAsync(items); } + /// + /// 根据业务编号及类型获取该票业务的币别 + /// + /// 业务ID与业务类型 + /// + [HttpPost, Route("GetCurrencies")] + public async Task> GetCurrenciesAsync([FromBody] params FeeClient[] items) + { + return await _service.GetCurrenciesAsync(items); + } + /// /// 提交发票开票 /// /// 请求参数 /// [HttpPost, Route("Save")] - public async Task> SaveAsync(InvoiceRequest request) + public async Task> SaveAsync([FromBody] InvoiceRequest request) { if (!ModelState.IsValid) return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest); + request.Invoice.Mode = InvoiceMode.Free; return await _service.SaveAsync(request); } } diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/GeneralInvoiceController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/GeneralInvoiceController.cs index d6f2da30..78a8cdc0 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/GeneralInvoiceController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/GeneralInvoiceController.cs @@ -1,5 +1,6 @@ using DS.Module.Core; using DS.Module.Core.Data; +using DS.Module.Core.Enums; using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Invoice.Dtos; using DS.WMS.Core.Invoice.Entity; @@ -84,6 +85,7 @@ namespace DS.WMS.FeeApi.Controllers if (!ModelState.IsValid) return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest); + request.Invoice.Mode = InvoiceMode.Applcation; return await _service.SaveAsync(request); } diff --git a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index 1fb5b57f..64fc18a3 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>D:\Publish\DS8\FeeApi - True|2024-09-21T03:59:19.0549926Z||;True|2024-09-21T11:24:32.4451752+08:00||;True|2024-09-21T10:39:11.5297411+08:00||;True|2024-09-20T18:24:31.7827684+08:00||;True|2024-09-19T17:55:53.1666689+08:00||;True|2024-09-19T17:42:47.9061485+08:00||;True|2024-09-19T16:08:21.7225571+08:00||;False|2024-09-19T14:15:42.9318446+08:00||;True|2024-09-19T11:20:03.5567568+08:00||;True|2024-09-18T11:35:18.1509724+08:00||;True|2024-09-18T09:08:59.1152574+08:00||;True|2024-09-14T15:48:22.9374486+08:00||;True|2024-09-14T15:42:19.0503983+08:00||;True|2024-09-14T11:51:53.3339222+08:00||;True|2024-09-14T11:41:38.3542237+08:00||;True|2024-09-14T11:19:13.1037012+08:00||;True|2024-09-13T14:31:12.4598160+08:00||;True|2024-09-13T10:44:56.1241214+08:00||;False|2024-09-13T10:44:26.6088271+08:00||;False|2024-09-13T10:44:06.1615137+08:00||;False|2024-09-13T10:43:19.2432517+08:00||;False|2024-09-13T10:38:18.1663387+08:00||;True|2024-09-06T18:49:17.9435308+08:00||;True|2024-09-06T17:01:39.6646353+08:00||;True|2024-09-06T10:27:36.9990456+08:00||;True|2024-09-06T09:48:23.4236094+08:00||;True|2024-09-05T13:57:23.8452431+08:00||;True|2024-09-05T10:21:34.6675149+08:00||;True|2024-09-05T09:12:44.5610882+08:00||;True|2024-09-04T10:07:38.3707398+08:00||;True|2024-09-04T09:52:47.0574599+08:00||;True|2024-09-03T16:41:23.7516960+08:00||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||; + True|2024-09-23T01:24:36.0732229Z||;True|2024-09-21T11:59:19.0549926+08:00||;True|2024-09-21T11:24:32.4451752+08:00||;True|2024-09-21T10:39:11.5297411+08:00||;True|2024-09-20T18:24:31.7827684+08:00||;True|2024-09-19T17:55:53.1666689+08:00||;True|2024-09-19T17:42:47.9061485+08:00||;True|2024-09-19T16:08:21.7225571+08:00||;False|2024-09-19T14:15:42.9318446+08:00||;True|2024-09-19T11:20:03.5567568+08:00||;True|2024-09-18T11:35:18.1509724+08:00||;True|2024-09-18T09:08:59.1152574+08:00||;True|2024-09-14T15:48:22.9374486+08:00||;True|2024-09-14T15:42:19.0503983+08:00||;True|2024-09-14T11:51:53.3339222+08:00||;True|2024-09-14T11:41:38.3542237+08:00||;True|2024-09-14T11:19:13.1037012+08:00||;True|2024-09-13T14:31:12.4598160+08:00||;True|2024-09-13T10:44:56.1241214+08:00||;False|2024-09-13T10:44:26.6088271+08:00||;False|2024-09-13T10:44:06.1615137+08:00||;False|2024-09-13T10:43:19.2432517+08:00||;False|2024-09-13T10:38:18.1663387+08:00||;True|2024-09-06T18:49:17.9435308+08:00||;True|2024-09-06T17:01:39.6646353+08:00||;True|2024-09-06T10:27:36.9990456+08:00||;True|2024-09-06T09:48:23.4236094+08:00||;True|2024-09-05T13:57:23.8452431+08:00||;True|2024-09-05T10:21:34.6675149+08:00||;True|2024-09-05T09:12:44.5610882+08:00||;True|2024-09-04T10:07:38.3707398+08:00||;True|2024-09-04T09:52:47.0574599+08:00||;True|2024-09-03T16:41:23.7516960+08:00||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||; \ No newline at end of file