付费结算删除

usertest
嵇文龙 5 months ago
parent 373646d302
commit 0bba27794f

@ -8,28 +8,34 @@ namespace DS.Module.Core.Enums
public enum SettlementMode public enum SettlementMode
{ {
/// <summary> /// <summary>
/// 收费申请+付费申请 /// 付费申请
/// </summary> /// </summary>
[Description("收费申请&付费申请")] [Description("付费申请")]
ChargeAndPayment = 1, Payment = 1,
/// <summary>
/// 收费申请
/// </summary>
[Description("收费申请")]
Charge = 2,
/// <summary> /// <summary>
/// 自由结算 /// 自由结算
/// </summary> /// </summary>
[Description("自由结算")] [Description("自由结算")]
FreeSettlement = 2, FreeSettlement = 3,
/// <summary> /// <summary>
/// 发票结算 /// 发票结算
/// </summary> /// </summary>
[Description("发票结算")] [Description("发票结算")]
InvoiceSettlement = 3, InvoiceSettlement = 4,
/// <summary> /// <summary>
/// 付费发票结算 /// 付费发票结算
/// </summary> /// </summary>
[Description("付费发票结算")] [Description("付费发票结算")]
PaymentInvoiceSettlement = 4 PaymentInvoiceSettlement = 5
} }
/// <summary> /// <summary>

@ -1,4 +1,5 @@
using DS.Module.Core; using System.Runtime.Serialization;
using DS.Module.Core;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Application.Dtos namespace DS.WMS.Core.Application.Dtos
@ -9,7 +10,7 @@ namespace DS.WMS.Core.Application.Dtos
public class ApplicationDetailDto public class ApplicationDetailDto
{ {
/// <summary> /// <summary>
/// ID /// 明细ID
/// </summary> /// </summary>
public long Id { get; set; } public long Id { get; set; }
@ -98,6 +99,12 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary> /// </summary>
public string? AccountDate { get; set; } public string? AccountDate { get; set; }
/// <summary>
/// 所属分部
/// </summary>
[IgnoreDataMember]
public long? SaleDeptId { get; set; }
/// <summary> /// <summary>
/// 所属分部 /// 所属分部
/// </summary> /// </summary>
@ -187,6 +194,11 @@ namespace DS.WMS.Core.Application.Dtos
/// 订舱编号 /// 订舱编号
/// </summary> /// </summary>
public string? BookingNo { get; set; } public string? BookingNo { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Note { get; set; }
} }
/// <summary> /// <summary>
@ -203,6 +215,11 @@ namespace DS.WMS.Core.Application.Dtos
/// 未收合计 /// 未收合计
/// </summary> /// </summary>
public decimal? OutstandingAmount { get; set; } public decimal? OutstandingAmount { get; set; }
/// <summary>
/// 已结算金额
/// </summary>
public decimal SettlementAmount { get; set; }
} }
/// <summary> /// <summary>

@ -13,14 +13,14 @@ namespace DS.WMS.Core.Application.Entity
/// <summary> /// <summary>
/// 申请单编号 /// 申请单编号
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请单编号", Length = 20, IsNullable = false)] [SugarColumn(ColumnDescription = "申请单编号", Length = 50, IsNullable = false)]
public string ApplicationNO { get; set; } public string ApplicationNO { get; set; }
/// <summary> /// <summary>
/// 申请单状态 /// 申请单状态
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请单状态", IsNullable = false)] [SugarColumn(ColumnDescription = "申请单状态", IsNullable = false)]
public int Status { get; set; } public virtual int Status { get; set; }
/// <summary> /// <summary>
/// 客户ID /// 客户ID

@ -338,6 +338,7 @@ namespace DS.WMS.Core.Application.Method
x => new ApplicationDetail x => new ApplicationDetail
{ {
Id = x.Id, Id = x.Id,
ApplicationId = x.ApplicationId,
RecordId = x.RecordId, RecordId = x.RecordId,
OriginalAmount = x.OriginalAmount OriginalAmount = x.OriginalAmount
}).ToListAsync(); }).ToListAsync();

@ -8,6 +8,26 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary> /// </summary>
public class PaymentSettlementDto : SettlementDto public class PaymentSettlementDto : SettlementDto
{ {
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string? InvoiceNO { get; set; }
/// <summary>
/// 发票日期
/// </summary>
public DateTime? InvoiceDate { get; set; }
/// <summary>
/// 开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; }
/// <summary> /// <summary>
/// 人民币金额 /// 人民币金额
/// </summary> /// </summary>
@ -108,7 +128,7 @@ namespace DS.WMS.Core.Settlement.Dtos
/// <summary> /// <summary>
/// 未开票金额 /// 未开票金额
/// </summary> /// </summary>
public string UnInvoiceAmount => string.Join(" ", UnInvoiceList); public string UnInvoiceAmount => string.Join(" ", UnInvoiceList ?? []);
/// <summary> /// <summary>
/// 是否导出凭证 /// 是否导出凭证
@ -129,20 +149,5 @@ namespace DS.WMS.Core.Settlement.Dtos
/// 是否生成支票 /// 是否生成支票
/// </summary> /// </summary>
public bool IsGenerateCheck { get; set; } public bool IsGenerateCheck { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string? InvoiceNO { get; set; }
/// <summary>
/// 发票日期
/// </summary>
public DateTime? InvoiceDate { get; set; }
/// <summary>
/// 开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; }
} }
} }

