删除时重新计算付费申请总金额统计

usertest
嵇文龙 5 months ago
parent 6b99cc5b5e
commit 10fe2d89b0

@ -8,6 +8,20 @@ namespace DS.Module.Core;
/// </summary> /// </summary>
public static class MultiLanguageConst public static class MultiLanguageConst
{ {
/// <summary>
/// 获取指定字段的描述文本
/// </summary>
/// <param name="fieldName">字段名</param>
/// <returns></returns>
/// <exception cref="ArgumentException">找不到字段时引发</exception>
public static string GetDescription(string fieldName)
{
var fieldInfo = typeof(MultiLanguageConst).GetField(fieldName) ?? throw new ArgumentException($"不存在的常量:{fieldName}", fieldName);
var attribute = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
return attribute?.Description ?? string.Empty;
}
/// <summary> /// <summary>
/// 未能获取指定的数据 /// 未能获取指定的数据
/// </summary> /// </summary>
@ -561,7 +575,7 @@ public static class MultiLanguageConst
#region 申请相关 #region 申请相关
[Description("申请单明细的结算对象有且只能有一个")] [Description("申请单明细的结算对象有且只能有一个")]
public const string ApplicationCustomerOnlyOne = "Application_Customer_OnlyOne"; public const string ApplicationCustomerOnlyOne = "Application_Customer_OnlyOne";
[Description("申请单明细每次只能对一条费用记录")] [Description("申请单明细每次提交只能对一条费用记录")]
public const string ApplicationRecordOnlyOne = "Application_Record_OnlyOne"; public const string ApplicationRecordOnlyOne = "Application_Record_OnlyOne";
[Description("提交审批时必须包含费用明细")] [Description("提交审批时必须包含费用明细")]
public const string ApplicationMustHaveDetail = "Application_MustHave_Detail"; public const string ApplicationMustHaveDetail = "Application_MustHave_Detail";

@ -77,7 +77,7 @@ namespace DS.WMS.Core.Application.Entity
/// 申请金额 /// 申请金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请金额")] [SugarColumn(ColumnDescription = "申请金额")]
public decimal Amount { get; set; } public decimal ApplyAmount { get; set; }
/// <summary> /// <summary>
/// 已处理金额 /// 已处理金额

@ -10,7 +10,6 @@ using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity; using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface; using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Sys.Interface; using DS.WMS.Core.Sys.Interface;
using Masuit.Tools.Models;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using SqlSugar; using SqlSugar;
@ -62,19 +61,22 @@ namespace DS.WMS.Core.Application.Method
application.Details ??= []; application.Details ??= [];
var result = PreSave(application, dbValue); var result = PreSave(application, dbValue);
if (!result.Succeeded) if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message); return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
List<FeeRecord> fees = []; List<FeeRecord> fees = [];
if (application.Details.Count > 0) if (application.Details.Count > 0)
{ {
//由于提交时只允许新增明细需要移除已存在ID的明细
application.Details.RemoveAll(x => x.Id > 0);
if (application.Details.GroupBy(x => x.CustomerName).Select(x => x.Key).Count() > 1) if (application.Details.GroupBy(x => x.CustomerName).Select(x => x.Key).Count() > 1)
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationCustomerOnlyOne)); return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationCustomerOnlyOne));
if (application.Details.GroupBy(x => x.RecordId).Select(x => x.Key).Count() > 1) if (application.Details.GroupBy(x => x.RecordId).Where(g => g.Count() > 1).Select(x => x.Key).Count() > 0)
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationRecordOnlyOne)); return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationRecordOnlyOne));
//申请金额禁止为0 //申请金额禁止为0
if (application.Details.Any(x => x.Amount == 0)) if (application.Details.Any(x => x.ApplyAmount == 0))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero)); return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero));
var ids = application.Details.Select(x => x.RecordId).Distinct().ToList(); var ids = application.Details.Select(x => x.RecordId).Distinct().ToList();
@ -109,6 +111,7 @@ namespace DS.WMS.Core.Application.Method
foreach (var detail in application.Details) foreach (var detail in application.Details)
{ {
detail.ApplicationId = application.Id;
var fee = fees.Find(x => x.Id == detail.RecordId); var fee = fees.Find(x => x.Id == detail.RecordId);
detail.BusinessId = fee.BusinessId; detail.BusinessId = fee.BusinessId;
detail.BusinessType = fee.BusinessType; detail.BusinessType = fee.BusinessType;
@ -121,7 +124,7 @@ namespace DS.WMS.Core.Application.Method
//原币申请 //原币申请
if (application.Currency.IsNullOrEmpty()) if (application.Currency.IsNullOrEmpty())
{ {
detail.OriginalAmount = detail.Amount; detail.OriginalAmount = detail.ApplyAmount;
if (detail.OriginalCurrency.IsNullOrEmpty()) if (detail.OriginalCurrency.IsNullOrEmpty())
detail.OriginalCurrency = fee.Currency; detail.OriginalCurrency = fee.Currency;
@ -130,7 +133,7 @@ namespace DS.WMS.Core.Application.Method
result = CalculateAmount(application, fees); result = CalculateAmount(application, fees);
if (!result.Succeeded) if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message); return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
} }
await TenantDb.Ado.BeginTranAsync(); await TenantDb.Ado.BeginTranAsync();
@ -147,32 +150,21 @@ namespace DS.WMS.Core.Application.Method
} }
application.ApplicationNO = sequence.Data; application.ApplicationNO = sequence.Data;
await TenantDb.InsertNav(application).Include(x => x.Details).ExecuteCommandAsync(); await OnCreateApplicationAsync(application);
} }
else else
{ {
var createList = application.Details.FindAll(x => x.Id == 0); if (application.Details.Count > 0)
if (createList.Count > 0) await TenantDb.Insertable(application.Details).ExecuteCommandAsync();
await TenantDb.Insertable(createList).ExecuteCommandAsync();
await TenantDb.Updateable(application).IgnoreColumns(x => new await OnUpdateApplicationAsync(application);
{
x.ApplicationNO,
//x.Currency,
x.CreateBy,
x.CreateTime,
x.Deleted,
x.DeleteBy,
x.DeleteTime
}).ExecuteCommandAsync();
} }
await OnSaveAsync(application, fees); await OnSaveAsync(application, fees);
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();
PostSave(application); var postResult = await PostSaveAsync(application);
return DataResult<TEntity>.Success(application); return postResult;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -217,7 +209,35 @@ namespace DS.WMS.Core.Application.Method
} }
/// <summary> /// <summary>
/// 持久化保存时调用 /// 在创建申请单时调用
/// </summary>
/// <param name="application">要创建的申请单</param>
/// <returns></returns>
protected virtual async Task OnCreateApplicationAsync(TEntity application)
{
await TenantDb.InsertNav(application).Include(x => x.Details).ExecuteCommandAsync();
}
/// <summary>
/// 在更新申请单时调用
/// </summary>
/// <param name="application">要更新的申请单</param>
/// <returns></returns>
protected virtual async Task OnUpdateApplicationAsync(TEntity application)
{
await TenantDb.Updateable(application).IgnoreColumns(x => new
{
x.ApplicationNO,
x.CreateBy,
x.CreateTime,
x.Deleted,
x.DeleteBy,
x.DeleteTime
}).ExecuteCommandAsync();
}
/// <summary>
/// 在保存时调用
/// </summary> /// </summary>
/// <param name="application">已保存的申请单</param> /// <param name="application">已保存的申请单</param>
/// <param name="fees">需要更新信息的费用记录</param> /// <param name="fees">需要更新信息的费用记录</param>
@ -231,8 +251,9 @@ namespace DS.WMS.Core.Application.Method
/// 在保存完成后调用 /// 在保存完成后调用
/// </summary> /// </summary>
/// <param name="application">申请单</param> /// <param name="application">申请单</param>
protected virtual void PostSave(TEntity application) protected virtual Task<DataResult<TEntity>> PostSaveAsync(TEntity application)
{ {
return Task.FromResult(DataResult<TEntity>.Success(application));
} }
/// <summary> /// <summary>
@ -263,7 +284,6 @@ namespace DS.WMS.Core.Application.Method
RecordId = x.RecordId, RecordId = x.RecordId,
OriginalAmount = x.OriginalAmount OriginalAmount = x.OriginalAmount
}).ToListAsync(); }).ToListAsync();
var appIds = details.Select(x => x.ApplicationId).Distinct().ToList(); var appIds = details.Select(x => x.ApplicationId).Distinct().ToList();
var apps = await TenantDb.Queryable<TEntity>().Where(x => appIds.Contains(x.Id)).Select(x => new TEntity var apps = await TenantDb.Queryable<TEntity>().Where(x => appIds.Contains(x.Id)).Select(x => new TEntity
{ {
@ -271,6 +291,9 @@ namespace DS.WMS.Core.Application.Method
Status = x.Status Status = x.Status
}).ToListAsync(); }).ToListAsync();
foreach (var app in apps)
app.Details = details.FindAll(x => x.ApplicationId == app.Id);
var result = PreDelete(apps); var result = PreDelete(apps);
if (!result.Succeeded) if (!result.Succeeded)
return result; return result;
@ -278,7 +301,7 @@ namespace DS.WMS.Core.Application.Method
await TenantDb.Ado.BeginTranAsync(); await TenantDb.Ado.BeginTranAsync();
try try
{ {
await OnDeleteDetailAsync(details); await OnDeleteDetailAsync(apps);
await TenantDb.Deleteable(details).ExecuteCommandAsync(); await TenantDb.Deleteable(details).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();
@ -305,9 +328,9 @@ namespace DS.WMS.Core.Application.Method
/// <summary> /// <summary>
/// 在执行删除申请单或其明细时调用 /// 在执行删除申请单或其明细时调用
/// </summary> /// </summary>
/// <param name="details">申请单明细</param> /// <param name="applications">申请单及其明细</param>
/// <returns></returns> /// <returns></returns>
protected virtual Task OnDeleteDetailAsync(List<ApplicationDetail> details) protected virtual Task OnDeleteDetailAsync(List<TEntity> applications)
{ {
return Task.CompletedTask; return Task.CompletedTask;
} }
@ -324,10 +347,6 @@ namespace DS.WMS.Core.Application.Method
Id = x.Id, Id = x.Id,
Status = x.Status Status = x.Status
}).ToListAsync(); }).ToListAsync();
var result = PreDelete(apps);
if (!result.Succeeded)
return result;
var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)).Select( var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)).Select(
x => new ApplicationDetail x => new ApplicationDetail
{ {
@ -336,10 +355,16 @@ namespace DS.WMS.Core.Application.Method
OriginalAmount = x.OriginalAmount OriginalAmount = x.OriginalAmount
}).ToListAsync(); }).ToListAsync();
await TenantDb.Ado.BeginTranAsync(); foreach (var app in apps)
app.Details = details.FindAll(x => x.ApplicationId == app.Id); await TenantDb.Ado.BeginTranAsync();
var result = PreDelete(apps);
if (!result.Succeeded)
return result;
try try
{ {
await OnDeleteDetailAsync(details); await OnDeleteDetailAsync(apps);
await TenantDb.DeleteNav<TEntity>(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync(); await TenantDb.DeleteNav<TEntity>(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();

@ -322,7 +322,7 @@ namespace DS.WMS.Core.Application.Method
FeeType = d.FeeType, FeeType = d.FeeType,
FeeId = d.FeeId, FeeId = d.FeeId,
FeeName = d.FeeName, FeeName = d.FeeName,
Amount = d.Amount, Amount = d.ApplyAmount,
OriginalAmount = d.OriginalAmount, OriginalAmount = d.OriginalAmount,
//未申请金额=(金额-结算金额-申请金额+申请金额已结算) //未申请金额=(金额-结算金额-申请金额+申请金额已结算)
RestAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount, RestAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount,
@ -406,14 +406,14 @@ namespace DS.WMS.Core.Application.Method
Id = x.Id, Id = x.Id,
BusinessId = x.BusinessId, BusinessId = x.BusinessId,
BusinessType = x.BusinessType, BusinessType = x.BusinessType,
Amount = x.Amount - x.InvoiceAmount - x.OrderInvoiceAmount + x.OrderInvSettlementAmount, ApplyAmount = x.Amount - x.InvoiceAmount - x.OrderInvoiceAmount + x.OrderInvSettlementAmount,
ExchangeRate = x.ExchangeRate, ExchangeRate = x.ExchangeRate,
OriginalCurrency = x.Currency OriginalCurrency = x.Currency
}).ToListAsync(); }).ToListAsync();
list.RemoveAll(x => x.Amount == 0); list.RemoveAll(x => x.ApplyAmount == 0);
foreach (var item in list) foreach (var item in list)
item.OriginalAmount = item.Amount; item.OriginalAmount = item.ApplyAmount;
return list; return list;
} }
@ -517,7 +517,7 @@ namespace DS.WMS.Core.Application.Method
ApplicationId = application.Id, ApplicationId = application.Id,
Name = x.GoodName, Name = x.GoodName,
TaxRate = application.TaxRate, TaxRate = application.TaxRate,
TaxUnitPrice = application.Details.FindAll(y => y.FeeId == x.FeeId).Sum(x => x.Amount) TaxUnitPrice = application.Details.FindAll(y => y.FeeId == x.FeeId).Sum(x => x.ApplyAmount)
}).ToList(); }).ToList();
} }
@ -538,7 +538,10 @@ namespace DS.WMS.Core.Application.Method
//更新已开票金额 //更新已开票金额
if (fees != null && fees.Count > 0) if (fees != null && fees.Count > 0)
await TenantDb.Updateable(fees).UpdateColumns(x => new { x.OrderInvoiceAmount }).ExecuteCommandAsync(); await TenantDb.Updateable(fees)
.PublicSetColumns(x => x.OrderInvoiceAmount, "+")
.UpdateColumns(x => new { x.OrderInvoiceAmount })
.ExecuteCommandAsync();
} }
protected override DataResult PreDelete(List<InvoiceApplication> applications) protected override DataResult PreDelete(List<InvoiceApplication> applications)
@ -549,16 +552,13 @@ namespace DS.WMS.Core.Application.Method
return DataResult.Success; return DataResult.Success;
} }
protected override async Task OnDeleteDetailAsync(List<ApplicationDetail> details) protected override async Task OnDeleteDetailAsync(List<InvoiceApplication> applications)
{ {
if (details.Count == 0) var appIds = applications.Select(x => x.Id).Distinct().ToList();
return;
var appIds = details.Select(x => x.ApplicationId).Distinct().ToList();
await TenantDb.Deleteable<InvoiceDetail>(x => appIds.Contains(x.ApplicationId)).ExecuteCommandAsync(); await TenantDb.Deleteable<InvoiceDetail>(x => appIds.Contains(x.ApplicationId)).ExecuteCommandAsync();
//还原费用表的已开票金额 //还原费用表的已开票金额
var fees = details.Select(x => new FeeRecord { Id = x.RecordId, OrderInvoiceAmount = x.OriginalAmount }).ToList(); var fees = applications.SelectMany(x => x.Details).Select(x => new FeeRecord { Id = x.RecordId, OrderInvoiceAmount = x.OriginalAmount }).ToList();
await TenantDb.Updateable(fees) await TenantDb.Updateable(fees)
.PublicSetColumns(it => it.OrderInvoiceAmount, "-") .PublicSetColumns(it => it.OrderInvoiceAmount, "-")
.UpdateColumns(x => new { x.OrderInvoiceAmount }) .UpdateColumns(x => new { x.OrderInvoiceAmount })

@ -166,7 +166,7 @@ namespace DS.WMS.Core.Application.Method
.Where(d => d.ApplicationId == id) .Where(d => d.ApplicationId == id)
.Select((d, f) => new InvoiceTemplateDetail .Select((d, f) => new InvoiceTemplateDetail
{ {
Amount = d.Amount, Amount = d.ApplyAmount,
OriginalAmount = d.OriginalAmount, OriginalAmount = d.OriginalAmount,
OriginalCurrency = d.OriginalCurrency, OriginalCurrency = d.OriginalCurrency,
OriginalRate = f.ExchangeRate, OriginalRate = f.ExchangeRate,

@ -153,7 +153,7 @@ namespace DS.WMS.Core.Application.Method
.Select((d, f, b) => new PaymentApplicationDetailDto .Select((d, f, b) => new PaymentApplicationDetailDto
{ {
AccTaxRate = f.AccTaxRate, AccTaxRate = f.AccTaxRate,
Amount = d.Amount, Amount = d.ApplyAmount,
CustomerId = f.CustomerId, CustomerId = f.CustomerId,
FeeName = d.FeeName, FeeName = d.FeeName,
FeeType = f.FeeType, FeeType = f.FeeType,

@ -11,6 +11,7 @@ using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Entity;
using SqlSugar; using SqlSugar;
using static System.Net.Mime.MediaTypeNames;
namespace DS.WMS.Core.Application.Method namespace DS.WMS.Core.Application.Method
{ {
@ -299,16 +300,15 @@ namespace DS.WMS.Core.Application.Method
if (dto != null) if (dto != null)
{ {
dto.Details = await TenantDb.Queryable<ApplicationDetail>() dto.Details = await TenantDb.Queryable<ApplicationDetail>().Where(d => d.ApplicationId == id)
.InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id) .InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.LeftJoin<BusinessFeeStatus>((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType) .InnerJoin<BusinessFeeStatus>((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType)
.Where(d => d.ApplicationId == id)
.Select((d, f, b) => new ApplicationDetailDto .Select((d, f, b) => new ApplicationDetailDto
{ {
Id = d.Id, Id = d.Id,
RecordId = f.Id, RecordId = f.Id,
AccTaxRate = f.AccTaxRate, AccTaxRate = f.AccTaxRate,
Amount = d.Amount, Amount = d.ApplyAmount,
FeeId = d.FeeId, FeeId = d.FeeId,
FeeName = d.FeeName, FeeName = d.FeeName,
FeeType = d.FeeType, FeeType = d.FeeType,
@ -391,15 +391,15 @@ namespace DS.WMS.Core.Application.Method
.Select(x => new ApplicationDetail .Select(x => new ApplicationDetail
{ {
RecordId = x.Id, RecordId = x.Id,
Amount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount, ApplyAmount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount,
Currency = x.Currency, Currency = x.Currency,
ExchangeRate = x.ExchangeRate, ExchangeRate = x.ExchangeRate,
OriginalCurrency = x.Currency OriginalCurrency = x.Currency
}).ToListAsync(); }).ToListAsync();
list.RemoveAll(x => x.Amount == 0); list.RemoveAll(x => x.ApplyAmount == 0);
foreach (var item in list) foreach (var item in list)
item.OriginalAmount = item.Amount; item.OriginalAmount = item.ApplyAmount;
return list; return list;
} }
@ -434,7 +434,7 @@ namespace DS.WMS.Core.Application.Method
var fee = fees.Find(x => x.Id == detail.RecordId); var fee = fees.Find(x => x.Id == detail.RecordId);
if (fee == null) if (fee == null)
{ {
sb.AppendFormat(MultiLanguageConst.ApplicationCannotRelateFee, detail.FeeName); sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.ApplicationCannotRelateFee)), detail.FeeName);
sb.Append(""); sb.Append("");
continue; continue;
} }
@ -444,19 +444,19 @@ namespace DS.WMS.Core.Application.Method
var restAmount = fee.Amount - fee.SettlementAmount - fee.OrderAmount + fee.OrderSettlementAmount; var restAmount = fee.Amount - fee.SettlementAmount - fee.OrderAmount + fee.OrderSettlementAmount;
if (restAmount == 0) if (restAmount == 0)
{ {
sb.AppendFormat(MultiLanguageConst.FeeNobalance, fee.FeeName); sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.FeeNobalance)), fee.FeeName);
sb.Append(""); sb.Append("");
continue; continue;
} }
if (detail.OriginalAmount > 0 && detail.OriginalAmount > restAmount) if (detail.OriginalAmount > 0 && detail.OriginalAmount > restAmount)
{ {
sb.AppendFormat(MultiLanguageConst.DetailExceedingLimit, fee.FeeName); sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), fee.FeeName);
sb.Append(""); sb.Append("");
continue; continue;
} }
if (detail.OriginalAmount < 0 && detail.OriginalAmount < restAmount) else if (detail.OriginalAmount < 0 && detail.OriginalAmount < restAmount)
{ {
sb.AppendFormat(MultiLanguageConst.DetailExceedingLimit, fee.FeeName); sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), fee.FeeName);
sb.Append(""); sb.Append("");
continue; continue;
} }
@ -466,20 +466,42 @@ namespace DS.WMS.Core.Application.Method
detail.Category = FeeCategory.PaidApplication; detail.Category = FeeCategory.PaidApplication;
} }
if (sb.Length > 0) return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;
return DataResult.Failed(sb.ToString()); }
application.AmountRMB = application.Details.Where(x => x.Currency == RMB_CODE).Sum(x => x.Amount); protected override async Task OnUpdateApplicationAsync(PaymentApplication application)
application.AmountUSD = application.Details.Where(x => x.Currency == USD_CODE).Sum(x => x.Amount); {
application.AmountOther = application.Details.Where(x => x.Currency != RMB_CODE && x.Currency != USD_CODE).Sum(x => x.Amount); application.AmountRMB = application.Details.Where(x => x.Currency == RMB_CODE).Sum(x => x.ApplyAmount);
application.AmountUSD = application.Details.Where(x => x.Currency == USD_CODE).Sum(x => x.ApplyAmount);
application.AmountOther = application.Details.Where(x => x.Currency != RMB_CODE && x.Currency != USD_CODE).Sum(x => x.ApplyAmount);
return DataResult.Success; await TenantDb.Updateable(application).IgnoreColumns(x => new
{
x.ApplicationNO,
x.AmountRMB,
x.AmountUSD,
x.AmountOther,
x.CreateBy,
x.CreateTime,
x.Deleted,
x.DeleteBy,
x.DeleteTime
}).ExecuteCommandAsync();
} }
protected override async Task OnSaveAsync(PaymentApplication application, List<FeeRecord>? fees) protected override async Task OnSaveAsync(PaymentApplication application, List<FeeRecord>? fees)
{ {
if (fees != null && fees.Count > 0) if (fees != null && fees.Count > 0)
await TenantDb.Updateable(fees).UpdateColumns(x => new { x.OrderAmount }).ExecuteCommandAsync(); await TenantDb.Updateable(fees)
.PublicSetColumns(x => x.OrderAmount, "+")
.UpdateColumns(x => new { x.OrderAmount })
.ExecuteCommandAsync();
}
protected override async Task<DataResult<PaymentApplication>> PostSaveAsync(PaymentApplication application)
{
var app = await TenantDb.Queryable<PaymentApplication>().Includes(x => x.Details).FirstAsync(x => x.Id == application.Id);
return DataResult<PaymentApplication>.Success(app);
} }
protected override DataResult PreDelete(List<PaymentApplication> applications) protected override DataResult PreDelete(List<PaymentApplication> applications)
@ -490,14 +512,46 @@ namespace DS.WMS.Core.Application.Method
return DataResult.Success; return DataResult.Success;
} }
protected override async Task OnDeleteDetailAsync(List<ApplicationDetail> details) protected override async Task OnDeleteDetailAsync(List<PaymentApplication> applications)
{ {
var detailList = applications.SelectMany(x => x.Details);
//还原费用表的已申请金额 //还原费用表的已申请金额
var fees = details.Select(x => new FeeRecord { Id = x.RecordId, OrderAmount = x.OriginalAmount }).ToList(); var fees = detailList.Select(x => new FeeRecord { Id = x.RecordId, OrderAmount = x.OriginalAmount }).ToList();
await TenantDb.Updateable(fees) await TenantDb.Updateable(fees)
.PublicSetColumns(it => it.OrderAmount, "-") .PublicSetColumns(it => it.OrderAmount, "-")
.UpdateColumns(x => new { x.OrderAmount }) .UpdateColumns(x => new { x.OrderAmount })
.ExecuteCommandAsync(); .ExecuteCommandAsync();
//更新总申请金额
var appIds = applications.Select(x => x.Id);
var dIds = detailList.Select(x => x.Id);
var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => appIds.Contains(x.ApplicationId) && !dIds.Contains(x.Id))
.Select(x => new { x.ApplicationId, x.ApplyAmount, x.Currency }).ToListAsync();
var gList = details.GroupBy(x => x.ApplicationId).ToList();
foreach (var item in applications)
{
var gItems = gList.Find(x => x.Key == item.Id);
if (gItems == null)
{
item.AmountRMB = item.AmountUSD = item.AmountOther = 0m;
item.CustomerId = 0;
item.CustomerName = null;
await TenantDb.Updateable(item)
.UpdateColumns(x => new { x.AmountRMB, x.AmountUSD, x.AmountOther, x.CustomerId, x.CustomerName })
.ExecuteCommandAsync();
}
else
{
item.AmountRMB = gItems.Where(x => x.Currency == RMB_CODE).Sum(x => x.ApplyAmount);
item.AmountUSD = gItems.Where(x => x.Currency == USD_CODE).Sum(x => x.ApplyAmount);
item.AmountOther = gItems.Where(x => x.Currency != RMB_CODE && x.Currency != USD_CODE).Sum(x => x.ApplyAmount);
await TenantDb.Updateable(item)
.UpdateColumns(x => new { x.AmountRMB, x.AmountUSD, x.AmountOther })
.ExecuteCommandAsync();
}
}
} }
protected override DataResult PreSubmitApproval(List<PaymentApplication> applications) protected override DataResult PreSubmitApproval(List<PaymentApplication> applications)

