cjy 5 months ago
commit b5374547ae

@ -594,7 +594,7 @@ public static class MultiLanguageConst
public const string ApplicationDeleteStatusError = "Application_Delete_StatusError";
[Description("申请明细的结算对象需与申请单一致")]
public const string ApplicationCustomerDetail = "Application_Customer_Detail";
[Description("申请明细的金额不能为零")]
[Description("申请明细的金额/原始金额不能为零")]
public const string AmountCannotBeZero = "Amount_CannotBe_Zero";
[Description("申请明细需要设置原始申请金额")]
public const string OriginalAmountCannotBeZero = "OriginalAmount_CannotBe_Zero";

@ -16,7 +16,7 @@ public class IdModel : IValidatableObject
/// <summary>
/// 主键ids
/// </summary>
public long[]? Ids { get; set; }
public long[] Ids { get; set; }
/// <summary>
/// 业务类型1、海运出口 2、海运进口
@ -46,3 +46,15 @@ public class IdModel : IValidatableObject
}
}
}
/// <summary>
/// ID实体的泛型版本
/// </summary>
/// <typeparam name="T">请求值的类型</typeparam>
public class IdModel<T> : IdModel
{
/// <summary>
/// 请求值
/// </summary>
public new T? Value { get; set; }
}

@ -99,7 +99,31 @@ public class SaasDbService : ISaasDbService
//Logger.Log(LogLevel.Info,
// DateTime.Now.ToString() + "\r\n" +
// UtilMethods.GetSqlString(c.DbType, sql, pars));
Console.WriteLine("执行的sql:" + sql);
string sqlStr = sql;
foreach (var item in pars)
{
if (item.Value != null && item.Value != DBNull.Value)
{
string? strValue = string.Empty;
if (item.DbType == System.Data.DbType.String)
{
strValue = "'" + (string)item.Value + "'";
}
else if (item.DbType == System.Data.DbType.Boolean)
{
strValue = (bool)item.Value ? "1" : "0";
}
else
{
strValue = item.Value.ToString();
}
sqlStr = sqlStr.Replace(item.ParameterName, strValue);
}
}
Console.WriteLine("执行的SQL" + Environment.NewLine + sqlStr);
};
//数据处理事件

@ -2,9 +2,7 @@
using DS.Module.Core.Data;
using DS.Module.Core.Extensions;
using DS.Module.UserModule;
using Newtonsoft.Json;
using SqlSugar;
using SqlSugar.IOC;
namespace DS.Module.SqlSugar
{
@ -40,7 +38,7 @@ namespace DS.Module.SqlSugar
//Logger.Log(LogLevel.Info,
// DateTime.Now.ToString() + "\r\n" +
// UtilMethods.GetSqlString(c.DbType, sql, pars));
Console.WriteLine("执行的sql:" + sql);
Console.WriteLine("执行的SQL" + Environment.NewLine + sql);
};
//数据处理事件
@ -123,7 +121,7 @@ namespace DS.Module.SqlSugar
// Aop_Time = it.Time.ToString(),
// DiffType = it.DiffType.ToString()
//};
//Console.WriteLine("执行的sql:" + log);
//Write logic
// DbScoped.Sugar.GetConnection(1288018625843826680).Insertable(log).ExecuteCommand();
};

@ -102,7 +102,7 @@ public static class SqlsugarInstall
{
// 封装AOP
// SqlsugarAopHelper.AopForSqlsugar(db, user, dbList, connectConfigList);
Console.WriteLine("开始加载sqlsugar模块 要走过滤 起了");
//Console.WriteLine("开始加载sqlsugar模块 要走过滤 起了");
foreach (var c in connectConfigList)
{
var dbProvider = db.GetConnectionScope((string)c.ConfigId);
@ -115,8 +115,33 @@ public static class SqlsugarInstall
//Logger.Log(LogLevel.Info,
// DateTime.Now.ToString() + "\r\n" +
// UtilMethods.GetSqlString(c.DbType, sql, pars));
Console.WriteLine("执行的sql:" + DateTime.Now.ToString() + "\r\n" +
UtilMethods.GetSqlString(c.DbType, sql, pars));
//Console.WriteLine("执行的sql:" + DateTime.Now.ToString() + "\r\n" +
// UtilMethods.GetSqlString(c.DbType, sql, pars));
string sqlStr = sql;
foreach (var item in pars)
{
if (item.Value != null && item.Value != DBNull.Value)
{
string? strValue = string.Empty;
if (item.DbType == System.Data.DbType.String)
{
strValue = "'" + (string)item.Value + "'";
}
else if (item.DbType == System.Data.DbType.Boolean)
{
strValue = (bool)item.Value ? "1" : "0";
}
else
{
strValue = item.Value.ToString();
}
sqlStr = sqlStr.Replace(item.ParameterName, strValue);
}
}
Console.WriteLine("执行的SQL" + Environment.NewLine + sqlStr);
};
//数据处理事件

@ -19,6 +19,11 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public long ApplicationId { get; set; }
/// <summary>
/// 引用的明细ID付费申请明细ID
/// </summary>
public long? DetailId { get; set; }
/// <summary>
/// 费用记录ID
/// </summary>
@ -217,9 +222,9 @@ namespace DS.WMS.Core.Application.Dtos
public decimal? OutstandingAmount { get; set; }
/// <summary>
/// 结算金额
/// 申请/结算金额
/// </summary>
public decimal SettlementAmount { get; set; }
public decimal ApplyAmount { get; set; }
/// <summary>
/// 发票号

@ -60,10 +60,10 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 审核备注
/// </summary>
public string? AuditRemark { get; set; }
///// <summary>
///// 审核备注
///// </summary>
//public string? AuditRemark { get; set; }
/// <summary>
/// 是否已打印
@ -75,20 +75,20 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public int PrintTimes { get; set; }
/// <summary>
/// 打印人
/// </summary>
public long? PrinterId { get; set; }
///// <summary>
///// 打印人
///// </summary>
//public long? PrinterId { get; set; }
/// <summary>
/// 打印人名称
/// </summary>
public string? PrinterName { get; set; }
///// <summary>
///// 打印人名称
///// </summary>
//public string? PrinterName { get; set; }
/// <summary>
/// 打印时间
/// </summary>
public DateTime? PrintTime { get; set; }
///// <summary>
///// 打印时间
///// </summary>
//public DateTime? PrintTime { get; set; }
/// <summary>
/// 驳回原因

@ -76,18 +76,6 @@ namespace DS.WMS.Core.Application.Dtos
public decimal? RestAmountOther { get; set; }
/// <summary>
/// 未结人民币
/// </summary>
public decimal? UnSettlementRMB { get; set; }
/// <summary>
/// 未结美元
/// </summary>
public decimal? UnSettlementUSD { get; set; }
public long? SettlementTypeId { get; set; }
/// <summary>
@ -152,11 +140,6 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public string? ChequeRemarks { get; set; }
/// <summary>
/// 实付金额
/// </summary>
public decimal? PayAmount { get; set; }
/// <summary>
/// 业务编号
/// </summary>
@ -171,8 +154,5 @@ namespace DS.WMS.Core.Application.Dtos
/// 入账申请编号
/// </summary>
public string? AccountingApplicationNO { get; set; }
public AuditStatusForQuery? AuditStatus { get; set; }
}
}

@ -16,7 +16,7 @@ namespace DS.WMS.Core.Application.Interface
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<PaymentApplicationDto>>> GetListAsync(PageRequest request);
Task<DataResult<List<PaymentApplicationDto>>> GetListAsync(PageRequest<AuditStatusForQuery> request);
/// <summary>
/// 获取申请单明细