@ -1,20 +1,73 @@
using DS.WMS.Core.Application.Dtos; using System.Runtime.Serialization;
namespace DS.WMS.Core.Settlement.Dtos namespace DS.WMS.Core.Settlement.Dtos
{ {
/// <summary> /// <summary>
/// 结算明细DTO /// 结算明细DTO
/// </summary> /// </summary>
public class SettlementDetailDto : ApplicationDetailDto public class SettlementDetailDto
{ {
/// <summary>
/// 申请明细ID
/// </summary>
public IEnumerable<long> Ids { get; set; }
/// <summary>
/// 申请单ID
/// </summary>
public long ApplicationId { get; set; }
/// <summary> /// <summary>
/// 结算金额 /// 结算金额
/// </summary> /// </summary>
public decimal SettlementAmount { get; set; } public decimal SettlementAmount { get; set; }
/// <summary>
/// 原始币别
/// </summary>
public string OriginalCurrency { get; set; }
/// <summary>
/// 原始金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// RMB申请金额
/// </summary>
public decimal? RMBApplyAmount { get; set; }
/// <summary>
/// USD申请金额
/// </summary>
public decimal? USDApplyAmount { get; set; }
/// <summary>
/// 申请日期
/// </summary>
public DateTime? CreateTime { get; set; }
[IgnoreDataMember]
public long? CreateBy { get; set; }
/// <summary>
/// 申请人
/// </summary>
public string? CreateByName { get; set; }
/// <summary> /// <summary>
/// 发票号 /// 发票号
/// </summary> /// </summary>
public string? InvoiceNO { get; set; } public string? InvoiceNO { get; set; }
/// <summary>
/// 申请支付日期
/// </summary>
public DateTime? PaymentDate { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Note { get; set; }
} }
} }

@ -181,5 +181,10 @@ namespace DS.WMS.Core.Settlement.Dtos
/// 创建日期 /// 创建日期
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public DateTime CreateTime { get; set; }
/// <summary>
/// 结算明细
/// </summary>
public List<SettlementDetailDto> Details { get; set; }
} }
} }

@ -1,4 +1,5 @@
using DS.WMS.Core.Settlement.Entity; using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Settlement.Entity;
namespace DS.WMS.Core.Settlement.Dtos namespace DS.WMS.Core.Settlement.Dtos
{ {
@ -15,6 +16,6 @@ namespace DS.WMS.Core.Settlement.Dtos
/// <summary> /// <summary>
/// 申请明细 /// 申请明细
/// </summary> /// </summary>
public List<SettlementDetailDto>? Details { get; set; } public List<PaymentApplicationDetailDto>? Details { get; set; }
} }
} }

@ -1,4 +1,4 @@
using DS.WMS.Core.Application.Entity; using System.Runtime.Serialization;
using SqlSugar; using SqlSugar;
namespace DS.WMS.Core.Settlement.Entity namespace DS.WMS.Core.Settlement.Entity
@ -10,10 +10,10 @@ namespace DS.WMS.Core.Settlement.Entity
public class PaymentSettlement : SettlementBase public class PaymentSettlement : SettlementBase
{ {
/// <summary> /// <summary>
/// 继承自<see cref="ApplicationBase"/>,由于付费结算不存在状态,访问此属性将始终引发<see cref="NotSupportedException"/>异常 /// 由于付费结算不存在状态已设置取消关联SqlSugar
/// </summary> /// </summary>
/// <exception cref="NotSupportedException">始终引发此异常</exception> [IgnoreDataMember, SugarColumn(IsIgnore = true)]
public new int Status => throw new NotSupportedException(); public override int Status { get => base.Status; set => base.Status = value; }
/// <summary> /// <summary>
/// 汇率 /// 汇率
@ -126,5 +126,29 @@ namespace DS.WMS.Core.Settlement.Entity
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "总账凭证号", IsNullable = true, Length = 50)] [SugarColumn(ColumnDescription = "总账凭证号", IsNullable = true, Length = 50)]
public string? LedgerVoucherNO { get; set; } public string? LedgerVoucherNO { get; set; }
/// <summary>
/// 相关号码
/// </summary>
[SugarColumn(ColumnDescription = "相关号码", IsNullable = true, Length = 50)]
public string? RelativeNO { get; set; }
/// <summary>
/// 发票号
/// </summary>
[SugarColumn(ColumnDescription = "发票号")]
public string? InvoiceNO { get; set; }
/// <summary>
/// 发票日期
/// </summary>
[SugarColumn(ColumnDescription = "发票日期")]
public DateTime? InvoiceDate { get; set; }
/// <summary>
/// 开票金额
/// </summary>
[SugarColumn(ColumnDescription = "开票金额")]
public decimal? InvoiceAmount { get; set; }
} }
} }