@ -1755,3 +1755,157 @@
2024-07-01 13:33:51.0663 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-01 13:33:51.0663 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-01 13:33:51.0663 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-07-01 13:33:51.0663 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 13:33:51.0663 Info Configuration initialized. 2024-07-01 13:33:51.0663 Info Configuration initialized.
2024-07-01 13:39:57.0309 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 13:39:57.0658 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 13:39:57.0658 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 13:39:57.0941 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-01 13:39:57.0941 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-01 13:39:57.0941 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 13:39:57.1136 Info Configuration initialized.
2024-07-01 13:43:20.7640 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 13:43:20.7932 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 13:43:20.7962 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 13:43:20.7962 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-01 13:43:20.8120 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-01 13:43:20.8120 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 13:43:20.8120 Info Configuration initialized.
2024-07-01 13:45:06.7227 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 13:45:06.7624 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 13:45:06.7661 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 13:45:06.7661 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-01 13:45:06.7848 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-01 13:45:06.7848 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 13:45:06.7848 Info Configuration initialized.
2024-07-01 13:59:56.5185 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 13:59:56.5539 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 13:59:56.5539 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 13:59:56.5751 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-01 13:59:56.5806 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-01 13:59:56.5806 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 13:59:56.5806 Info Configuration initialized.
2024-07-01 14:08:50.3374 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 14:08:50.3915 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 14:08:50.3915 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 14:08:50.4070 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-01 14:08:50.4070 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-01 14:08:50.4070 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 14:08:50.4202 Info Configuration initialized.
2024-07-01 14:09:32.2753 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 14:09:32.3057 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 14:09:32.3057 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 14:09:32.3205 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-01 14:09:32.3205 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-01 14:09:32.3285 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 14:09:32.3285 Info Configuration initialized.
2024-07-01 14:10:13.8952 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 14:10:13.9237 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 14:10:13.9237 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 14:10:13.9379 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-01 14:10:13.9379 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-01 14:10:13.9379 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 14:10:13.9513 Info Configuration initialized.
2024-07-01 14:14:46.1979 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 14:14:46.2383 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 14:14:46.2383 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 14:14:46.2641 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-01 14:14:46.2641 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-01 14:14:46.2641 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 14:14:46.2859 Info Configuration initialized.
2024-07-01 14:32:17.8606 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 14:32:17.9054 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 14:32:17.9054 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 14:32:17.9255 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-01 14:32:17.9255 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-01 14:32:17.9255 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 14:32:17.9396 Info Configuration initialized.
2024-07-01 15:42:27.6274 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 15:42:27.6569 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 15:42:27.6569 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 15:42:27.6731 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-01 15:42:27.6731 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-01 15:42:27.6731 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 15:42:27.6883 Info Configuration initialized.
2024-07-01 15:46:31.3744 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 15:46:31.4425 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 15:46:31.4425 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 15:46:31.4732 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-01 15:46:31.4910 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-01 15:46:31.4910 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 15:46:31.5079 Info Configuration initialized.
2024-07-01 16:03:05.1479 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 16:03:05.1771 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 16:03:05.1771 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 16:03:05.1902 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-01 16:03:05.1902 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-01 16:03:05.1902 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 16:03:05.2027 Info Configuration initialized.
2024-07-01 16:25:55.0715 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 16:25:55.1057 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 16:25:55.1115 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 16:25:55.1251 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-01 16:25:55.1251 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-01 16:25:55.1251 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 16:25:55.1415 Info Configuration initialized.
2024-07-01 16:29:20.2354 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 16:29:20.2660 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 16:29:20.2660 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 16:29:20.2808 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-01 16:29:20.2808 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-01 16:29:20.2808 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 16:29:20.2808 Info Configuration initialized.
2024-07-01 16:36:47.4222 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 16:36:47.4528 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 16:36:47.4528 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 16:36:47.4850 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-01 16:36:47.4850 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-01 16:36:47.5012 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 16:36:47.5012 Info Configuration initialized.
2024-07-01 16:48:37.8230 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 16:48:37.8618 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 16:48:37.8618 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 16:48:37.8770 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-01 16:48:37.8770 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-01 16:48:37.8770 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 16:48:37.8901 Info Configuration initialized.
2024-07-01 16:54:07.0215 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 16:54:07.0605 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 16:54:07.0605 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 16:54:07.0813 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-01 16:54:07.0813 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-01 16:54:07.0947 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 16:54:07.0947 Info Configuration initialized.
2024-07-01 17:13:27.9882 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 17:13:28.0275 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 17:13:28.0311 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 17:13:28.0311 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-01 17:13:28.0509 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-01 17:13:28.0509 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 17:13:28.0509 Info Configuration initialized.
2024-07-01 17:28:52.1728 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 17:28:52.2378 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 17:28:52.2378 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 17:28:52.2590 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-01 17:28:52.2663 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-01 17:28:52.2663 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 17:28:52.2663 Info Configuration initialized.
2024-07-01 17:32:19.9596 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 17:32:20.0331 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 17:32:20.0331 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 17:32:20.0525 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-01 17:32:20.0525 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-01 17:32:20.0525 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 17:32:20.0710 Info Configuration initialized.
2024-07-01 17:35:59.0428 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 17:35:59.0772 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 17:35:59.0772 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 17:35:59.0950 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-01 17:35:59.0950 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-01 17:35:59.0950 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 17:35:59.0950 Info Configuration initialized.
2024-07-01 17:42:55.6674 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-01 17:42:55.7373 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-01 17:42:55.7373 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-01 17:42:55.7659 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-01 17:42:55.7739 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-01 17:42:55.7739 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-01 17:42:55.7907 Info Configuration initialized.

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl> <_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-07-01T03:41:52.2969338Z||;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||;</History> <History>True|2024-07-01T08:42:55.7374984Z||;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||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>
Loading…
Cancel
Save