@ -5,7 +5,6 @@ using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Code.Entity;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Info.Entity;
@ -33,7 +32,7 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<PaymentApplicationDto>>> GetListAsync(PageRequest request)
public async Task<DataResult<List<PaymentApplicationDto>>> GetListAsync(PageRequest<AuditStatusForQuery> request)
{
var query = CreateListQuery();
@ -41,42 +40,23 @@ namespace DS.WMS.Core.Application.Method
{
var whereList = Db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
int? index = null;
foreach (var item in whereList)
switch (request.OtherQueryCondition)
{
ConditionalModel? model = item as ConditionalModel;
if (model == null)
continue;
//设置了状态筛选
if (string.Equals(model.FieldName, nameof(PaymentApplicationDto.AuditStatus)) && int.TryParse(model.FieldValue, out int statusValue))
{
AuditStatusForQuery status = (AuditStatusForQuery)statusValue;
switch (status)
{
case AuditStatusForQuery.Pending:
query = query.Where(x => x.AuditerId == null);
break;
case AuditStatusForQuery.Audited:
query = query.Where(x => x.AuditerId != null);
break;
case AuditStatusForQuery.Pending:
query = query.Where(x => x.AuditerId == null);
break;
case AuditStatusForQuery.MarkerOnly:
var ids = await GetCurrentFlowsQuery(AuditTypes).Select(x => x.BusinessId).ToListAsync();
if (ids.Count == 0)
ids.Add(0L);
query = query.Where(x => ids.Contains(x.Id));
break;
}
case AuditStatusForQuery.Audited:
query = query.Where(x => x.AuditerId != null);
break;
index = whereList.IndexOf(item);
case AuditStatusForQuery.MarkerOnly:
var ids = await GetCurrentFlowsQuery(AuditTypes).Select(x => x.BusinessId).ToListAsync();
if (ids.Count == 0)
ids.Add(0L);
query = query.Where(x => ids.Contains(x.Id));
break;
}
}
if (index.HasValue)
whereList.RemoveAt(index.Value);
query = query.Where(whereList);
}

@ -5,9 +5,9 @@ using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Settlement.Dtos
{
/// <summary>
/// 费用记录返回实体
/// 用于结算的按业务展示的费用组
/// </summary>
public class FeeBizDto
public class SettlementBiz
{
/// <summary>
/// 业务Id
@ -205,7 +205,7 @@ namespace DS.WMS.Core.Settlement.Dtos
/// <summary>
/// 按业务分组的费用
/// </summary>
public class FeeDto : FeeBizDto
public class FeeDto : SettlementBiz
{
public long Id { get; set; }

@ -0,0 +1,146 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Method;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Settlement.Dtos
{
/// <summary>
/// 费用表单
/// </summary>
public class FeeForm
{
readonly List<FeeItem> _items;
/// <summary>
/// 费用记录项
/// </summary>
public List<FeeItem> Items => _items;
/// <summary>
/// 使用指定的数据源初始化统计。
/// </summary>
/// <param name="source">数据源</param>
public FeeForm(List<FeeItem> source)
{
_items = source;
UnchargedRMB = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnchargedUSD = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnchargedOther = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnpaidRMB = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
UnpaidUSD = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
UnpaidOther = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
}
/// <summary>
/// 人民币未收
/// </summary>
public decimal UnchargedRMB { get; private set; }
/// <summary>
/// 人民币未付
/// </summary>
public decimal UnpaidRMB { get; private set; }
/// <summary>
/// 美元未收
/// </summary>
public decimal UnchargedUSD { get; private set; }
/// <summary>
/// 美元未付
/// </summary>
public decimal UnpaidUSD { get; private set; }
/// <summary>
/// 其他未收
/// </summary>
public decimal UnchargedOther { get; private set; }
/// <summary>
/// 其他未付
/// </summary>
public decimal UnpaidOther { get; private set; }
}
/// <summary>
/// 费用项
/// </summary>
public class FeeItem
{
/// <summary>
/// 费用记录ID
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务ID
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 客户名称
/// </summary>
public string? CustomerName { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string? FeeName { get; set; }
/// <summary>
/// 费用类型
/// </summary>
public FeeType FeeType { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 未结金额
/// </summary>
public decimal RestAmount { get; set; }
/// <summary>
/// 本次结算金额
/// </summary>
public decimal SettlementAmount { get; set; }
/// <summary>
/// 原始汇率
/// </summary>
public decimal? OriginalRate { get; set; }
/// <summary>
/// 开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 录入方式
/// </summary>
public string? InputMethod { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Remark { get; set; }
}
}

@ -0,0 +1,104 @@
using DS.Module.Core.Enums;
using DS.WMS.Core.Application.Dtos;
using Masuit.Tools.Systems;
namespace DS.WMS.Core.Settlement.Dtos
{
/// <summary>
/// 用于结算的付费申请单
/// </summary>
public class PaymentApplicationDtoV2 : ApplicationDto
{
/// <summary>
/// 申请单状态
/// </summary>
public PaymentApplicationStatus Status { get; set; }
public string StatusText => Status.GetDescription();
/// <summary>
/// 人民币申请金额
/// </summary>
public decimal AmountRMB { get; set; }
/// <summary>
/// 美元申请金额
/// </summary>
public decimal AmountUSD { get; set; }
/// <summary>
/// 本次结算人民币
/// </summary>
public decimal SettlementRMB { get; set; }
/// <summary>
/// 本次结算美元
/// </summary>
public decimal SettlementUSD { get; set; }
/// <summary>
/// 未结人民币
/// </summary>
public decimal UnSettledRMB { get; set; }
/// <summary>
/// 未结美元
/// </summary>
public decimal UnSettledUSD { get; set; }
public long? SettlementTypeId { get; set; }
/// <summary>
/// 结算方式名称
/// </summary>
public string? SettlementTypeName { get; set; }
/// <summary>
/// 结算人
/// </summary>
public long? SettlerId { get; set; }
/// <summary>
/// 结算人名称
/// </summary>
public string? SettlerName { get; set; }
/// <summary>
/// 结算时间
/// </summary>
public DateTime? SettlementTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreateBy { get; set; }
/// <summary>
/// 创建人名称
/// </summary>
public string CreateByName { get; set; }
public List<ApplicationDetailDto>? Details { get; set; }
/// <summary>
/// 业务委托单位
/// </summary>
public string? ClientName { get; set; }
/// <summary>
/// 申请支付日期
/// </summary>
public DateTime? PaymentDate { get; set; }
/// <summary>
/// 实付金额
/// </summary>
public decimal? PayAmount { get; set; }
}
}

@ -4,7 +4,7 @@ using DS.WMS.Core.Application.Dtos;
namespace DS.WMS.Core.Settlement.Dtos
{
/// <summary>
/// 付费结算
/// 付费申请结算
/// </summary>
public class PaymentSettlementDto : SettlementDto
{
@ -122,14 +122,6 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary>
public decimal? AdvanceAmount { get; set; }
[IgnoreDataMember]
public List<CurrencyAmount> UnInvoiceList { get; set; }
/// <summary>
/// 未开票金额
/// </summary>
public string UnInvoiceAmount => string.Join(" ", UnInvoiceList ?? []);
/// <summary>
/// 是否导出凭证
/// </summary>
@ -149,5 +141,34 @@ namespace DS.WMS.Core.Settlement.Dtos
/// 是否生成支票
/// </summary>
public bool IsGenerateCheck { get; set; }
[IgnoreDataMember]
public List<CurrencyAmount> UnInvoiceList { get; set; }
/// <summary>
/// 未开票金额
/// </summary>
public string UnInvoiceAmount => string.Join(" ", UnInvoiceList ?? []);
/// <summary>
/// 结算明细
/// </summary>
public List<SettlementDetailDto>? Details { get; set; }
}
/// <summary>
/// 付费自由结算
/// </summary>
public class FreePaymentSettlementDto : PaymentSettlementDto
{
/// <summary>
/// 结算明细
/// </summary>
public new List<FreeSettlementDetailDto>? Details { get; set; }
/// <summary>
/// 结算金额合计
/// </summary>
public List<SummaryItem>? SummaryItems { get; set; }
}
}

@ -1,9 +1,13 @@
using System.Runtime.Serialization;
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.WMS.Core.Op.Entity;
using Masuit.Tools.Systems;
namespace DS.WMS.Core.Settlement.Dtos
{
/// <summary>
/// 结算明细DTO
/// 付费申请结算明细DTO
/// </summary>
public class SettlementDetailDto
{
@ -17,6 +21,21 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary>
public long ApplicationId { get; set; }
/// <summary>
/// 申请单号
/// </summary>
public string ApplicationNO { get; set; }
/// <summary>
/// 状态
/// </summary>
public PaymentApplicationStatus Status { get; set; }
/// <summary>
/// 状态文本
/// </summary>
public string StatusText => Status.GetDescription();
/// <summary>
/// 结算金额
/// </summary>
@ -70,4 +89,150 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary>
public string? Note { get; set; }
}
/// <summary>
/// 付费自由结算明细DTO
/// </summary>
public class FreeSettlementDetailDto
{
/// <summary>
/// ID
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用记录ID
/// </summary>
public long RecordId { get; set; }
/// <summary>
/// 业务ID
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 主提单号
/// </summary>
public string? MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public string? HBLNO { get; set; }
/// <summary>
/// 委托编号
/// </summary>
public string? CustomerNo { get; set; }
/// <summary>
/// 委托单位
/// </summary>
public string? ClientName { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 业务来源
/// </summary>
public string? SourceName { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public string? Sale { get; set; }
/// <summary>
/// 会计期间
/// </summary>
public string? AccountDate { get; set; }
/// <summary>
/// 船名
/// </summary>
public string? Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string? Voyage { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string? Carrier { get; set; }
/// <summary>
/// 经营单位
/// </summary>
public string? Enterprise { get; set; }
/// <summary>
/// 报关单号
/// </summary>
public string? CustomNo { get; set; }
/// <summary>
/// 客户/费用对象名称
/// </summary>
public string? CustomerName { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string? FeeName { get; set; }
/// <summary>
/// 费用类型
/// </summary>
public FeeType FeeType { get; set; }
/// <summary>
/// 结算金额
/// </summary>
public decimal ApplyAmount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 折算汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 原始汇率
/// </summary>
public decimal? OriginalRate { get; set; }
/// <summary>
/// 原始币别
/// </summary>
public string OriginalCurrency { get; set; }
/// <summary>
/// 原始金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// 更改单
/// </summary>
public string? ChangeOrder { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Note { get; set; }
}
}

@ -182,9 +182,6 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 结算明细
/// </summary>
public List<SettlementDetailDto> Details { get; set; }
}
}

@ -14,8 +14,10 @@ namespace DS.WMS.Core.Settlement.Dtos
public TEntity Settlement { get; set; }
/// <summary>
/// 申请明细
/// 结算费用明细
/// </summary>
public List<PaymentApplicationDetailDto>? Details { get; set; }
//public List<PaymentApplicationDtoV2> Applications { get; set; }
}
}

@ -150,5 +150,11 @@ namespace DS.WMS.Core.Settlement.Entity
/// </summary>
[SugarColumn(ColumnDescription = "开票金额")]
public decimal? InvoiceAmount { get; set; }
/// <summary>
/// 凭证备注
/// </summary>
[SugarColumn(ColumnDescription = "凭证备注", IsNullable = true, Length = 200)]
public string? VoucherRemark { get; set; }
}
}

@ -1,16 +0,0 @@
using DS.Module.Core;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
namespace DS.WMS.Core.Settlement.Interface
{
/// <summary>
/// 付费自由结算
/// </summary>
public interface IFreeSettlementService : ISettlementService<PaymentSettlement>
{
}
}

@ -0,0 +1,21 @@
using DS.Module.Core;
using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
namespace DS.WMS.Core.Settlement.Interface
{
/// <summary>
/// 付费自由结算
/// </summary>
public interface IPaymentFreeSettlementService : ISettlementService<PaymentSettlement>
{
/// <summary>
/// 获取待结算费用分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>查询条件请参考<see cref="FeeDto"/>中定义的字段</remarks>
Task<DataResult<List<SettlementBiz>>> GetBizListAsync(PageRequest request);
}
}

@ -30,7 +30,7 @@ namespace DS.WMS.Core.Settlement.Interface
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<PaymentApplicationDto>>> GetApplicationListAsync(PageRequest<ApplicationListQuery> request);
Task<DataResult<List<PaymentApplicationDtoV2>>> GetApplicationListAsync(PageRequest<ApplicationListQuery> request);
/// <summary>
/// 获取付费申请的费用明细

@ -13,7 +13,7 @@ namespace DS.WMS.Core.Application.Interface
/// <summary>
/// 提交结算单
/// </summary>
/// <param name="application"></param>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<TEntity>> SaveAsync(SettlementRequest<TEntity> request);
@ -30,5 +30,13 @@ namespace DS.WMS.Core.Application.Interface
/// <param name="ids">结算单ID</param>
/// <returns></returns>
Task<DataResult> DeleteAsync(params long[] ids);
/// <summary>
/// 设置结算单的锁定状态
/// </summary>
/// <param name="isLocked">是否锁定</param>
/// <param name="ids">结算ID</param>
/// <returns></returns>
Task<DataResult> SetLockAsync(bool isLocked, params long[] ids);
}
}

@ -1,135 +0,0 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
using DS.WMS.Core.Settlement.Interface;
using DS.WMS.Core.Sys.Entity;
using SqlSugar;
namespace DS.WMS.Core.Settlement.Method
{
/// <summary>
/// 付费自由结算
/// </summary>
public class FreeSettlementService : SettlementService<PaymentSettlement>, IFreeSettlementService
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public FreeSettlementService(IServiceProvider provider) : base(provider)
{
}
/// <summary>
/// 获取待结算费用分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>查询条件请参考<see cref="FeeDto"/>中定义的字段</remarks>
public async Task<DataResult<List<FeeBizDto>>> GeFeeListAsync(PageRequest request)
{
var whereList = request.GetConditionalModels(Db);
var result = await CreateQuery().Where(whereList)
.GroupBy(x => new { x.BusinessId, x.BusinessType })
.Select<FeeBizDto>()
.ToQueryPageAsync(request.PageCondition);
if (result.Data.Count > 0)
{
//获取统计信息
var ids = result.Data.Select(x => x.BusinessId);
var types = result.Data.Select(x => x.BusinessType).Distinct();
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.BusinessId) && types.Contains(x.BusinessType))
.Select(x => new
{
x.Currency,
x.FeeType,
//x.Amount,
//x.OrderAmount,
//x.SettlementAmount,
//x.OrderSettlementAmount,
x.InvoiceAmount,
UnSettlementAmount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount //剩余待结算
}).ToListAsync();
//关联用户名称
var userIds = result.Data.Select(x => x.CreateBy)
.Union(result.Data.Select(x => x.OperatorId))
.Distinct();
var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();
var orgIds = result.Data.Select(x => x.SaleDeptId).Distinct();
var orgs = await Db.Queryable<SysOrg>().Where(x => orgIds.Contains(x.Id)).Select(x => new { x.Id, x.OrgName }).ToListAsync();
foreach (var item in result.Data)
{
item.UnpaidRMB = fees.FindAll(x => x.Currency == RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.UnSettlementAmount);
item.UnpaidUSD = fees.FindAll(x => x.Currency == USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.UnSettlementAmount);
item.UnpaidOther = fees.FindAll(x => x.Currency != RMB_CODE && x.Currency != USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.UnSettlementAmount);
item.UnchargedRMB = fees.FindAll(x => x.Currency == RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.UnSettlementAmount);
item.UnchargedUSD = fees.FindAll(x => x.Currency == USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.UnSettlementAmount);
item.UnchargedOther = fees.FindAll(x => x.Currency != RMB_CODE && x.Currency != USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.UnSettlementAmount);
item.UnpaidInvoiceRMB = fees.FindAll(x => x.Currency == RMB_CODE && x.FeeType == FeeType.Payable && x.UnSettlementAmount == 0).Sum(x => x.InvoiceAmount);
item.UnpaidInvoiceUSD = fees.FindAll(x => x.Currency == USD_CODE && x.FeeType == FeeType.Payable && x.UnSettlementAmount == 0).Sum(x => x.InvoiceAmount);
item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
item.Operator = users.Find(x => x.Id == item.OperatorId)?.UserName;
item.SaleDeptName = orgs.Find(x => x.Id == item.SaleDeptId)?.OrgName;
}
}
return result;
}
//创建各项费用数据的查询并集
internal ISugarQueryable<FeeDto> CreateQuery()
{
var query1 = TenantDb.Queryable<FeeRecord, SeaExport>((f, s) => new JoinQueryInfos(
JoinType.Inner, s.Id == f.BusinessId && f.BusinessType == BusinessType.OceanShippingExport && f.FeeStatus == FeeStatus.AuditPassed &&
(f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0))
.Select((f, s) => new FeeDto
{
Id = f.Id,
FeeId = f.FeeId,
FeeCode = f.FeeCode,
FeeName = f.FeeName,
FeeType = f.FeeType,
CustomerId = f.CustomerId,
CustomerName = f.CustomerName,
BusinessId = f.BusinessId,
BusinessType = BusinessType.OceanShippingExport,
Currency = f.Currency,
DebitNo = f.DebitNo,
SaleOrgId = f.SaleOrgId,
SaleOrg = f.SaleOrg,
CreateBy = f.CreateBy,
AccountDate = s.AccountDate,
BusinessDate = s.BusinessDate,//业务日期
ClientName = s.CustomerName,//委托单位
CustomerNo = s.CustomerNo,
CustomNo = s.CustomNo,
DischargePort = s.DischargePort,
ETD = s.ETD,
HBLNO = s.HBLNO,
LoadPort = s.LoadPort,
MBLNO = s.MBLNO,
OperatorId = s.OperatorId,
SaleDeptId = s.SaleDeptId,
Sale = s.Sale,//揽货人
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
BookingNo = s.BookingNo,
Enterprise = s.Enterprise,
});
//海运进口
return TenantDb.UnionAll(new List<ISugarQueryable<FeeDto>> { query1 });
}
}
}

@ -0,0 +1,372 @@
using System.Text;
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Code.Entity;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
using DS.WMS.Core.Settlement.Interface;
using DS.WMS.Core.Sys.Entity;
using SqlSugar;
namespace DS.WMS.Core.Settlement.Method
{
/// <summary>
/// 付费自由结算
/// </summary>
public class PaymentFreeSettlementService : SettlementService<PaymentSettlement>, IPaymentFreeSettlementService
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public PaymentFreeSettlementService(IServiceProvider provider) : base(provider)
{
}
/// <summary>
/// 获取待结算业务分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>查询条件请参考<see cref="FeeDto"/>中定义的字段</remarks>
public async Task<DataResult<List<SettlementBiz>>> GetBizListAsync(PageRequest request)
{
var whereList = request.GetConditionalModels(Db);
var result = await CreateBizQuery().Where(whereList).GroupBy(x => new { x.BusinessId, x.BusinessType })
.Select<SettlementBiz>().ToQueryPageAsync(request.PageCondition);
if (result.Data.Count > 0)
{
//获取统计信息
var ids = result.Data.Select(x => x.BusinessId);
var types = result.Data.Select(x => x.BusinessType).Distinct();
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.BusinessId) && types.Contains(x.BusinessType))
.Select(x => new
{
x.BusinessId,
x.BusinessType,
x.Currency,
x.FeeType,
//x.Amount,
//x.OrderAmount,
//x.SettlementAmount,
//x.OrderSettlementAmount,
x.InvoiceAmount,
UnSettledAmount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount //剩余待结算
}).ToListAsync();
//关联用户名称
var userIds = result.Data.Select(x => x.CreateBy)
.Union(result.Data.Select(x => x.OperatorId))
.Distinct();
var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();
var orgIds = result.Data.Select(x => x.SaleDeptId).Distinct();
var orgs = await Db.Queryable<SysOrg>().Where(x => orgIds.Contains(x.Id)).Select(x => new { x.Id, x.OrgName }).ToListAsync();
foreach (var item in result.Data)
{
item.UnpaidRMB = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency == RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.UnSettledAmount);
item.UnpaidUSD = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency == USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.UnSettledAmount);
item.UnpaidOther = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency != RMB_CODE && x.Currency != USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.UnSettledAmount);
item.UnchargedRMB = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency == RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.UnSettledAmount);
item.UnchargedUSD = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency == USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.UnSettledAmount);
item.UnchargedOther = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency != RMB_CODE && x.Currency != USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.UnSettledAmount);
item.UnpaidInvoiceRMB = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency == RMB_CODE && x.FeeType == FeeType.Payable && x.UnSettledAmount == 0).Sum(x => x.InvoiceAmount);
item.UnpaidInvoiceUSD = fees.FindAll(x => x.BusinessId == item.BusinessId && x.BusinessType == item.BusinessType && x.Currency == USD_CODE && x.FeeType == FeeType.Payable && x.UnSettledAmount == 0).Sum(x => x.InvoiceAmount);
item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
item.Operator = users.Find(x => x.Id == item.OperatorId)?.UserName;
item.SaleDeptName = orgs.Find(x => x.Id == item.SaleDeptId)?.OrgName;
}
}
return result;
}
//创建各项费用数据的查询并集
internal ISugarQueryable<FeeDto> CreateBizQuery()
{
var query1 = TenantDb.Queryable<FeeRecord, SeaExport>((f, s) => new JoinQueryInfos(
JoinType.Inner, s.Id == f.BusinessId && f.BusinessType == BusinessType.OceanShippingExport && f.FeeStatus == FeeStatus.AuditPassed &&
(f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0))
.Select((f, s) => new FeeDto
{
Id = f.Id,
FeeId = f.FeeId,
FeeCode = f.FeeCode,
FeeName = f.FeeName,
FeeType = f.FeeType,
CustomerId = f.CustomerId,
CustomerName = f.CustomerName,
BusinessId = f.BusinessId,
BusinessType = BusinessType.OceanShippingExport,
Currency = f.Currency,
DebitNo = f.DebitNo,
SaleOrgId = f.SaleOrgId,
SaleOrg = f.SaleOrg,
CreateBy = f.CreateBy,
AccountDate = s.AccountDate,
BusinessDate = s.BusinessDate,//业务日期
ClientName = s.CustomerName,//委托单位
CustomerNo = s.CustomerNo,
CustomNo = s.CustomNo,
DischargePort = s.DischargePort,
ETD = s.ETD,
HBLNO = s.HBLNO,
LoadPort = s.LoadPort,
MBLNO = s.MBLNO,
OperatorId = s.OperatorId,
SaleDeptId = s.SaleDeptId,
Sale = s.Sale,//揽货人
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
BookingNo = s.BookingNo,
Enterprise = s.Enterprise,
});
//海运进口
return TenantDb.UnionAll(new List<ISugarQueryable<FeeDto>> { query1 });
}
/// <summary>
/// 根据业务编号及类型获取关联费用记录
/// </summary>
/// <param name="items">业务ID与业务类型</param>
/// <returns></returns>
public async Task<DataResult<FeeForm>> GetFeesAsync(params BizItem[] items)
{
var bizIds = items.Select(x => x.Id).ToList();
var types = items.Select(x => x.BusinessType).ToList();
var list = await TenantDb.Queryable<FeeRecord>()
.Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && f.FeeStatus == FeeStatus.AuditPassed &&
(f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0)
.Select(f => new FeeItem
{
Id = f.Id,
BusinessId = f.BusinessId,
BusinessType = f.BusinessType,
CustomerName = f.CustomerName,
FeeName = f.FeeName,
FeeType = f.FeeType,
Amount = f.Amount,
Currency = f.Currency,
OriginalRate = f.ExchangeRate,
RestAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount,
SettlementAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount,
InvoiceAmount = f.InvoiceAmount,
AccTaxRate = f.AccTaxRate,
Remark = f.Remark
}).ToListAsync();
return DataResult<FeeForm>.Success(new FeeForm(list));
}
/// <summary>
/// 获取付费自由结算及其明细
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
public async Task<DataResult<FreePaymentSettlementDto>> GetAsync(long id)
{
var model = await TenantDb.Queryable<PaymentSettlement>().Select(x => new FreePaymentSettlementDto
{
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)
{
model.Details = await TenantDb.Queryable<ApplicationDetail>().Where(x => x.ApplicationId == id && x.Category == FeeCategory.PaidFreeSettlement)
.InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.Select((d, f) => new FreeSettlementDetailDto
{
Id = d.Id,
RecordId = f.Id,
BusinessId = f.BusinessId,
BusinessType = f.BusinessType,
CustomerName = d.CustomerName,
FeeName = d.FeeName,
FeeType = d.FeeType,
ExchangeRate = d.ExchangeRate,
OriginalAmount = d.OriginalAmount,
OriginalCurrency = d.OriginalCurrency,
OriginalRate = f.ExchangeRate,
ApplyAmount = d.ApplyAmount,
Currency = d.Currency,
Note = d.Note
}).ToListAsync();
var gList = model.Details.GroupBy(x => x.BusinessType);
foreach (var g in gList)
{
var ids = g.Select(x => x.BusinessId);
switch (g.Key)
{
case BusinessType.OceanShippingExport:
var list1 = await TenantDb.Queryable<SeaExport>().Where(x => ids.Contains(x.Id))
.LeftJoin<CodeSource>((s, cs) => s.SourceId == cs.Id)
.Select((s, cs) => new
{
s.Id,
s.MBLNO,
s.HBLNO,
s.CustomerNo,
ClientName = s.CustomerName,
s.ETD,
cs.SourceName,
s.Sale,
s.AccountDate,
s.Vessel,
Voyage = s.Voyno,
s.Carrier,
s.Enterprise,
s.CustomNo
}).ToListAsync();
foreach (var item in g)
{
var biz = list1.Find(x => x.Id == item.BusinessId);
if (biz != null)
{
item.MBLNO = biz.MBLNO;
item.HBLNO = biz.HBLNO;
item.CustomerNo = biz.CustomerNo;
item.ClientName = biz.ClientName;
item.ETD = biz.ETD;
item.SourceName = biz.SourceName;
item.Sale = biz.Sale;
item.AccountDate = biz.AccountDate;
item.Vessel = biz.Vessel;
item.Voyage = biz.Voyage;
item.Carrier = biz.Carrier;
item.Enterprise = biz.Enterprise;
item.CustomNo = biz.CustomNo;
}
}
break;
case BusinessType.OceanShippingImport:
break;
}
}
model.SummaryItems = model.Details.GroupBy(x => new { x.FeeType, x.Currency }).Select(x => new SummaryItem
{
FeeType = x.Key.FeeType,
Currency = x.Key.Currency,
Amount = x.Sum(y => y.ApplyAmount)
}).ToList();
}
return DataResult<FreePaymentSettlementDto>.Success(model);
}
protected override async Task<DataResult> PreSaveAsync(PaymentSettlement settlement)
{
//获取剩余待结算金额
var ids = settlement.Details.Select(x => x.RecordId);
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.Id) && x.FeeStatus == FeeStatus.AuditPassed)
.Select(x => new
{
x.Id,
OriginalRestAmount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount
}).ToListAsync();
StringBuilder sb = new();
foreach (var detail in settlement.Details)
{
var item = fees.Find(x => x.Id == detail.DetailId);
if (item == null)
{
sb.Append(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.EmptyData)));
break;
}
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;
}
}
return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;
}
protected override DataResult PreDelete(List<PaymentSettlement> settlements)
{
if (settlements.Any(x => x.IsLocked))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.SettlementIsLocked));
return DataResult.Success;
}
//protected override async Task OnDeleteDetailAsync(List<PaymentSettlement> 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();
//}
}
}