@ -18,6 +18,13 @@ namespace DS.WMS.Core.Settlement.Interface
/// <returns></returns> /// <returns></returns>
Task<DataResult<List<PaymentSettlementDto>>> GetListAsync(PageRequest request); Task<DataResult<List<PaymentSettlementDto>>> GetListAsync(PageRequest request);
/// <summary>
/// 获取付费结算及其明细
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
Task<DataResult<PaymentSettlementDto>> GetAsync(long id);
/// <summary> /// <summary>
/// 获取付费申请分页列表 /// 获取付费申请分页列表
/// </summary> /// </summary>
@ -30,6 +37,13 @@ namespace DS.WMS.Core.Settlement.Interface
/// </summary> /// </summary>
/// <param name="id">申请单ID</param> /// <param name="id">申请单ID</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(long id); Task<DataResult<List<PaymentApplicationDetailDto>>> GetDetailsAsync(long id);
/// <summary>
/// 提交结算单
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<PaymentSettlement>> SaveAsync(SettlementRequest<PaymentSettlement> request);
} }
} }

@ -75,8 +75,6 @@ namespace DS.WMS.Core.Settlement.Method
IsVoucherDisabled = x.IsVoucherDisabled, //禁用凭证 IsVoucherDisabled = x.IsVoucherDisabled, //禁用凭证
SaleDeptId = x.SaleDeptId, //所属分部 SaleDeptId = x.SaleDeptId, //所属分部
LedgerVoucherNO = x.LedgerVoucherNO //总账凭证号 LedgerVoucherNO = x.LedgerVoucherNO //总账凭证号
//BillType = x.BillType, //单据类型
//Category = x.Category, //业务类别
}); });
var whereList = request.GetConditionalModels(Db); var whereList = request.GetConditionalModels(Db);
@ -106,6 +104,128 @@ namespace DS.WMS.Core.Settlement.Method
return result; return result;
} }
/// <summary>
/// 获取付费结算及其明细
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
public async Task<DataResult<PaymentSettlementDto>> GetAsync(long id)
{
var model = await TenantDb.Queryable<PaymentSettlement>().Select(x => new PaymentSettlementDto
{
Id = x.Id,
ApplicationNO = x.ApplicationNO, //申请编号
SettlementNO = x.SettlementNO, //结算单号
CustomerId = x.CustomerId, //结算单位
CustomerName = x.CustomerName,
Mode = x.Mode, //结算类型
SettlementDate = x.SettlementDate, //结算日期
SettlementTypeId = x.SettlementTypeId, //结算方式
CustomerBankId = x.CustomerBankId, //客户银行
Account = x.Account, //客户账户
Currency = x.Currency, //币别
Amount = x.Amount, //金额
ExchangeRate = x.ExchangeRate, //汇率
IsLocked = x.IsLocked, //锁定状态
SaleDeptId = x.SaleDeptId, //所属分部
BillType = x.BillType, //单据类型
Category = x.Category, //业务类别
LedgerVoucherNO = x.LedgerVoucherNO, //总账凭证号
RelativeNO = x.RelativeNO, //相关号码
InvoiceAmount = x.InvoiceAmount,
InvoiceDate = x.InvoiceDate,
InvoiceNO = x.InvoiceNO,
Note = x.Note, //备注
AccountAmount = x.AccountAmount, //记账资料
AccountCurrency = x.AccountCurrency,
AccountRate = x.AccountRate,
PrePayAmount = x.PrePayAmount, //预付支资料
PrePayCurrency = x.PrePayCurrency,
PrePayRate = x.PrePayRate,
AHSRAmount = x.AHSRAmount, //实收支资料
AHSRCurrency = x.AHSRCurrency,
AHSRRate = x.AHSRRate,
FinancialAmount = x.FinancialAmount,//财务费用
FinancialCurrency = x.FinancialCurrency,
FinancialRate = x.FinancialRate,
AdvanceAmount = x.AdvanceAmount, //预收支资料
AdvanceCurrency = x.AdvanceCurrency,
AdvanceRate = x.AdvanceRate,
}).FirstAsync();
if (model != null)
{
var details = await TenantDb.Queryable<ApplicationDetail>().Where(d => d.ApplicationId == id)
.LeftJoin<ApplicationDetail>((d, pd) => d.DetailId == pd.Id)
.LeftJoin<PaymentApplication>((d, pd, pa) => pd.ApplicationId == pa.Id)
.Select((d, pd, pa) => new
{
d.Id,
d.ApplicationId,
d.ApplyAmount,
//d.Currency,
d.OriginalCurrency,
d.OriginalAmount,
pa.CreateTime,
pa.CreateBy,
pa.PaymentDate,
pa.Note
}).ToListAsync();
var gp = details.GroupBy(x => x.ApplicationId);
model.Details = new List<SettlementDetailDto>();
foreach (var g in gp)
{
var firstItem = g.FirstOrDefault();
var dto = new SettlementDetailDto
{
ApplicationId = g.Key,
Ids = g.Select(x => x.Id),
RMBApplyAmount = g.Where(x => x.OriginalCurrency == RMB_CODE).Sum(x => x.ApplyAmount),
USDApplyAmount = g.Where(x => x.OriginalCurrency == USD_CODE).Sum(x => x.ApplyAmount),
CreateTime = firstItem?.CreateTime,
CreateBy = firstItem?.CreateBy,
PaymentDate = firstItem?.PaymentDate,
Note = firstItem?.Note
};
//包含多个币别
if (g.GroupBy(x => x.OriginalCurrency).Select(x => x.Key).Count() > 1)
{
//原始币别=不等于结算单币别的首个币别参考DS7
dto.OriginalCurrency = g.Where(x => x.OriginalCurrency != model.Currency).Select(x => x.OriginalCurrency).FirstOrDefault();
//原始金额=当前结算单的币别合计
dto.OriginalAmount = g.Where(x => x.OriginalCurrency == model.Currency).Sum(x => x.ApplyAmount);
}
else
{
dto.OriginalCurrency = firstItem?.OriginalCurrency;
dto.OriginalAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount);
}
//结算金额=原申请的原始币别合计
dto.SettlementAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount);
model.Details.Add(dto);
}
if (model.Details.Count > 0)
{
//关联用户名称
var userIds = model.Details.Select(x => x.CreateBy).Distinct();
var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();
foreach (var item in model.Details)
{
item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
}
}
}
return DataResult<PaymentSettlementDto>.Success(model);
}
/// <summary> /// <summary>
/// 获取付费申请分页列表 /// 获取付费申请分页列表
/// </summary> /// </summary>
@ -173,29 +293,29 @@ namespace DS.WMS.Core.Settlement.Method
/// </summary> /// </summary>
/// <param name="id">申请单ID</param> /// <param name="id">申请单ID</param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(long id) public async Task<DataResult<List<PaymentApplicationDetailDto>>> GetDetailsAsync(long id)
{ {
var details = await TenantDb.Queryable<ApplicationDetail>().Where(d => d.ApplicationId == id && (d.ApplyAmount - d.ProcessedAmount) != 0) var details = await TenantDb.Queryable<ApplicationDetail>().Where(d => d.ApplicationId == id && (d.ApplyAmount - d.ProcessedAmount) != 0)
.InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id) .InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.InnerJoin<BusinessFeeStatus>((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType) .InnerJoin<BusinessFeeStatus>((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType)
.Select((d, f, b) => new SettlementDetailDto .Select((d, f, b) => new PaymentApplicationDetailDto
{ {
Id = d.Id, Id = d.Id,
ApplicationId = d.ApplicationId, ApplicationId = d.ApplicationId,
BusinessId = d.BusinessId,
BusinessType = d.BusinessType,
RecordId = d.RecordId, RecordId = d.RecordId,
FeeName = d.FeeName, FeeName = d.FeeName,
FeeType = d.FeeType, //收付 FeeType = d.FeeType, //收付
Amount = d.ApplyAmount, //申请金额 Amount = d.ApplyAmount, //申请金额
SettlementAmount = d.ApplyAmount, //结算金额默认=申请金额 SettlementAmount = f.SettlementAmount, //结算金额
RestAmount = d.ApplyAmount - d.ProcessedAmount, //剩余结算金额
CustomerId = f.CustomerId, CustomerId = f.CustomerId,
CustomerName = d.CustomerName, CustomerName = d.CustomerName,
OriginalCurrency = d.OriginalCurrency, //原始币别 OriginalCurrency = d.OriginalCurrency, //原始币别
OriginalRate = f.ExchangeRate, //原始汇率 OriginalRate = f.ExchangeRate, //原始汇率
ExchangeRate = d.ExchangeRate, //折算汇率 ExchangeRate = d.ExchangeRate, //折算汇率
OriginalAmount = d.OriginalAmount, //原始金额 OriginalAmount = d.OriginalAmount //原始金额
InvoiceNO = f.InvoiceNO, //发票号
BusinessId = f.BusinessId,
BusinessType = f.BusinessType
}).ToListAsync(); }).ToListAsync();
if (details.Count > 0) if (details.Count > 0)
@ -221,6 +341,7 @@ namespace DS.WMS.Core.Settlement.Method
s.ETD, //开船日期 s.ETD, //开船日期
s.Sale, //揽货人 s.Sale, //揽货人
cs.SourceName, //业务来源 cs.SourceName, //业务来源
s.Note
}).ToListAsync(); }).ToListAsync();
foreach (var item in g) foreach (var item in g)
{ {
@ -236,6 +357,7 @@ namespace DS.WMS.Core.Settlement.Method
item.AccountDate = biz.AccountDate; item.AccountDate = biz.AccountDate;
item.Vessel = biz.Vessel; item.Vessel = biz.Vessel;
item.Voyage = biz.Voyno; item.Voyage = biz.Voyno;
item.Note = biz.Note;
} }
} }
break; break;
@ -246,19 +368,18 @@ namespace DS.WMS.Core.Settlement.Method
} }
} }
return DataResult<List<SettlementDetailDto>>.Success(details); return DataResult<List<PaymentApplicationDetailDto>>.Success(details);
} }
/// <summary> /// <summary>
/// 创建结算单 /// 提交结算单
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<PaymentSettlement>> CreateAsync(SettlementRequest<PaymentSettlement> request) public async Task<DataResult<PaymentSettlement>> SaveAsync(SettlementRequest<PaymentSettlement> request)
{ {
var ids = request.Details.Select(x => x.ApplicationId).Distinct(); var appIds = request.Details.Select(x => x.ApplicationId).Distinct();
var appList = await TenantDb.Queryable<PaymentApplication>().Where(x => ids.Contains(x.Id)) var appList = await TenantDb.Queryable<PaymentApplication>().Where(x => appIds.Contains(x.Id))
.Select(x => new .Select(x => new
{ {
x.Id, x.Id,
@ -269,7 +390,7 @@ namespace DS.WMS.Core.Settlement.Method
if (appList.Count == 0) if (appList.Count == 0)
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (appList.Exists(x => x.Status != PaymentApplicationStatus.AuditSubmittd && x.Status != PaymentApplicationStatus.PartialSettlement)) if (appList.Exists(x => x.Status != PaymentApplicationStatus.AuditPassed && x.Status != PaymentApplicationStatus.PartialSettlement))
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSelectStatusError)); return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSelectStatusError));
if (appList.GroupBy(x => x.CustomerId).Select(x => x.Key).Count() > 1) if (appList.GroupBy(x => x.CustomerId).Select(x => x.Key).Count() > 1)
@ -279,62 +400,13 @@ namespace DS.WMS.Core.Settlement.Method
if (request.Details.Any(x => x.SettlementAmount == 0)) if (request.Details.Any(x => x.SettlementAmount == 0))
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero)); return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero));
StringBuilder sb = new(); var ids = request.Details.Select(x => x.RecordId).Distinct().ToList();
var appDetails = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)) var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.Id)).Select(x => new FeeRecord
.Select(x => new
{
x.Id,
x.ApplicationId,
x.ApplyAmount,
x.BusinessId,
x.BusinessType,
x.Currency,
x.CustomerName,
x.FeeId,
x.FeeName,
x.FeeType,
x.OriginalAmount,
x.OriginalCurrency,
x.ProcessedAmount,
x.OriginalProcessedAmount,
}).ToListAsync();
foreach (var item in request.Details)
{
var appDetail = appDetails.Find(x => x.Id == item.Id);
decimal restValue = appDetail.ApplyAmount - appDetail.ProcessedAmount;
if (item.SettlementAmount > 0 && item.SettlementAmount > restValue)
{
sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), item.FeeName);
sb.Append("");
continue;
}
else if (item.SettlementAmount < 0 && item.SettlementAmount < restValue)
{
sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), item.FeeName);
sb.Append("");
continue;
}
}
if (sb.Length > 0)
return DataResult<PaymentSettlement>.Failed(sb.ToString());
var ids2 = request.Details.Select(x => x.RecordId).Distinct().ToList();
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids2.Contains(x.Id)).Select(x => new FeeRecord
{ {
Id = x.Id, Id = x.Id,
//BusinessId = x.BusinessId, Currency = x.Currency,
//BusinessType = x.BusinessType,
//FeeId = x.FeeId,
//FeeName = x.FeeName,
//FeeType = x.FeeType,
//CustomerId = x.CustomerId,
//CustomerName = x.CustomerName,
Amount = x.Amount,
//Currency = x.Currency,
//ExchangeRate = x.ExchangeRate,
//OrderAmount = x.OrderAmount,
OrderSettlementAmount = x.OrderSettlementAmount, OrderSettlementAmount = x.OrderSettlementAmount,
//SettlementAmount = x.SettlementAmount SettlementAmount = x.SettlementAmount
}).ToListAsync(); }).ToListAsync();
if (fees.Count != request.Details.Count) if (fees.Count != request.Details.Count)
@ -351,47 +423,64 @@ namespace DS.WMS.Core.Settlement.Method
settlement.CustomerName = app.CustomerName; settlement.CustomerName = app.CustomerName;
} }
settlement.Mode = SettlementMode.ChargeAndPayment; settlement.Mode = SettlementMode.Payment;
settlement.BillType = SettlementBillType.Payment; settlement.BillType = SettlementBillType.Payment;
settlement.Amount = request.Details.Sum(x => x.SettlementAmount);
settlement.Details = request.Details.Select(x => new ApplicationDetail settlement.Details = request.Details.Select(x => new ApplicationDetail
{ {
ApplicationId = x.ApplicationId, ApplicationId = x.ApplicationId,
DetailId = x.Id, DetailId = x.Id,
ApplyAmount = x.SettlementAmount, RecordId = x.RecordId,
BusinessId = x.BusinessId, BusinessId = x.BusinessId,
BusinessType = x.BusinessType, BusinessType = x.BusinessType,
Category = FeeCategory.PaidApplicationSettlement, CustomerName = x.CustomerName ?? settlement.CustomerName,
Currency = x.Currency,
CustomerName = x.CustomerName,
ExchangeRate = x.ExchangeRate,
FeeId = x.FeeId, FeeId = x.FeeId,
FeeName = x.FeeName, FeeName = x.FeeName,
FeeType = x.FeeType, FeeType = x.FeeType,
Category = FeeCategory.PaidApplicationSettlement,
ApplyAmount = x.RestAmount.GetValueOrDefault(),
Currency = x.Currency,
ExchangeRate = x.ExchangeRate,
OriginalAmount = x.OriginalAmount, OriginalAmount = x.OriginalAmount,
OriginalCurrency = x.OriginalCurrency OriginalCurrency = x.OriginalCurrency
}).ToList(); }).ToList();
//获取剩余待结算金额
var ids2 = settlement.Details.Select(x => x.Id);
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();
StringBuilder sb = new();
foreach (var detail in settlement.Details) foreach (var detail in settlement.Details)
{ {
//var fee = fees.Find(x => x.Id == detail.RecordId); var item = appDetails.Find(x => x.Id == detail.Id);
//detail.BusinessId = fee.BusinessId; if (item == null)
//detail.BusinessType = fee.BusinessType;
//detail.ExchangeRate = detail.ExchangeRate ?? fee.ExchangeRate;
//detail.FeeId = fee.FeeId;
//detail.FeeName = fee.FeeName;
//detail.FeeType = fee.FeeType;
detail.CustomerName = detail.CustomerName ?? settlement.CustomerName;
//原币申请
if (settlement.Currency.IsNullOrEmpty())
{ {
detail.OriginalAmount = detail.ApplyAmount; sb.Append(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.EmptyData)));
break;
}
//if (detail.OriginalCurrency.IsNullOrEmpty()) if (detail.OriginalAmount > 0 && detail.OriginalAmount > item.OriginalRestAmount)
// detail.OriginalCurrency = fee.Currency; {
sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), detail.FeeName);
sb.Append("");
continue;
}
else if (detail.OriginalAmount < 0 && detail.OriginalAmount < item.OriginalRestAmount)
{
sb.AppendFormat(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DetailExceedingLimit)), detail.FeeName);
sb.Append("");
continue;
} }
} }
if (sb.Length > 0)
return DataResult<PaymentSettlement>.Failed(sb.ToString());
settlement.Amount = settlement.Details.Sum(x => x.ApplyAmount);
await TenantDb.Ado.BeginTranAsync(); await TenantDb.Ado.BeginTranAsync();
try try
@ -427,6 +516,17 @@ namespace DS.WMS.Core.Settlement.Method
}).ExecuteCommandAsync(); }).ExecuteCommandAsync();
} }
//更新申请明细的已处理金额
var list = request.Details.Select(x => new ApplicationDetail
{
Id = x.Id,
ProcessedAmount = x.SettlementAmount,
OriginalProcessedAmount = x.OriginalAmount
}).ToList();
await TenantDb.Updateable(list)
.UpdateColumns(x => new { x.ProcessedAmount, x.OriginalProcessedAmount })
.ExecuteCommandAsync();
if (fees != null && fees.Count > 0) if (fees != null && fees.Count > 0)
await TenantDb.Updateable(fees) await TenantDb.Updateable(fees)
.PublicSetColumns(x => x.SettlementAmount, "+") .PublicSetColumns(x => x.SettlementAmount, "+")
@ -443,5 +543,27 @@ namespace DS.WMS.Core.Settlement.Method
return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed)); return DataResult<PaymentSettlement>.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
} }
} }
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();
}
} }
} }

