diff --git a/ds-wms-service/DS.Module.Core/Enums/Settlement.cs b/ds-wms-service/DS.Module.Core/Enums/Settlement.cs index 843ac9fb..f1877ef0 100644 --- a/ds-wms-service/DS.Module.Core/Enums/Settlement.cs +++ b/ds-wms-service/DS.Module.Core/Enums/Settlement.cs @@ -8,28 +8,34 @@ namespace DS.Module.Core.Enums public enum SettlementMode { /// - /// 收费申请+付费申请 + /// 付费申请 /// - [Description("收费申请&付费申请")] - ChargeAndPayment = 1, + [Description("付费申请")] + Payment = 1, + + /// + /// 收费申请 + /// + [Description("收费申请")] + Charge = 2, /// /// 自由结算 /// [Description("自由结算")] - FreeSettlement = 2, + FreeSettlement = 3, /// /// 发票结算 /// [Description("发票结算")] - InvoiceSettlement = 3, + InvoiceSettlement = 4, /// /// 付费发票结算 /// [Description("付费发票结算")] - PaymentInvoiceSettlement = 4 + PaymentInvoiceSettlement = 5 } /// diff --git a/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs b/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs index 9e64b4d0..617eb0da 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs @@ -1,4 +1,5 @@ -using DS.Module.Core; +using System.Runtime.Serialization; +using DS.Module.Core; using DS.WMS.Core.Op.Entity; namespace DS.WMS.Core.Application.Dtos @@ -9,7 +10,7 @@ namespace DS.WMS.Core.Application.Dtos public class ApplicationDetailDto { /// - /// ID + /// 明细ID /// public long Id { get; set; } @@ -98,6 +99,12 @@ namespace DS.WMS.Core.Application.Dtos /// public string? AccountDate { get; set; } + /// + /// 所属分部 + /// + [IgnoreDataMember] + public long? SaleDeptId { get; set; } + /// /// 所属分部 /// @@ -187,6 +194,11 @@ namespace DS.WMS.Core.Application.Dtos /// 订舱编号 /// public string? BookingNo { get; set; } + + /// + /// 备注 + /// + public string? Note { get; set; } } /// @@ -203,6 +215,11 @@ namespace DS.WMS.Core.Application.Dtos /// 未收合计 /// public decimal? OutstandingAmount { get; set; } + + /// + /// 已结算金额 + /// + public decimal SettlementAmount { get; set; } } /// diff --git a/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationBase.cs b/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationBase.cs index 0a425fed..6dbad63b 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationBase.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationBase.cs @@ -13,14 +13,14 @@ namespace DS.WMS.Core.Application.Entity /// /// 申请单编号 /// - [SugarColumn(ColumnDescription = "申请单编号", Length = 20, IsNullable = false)] + [SugarColumn(ColumnDescription = "申请单编号", Length = 50, IsNullable = false)] public string ApplicationNO { get; set; } /// /// 申请单状态 /// [SugarColumn(ColumnDescription = "申请单状态", IsNullable = false)] - public int Status { get; set; } + public virtual int Status { get; set; } /// /// 客户ID diff --git a/ds-wms-service/DS.WMS.Core/Application/Method/ApplicationService`1.cs b/ds-wms-service/DS.WMS.Core/Application/Method/ApplicationService`1.cs index e4450c99..6750c8f0 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Method/ApplicationService`1.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Method/ApplicationService`1.cs @@ -338,6 +338,7 @@ namespace DS.WMS.Core.Application.Method x => new ApplicationDetail { Id = x.Id, + ApplicationId = x.ApplicationId, RecordId = x.RecordId, OriginalAmount = x.OriginalAmount }).ToListAsync(); diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentSettlementDto.cs b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentSettlementDto.cs index 4bd71c2e..cb72eea0 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentSettlementDto.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentSettlementDto.cs @@ -8,6 +8,26 @@ namespace DS.WMS.Core.Settlement.Dtos /// public class PaymentSettlementDto : SettlementDto { + /// + /// 汇率 + /// + public decimal? ExchangeRate { get; set; } + + /// + /// 发票号 + /// + public string? InvoiceNO { get; set; } + + /// + /// 发票日期 + /// + public DateTime? InvoiceDate { get; set; } + + /// + /// 开票金额 + /// + public decimal? InvoiceAmount { get; set; } + /// /// 人民币金额 /// @@ -108,7 +128,7 @@ namespace DS.WMS.Core.Settlement.Dtos /// /// 未开票金额 /// - public string UnInvoiceAmount => string.Join(" ", UnInvoiceList); + public string UnInvoiceAmount => string.Join(" ", UnInvoiceList ?? []); /// /// 是否导出凭证 @@ -129,20 +149,5 @@ namespace DS.WMS.Core.Settlement.Dtos /// 是否生成支票 /// public bool IsGenerateCheck { get; set; } - - /// - /// 发票号 - /// - public string? InvoiceNO { get; set; } - - /// - /// 发票日期 - /// - public DateTime? InvoiceDate { get; set; } - - /// - /// 开票金额 - /// - public decimal? InvoiceAmount { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDetailDto.cs b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDetailDto.cs index 5d2dbba2..67b8b8fe 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDetailDto.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDetailDto.cs @@ -1,20 +1,73 @@ -using DS.WMS.Core.Application.Dtos; +using System.Runtime.Serialization; namespace DS.WMS.Core.Settlement.Dtos { /// /// 结算明细DTO /// - public class SettlementDetailDto : ApplicationDetailDto + public class SettlementDetailDto { + /// + /// 申请明细ID + /// + public IEnumerable Ids { get; set; } + + /// + /// 申请单ID + /// + public long ApplicationId { get; set; } + /// /// 结算金额 /// public decimal SettlementAmount { get; set; } + /// + /// 原始币别 + /// + public string OriginalCurrency { get; set; } + + /// + /// 原始金额 + /// + public decimal OriginalAmount { get; set; } + + /// + /// RMB申请金额 + /// + public decimal? RMBApplyAmount { get; set; } + + /// + /// USD申请金额 + /// + public decimal? USDApplyAmount { get; set; } + + /// + /// 申请日期 + /// + public DateTime? CreateTime { get; set; } + + [IgnoreDataMember] + public long? CreateBy { get; set; } + + /// + /// 申请人 + /// + public string? CreateByName { get; set; } + /// /// 发票号 /// public string? InvoiceNO { get; set; } + + /// + /// 申请支付日期 + /// + public DateTime? PaymentDate { get; set; } + + /// + /// 备注 + /// + public string? Note { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDto.cs b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDto.cs index 1404f803..877200df 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDto.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementDto.cs @@ -181,5 +181,10 @@ namespace DS.WMS.Core.Settlement.Dtos /// 创建日期 /// public DateTime CreateTime { get; set; } + + /// + /// 结算明细 + /// + public List Details { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementRequest.cs b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementRequest.cs index efb80adf..4867771e 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementRequest.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/SettlementRequest.cs @@ -1,4 +1,5 @@ -using DS.WMS.Core.Settlement.Entity; +using DS.WMS.Core.Application.Dtos; +using DS.WMS.Core.Settlement.Entity; namespace DS.WMS.Core.Settlement.Dtos { @@ -15,6 +16,6 @@ namespace DS.WMS.Core.Settlement.Dtos /// /// 申请明细 /// - public List? Details { get; set; } + public List? Details { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Entity/PaymentSettlement.cs b/ds-wms-service/DS.WMS.Core/Settlement/Entity/PaymentSettlement.cs index e4506ed7..ec4a8e74 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Entity/PaymentSettlement.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Entity/PaymentSettlement.cs @@ -1,4 +1,4 @@ -using DS.WMS.Core.Application.Entity; +using System.Runtime.Serialization; using SqlSugar; namespace DS.WMS.Core.Settlement.Entity @@ -10,10 +10,10 @@ namespace DS.WMS.Core.Settlement.Entity public class PaymentSettlement : SettlementBase { /// - /// 继承自,由于付费结算不存在状态,访问此属性将始终引发异常 + /// 由于付费结算不存在状态,已设置取消关联SqlSugar /// - /// 始终引发此异常 - public new int Status => throw new NotSupportedException(); + [IgnoreDataMember, SugarColumn(IsIgnore = true)] + public override int Status { get => base.Status; set => base.Status = value; } /// /// 汇率 @@ -126,5 +126,29 @@ namespace DS.WMS.Core.Settlement.Entity /// [SugarColumn(ColumnDescription = "总账凭证号", IsNullable = true, Length = 50)] public string? LedgerVoucherNO { get; set; } + + /// + /// 相关号码 + /// + [SugarColumn(ColumnDescription = "相关号码", IsNullable = true, Length = 50)] + public string? RelativeNO { get; set; } + + /// + /// 发票号 + /// + [SugarColumn(ColumnDescription = "发票号")] + public string? InvoiceNO { get; set; } + + /// + /// 发票日期 + /// + [SugarColumn(ColumnDescription = "发票日期")] + public DateTime? InvoiceDate { get; set; } + + /// + /// 开票金额 + /// + [SugarColumn(ColumnDescription = "开票金额")] + public decimal? InvoiceAmount { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Interface/IPaymentSettlementService.cs b/ds-wms-service/DS.WMS.Core/Settlement/Interface/IPaymentSettlementService.cs index 94daddeb..2e845b15 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Interface/IPaymentSettlementService.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Interface/IPaymentSettlementService.cs @@ -18,6 +18,13 @@ namespace DS.WMS.Core.Settlement.Interface /// Task>> GetListAsync(PageRequest request); + /// + /// 获取付费结算及其明细 + /// + /// 结算单ID + /// + Task> GetAsync(long id); + /// /// 获取付费申请分页列表 /// @@ -30,6 +37,13 @@ namespace DS.WMS.Core.Settlement.Interface /// /// 申请单ID /// - Task>> GetDetailsAsync(long id); + Task>> GetDetailsAsync(long id); + + /// + /// 提交结算单 + /// + /// + /// + Task> SaveAsync(SettlementRequest request); } } diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Method/PaymentSettlementService.cs b/ds-wms-service/DS.WMS.Core/Settlement/Method/PaymentSettlementService.cs index e185a9a2..78baeb38 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Method/PaymentSettlementService.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Method/PaymentSettlementService.cs @@ -75,8 +75,6 @@ namespace DS.WMS.Core.Settlement.Method IsVoucherDisabled = x.IsVoucherDisabled, //禁用凭证 SaleDeptId = x.SaleDeptId, //所属分部 LedgerVoucherNO = x.LedgerVoucherNO //总账凭证号 - //BillType = x.BillType, //单据类型 - //Category = x.Category, //业务类别 }); var whereList = request.GetConditionalModels(Db); @@ -106,6 +104,128 @@ namespace DS.WMS.Core.Settlement.Method return result; } + /// + /// 获取付费结算及其明细 + /// + /// 结算单ID + /// + public async Task> GetAsync(long id) + { + var model = await TenantDb.Queryable().Select(x => new PaymentSettlementDto + { + Id = x.Id, + ApplicationNO = x.ApplicationNO, //申请编号 + SettlementNO = x.SettlementNO, //结算单号 + CustomerId = x.CustomerId, //结算单位 + CustomerName = x.CustomerName, + Mode = x.Mode, //结算类型 + SettlementDate = x.SettlementDate, //结算日期 + SettlementTypeId = x.SettlementTypeId, //结算方式 + CustomerBankId = x.CustomerBankId, //客户银行 + Account = x.Account, //客户账户 + Currency = x.Currency, //币别 + Amount = x.Amount, //金额 + ExchangeRate = x.ExchangeRate, //汇率 + IsLocked = x.IsLocked, //锁定状态 + SaleDeptId = x.SaleDeptId, //所属分部 + BillType = x.BillType, //单据类型 + Category = x.Category, //业务类别 + LedgerVoucherNO = x.LedgerVoucherNO, //总账凭证号 + RelativeNO = x.RelativeNO, //相关号码 + InvoiceAmount = x.InvoiceAmount, + InvoiceDate = x.InvoiceDate, + InvoiceNO = x.InvoiceNO, + Note = x.Note, //备注 + + AccountAmount = x.AccountAmount, //记账资料 + AccountCurrency = x.AccountCurrency, + AccountRate = x.AccountRate, + PrePayAmount = x.PrePayAmount, //预付支资料 + PrePayCurrency = x.PrePayCurrency, + PrePayRate = x.PrePayRate, + AHSRAmount = x.AHSRAmount, //实收支资料 + AHSRCurrency = x.AHSRCurrency, + AHSRRate = x.AHSRRate, + FinancialAmount = x.FinancialAmount,//财务费用 + FinancialCurrency = x.FinancialCurrency, + FinancialRate = x.FinancialRate, + AdvanceAmount = x.AdvanceAmount, //预收支资料 + AdvanceCurrency = x.AdvanceCurrency, + AdvanceRate = x.AdvanceRate, + }).FirstAsync(); + + if (model != null) + { + var details = await TenantDb.Queryable().Where(d => d.ApplicationId == id) + .LeftJoin((d, pd) => d.DetailId == pd.Id) + .LeftJoin((d, pd, pa) => pd.ApplicationId == pa.Id) + .Select((d, pd, pa) => new + { + d.Id, + d.ApplicationId, + d.ApplyAmount, + //d.Currency, + d.OriginalCurrency, + d.OriginalAmount, + pa.CreateTime, + pa.CreateBy, + pa.PaymentDate, + pa.Note + }).ToListAsync(); + + var gp = details.GroupBy(x => x.ApplicationId); + model.Details = new List(); + foreach (var g in gp) + { + var firstItem = g.FirstOrDefault(); + + var dto = new SettlementDetailDto + { + ApplicationId = g.Key, + Ids = g.Select(x => x.Id), + RMBApplyAmount = g.Where(x => x.OriginalCurrency == RMB_CODE).Sum(x => x.ApplyAmount), + USDApplyAmount = g.Where(x => x.OriginalCurrency == USD_CODE).Sum(x => x.ApplyAmount), + CreateTime = firstItem?.CreateTime, + CreateBy = firstItem?.CreateBy, + PaymentDate = firstItem?.PaymentDate, + Note = firstItem?.Note + }; + + //包含多个币别 + if (g.GroupBy(x => x.OriginalCurrency).Select(x => x.Key).Count() > 1) + { + //原始币别=不等于结算单币别的首个币别(参考DS7) + dto.OriginalCurrency = g.Where(x => x.OriginalCurrency != model.Currency).Select(x => x.OriginalCurrency).FirstOrDefault(); + //原始金额=当前结算单的币别合计 + dto.OriginalAmount = g.Where(x => x.OriginalCurrency == model.Currency).Sum(x => x.ApplyAmount); + } + else + { + dto.OriginalCurrency = firstItem?.OriginalCurrency; + dto.OriginalAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount); + } + + //结算金额=原申请的原始币别合计 + dto.SettlementAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount); + model.Details.Add(dto); + } + + if (model.Details.Count > 0) + { + //关联用户名称 + var userIds = model.Details.Select(x => x.CreateBy).Distinct(); + var users = await Db.Queryable().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync(); + + foreach (var item in model.Details) + { + item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName; + } + } + } + + return DataResult.Success(model); + } + /// /// 获取付费申请分页列表 /// @@ -173,29 +293,29 @@ namespace DS.WMS.Core.Settlement.Method /// /// 申请单ID /// - public async Task>> GetDetailsAsync(long id) + public async Task>> GetDetailsAsync(long id) { var details = await TenantDb.Queryable().Where(d => d.ApplicationId == id && (d.ApplyAmount - d.ProcessedAmount) != 0) .InnerJoin((d, f) => d.RecordId == f.Id) .InnerJoin((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType) - .Select((d, f, b) => new SettlementDetailDto + .Select((d, f, b) => new PaymentApplicationDetailDto { Id = d.Id, ApplicationId = d.ApplicationId, + BusinessId = d.BusinessId, + BusinessType = d.BusinessType, RecordId = d.RecordId, FeeName = d.FeeName, FeeType = d.FeeType, //收付 Amount = d.ApplyAmount, //申请金额 - SettlementAmount = d.ApplyAmount, //结算金额默认=申请金额 + SettlementAmount = f.SettlementAmount, //结算金额 + RestAmount = d.ApplyAmount - d.ProcessedAmount, //剩余结算金额 CustomerId = f.CustomerId, CustomerName = d.CustomerName, OriginalCurrency = d.OriginalCurrency, //原始币别 OriginalRate = f.ExchangeRate, //原始汇率 ExchangeRate = d.ExchangeRate, //折算汇率 - OriginalAmount = d.OriginalAmount, //原始金额 - InvoiceNO = f.InvoiceNO, //发票号 - BusinessId = f.BusinessId, - BusinessType = f.BusinessType + OriginalAmount = d.OriginalAmount //原始金额 }).ToListAsync(); if (details.Count > 0) @@ -221,6 +341,7 @@ namespace DS.WMS.Core.Settlement.Method s.ETD, //开船日期 s.Sale, //揽货人 cs.SourceName, //业务来源 + s.Note }).ToListAsync(); foreach (var item in g) { @@ -236,6 +357,7 @@ namespace DS.WMS.Core.Settlement.Method item.AccountDate = biz.AccountDate; item.Vessel = biz.Vessel; item.Voyage = biz.Voyno; + item.Note = biz.Note; } } break; @@ -246,19 +368,18 @@ namespace DS.WMS.Core.Settlement.Method } } - return DataResult>.Success(details); + return DataResult>.Success(details); } - /// - /// 创建结算单 + /// 提交结算单 /// /// /// - public async Task> CreateAsync(SettlementRequest request) + public async Task> SaveAsync(SettlementRequest request) { - var ids = request.Details.Select(x => x.ApplicationId).Distinct(); - var appList = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)) + var appIds = request.Details.Select(x => x.ApplicationId).Distinct(); + var appList = await TenantDb.Queryable().Where(x => appIds.Contains(x.Id)) .Select(x => new { x.Id, @@ -269,7 +390,7 @@ namespace DS.WMS.Core.Settlement.Method if (appList.Count == 0) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); - if (appList.Exists(x => x.Status != PaymentApplicationStatus.AuditSubmittd && x.Status != PaymentApplicationStatus.PartialSettlement)) + if (appList.Exists(x => x.Status != PaymentApplicationStatus.AuditPassed && x.Status != PaymentApplicationStatus.PartialSettlement)) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSelectStatusError)); if (appList.GroupBy(x => x.CustomerId).Select(x => x.Key).Count() > 1) @@ -279,62 +400,13 @@ namespace DS.WMS.Core.Settlement.Method if (request.Details.Any(x => x.SettlementAmount == 0)) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero)); - StringBuilder sb = new(); - var appDetails = await TenantDb.Queryable().Where(x => ids.Contains(x.ApplicationId)) - .Select(x => new - { - x.Id, - x.ApplicationId, - x.ApplyAmount, - x.BusinessId, - x.BusinessType, - x.Currency, - x.CustomerName, - x.FeeId, - x.FeeName, - x.FeeType, - x.OriginalAmount, - x.OriginalCurrency, - x.ProcessedAmount, - x.OriginalProcessedAmount, - }).ToListAsync(); - foreach (var item in request.Details) - { - var appDetail = appDetails.Find(x => x.Id == item.Id); - decimal restValue = appDetail.ApplyAmount - appDetail.ProcessedAmount; - if (item.SettlementAmount > 0 && item.SettlementAmount > restValue) - { - sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), item.FeeName); - sb.Append(";"); - continue; - } - else if (item.SettlementAmount < 0 && item.SettlementAmount < restValue) - { - sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), item.FeeName); - sb.Append(";"); - continue; - } - } - if (sb.Length > 0) - return DataResult.Failed(sb.ToString()); - - var ids2 = request.Details.Select(x => x.RecordId).Distinct().ToList(); - var fees = await TenantDb.Queryable().Where(x => ids2.Contains(x.Id)).Select(x => new FeeRecord + var ids = request.Details.Select(x => x.RecordId).Distinct().ToList(); + var fees = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select(x => new FeeRecord { Id = x.Id, - //BusinessId = x.BusinessId, - //BusinessType = x.BusinessType, - //FeeId = x.FeeId, - //FeeName = x.FeeName, - //FeeType = x.FeeType, - //CustomerId = x.CustomerId, - //CustomerName = x.CustomerName, - Amount = x.Amount, - //Currency = x.Currency, - //ExchangeRate = x.ExchangeRate, - //OrderAmount = x.OrderAmount, + Currency = x.Currency, OrderSettlementAmount = x.OrderSettlementAmount, - //SettlementAmount = x.SettlementAmount + SettlementAmount = x.SettlementAmount }).ToListAsync(); if (fees.Count != request.Details.Count) @@ -351,47 +423,64 @@ namespace DS.WMS.Core.Settlement.Method settlement.CustomerName = app.CustomerName; } - settlement.Mode = SettlementMode.ChargeAndPayment; + settlement.Mode = SettlementMode.Payment; settlement.BillType = SettlementBillType.Payment; - settlement.Amount = request.Details.Sum(x => x.SettlementAmount); settlement.Details = request.Details.Select(x => new ApplicationDetail { ApplicationId = x.ApplicationId, DetailId = x.Id, - ApplyAmount = x.SettlementAmount, + RecordId = x.RecordId, BusinessId = x.BusinessId, BusinessType = x.BusinessType, - Category = FeeCategory.PaidApplicationSettlement, - Currency = x.Currency, - CustomerName = x.CustomerName, - ExchangeRate = x.ExchangeRate, + CustomerName = x.CustomerName ?? settlement.CustomerName, FeeId = x.FeeId, FeeName = x.FeeName, FeeType = x.FeeType, + Category = FeeCategory.PaidApplicationSettlement, + ApplyAmount = x.RestAmount.GetValueOrDefault(), + Currency = x.Currency, + ExchangeRate = x.ExchangeRate, OriginalAmount = x.OriginalAmount, OriginalCurrency = x.OriginalCurrency }).ToList(); + //获取剩余待结算金额 + var ids2 = settlement.Details.Select(x => x.Id); + var appDetails = await TenantDb.Queryable().Where(x => ids2.Contains(x.Id) && x.Category == FeeCategory.PaidApplication) + .Select(x => new + { + x.Id, + RestAmount = x.ApplyAmount - x.ProcessedAmount, + OriginalRestAmount = x.OriginalAmount - x.OriginalProcessedAmount + }).ToListAsync(); + + StringBuilder sb = new(); foreach (var detail in settlement.Details) { - //var fee = fees.Find(x => x.Id == detail.RecordId); - //detail.BusinessId = fee.BusinessId; - //detail.BusinessType = fee.BusinessType; - //detail.ExchangeRate = detail.ExchangeRate ?? fee.ExchangeRate; - //detail.FeeId = fee.FeeId; - //detail.FeeName = fee.FeeName; - //detail.FeeType = fee.FeeType; - detail.CustomerName = detail.CustomerName ?? settlement.CustomerName; - - //原币申请 - if (settlement.Currency.IsNullOrEmpty()) + var item = appDetails.Find(x => x.Id == detail.Id); + if (item == null) { - detail.OriginalAmount = detail.ApplyAmount; + sb.Append(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.EmptyData))); + break; + } - //if (detail.OriginalCurrency.IsNullOrEmpty()) - // detail.OriginalCurrency = fee.Currency; + if (detail.OriginalAmount > 0 && detail.OriginalAmount > item.OriginalRestAmount) + { + sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), detail.FeeName); + sb.Append(";"); + continue; + } + else if (detail.OriginalAmount < 0 && detail.OriginalAmount < item.OriginalRestAmount) + { + sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), detail.FeeName); + sb.Append(";"); + continue; } } + if (sb.Length > 0) + return DataResult.Failed(sb.ToString()); + + settlement.Amount = settlement.Details.Sum(x => x.ApplyAmount); await TenantDb.Ado.BeginTranAsync(); try @@ -427,6 +516,17 @@ namespace DS.WMS.Core.Settlement.Method }).ExecuteCommandAsync(); } + //更新申请明细的已处理金额 + var list = request.Details.Select(x => new ApplicationDetail + { + Id = x.Id, + ProcessedAmount = x.SettlementAmount, + OriginalProcessedAmount = x.OriginalAmount + }).ToList(); + await TenantDb.Updateable(list) + .UpdateColumns(x => new { x.ProcessedAmount, x.OriginalProcessedAmount }) + .ExecuteCommandAsync(); + if (fees != null && fees.Count > 0) await TenantDb.Updateable(fees) .PublicSetColumns(x => x.SettlementAmount, "+") @@ -443,5 +543,27 @@ namespace DS.WMS.Core.Settlement.Method return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed)); } } + + protected override DataResult PreDelete(List settlements) + { + if (settlements.Any(x => x.IsLocked)) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.SettlementIsLocked)); + + return DataResult.Success; + } + + protected override async Task OnDeleteDetailAsync(List settlements) + { + await base.OnDeleteDetailAsync(settlements); + + var detailList = settlements.SelectMany(x => x.Details); + //还原费用表的已结算金额 + var fees = detailList.Select(x => new FeeRecord { Id = x.RecordId, SettlementAmount = x.OriginalAmount }).ToList(); + await TenantDb.Updateable(fees) + .PublicSetColumns(it => it.SettlementAmount, "-") + .UpdateColumns(x => new { x.SettlementAmount }) + .ExecuteCommandAsync(); + } + } } 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 dc6b4abc..5f2b2d4a 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 @@ -1,4 +1,5 @@ using DS.Module.Core; +using DS.Module.Core.Enums; using DS.WMS.Core.Application.Entity; using DS.WMS.Core.Application.Interface; using DS.WMS.Core.Fee.Method; @@ -51,13 +52,16 @@ namespace DS.WMS.Core.Settlement.Method Id = x.Id, ApplicationId = x.ApplicationId, RecordId = x.RecordId, - OriginalAmount = x.OriginalAmount + DetailId = x.DetailId, + OriginalAmount = x.OriginalAmount, + ProcessedAmount = x.ProcessedAmount, + OriginalProcessedAmount = x.OriginalProcessedAmount }).ToListAsync(); var appIds = details.Select(x => x.ApplicationId).Distinct().ToList(); var apps = await TenantDb.Queryable().Where(x => appIds.Contains(x.Id)).Select(x => new TEntity { Id = x.Id, - Status = x.Status + Mode = x.Mode }).ToListAsync(); foreach (var app in apps) @@ -94,13 +98,17 @@ namespace DS.WMS.Core.Settlement.Method var apps = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select(x => new TEntity { Id = x.Id, - Status = x.Status + Mode = x.Mode }).ToListAsync(); + var details = await TenantDb.Queryable().Where(x => ids.Contains(x.ApplicationId)).Select( x => new ApplicationDetail { Id = x.Id, + ApplicationId = x.ApplicationId, RecordId = x.RecordId, + DetailId = x.DetailId, + ApplyAmount = x.ApplyAmount, OriginalAmount = x.OriginalAmount }).ToListAsync(); @@ -142,12 +150,35 @@ namespace DS.WMS.Core.Settlement.Method /// /// 结算单及其明细 /// - protected virtual Task OnDeleteDetailAsync(List settlements) + protected virtual async Task OnDeleteDetailAsync(List settlements) { - return Task.CompletedTask; + //还原付费申请明细 + var list = settlements.FindAll(x => x.Mode == SettlementMode.Payment); + if (list.Count > 0) + { + var items = list.SelectMany(x => x.Details); + var ids = items.Select(x => x.DetailId); + var details = TenantDb.Queryable().Where(x => ids.Contains(x.Id) && x.Category == FeeCategory.PaidApplication) + .Select(x => new ApplicationDetail + { + Id = x.Id, + ProcessedAmount = x.ProcessedAmount, + OriginalProcessedAmount = x.OriginalProcessedAmount + }).ToList(); + + foreach (var detail in details) + { + var item = items.FirstOrDefault(x => x.DetailId == detail.Id); + detail.ProcessedAmount -= item.ApplyAmount; + detail.OriginalProcessedAmount -= item.OriginalAmount; + } + + await TenantDb.Updateable(details) + .UpdateColumns(x => new { x.ProcessedAmount, x.OriginalProcessedAmount }) + .ExecuteCommandAsync(); + } } - #endregion } diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs index a37344c4..0b0de6bc 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs @@ -1,6 +1,8 @@ using DS.Module.Core; +using DS.Module.Core.Data; using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Settlement.Dtos; +using DS.WMS.Core.Settlement.Entity; using DS.WMS.Core.Settlement.Interface; using Microsoft.AspNetCore.Mvc; @@ -33,6 +35,17 @@ namespace DS.WMS.FeeApi.Controllers return await _service.GetListAsync(request); } + /// + /// 获取付费结算及其明细 + /// + /// 结算单ID + /// + [HttpGet, Route("Get")] + public async Task> GetAsync(long id) + { + return await _service.GetAsync(id); + } + /// /// 获取付费申请分页列表 /// @@ -50,9 +63,48 @@ namespace DS.WMS.FeeApi.Controllers /// 申请单ID /// [HttpGet, Route("GetDetails")] - public async Task>> GetDetailsAsync(long id) + public async Task>> GetDetailsAsync(long id) { return await _service.GetDetailsAsync(id); } + + /// + /// 根据付费申请创建结算单 + /// + /// + /// + [HttpPost, Route("Save")] + public async Task> SaveAsync([FromBody] SettlementRequest request) + { + return await _service.SaveAsync(request); + } + + /// + /// 删除申请单明细 + /// + /// 申请单明细ID + /// + [HttpPost, Route("DeleteDetail")] + public async Task DeleteDetailAsync([FromBody] IdModel model) + { + if (model.Ids == null || model.Ids.Length == 0) + return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest); + + return await _service.DeleteDetailAsync(model.Ids); + } + + /// + /// 删除申请单 + /// + /// 申请单ID + /// + [HttpPost, Route("Delete")] + public async Task DeleteAsync([FromBody] IdModel model) + { + if (model.Ids == null || model.Ids.Length == 0) + return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest); + + return await _service.DeleteAsync(model.Ids); + } } } diff --git a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt index 9fb4495b..b122d4f8 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt @@ -2028,3 +2028,143 @@ 2024-07-04 13:55:50.8005 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config 2024-07-04 13:55:50.8005 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-07-04 13:55:50.8005 Info Configuration initialized. +2024-07-05 08:52:32.6093 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 08:52:32.6374 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 08:52:32.6517 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 08:52:32.6615 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 08:52:32.6615 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 08:52:32.6615 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 08:52:32.6722 Info Configuration initialized. +2024-07-05 09:23:27.4388 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:23:27.4599 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:23:27.4599 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:23:27.4790 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:23:27.4790 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:23:27.4860 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:23:27.4860 Info Configuration initialized. +2024-07-05 09:32:45.5722 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:32:45.6014 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:32:45.6014 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:32:45.6180 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:32:45.6253 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:32:45.6253 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:32:45.6253 Info Configuration initialized. +2024-07-05 09:34:10.4078 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:34:10.4366 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:34:10.4393 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:34:10.4393 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:34:10.4555 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:34:10.4555 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:34:10.4555 Info Configuration initialized. +2024-07-05 09:34:48.2859 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:34:48.3650 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:34:48.3650 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:34:48.3837 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:34:48.3837 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:34:48.3929 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:34:48.3929 Info Configuration initialized. +2024-07-05 09:36:40.4784 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:36:40.5095 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:36:40.5095 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:36:40.5236 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:36:40.5236 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:36:40.5349 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:36:40.5349 Info Configuration initialized. +2024-07-05 09:49:11.3932 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:49:11.4524 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:49:11.4572 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:49:11.4722 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:49:11.4722 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:49:11.4722 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:49:11.4877 Info Configuration initialized. +2024-07-05 09:52:07.3838 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 09:52:07.4555 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 09:52:07.4739 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 09:52:07.4940 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 09:52:07.5055 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 09:52:07.5055 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 09:52:07.5235 Info Configuration initialized. +2024-07-05 10:02:10.0819 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 10:02:10.1314 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 10:02:10.1314 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 10:02:10.1522 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 10:02:10.1615 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 10:02:10.1615 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 10:02:10.1736 Info Configuration initialized. +2024-07-05 10:05:23.8134 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 10:05:23.8506 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 10:05:23.8506 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 10:05:23.8674 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 10:05:23.8674 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 10:05:23.8674 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 10:05:23.8794 Info Configuration initialized. +2024-07-05 10:06:04.5681 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 10:06:04.6138 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 10:06:04.6138 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 10:06:04.6341 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 10:06:04.6410 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 10:06:04.6410 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 10:06:04.6410 Info Configuration initialized. +2024-07-05 10:18:06.6272 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 10:18:06.6725 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 10:18:06.6725 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 10:18:06.6997 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 10:18:06.7061 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 10:18:06.7061 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 10:18:06.7061 Info Configuration initialized. +2024-07-05 14:21:50.0900 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 14:21:50.1241 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 14:21:50.1281 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 14:21:50.1281 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 14:21:50.1478 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 14:21:50.1478 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 14:21:50.1478 Info Configuration initialized. +2024-07-05 14:23:49.1584 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 14:23:49.2061 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 14:23:49.2061 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 14:23:49.2218 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 14:23:49.2218 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 14:23:49.2218 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 14:23:49.2368 Info Configuration initialized. +2024-07-05 14:25:32.7300 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 14:25:32.7628 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 14:25:32.7628 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 14:25:32.7794 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 14:25:32.7844 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 14:25:32.7844 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 14:25:32.7844 Info Configuration initialized. +2024-07-05 17:35:02.8685 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 17:35:02.8938 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 17:35:02.9014 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 17:35:02.9014 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 17:35:02.9163 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 17:35:02.9163 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 17:35:02.9240 Info Configuration initialized. +2024-07-05 17:37:11.8064 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 17:37:11.8413 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 17:37:11.8413 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 17:37:11.8598 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 17:37:11.8651 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 17:37:11.8651 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 17:37:11.8651 Info Configuration initialized. +2024-07-05 17:38:51.9968 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 17:38:52.0604 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 17:38:52.0604 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 17:38:52.0774 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 17:38:52.0774 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 17:38:52.0879 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 17:38:52.0879 Info Configuration initialized. +2024-07-05 17:42:10.8553 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 17:42:10.8902 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 17:42:10.8938 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 17:42:10.8938 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 17:42:10.9165 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 17:42:10.9165 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 17:42:10.9165 Info Configuration initialized. +2024-07-05 17:49:45.8721 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-05 17:49:45.9060 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-05 17:49:45.9092 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-05 17:49:45.9092 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-05 17:49:45.9259 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config +2024-07-05 17:49:45.9259 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-05 17:49:45.9259 Info Configuration initialized. 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 699a1046..68a4265c 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-07-02T03:26:14.2092751Z||;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-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||; + True|2024-07-04T09:20:50.0175739Z||;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-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||; \ No newline at end of file