@ -16,7 +16,7 @@ using SqlSugar;
namespace DS.WMS.Core.Settlement.Method
{
/// <summary>
/// 付费结算服务
/// 付费申请结算服务
/// </summary>
public class PaymentSettlementService : SettlementService<PaymentSettlement>, IPaymentSettlementService
{
@ -152,13 +152,14 @@ namespace DS.WMS.Core.Settlement.Method
AdvanceAmount = x.AdvanceAmount, //预收支资料
AdvanceCurrency = x.AdvanceCurrency,
AdvanceRate = x.AdvanceRate,
}).FirstAsync();
}).FirstAsync(x => x.Id == id);
if (model != null)
{
var details = await TenantDb.Queryable<ApplicationDetail>().Where(d => d.ApplicationId == id)
.LeftJoin<ApplicationDetail>((d, pd) => d.DetailId == pd.Id)
.LeftJoin<PaymentApplication>((d, pd, pa) => pd.ApplicationId == pa.Id)
var details = await TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<ApplicationDetail>((d, pd) => d.DetailId == pd.Id)
.InnerJoin<PaymentApplication>((d, pd, pa) => pd.ApplicationId == pa.Id)
.Where(d => d.ApplicationId == id)
.Select((d, pd, pa) => new
{
d.Id,
@ -167,6 +168,8 @@ namespace DS.WMS.Core.Settlement.Method
//d.Currency,
d.OriginalCurrency,
d.OriginalAmount,
pa.ApplicationNO,
pa.Status,
pa.CreateTime,
pa.CreateBy,
pa.PaymentDate,
@ -185,6 +188,8 @@ namespace DS.WMS.Core.Settlement.Method
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),
ApplicationNO = firstItem.ApplicationNO,
Status = firstItem.Status,
CreateTime = firstItem?.CreateTime,
CreateBy = firstItem?.CreateBy,
PaymentDate = firstItem?.PaymentDate,
@ -231,16 +236,16 @@ namespace DS.WMS.Core.Settlement.Method
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<PaymentApplicationDto>>> GetApplicationListAsync(PageRequest<ApplicationListQuery> request)
public async Task<DataResult<List<PaymentApplicationDtoV2>>> GetApplicationListAsync(PageRequest<ApplicationListQuery> request)
{
var query = TenantDb.Queryable<PaymentApplication>().Where(a => a.Status == PaymentApplicationStatus.AuditPassed || a.Status == PaymentApplicationStatus.PartialSettlement)
.WhereIF(request.OtherQueryCondition != null && request.OtherQueryCondition.UnsettledOnly,
a => a.Status != PaymentApplicationStatus.SettlementCompleted && SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.ApplicationId == a.Id && (d.ApplyAmount - d.ProcessedAmount) != 0).Any())
var query = TenantDb.Queryable<PaymentApplication>()
.InnerJoinIF<ApplicationDetail>(request.OtherQueryCondition != null && request.OtherQueryCondition.PortId.HasValue,
(a, d) => d.ApplicationId == a.Id)
(a, d) => a.Id == d.ApplicationId)
.InnerJoinIF<SeaExport>(request.OtherQueryCondition != null && request.OtherQueryCondition.PortId.HasValue,
(a, d, s) => s.Id == d.BusinessId && (s.LoadPortId == request.OtherQueryCondition.PortId.Value || s.DischargePortId == request.OtherQueryCondition.PortId.Value))
.Select(a => new PaymentApplicationDto
.GroupByIF(request.OtherQueryCondition != null && request.OtherQueryCondition.PortId.HasValue,
(a, d, s) => a.Id)
.Select(a => new PaymentApplicationDtoV2
{
Id = a.Id,
ApplicationNO = a.ApplicationNO,
@ -251,13 +256,13 @@ namespace DS.WMS.Core.Settlement.Method
CustomerBank = a.CustomerBank.BankName, //结算对象银行
CustomerAccount = a.CustomerBank.Account, //结算对象账号
Currency = a.Currency,
AmountRMB = a.AmountRMB, //RMB申请金额
AmountUSD = a.AmountUSD, //USD申请金额
AmountRMB = a.AmountRMB.GetValueOrDefault(), //RMB申请金额
AmountUSD = a.AmountUSD.GetValueOrDefault(), //USD申请金额
//RMB未结金额
UnSettlementRMB = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == RMB_CODE)
UnSettledRMB = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == RMB_CODE)
.Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)),
//USD未结金额
UnSettlementUSD = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == USD_CODE)
UnSettledUSD = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == USD_CODE)
.Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)),
SaleDeptId = a.SaleDeptId, //所属分部
SettlementTypeId = a.SettlementTypeId,
@ -272,6 +277,11 @@ namespace DS.WMS.Core.Settlement.Method
Note = a.Note
});
if (request.OtherQueryCondition != null && request.OtherQueryCondition.UnsettledOnly)
query = query.Where(a => a.Status == PaymentApplicationStatus.AuditPassed || a.Status == PaymentApplicationStatus.PartialSettlement);
else
query = query.Where(a => a.Status == PaymentApplicationStatus.AuditPassed || a.Status == PaymentApplicationStatus.PartialSettlement || a.Status == PaymentApplicationStatus.SettlementCompleted);
var whereList = request.GetConditionalModels(Db);
var result = await query.Where(whereList).ToQueryPageAsync(request.PageCondition);
@ -287,6 +297,9 @@ namespace DS.WMS.Core.Settlement.Method
{
item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
item.SaleDeptName = orgs.Find(x => x.Id == item.SaleDeptId)?.OrgName;
item.SettlementRMB = item.UnSettledRMB;
item.SettlementUSD = item.UnSettledUSD;
}
}
@ -313,7 +326,7 @@ namespace DS.WMS.Core.Settlement.Method
FeeName = d.FeeName,
FeeType = d.FeeType, //收付
Amount = d.ApplyAmount, //申请金额
SettlementAmount = f.SettlementAmount, //已结算金额
ApplyAmount = f.SettlementAmount, //已结算金额
RestAmount = d.ApplyAmount - d.ProcessedAmount, //剩余结算金额
CustomerId = f.CustomerId,
CustomerName = d.CustomerName,
@ -348,7 +361,7 @@ namespace DS.WMS.Core.Settlement.Method
RecordId = d.RecordId,
FeeName = d.FeeName,
FeeType = d.FeeType, //收付
SettlementAmount = d.ApplyAmount, //结算金额
ApplyAmount = d.ApplyAmount, //结算金额
CustomerId = f.CustomerId,
CustomerName = d.CustomerName,
OriginalCurrency = d.OriginalCurrency, //原始币别
@ -416,207 +429,93 @@ namespace DS.WMS.Core.Settlement.Method
}
}
/// <summary>
/// 提交结算单
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async override Task<DataResult<PaymentSettlement>> SaveAsync(SettlementRequest<PaymentSettlement> request)
protected override async Task<DataResult> PreSaveAsync(PaymentSettlement settlement)
{
var settlement = request.Settlement;
if (settlement.SettlementDate == default)
settlement.SettlementDate = DateTime.Now;
settlement.Mode = SettlementMode.Payment;
settlement.BillType = SettlementBillType.Payment;
if (request.Details?.Count > 0)
{
var appIds = request.Details.Select(x => x.ApplicationId).Distinct();
var appList = await TenantDb.Queryable<PaymentApplication>().Where(x => appIds.Contains(x.Id))
.Select(x => new
{
x.Id,
x.Status,
x.CustomerId,
x.CustomerName,
}).ToListAsync();
if (appList.Count == 0)
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (appList.Exists(x => x.Status != PaymentApplicationStatus.AuditPassed && x.Status != PaymentApplicationStatus.PartialSettlement))
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSelectStatusError));
if (appList.GroupBy(x => x.CustomerId).Select(x => x.Key).Count() > 1)
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.DetailCustomerOnlyOne));
var appIds = settlement.Details.Select(x => x.ApplicationId).Distinct();
var appList = await TenantDb.Queryable<PaymentApplication>().Where(x => appIds.Contains(x.Id))
.Select(x => new
{
x.Id,
x.Status,
x.CustomerId,
x.CustomerName,
}).ToListAsync();
if (appList.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
//金额禁止为0
if (request.Details.Any(x => x.Amount == 0 || x.OriginalAmount == 0))
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero));
if (appList.Exists(x => x.Status != PaymentApplicationStatus.AuditPassed && x.Status != PaymentApplicationStatus.PartialSettlement))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSelectStatusError));
if (settlement.Id == 0)
{
var app = appList[0];
settlement.CustomerId = app.CustomerId;
settlement.CustomerName = app.CustomerName;
}
if (appList.GroupBy(x => x.CustomerId).Select(x => x.Key).Count() > 1)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.DetailCustomerOnlyOne));
settlement.Details = request.Details.Select(x => new ApplicationDetail
//获取剩余待结算金额
var ids2 = settlement.Details.Select(x => x.DetailId);
var appDetails = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids2.Contains(x.Id) && x.Category == FeeCategory.PaidApplication)
.Select(x => new
{
ApplicationId = x.ApplicationId,
DetailId = x.Id,
RecordId = x.RecordId,
BusinessId = x.BusinessId,
BusinessType = x.BusinessType,
CustomerName = x.CustomerName ?? settlement.CustomerName,
FeeId = x.FeeId,
FeeName = x.FeeName,
FeeType = x.FeeType,
Category = FeeCategory.PaidApplicationSettlement,
ApplyAmount = x.Amount,
Currency = x.Currency,
ExchangeRate = x.ExchangeRate,
OriginalAmount = x.OriginalAmount,
OriginalCurrency = x.OriginalCurrency ?? (settlement.Currency.IsNullOrEmpty() ? x.Currency : settlement.Currency),
}).ToList();
if (settlement.Details.Any(x => x.OriginalCurrency.IsNullOrEmpty()))
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.OriginalCurrencyCanNotNull));
//获取剩余待结算金额
var ids2 = settlement.Details.Select(x => x.DetailId);
var appDetails = await TenantDb.Queryable<ApplicationDetail>().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();
x.Id,
//RestAmount = x.ApplyAmount - x.ProcessedAmount,
OriginalRestAmount = x.OriginalAmount - x.OriginalProcessedAmount
}).ToListAsync();
StringBuilder sb = new();
foreach (var detail in settlement.Details)
StringBuilder sb = new();
foreach (var detail in settlement.Details)
{
var item = appDetails.Find(x => x.Id == detail.DetailId);
if (item == null)
{
var item = appDetails.Find(x => x.Id == detail.DetailId);
if (item == null)
{
sb.Append(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.EmptyData)));
break;
}
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;
}
sb.Append(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.EmptyData)));
break;
}
if (sb.Length > 0)
return DataResult<PaymentSettlement>.Failed(sb.ToString());
settlement.Amount = settlement.Details.Sum(x => x.ApplyAmount);
}
await TenantDb.Ado.BeginTranAsync();
try
{
//关联导航属性插入
if (settlement.Id == 0)
if (detail.OriginalAmount > 0 && detail.OriginalAmount > item.OriginalRestAmount)
{
//创建时需要生成申请单编号
var sequence = CommonService.Value.GetSequenceNext<PaymentSettlement>();
if (!sequence.Succeeded)
{
return DataResult<PaymentSettlement>.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist);
}
settlement.ApplicationNO = "CP" + SnowFlakeSingle.Instance.NextId(); //申请编号
settlement.SettlementNO = sequence.Data; //结算单号
await TenantDb.InsertNav(settlement).Include(x => x.Details).ExecuteCommandAsync();
sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), detail.FeeName);
sb.Append("");
continue;
}
else
else if (detail.OriginalAmount < 0 && detail.OriginalAmount < item.OriginalRestAmount)
{
if (settlement.Details.Count > 0)
await TenantDb.Insertable(settlement.Details).ExecuteCommandAsync();
await TenantDb.Updateable(settlement).IgnoreColumns(x => new
{
x.ApplicationNO,
x.SettlementNO,
x.IsLocked,
x.CreateBy,
x.CreateTime,
x.Deleted,
x.DeleteBy,
x.DeleteTime
}).ExecuteCommandAsync();
sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), detail.FeeName);
sb.Append("");
continue;
}
}
if (request.Details?.Count > 0)
{
//更新申请明细的已处理金额
var list = request.Details.Select(x => new ApplicationDetail
{
Id = x.Id,
ProcessedAmount = x.Amount,
OriginalProcessedAmount = x.OriginalAmount
}).ToList();
await TenantDb.Updateable(list)
.PublicSetColumns(x => x.ProcessedAmount, "+")
.PublicSetColumns(x => x.OriginalProcessedAmount, "+")
.UpdateColumns(x => new { x.ProcessedAmount, x.OriginalProcessedAmount })
.ExecuteCommandAsync();
//更新费用记录的已结算金额
var fees = request.Details.Select(x => new FeeRecord
{
Id = x.RecordId,
SettlementAmount = x.OriginalAmount
}).ToList();
await TenantDb.Updateable(fees)
.PublicSetColumns(x => x.SettlementAmount, "+")
.UpdateColumns(x => new { x.SettlementAmount })
.ExecuteCommandAsync();
}
return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;
}
await TenantDb.Ado.CommitTranAsync();
return DataResult<PaymentSettlement>.Success(settlement);
}
catch (Exception ex)
{
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
finally
protected override async Task OnSaveAsync(PaymentSettlement settlement)
{
//更新申请明细的已处理金额
var list = settlement.Details.Select(x => new ApplicationDetail
{
if (request.Details?.Count > 0)
await WriteBackStatusAsync(settlement);
}
Id = x.DetailId.Value,
ProcessedAmount = x.ApplyAmount,
OriginalProcessedAmount = x.OriginalAmount
}).ToList();
await TenantDb.Updateable(list)
.PublicSetColumns(x => x.ProcessedAmount, "+")
.PublicSetColumns(x => x.OriginalProcessedAmount, "+")
.UpdateColumns(x => new { x.ProcessedAmount, x.OriginalProcessedAmount })
.ExecuteCommandAsync();
}
/// <summary>
/// 回写申请单的状态
/// </summary>
/// <param name="settlement">结算单</param>
/// <returns></returns>
public async Task WriteBackStatusAsync(PaymentSettlement settlement)
protected override async Task<PaymentSettlement> PostSaveAsync(PaymentSettlement settlement)
{
var details = await TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<ApplicationDetail>((x, y) => x.DetailId == y.Id && y.ApplicationId == settlement.Id && y.Category == FeeCategory.PaidApplicationSettlement)
.Where((x, y) => x.Category == FeeCategory.PaidApplication)
.GroupBy((x, y) => x.ApplicationId).Select((x, y) => new
{
x.ApplicationId,
Count = SqlFunc.AggregateCount(x.Id),
ProcessedCount = SqlFunc.Subqueryable<ApplicationDetail>().Where(y => y.ApplicationId == x.ApplicationId &&
y.Category == FeeCategory.PaidApplication && y.OriginalAmount - y.OriginalProcessedAmount == 0).Count()
}).ToListAsync();
//回写付费申请的状态
var ids = settlement.Details.Select(x => x.DetailId);
var appIds = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.Id) && x.Category == FeeCategory.PaidApplication)
.Select(x => x.ApplicationId).ToListAsync();
var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => appIds.Contains(x.ApplicationId) && x.Category == FeeCategory.PaidApplication).GroupBy(x => x.ApplicationId).Select(x => new
{
x.ApplicationId,
Count = SqlFunc.AggregateCount(x.Id),
ProcessedCount = SqlFunc.Subqueryable<ApplicationDetail>().Where(y => y.ApplicationId == x.ApplicationId &&
y.Category == FeeCategory.PaidApplication && y.OriginalAmount - y.OriginalProcessedAmount == 0).Count()
}).ToListAsync();
List<PaymentApplication> applications = [];
foreach (var item in details)
@ -638,6 +537,8 @@ namespace DS.WMS.Core.Settlement.Method
}
await TenantDb.Updateable(applications).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
return await base.PostSaveAsync(settlement);
}
@ -653,13 +554,31 @@ namespace DS.WMS.Core.Settlement.Method
{
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 })
//还原付费申请明细
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<ApplicationDetail>().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();
}
}
}