@ -1,4 +1,5 @@
using DS.Module.Core; using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.WMS.Core.Application.Entity; using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Application.Interface; using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Fee.Method; using DS.WMS.Core.Fee.Method;
@ -51,13 +52,16 @@ namespace DS.WMS.Core.Settlement.Method
Id = x.Id, Id = x.Id,
ApplicationId = x.ApplicationId, ApplicationId = x.ApplicationId,
RecordId = x.RecordId, RecordId = x.RecordId,
OriginalAmount = x.OriginalAmount DetailId = x.DetailId,
OriginalAmount = x.OriginalAmount,
ProcessedAmount = x.ProcessedAmount,
OriginalProcessedAmount = x.OriginalProcessedAmount
}).ToListAsync(); }).ToListAsync();
var appIds = details.Select(x => x.ApplicationId).Distinct().ToList(); var appIds = details.Select(x => x.ApplicationId).Distinct().ToList();
var apps = await TenantDb.Queryable<TEntity>().Where(x => appIds.Contains(x.Id)).Select(x => new TEntity var apps = await TenantDb.Queryable<TEntity>().Where(x => appIds.Contains(x.Id)).Select(x => new TEntity
{ {
Id = x.Id, Id = x.Id,
Status = x.Status Mode = x.Mode
}).ToListAsync(); }).ToListAsync();
foreach (var app in apps) foreach (var app in apps)
@ -94,13 +98,17 @@ namespace DS.WMS.Core.Settlement.Method
var apps = await TenantDb.Queryable<TEntity>().Where(x => ids.Contains(x.Id)).Select(x => new TEntity var apps = await TenantDb.Queryable<TEntity>().Where(x => ids.Contains(x.Id)).Select(x => new TEntity
{ {
Id = x.Id, Id = x.Id,
Status = x.Status Mode = x.Mode
}).ToListAsync(); }).ToListAsync();
var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)).Select( var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)).Select(
x => new ApplicationDetail x => new ApplicationDetail
{ {
Id = x.Id, Id = x.Id,
ApplicationId = x.ApplicationId,
RecordId = x.RecordId, RecordId = x.RecordId,
DetailId = x.DetailId,
ApplyAmount = x.ApplyAmount,
OriginalAmount = x.OriginalAmount OriginalAmount = x.OriginalAmount
}).ToListAsync(); }).ToListAsync();
@ -142,12 +150,35 @@ namespace DS.WMS.Core.Settlement.Method
/// </summary> /// </summary>
/// <param name="settlements">结算单及其明细</param> /// <param name="settlements">结算单及其明细</param>
/// <returns></returns> /// <returns></returns>
protected virtual Task OnDeleteDetailAsync(List<TEntity> settlements) protected virtual async Task OnDeleteDetailAsync(List<TEntity> settlements)
{ {
return Task.CompletedTask; //还原付费申请明细
var list = settlements.FindAll(x => x.Mode == SettlementMode.Payment);
if (list.Count > 0)
{
var items = list.SelectMany(x => x.Details);
var ids = items.Select(x => x.DetailId);
var details = TenantDb.Queryable<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();
}
} }
#endregion #endregion
} }