@ -1,7 +1,9 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Method;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
@ -31,11 +33,190 @@ namespace DS.WMS.Core.Settlement.Method
#region 保存
public virtual Task<DataResult<TEntity>> SaveAsync(SettlementRequest<TEntity> request)
/// <summary>
/// 提交结算单
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<TEntity>> SaveAsync(SettlementRequest<TEntity> request)
{
throw new NotImplementedException();
var settlement = request.Settlement;
if (settlement.SettlementDate == default)
settlement.SettlementDate = DateTime.Now;
settlement.Mode = SettlementMode.Payment;
settlement.BillType = SettlementBillType.Payment;
TEntity? dbValue = default;
if (request.Settlement.Id > 0)
{
dbValue = await TenantDb.Queryable<TEntity>().Select(x => new TEntity
{
Id = x.Id,
IsLocked = x.IsLocked,
Mode = x.Mode
}).FirstAsync(x => x.Id == request.Settlement.Id);
if (dbValue.IsLocked)
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.SettlementIsLocked));
}
var result = EnsureSettlement(request.Settlement, dbValue);
if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
if (request.Details?.Count > 0)
{
if (settlement.Id == 0 && settlement.CustomerId == 0)
{
var first = request.Details[0];
settlement.CustomerId = first.CustomerId.GetValueOrDefault();
settlement.CustomerName = first.CustomerName;
}
settlement.Details = request.Details.Select(x => new ApplicationDetail
{
ApplicationId = x.ApplicationId,
DetailId = x.Id == 0 ? null : x.Id,
RecordId = x.RecordId,
BusinessId = x.BusinessId,
BusinessType = x.BusinessType,
CustomerName = x.CustomerName ?? settlement.CustomerName,
FeeId = x.FeeId,
FeeName = x.FeeName,
FeeType = x.FeeType,
Category = FeeCategory.PaidApplicationSettlement,
ApplyAmount = x.Amount,
Currency = x.Currency,
ExchangeRate = x.ExchangeRate,
OriginalAmount = x.OriginalAmount,
OriginalCurrency = x.OriginalCurrency ?? (settlement.Currency.IsNullOrEmpty() ? x.Currency : settlement.Currency),
}).ToList();
//金额禁止为0
if (settlement.Details.Any(x => x.ApplyAmount == 0 || x.OriginalAmount == 0))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero));
if (settlement.Details.Any(x => x.OriginalCurrency.IsNullOrEmpty()))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.OriginalCurrencyCanNotNull));
result = await PreSaveAsync(settlement);
if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
settlement.Amount = settlement.Details.Sum(x => x.ApplyAmount);
}
await TenantDb.Ado.BeginTranAsync();
try
{
//关联导航属性插入
if (settlement.Id == 0)
{
//创建时需要生成申请单编号
var sequence = CommonService.Value.GetSequenceNext<TEntity>();
if (!sequence.Succeeded)
{
return DataResult<TEntity>.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist);
}
settlement.ApplicationNO = "CP" + SnowFlakeSingle.Instance.NextId(); //申请编号
settlement.SettlementNO = sequence.Data; //结算单号
await TenantDb.InsertNav(settlement).Include(x => x.Details).ExecuteCommandAsync();
}
else
{
if (settlement.Details.Count > 0)
await TenantDb.Insertable(settlement.Details).ExecuteCommandAsync();
await TenantDb.Updateable(settlement).IgnoreColumns(x => new
{
x.ApplicationNO,
x.SettlementNO,
x.IsLocked,
x.CreateBy,
x.CreateTime,
x.Deleted,
x.DeleteBy,
x.DeleteTime
}).ExecuteCommandAsync();
}
await OnSaveAsync(settlement);
if (settlement.Details?.Count > 0)
{
//更新费用记录的已结算金额
var fees = settlement.Details.Select(x => new FeeRecord
{
Id = x.RecordId,
SettlementAmount = x.OriginalAmount
}).ToList();
await TenantDb.Updateable(fees)
.PublicSetColumns(x => x.SettlementAmount, "+")
.UpdateColumns(x => new { x.SettlementAmount })
.ExecuteCommandAsync();
}
await TenantDb.Ado.CommitTranAsync();
return DataResult<TEntity>.Success(await PostSaveAsync(settlement));
}
catch (Exception ex)
{
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
}
/// <summary>
/// 用于结算单的状态检查
/// </summary>
/// <param name="settlement">提交的结算单</param>
/// <param name="dbValue">数据库值新增时为null</param>
/// <returns></returns>
protected virtual DataResult EnsureSettlement(TEntity settlement, TEntity? dbValue)
{
return DataResult.Success;
}
/// <summary>
/// 在保存前调用
/// </summary>
/// <param name="settlement">结算单</param>
/// <returns></returns>
protected virtual Task<DataResult> PreSaveAsync(TEntity settlement)
{
return Task.FromResult(DataResult.Success);
}
/// <summary>
/// 在保存时调用
/// </summary>
/// <param name="settlement">已保存的结算单</param>
/// <returns></returns>
protected virtual Task OnSaveAsync(TEntity settlement)
{
return Task.CompletedTask;
}
/// <summary>
/// 在保存完成后调用
/// </summary>
/// <param name="settlement">申请单</param>
protected virtual async Task<TEntity> PostSaveAsync(TEntity settlement)
{
if (settlement.Details?.Count > 0)
{
//更新费用记录状态
var ids = settlement.Details.Where(x => x.RecordId > 0).Select(x => x.RecordId);
if (!ids.Any())
return settlement;
await UpdateFeeStatus(ids);
}
return settlement;
}
#endregion
@ -59,6 +240,9 @@ namespace DS.WMS.Core.Settlement.Method
ProcessedAmount = x.ProcessedAmount,
OriginalProcessedAmount = x.OriginalProcessedAmount
}).ToListAsync();
if (details.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
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
{
@ -79,6 +263,15 @@ namespace DS.WMS.Core.Settlement.Method
await OnDeleteDetailAsync(apps);
await TenantDb.Deleteable(details).ExecuteCommandAsync();
//更新结算单的结算总金额
var apps2 = await TenantDb.Queryable<ApplicationDetail>().Where(x => appIds.Contains(x.ApplicationId) && !ids.Contains(x.Id))
.GroupBy(x => x.ApplicationId).Select(x => new TEntity
{
Id = x.ApplicationId,
Amount = SqlFunc.AggregateSum(x.ApplyAmount)
}).ToListAsync();
await TenantDb.Updateable(apps2).UpdateColumns(x => new { x.Amount }).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;
}
@ -102,6 +295,8 @@ namespace DS.WMS.Core.Settlement.Method
Id = x.Id,
Mode = x.Mode
}).ToListAsync();
if (apps.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)).Select(
x => new ApplicationDetail
@ -125,8 +320,12 @@ namespace DS.WMS.Core.Settlement.Method
{
await OnDeleteDetailAsync(apps);
await TenantDb.DeleteNav<TEntity>(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
//更新费用结算状态
var ids2 = details.Select(x => x.RecordId);
await UpdateFeeStatus(ids2);
return DataResult.Success;
}
catch (Exception ex)
@ -154,35 +353,97 @@ namespace DS.WMS.Core.Settlement.Method
/// <returns></returns>
protected virtual async Task OnDeleteDetailAsync(List<TEntity> settlements)
{
//还原付费申请明细
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<ApplicationDetail>().Where(x => ids.Contains(x.Id) && x.Category == FeeCategory.PaidApplication)
.Select(x => new ApplicationDetail
{
Id = x.Id,
ProcessedAmount = x.ProcessedAmount,
OriginalProcessedAmount = x.OriginalProcessedAmount
}).ToList();
//还原费用表的已结算金额
var fees = settlements.SelectMany(x => x.Details).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();
}
foreach (var detail in details)
{
var item = items.FirstOrDefault(x => x.DetailId == detail.Id);
detail.ProcessedAmount -= item.ApplyAmount;
detail.OriginalProcessedAmount -= item.OriginalAmount;
}
#endregion
await TenantDb.Updateable(details)
.UpdateColumns(x => new { x.ProcessedAmount, x.OriginalProcessedAmount })
.ExecuteCommandAsync();
/// <summary>
/// 设置结算单的锁定状态
/// </summary>
/// <param name="isLocked">是否锁定</param>
/// <param name="ids">结算ID</param>
/// <returns></returns>
public async Task<DataResult> SetLockAsync(bool isLocked, params long[] ids)
{
var dtNow = DateTime.Now;
var userId = long.Parse(User.UserId);
List<TEntity> list = null;
if (isLocked)
{
list = ids.Select(x => new TEntity
{
Id = x,
IsLocked = isLocked,
LockTime = dtNow,
LockUserId = userId
}).ToList();
}
else
{
list = ids.Select(x => new TEntity
{
Id = x,
IsLocked = isLocked,
UnlockTime = dtNow,
UnlockUserId = userId
}).ToList();
}
return await TenantDb.Updateable(list).UpdateColumns(x => new
{
x.IsLocked,
x.LockTime,
x.UnlockTime,
x.LockUserId,
x.UnlockUserId
}).ExecuteCommandAsync() > 0 ?
DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
#endregion
/// <summary>
/// 更新费用的结算状态
/// </summary>
/// <param name="ids">费用记录ID</param>
/// <returns></returns>
protected internal async Task UpdateFeeStatus(IEnumerable<long> ids)
{
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.Id))
.Select(x => new FeeRecord
{
Id = x.Id,
FeeStatus = x.FeeStatus,
Amount = x.Amount,
SettlementAmount = x.SettlementAmount,
OrderAmount = x.OrderAmount,
OrderSettlementAmount = x.OrderSettlementAmount
}).ToListAsync();
if (fees.Count == 0)
return;
List<FeeRecord> list = new(fees.Count);
foreach (var item in fees)
{
var restAmount = item.Amount - item.SettlementAmount - item.OrderAmount + item.OrderSettlementAmount;
if (restAmount == 0)
{
item.FeeStatus = FeeStatus.SettlementCompleted;
list.Add(item);
}
else if (restAmount != item.Amount)
{
item.FeeStatus = FeeStatus.PartialSettlement;
list.Add(item);
}
}
await TenantDb.Updateable(list).UpdateColumns(x => new { x.FeeStatus }).ExecuteCommandAsync();
}
}
}

@ -31,7 +31,7 @@ namespace DS.WMS.FeeApi.Controllers
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetList")]
public async Task<DataResult<List<PaymentApplicationDto>>> ListAsync([FromBody] PageRequest request)
public async Task<DataResult<List<PaymentApplicationDto>>> ListAsync([FromBody] PageRequest<AuditStatusForQuery> request)
{
return await _auditService.GetListAsync(request);
}

@ -0,0 +1,91 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
using DS.WMS.Core.Settlement.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 付费自由结算API
/// </summary>
public class PaymentFreeSettlementController : ApiController
{
readonly IPaymentFreeSettlementService _service;
/// <summary>
/// 初始化
/// </summary>
/// <param name="service"></param>
public PaymentFreeSettlementController(IPaymentFreeSettlementService service)
{
_service = service;
}
/// <summary>
/// 获取待结算费用分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetFeeList")]
public async Task<DataResult<List<SettlementBiz>>> GetFeeListAsync([FromBody] PageRequest request)
{
return await _service.GetBizListAsync(request);
}
/// <summary>
/// 根据付费申请创建结算单
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("Save")]
public async Task<DataResult<PaymentSettlement>> SaveAsync([FromBody] SettlementRequest<PaymentSettlement> request)
{
return await _service.SaveAsync(request);
}
/// <summary>
/// 删除申请单明细
/// </summary>
/// <param name="model">申请单明细ID</param>
/// <returns></returns>
[HttpPost, Route("DeleteDetail")]
public async Task<DataResult> DeleteDetailAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _service.DeleteDetailAsync(model.Ids);
}
/// <summary>
/// 删除申请单
/// </summary>
/// <param name="model">申请单ID</param>
/// <returns></returns>
[HttpPost, Route("Delete")]
public async Task<DataResult> DeleteAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _service.DeleteAsync(model.Ids);
}
/// <summary>
/// 设置结算单的锁定状态
/// </summary>
/// <returns></returns>
[HttpPost, Route("SetLock")]
public async Task<DataResult> SetLockAsync(IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
bool isLocked = Convert.ToBoolean(model.Value);
return await _service.SetLockAsync(isLocked, model.Ids);
}
}
}