@ -1,6 +1,8 @@
using DS.Module.Core; using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Settlement.Dtos; using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
using DS.WMS.Core.Settlement.Interface; using DS.WMS.Core.Settlement.Interface;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -33,6 +35,17 @@ namespace DS.WMS.FeeApi.Controllers
return await _service.GetListAsync(request); return await _service.GetListAsync(request);
} }
/// <summary>
/// 获取付费结算及其明细
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
[HttpGet, Route("Get")]
public async Task<DataResult<PaymentSettlementDto>> GetAsync(long id)
{
return await _service.GetAsync(id);
}
/// <summary> /// <summary>
/// 获取付费申请分页列表 /// 获取付费申请分页列表
/// </summary> /// </summary>
@ -50,9 +63,48 @@ namespace DS.WMS.FeeApi.Controllers
/// <param name="id">申请单ID</param> /// <param name="id">申请单ID</param>
/// <returns></returns> /// <returns></returns>
[HttpGet, Route("GetDetails")] [HttpGet, Route("GetDetails")]
public async Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(long id) public async Task<DataResult<List<PaymentApplicationDetailDto>>> GetDetailsAsync(long id)
{ {
return await _service.GetDetailsAsync(id); return await _service.GetDetailsAsync(id);
} }
/// <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 (model.Ids == null || model.Ids.Length == 0)
return DataResult.Failed("参数无效", 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 (model.Ids == null || model.Ids.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return await _service.DeleteAsync(model.Ids);
}
} }
} }