@ -52,7 +52,7 @@ namespace DS.WMS.FeeApi.Controllers
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetApplicationList")]
public async Task<DataResult<List<PaymentApplicationDto>>> GetApplicationListAsync([FromBody] PageRequest<ApplicationListQuery> request)
public async Task<DataResult<List<PaymentApplicationDtoV2>>> GetApplicationListAsync([FromBody] PageRequest<ApplicationListQuery> request)
{
return await _service.GetApplicationListAsync(request);
}
@ -60,7 +60,7 @@ namespace DS.WMS.FeeApi.Controllers
/// <summary>
/// 获取付费申请的费用明细
/// </summary>
/// <param name="id">申请单ID</param>
/// <param name="id">付费申请单ID</param>
/// <returns></returns>
[HttpGet, Route("GetApplicationDetails")]
public async Task<DataResult<List<PaymentApplicationDetailDto>>> GetApplicationDetailsAsync(long id)
@ -69,7 +69,7 @@ namespace DS.WMS.FeeApi.Controllers
}
/// <summary>
/// 获取付费申请的费用明细
/// 获取结算明细的费用明细
/// </summary>
/// <param name="model">申请明细ID</param>
/// <returns></returns>
@ -123,5 +123,19 @@ namespace DS.WMS.FeeApi.Controllers
return await _service.DeleteAsync(model.Ids);
}
/// <summary>
/// 设置结算单的锁定状态
/// </summary>
/// <returns></returns>
[HttpPost, Route("SetLock")]
public async Task<DataResult> SetLockAsync(IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
bool isLocked = Convert.ToBoolean(model.Value);
return await _service.SetLockAsync(isLocked, model.Ids);
}
}
}