@ -2028,3 +2028,143 @@
2024-07-04 13:55:50.8005 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config 2024-07-04 13:55:50.8005 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-04 13:55:50.8005 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-07-04 13:55:50.8005 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-04 13:55:50.8005 Info Configuration initialized. 2024-07-04 13:55:50.8005 Info Configuration initialized.
2024-07-05 08:52:32.6093 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 08:52:32.6374 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 08:52:32.6517 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 08:52:32.6615 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 08:52:32.6615 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 08:52:32.6615 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 08:52:32.6722 Info Configuration initialized.
2024-07-05 09:23:27.4388 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:23:27.4599 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:23:27.4599 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:23:27.4790 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:23:27.4790 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:23:27.4860 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:23:27.4860 Info Configuration initialized.
2024-07-05 09:32:45.5722 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:32:45.6014 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:32:45.6014 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:32:45.6180 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:32:45.6253 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:32:45.6253 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:32:45.6253 Info Configuration initialized.
2024-07-05 09:34:10.4078 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:34:10.4366 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:34:10.4393 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:34:10.4393 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:34:10.4555 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:34:10.4555 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:34:10.4555 Info Configuration initialized.
2024-07-05 09:34:48.2859 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:34:48.3650 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:34:48.3650 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:34:48.3837 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:34:48.3837 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:34:48.3929 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:34:48.3929 Info Configuration initialized.
2024-07-05 09:36:40.4784 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:36:40.5095 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:36:40.5095 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:36:40.5236 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:36:40.5236 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:36:40.5349 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:36:40.5349 Info Configuration initialized.
2024-07-05 09:49:11.3932 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:49:11.4524 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:49:11.4572 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:49:11.4722 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:49:11.4722 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:49:11.4722 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:49:11.4877 Info Configuration initialized.
2024-07-05 09:52:07.3838 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 09:52:07.4555 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 09:52:07.4739 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 09:52:07.4940 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 09:52:07.5055 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 09:52:07.5055 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 09:52:07.5235 Info Configuration initialized.
2024-07-05 10:02:10.0819 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 10:02:10.1314 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 10:02:10.1314 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 10:02:10.1522 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 10:02:10.1615 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 10:02:10.1615 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 10:02:10.1736 Info Configuration initialized.
2024-07-05 10:05:23.8134 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 10:05:23.8506 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 10:05:23.8506 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 10:05:23.8674 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 10:05:23.8674 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 10:05:23.8674 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 10:05:23.8794 Info Configuration initialized.
2024-07-05 10:06:04.5681 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 10:06:04.6138 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 10:06:04.6138 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 10:06:04.6341 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 10:06:04.6410 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 10:06:04.6410 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 10:06:04.6410 Info Configuration initialized.
2024-07-05 10:18:06.6272 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 10:18:06.6725 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 10:18:06.6725 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 10:18:06.6997 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 10:18:06.7061 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 10:18:06.7061 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 10:18:06.7061 Info Configuration initialized.
2024-07-05 14:21:50.0900 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 14:21:50.1241 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 14:21:50.1281 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 14:21:50.1281 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 14:21:50.1478 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 14:21:50.1478 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 14:21:50.1478 Info Configuration initialized.
2024-07-05 14:23:49.1584 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 14:23:49.2061 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 14:23:49.2061 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 14:23:49.2218 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 14:23:49.2218 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 14:23:49.2218 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 14:23:49.2368 Info Configuration initialized.
2024-07-05 14:25:32.7300 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 14:25:32.7628 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 14:25:32.7628 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 14:25:32.7794 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 14:25:32.7844 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 14:25:32.7844 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 14:25:32.7844 Info Configuration initialized.
2024-07-05 17:35:02.8685 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 17:35:02.8938 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 17:35:02.9014 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 17:35:02.9014 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 17:35:02.9163 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 17:35:02.9163 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 17:35:02.9240 Info Configuration initialized.
2024-07-05 17:37:11.8064 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 17:37:11.8413 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 17:37:11.8413 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 17:37:11.8598 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 17:37:11.8651 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 17:37:11.8651 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 17:37:11.8651 Info Configuration initialized.
2024-07-05 17:38:51.9968 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 17:38:52.0604 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 17:38:52.0604 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 17:38:52.0774 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 17:38:52.0774 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 17:38:52.0879 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 17:38:52.0879 Info Configuration initialized.
2024-07-05 17:42:10.8553 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 17:42:10.8902 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 17:42:10.8938 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 17:42:10.8938 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 17:42:10.9165 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 17:42:10.9165 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 17:42:10.9165 Info Configuration initialized.
2024-07-05 17:49:45.8721 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-05 17:49:45.9060 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-05 17:49:45.9092 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-05 17:49:45.9092 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-05 17:49:45.9259 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-05 17:49:45.9259 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-05 17:49:45.9259 Info Configuration initialized.

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl> <_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-07-02T03:26:14.2092751Z||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History> <History>True|2024-07-04T09:20:50.0175739Z||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>
Loading…
Cancel
Save