@ -2252,3 +2252,248 @@
2024-07-08 17:48:22.1047 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-08 17:48:22.1047 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-08 17:48:22.1047 Info Configuration initialized.
2024-07-09 11:49:51.2234 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-09 11:49:51.2600 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-09 11:49:51.2600 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-09 11:49:51.2824 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-09 11:49:51.2824 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-09 11:49:51.2824 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-09 11:49:51.3056 Info Configuration initialized.
2024-07-09 11:54:05.4348 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-09 11:54:05.4650 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-09 11:54:05.4650 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-09 11:54:05.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-09 11:54:05.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-09 11:54:05.4790 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-09 11:54:05.4954 Info Configuration initialized.
2024-07-10 11:40:15.2058 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:40:15.2450 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:40:15.2628 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:40:15.2771 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-10 11:40:15.2851 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-10 11:40:15.2851 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:40:15.2970 Info Configuration initialized.
2024-07-10 11:46:36.5322 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:46:36.6318 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:46:36.6406 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:46:36.6670 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-10 11:46:36.6835 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-10 11:46:36.6919 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:46:36.7069 Info Configuration initialized.
2024-07-10 11:50:46.3952 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:50:46.4422 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:50:46.4422 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:50:46.4689 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-10 11:50:46.4689 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-10 11:50:46.4839 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:50:46.4839 Info Configuration initialized.
2024-07-10 11:53:03.3009 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:53:03.3450 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:53:03.3660 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:53:03.4012 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-10 11:53:03.4150 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-10 11:53:03.4217 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:53:03.4217 Info Configuration initialized.
2024-07-10 11:55:00.6404 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:55:00.7028 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:55:00.7028 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:55:00.7487 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-10 11:55:00.7667 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-10 11:55:00.7667 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:55:00.7877 Info Configuration initialized.
2024-07-10 11:55:25.1570 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:55:25.2198 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:55:25.2198 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:55:25.2493 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-10 11:55:25.2599 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-10 11:55:25.2665 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:55:25.2665 Info Configuration initialized.
2024-07-10 11:59:17.7815 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 11:59:17.8304 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 11:59:17.8304 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 11:59:17.8535 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-10 11:59:17.8638 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-10 11:59:17.8638 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 11:59:17.8760 Info Configuration initialized.
2024-07-10 13:34:37.6477 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 13:34:37.6732 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 13:34:37.6918 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 13:34:37.7140 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-10 13:34:37.7217 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-10 13:34:37.7217 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 13:34:37.7322 Info Configuration initialized.
2024-07-10 14:04:49.7357 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:04:49.7912 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:04:49.7981 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:04:49.8251 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-10 14:04:49.8606 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-10 14:04:49.8606 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:04:49.8802 Info Configuration initialized.
2024-07-10 14:15:38.0626 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:15:38.0976 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:15:38.1299 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:15:38.1464 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-10 14:15:38.1541 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-10 14:15:38.1541 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:15:38.1541 Info Configuration initialized.
2024-07-10 14:24:28.8757 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:24:28.9277 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:24:28.9407 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:24:28.9637 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-10 14:24:28.9742 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-10 14:24:28.9742 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:24:28.9880 Info Configuration initialized.
2024-07-10 14:44:44.5964 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:44:44.7057 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:44:44.7057 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:44:44.7446 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-10 14:44:44.7589 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-10 14:44:44.7663 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:44:44.7833 Info Configuration initialized.
2024-07-10 14:48:29.1877 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:48:29.2591 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:48:29.2664 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:48:29.2895 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-10 14:48:29.3018 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-10 14:48:29.3018 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:48:29.3197 Info Configuration initialized.
2024-07-10 14:55:04.8946 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:55:04.9570 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:55:04.9570 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:55:04.9876 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-10 14:55:04.9876 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-10 14:55:05.0016 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:55:05.0016 Info Configuration initialized.
2024-07-10 14:55:44.3444 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:55:44.3951 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:55:44.4146 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:55:44.4414 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-10 14:55:44.4533 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-10 14:55:44.4533 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:55:44.4696 Info Configuration initialized.
2024-07-10 14:58:12.9358 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 14:58:12.9872 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 14:58:12.9872 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 14:58:13.0162 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-10 14:58:13.0289 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-10 14:58:13.0289 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 14:58:13.0509 Info Configuration initialized.
2024-07-10 15:09:04.8454 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:09:04.9132 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:09:04.9230 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:09:04.9485 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-10 15:09:04.9607 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-10 15:09:04.9670 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:09:04.9670 Info Configuration initialized.
2024-07-10 15:20:17.2025 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:20:17.2755 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:20:17.2810 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:20:17.3048 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-10 15:20:17.3147 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-10 15:20:17.3147 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:20:17.3311 Info Configuration initialized.
2024-07-10 15:25:58.8734 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:25:59.0403 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:25:59.0635 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:25:59.1047 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-10 15:25:59.1202 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-10 15:25:59.1321 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:25:59.1531 Info Configuration initialized.
2024-07-10 15:28:09.3659 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:28:09.4273 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:28:09.4273 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:28:09.4649 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-10 15:28:09.4844 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-10 15:28:09.4844 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:28:09.5108 Info Configuration initialized.
2024-07-10 15:32:33.0334 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:32:33.1033 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:32:33.1200 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:32:33.1557 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-10 15:32:33.1770 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-10 15:32:33.1853 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:32:33.1853 Info Configuration initialized.
2024-07-10 15:35:46.4754 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:35:46.6169 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:35:46.6169 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:35:46.6390 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-10 15:35:46.6390 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-10 15:35:46.6390 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:35:46.6604 Info Configuration initialized.
2024-07-10 15:46:57.2041 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:46:57.2845 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:46:57.2845 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:46:57.3176 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-10 15:46:57.3311 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-10 15:46:57.3311 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:46:57.3494 Info Configuration initialized.
2024-07-10 15:53:45.2044 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 15:53:45.2691 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 15:53:45.2691 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 15:53:45.3045 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-10 15:53:45.3175 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-10 15:53:45.3175 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 15:53:45.3328 Info Configuration initialized.
2024-07-10 16:13:10.7966 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:13:10.8602 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:13:10.8791 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:13:10.9133 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-10 16:13:10.9321 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-10 16:13:10.9406 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:13:10.9548 Info Configuration initialized.
2024-07-10 16:23:29.5797 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:23:29.6495 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:23:29.6613 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:23:29.6911 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-10 16:23:29.7133 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-10 16:23:29.7210 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:23:29.7210 Info Configuration initialized.
2024-07-10 16:31:01.0763 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:31:01.1324 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:31:01.1324 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:31:01.1624 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-10 16:31:01.1746 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-10 16:31:01.1746 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:31:01.1928 Info Configuration initialized.
2024-07-10 16:44:16.1731 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:44:16.2348 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:44:16.2348 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:44:16.2661 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-10 16:44:16.2661 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-10 16:44:16.2829 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:44:16.2829 Info Configuration initialized.
2024-07-10 16:45:32.9080 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:45:32.9935 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:45:32.9971 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:45:33.0816 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-10 16:45:33.0947 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-10 16:45:33.0947 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:45:33.0947 Info Configuration initialized.
2024-07-10 16:49:07.2693 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:49:07.3353 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:49:07.3423 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:49:07.3717 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-10 16:49:07.3908 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-10 16:49:07.3908 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:49:07.4270 Info Configuration initialized.
2024-07-10 16:52:17.9216 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 16:52:17.9840 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 16:52:17.9840 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 16:52:18.0243 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-10 16:52:18.0471 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-10 16:52:18.0471 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 16:52:18.0673 Info Configuration initialized.
2024-07-10 17:01:36.4738 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 17:01:36.5624 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 17:01:36.5624 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 17:01:36.6626 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-10 17:01:36.6732 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-10 17:01:36.6732 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 17:01:36.6864 Info Configuration initialized.
2024-07-10 17:10:02.8627 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 17:10:02.9033 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 17:10:02.9074 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 17:10:02.9237 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-10 17:10:02.9237 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-10 17:10:02.9358 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 17:10:02.9358 Info Configuration initialized.

Loading…
Cancel
Save