标准发票提交开票

usertest
嵇文龙 4 months ago
parent c1b25073f9
commit 02c3e00a89

@ -637,6 +637,9 @@ public static class MultiLanguageConst
[Description("发票币别与费用明细币别不一致,需要进行汇率转换")]
public const string NeedExchangeRate = "Need_ExchangeRate";
[Description("开票单位有且只能有一个")]
public const string InvoiceCustomerOnlyOne = "Invoice_Customer_OnlyOne";
#endregion
#region 预订舱API

@ -20,10 +20,15 @@ namespace DS.WMS.Core.Application.Dtos
public long ApplicationId { get; set; }
/// <summary>
/// 引用的明细ID付费申请明细ID
/// 引用的明细ID申请明细ID
/// </summary>
public long? DetailId { get; set; }
/// <summary>
/// 引用的ID申请ID
/// </summary>
public long? RefId { get; set; }
/// <summary>
/// 费用记录ID
/// </summary>
@ -74,11 +79,21 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public decimal ApplyAmount { get; set; }
/// <summary>
/// 已处理金额
/// </summary>
public decimal ProcessedAmount { get; set; }
/// <summary>
/// 原始金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// 已处理原始金额
/// </summary>
public decimal OriginalProcessedAmount { get; set; }
/// <summary>
/// 币别
/// </summary>
@ -104,10 +119,36 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 已申请金额
/// </summary>
public decimal OrderAmount { get; set; }
/// <summary>
/// 已结算金额
/// </summary>
public decimal SettlementAmount { get; set; }
/// <summary>
/// 已开票金额
/// </summary>
public decimal InvoiceAmount { get; set; }
/// <summary>
/// 申请金额已结算
/// </summary>
public decimal OrderSettlementAmount { get; set; }
/// <summary>
/// 申请发票金额已开票
/// </summary>
public decimal OrderInvSettlementAmount { get; set; }
/// <summary>
/// 剩余金额
/// </summary>
public decimal RestAmount { get; set; }
public decimal? RestAmount { get; set; }
/// <summary>
/// 备注
@ -254,6 +295,11 @@ namespace DS.WMS.Core.Application.Dtos
/// 录入方式
/// </summary>
public string? InputMethod { get; set; }
/// <summary>
/// 审核日期
/// </summary>
public DateTime? AuditTime { get; set; }
}
/// <summary>

@ -143,20 +143,20 @@ namespace DS.WMS.Core.Application.Dtos
public List<InvoiceDetail>? InvoiceDetails { get; set; }
[IgnoreDataMember]
public List<CurrencyAmount> OriginalAmountList { get; set; }
public List<CurrencyAmount>? OriginalAmountList { get; set; }
/// <summary>
/// 原币金额
/// </summary>
public string OriginalAmount => string.Join(" ", OriginalAmountList);
public string OriginalAmount => OriginalAmountList == null ? string.Empty : string.Join(" ", OriginalAmountList);
[IgnoreDataMember]
public List<CurrencyAmount> UnsettledList { get; set; }
public List<CurrencyAmount>? UnsettledList { get; set; }
/// <summary>
/// 未结算金额
/// </summary>
public string UnsettledAmount => string.Join(" ", UnsettledList);
public string UnsettledAmount => UnsettledList == null ? string.Empty : string.Join(" ", UnsettledList);
/// <summary>
/// 是否已审核(仅用于查询)

@ -37,7 +37,7 @@ namespace DS.WMS.Core.Application.Entity
/// 开票币别
/// </summary>
[SugarColumn(ColumnDescription = "开票币别", Length = 3, IsNullable = false)]
public string InvoiceCurrency { get; set; }
public string? InvoiceCurrency { get; set; }
/// <summary>
/// 发票税率

@ -0,0 +1,94 @@
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Code.Entity;
using DS.WMS.Core.Fee.Entity;
using System.Linq.Expressions;
using DS.WMS.Core.Fee.Method;
using DS.WMS.Core.Op.Entity;
using SqlSugar;
namespace DS.WMS.Core.Application.Method
{
/// <summary>
/// 申请单相关服务基类
/// </summary>
public abstract class ApplicationServiceBase : FeeServiceBase
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="serviceProvider">服务提供程序</param>
protected ApplicationServiceBase(IServiceProvider serviceProvider) : base(serviceProvider)
{
}
/// <summary>
/// 返回针对费用申请明细及其关联业务的查询对象
/// </summary>
/// <param name="expr1">关联条件1</param>
/// <returns>查询对象</returns>
public ISugarQueryable<ApplicationDetailDto> CreateApplicationDetailQuery(
Expression<Func<ApplicationDetail, FeeRecord, SeaExport, bool>>? expr1 = null)
{
//海运出口
var query1 = TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.LeftJoin<SeaExport>((d, f, s) => f.BusinessId == s.Id && f.BusinessType == BusinessType.OceanShippingExport)
.WhereIF(expr1 != null, expr1)
.LeftJoin<CodeSource>((d, f, s, cs) => s.SourceId == cs.Id)
.Select((d, f, s, cs) => new ApplicationDetailDto
{
//---------------明细表--------------
Id = d.Id,
ApplicationId = d.ApplicationId,
DetailId = d.DetailId,
RecordId = d.RecordId,
FeeType = d.FeeType,
CustomerName = d.CustomerName,
FeeId = d.FeeId,
FeeName = d.FeeName,
Currency = d.Currency,
ApplyAmount = d.ApplyAmount,
ExchangeRate = d.ExchangeRate,
OriginalAmount = d.OriginalAmount,
OriginalCurrency = d.OriginalCurrency,
ProcessedAmount = d.ProcessedAmount,
OriginalProcessedAmount = d.OriginalProcessedAmount,
//---------------费用表--------------
OriginalRate = f.ExchangeRate,
Amount = f.Amount,
AccTaxRate = f.AccTaxRate,
CustomerId = f.CustomerId,//费用对象ID
OrderAmount = f.OrderAmount,
InvoiceAmount = f.InvoiceAmount,
SettlementAmount = f.SettlementAmount,
OrderSettlementAmount = f.OrderSettlementAmount,
OrderInvSettlementAmount = f.OrderInvSettlementAmount,
//---------------业务表--------------
BusinessId = s.Id,
BusinessType = BusinessType.OceanShippingExport,
AccountDate = s.AccountDate,
CntrTotal = s.CntrTotal,
CustomerNo = s.CustomerNo,
ClientName = s.CustomerName, //委托单位
//DischargePort = s.DischargePort,
ETD = s.ETD,
HBLNO = s.HBLNO,
LoadPort = s.LoadPort,
MBLNO = s.MBLNO,
SaleDeptId = s.SaleDeptId,
SaleName = s.Sale,//揽货人
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
BookingNo = s.BookingNo,
//---------------附加表--------------
SourceName = cs.SourceName
});
//海运进口
return TenantDb.UnionAll(new List<ISugarQueryable<ApplicationDetailDto>> { query1 });
}
}
}

@ -226,6 +226,7 @@ namespace DS.WMS.Core.Application.Method
await TenantDb.Updateable(application).IgnoreColumns(x => new
{
x.ApplicationNO,
x.Status,
x.CreateBy,
x.CreateTime,
x.Deleted,

@ -8,7 +8,6 @@ using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Invoice.Entity;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using SqlSugar;
@ -495,7 +494,7 @@ namespace DS.WMS.Core.Application.Method
await TenantDb.Deleteable<InvoiceDetail>().Where(x => x.ApplicationId == application.Id).ExecuteCommandAsync();
//然后根据申请单明细重新生成
CreateInvoiceDetailsAsync([application]);
await CreateInvoiceDetailsAsync([application]);
if (application.InvoiceDetails?.Count > 0)
{
@ -509,6 +508,9 @@ namespace DS.WMS.Core.Application.Method
.UpdateColumns(x => new { x.OrderInvoiceAmount })
.ExecuteCommandAsync();
//if (application.InvoiceCurrency.IsNullOrEmpty())
// application.InvoiceCurrency = RMB_CODE;
await base.OnSaveAsync(application, fees);
}

@ -166,7 +166,7 @@ namespace DS.WMS.Core.Fee.Entity
///已申请金额
/// </summary>
[SugarColumn(ColumnDescription = "已申请金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
public decimal OrderAmount { get; set; } = 0;
public decimal OrderAmount { get; set; }
/// <summary>
/// Desc:申请开票金额
/// </summary>

@ -3,9 +3,6 @@ using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
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.Flow.Entity;
@ -139,68 +136,6 @@ namespace DS.WMS.Core.Fee.Method
return TenantDb.UnionAll(new List<ISugarQueryable<BusinessFeeDto>> { query1 });
}
/// <summary>
/// 返回针对费用申请明细及其关联业务的查询对象
/// </summary>
/// <param name="expr1">关联条件1</param>
/// <returns>查询对象</returns>
public ISugarQueryable<ApplicationDetailDto> CreateApplicationDetailQuery(
Expression<Func<ApplicationDetail, FeeRecord, SeaExport, bool>>? expr1 = null)
{
//海运出口
var query1 = TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.LeftJoin<SeaExport>((d, f, s) => f.BusinessId == s.Id && f.BusinessType == BusinessType.OceanShippingExport)
.WhereIF(expr1 != null, expr1)
.LeftJoin<CodeSource>((d, f, s, cs) => s.SourceId == cs.Id)
.Select((d, f, s, cs) => new ApplicationDetailDto
{
//---------------明细表--------------
Id = d.Id,
ApplicationId = d.ApplicationId,
DetailId = d.DetailId,
RecordId = d.RecordId,
FeeType = d.FeeType,
CustomerName = d.CustomerName,
FeeId = d.FeeId,
FeeName = d.FeeName,
Currency = d.Currency,
ApplyAmount = d.ApplyAmount,
ExchangeRate = d.ExchangeRate,
OriginalAmount = d.OriginalAmount,
OriginalCurrency = d.OriginalCurrency,
//---------------费用表--------------
OriginalRate = f.ExchangeRate,
Amount = f.Amount,
AccTaxRate = f.AccTaxRate,
CustomerId = f.CustomerId,//费用对象ID
//---------------业务表--------------
BusinessId = s.Id,
BusinessType = BusinessType.OceanShippingExport,
AccountDate = s.AccountDate,
CntrTotal = s.CntrTotal,
CustomerNo = s.CustomerNo,
ClientName = s.CustomerName, //委托单位
//DischargePort = s.DischargePort,
ETD = s.ETD,
HBLNO = s.HBLNO,
LoadPort = s.LoadPort,
MBLNO = s.MBLNO,
SaleDeptId = s.SaleDeptId,
SaleName = s.Sale,//揽货人
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
BookingNo = s.BookingNo,
//---------------附加表--------------
SourceName = cs.SourceName
});
//海运进口
return TenantDb.UnionAll(new List<ISugarQueryable<ApplicationDetailDto>> { query1 });
}
/// <summary>
/// 更新费用及其业务的费用状态
/// </summary>
@ -209,7 +144,7 @@ namespace DS.WMS.Core.Fee.Method
protected internal void UpdateFeeStatus(IEnumerable<long> ids)
{
var task1 = Task.Factory.StartNew(UpdateFeeStatusCore, ids, CancellationToken.None);
var task2 = task1.ContinueWith(t => UpdateBizStatusCore(t.Result), TaskContinuationOptions.OnlyOnRanToCompletion);
task1.ContinueWith(t => UpdateBizStatusCore(t.Result), TaskContinuationOptions.OnlyOnRanToCompletion);
}
private List<FeeRecord> UpdateFeeStatusCore(object? state)

@ -3,7 +3,7 @@
namespace DS.WMS.Core.Invoice.Dtos
{
/// <summary>
/// 提交结算单请求参数
/// 提交开票请求参数
/// </summary>
public class InvoiceRequest<TEntity> where TEntity : Entity.Invoice
{
@ -13,7 +13,12 @@ namespace DS.WMS.Core.Invoice.Dtos
public TEntity Invoice { get; set; }
/// <summary>
/// 结算费用明细
/// 发票申请
/// </summary>
public List<RequestItem>? Applications { get; set; }
/// <summary>
/// 发票费用明细
/// </summary>
public List<PaymentApplicationDetailDto>? Details { get; set; }

@ -0,0 +1,23 @@
namespace DS.WMS.Core.Invoice.Dtos
{
/// <summary>
/// 按发票申请开票的请求项
/// </summary>
public class RequestItem
{
/// <summary>
/// 发票申请ID
/// </summary>
public long ApplicationId { get; set; }
/// <summary>
/// 发票申请币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 折算汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
}
}

@ -10,7 +10,7 @@ namespace DS.WMS.Core.Invoice.Entity
/// <summary>
/// 发票相关基类
/// </summary>
[SugarTable("invoice_form", TableDescription = "发票主表")]
[SugarTable("application_invoice_form", TableDescription = "发票主表")]
public class Invoice : BaseModelV2<long>
{
/// <summary>

@ -1,10 +1,25 @@
namespace DS.WMS.Core.Invoice.Interface
using DS.Module.Core;
using DS.WMS.Core.Application.Dtos;
namespace DS.WMS.Core.Invoice.Interface
{
/// <summary>
/// 标准开票
/// </summary>
public interface IGeneralInvoiceService : IInvoiceService<Entity.Invoice>
{
/// <summary>
/// 获取发票申请分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync(PageRequest request);
/// <summary>
/// 获取发票申请明细
/// </summary>
/// <param name="ids">申请单ID</param>
/// <returns></returns>
Task<DataResult<List<InvoiceApplicationDetailDto>>> GetApplicationDetailsAsync(params long[] ids);
}
}

@ -3,10 +3,8 @@ 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.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Interface;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
@ -190,8 +188,6 @@ namespace DS.WMS.Core.Invoice.Method
sb.Append("");
continue;
}
detail.Category = DetailCategory.InvoiceIssuance;
}
return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;

@ -23,14 +23,15 @@ namespace DS.WMS.Core.Invoice.Method
}
/// <summary>
/// 获取付费申请分页列表
/// 获取发票申请分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync(PageRequest request)
{
var query = TenantDb.Queryable<InvoiceApplication>().Where(x => x.Status == InvoiceApplicationStatus.AuditPassed || x.Status == InvoiceApplicationStatus.PartialInvoiced)
.InnerJoin<ApplicationDetail>((a, d) => a.Id == d.ApplicationId && (d.OriginalAmount - d.OriginalProcessedAmount) != 0)
var query = TenantDb.Queryable<InvoiceApplication>()
.Where(a => (a.Status == InvoiceApplicationStatus.AuditPassed || a.Status == InvoiceApplicationStatus.PartialInvoiced) &&
SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.ApplicationId == a.Id && (d.OriginalAmount - d.OriginalProcessedAmount) != 0).Any())
.Select(a => new InvoiceApplicationDto
{
Id = a.Id,
@ -78,5 +79,120 @@ namespace DS.WMS.Core.Invoice.Method
return result;
}
/// <summary>
/// 获取发票申请明细
/// </summary>
/// <param name="ids">申请单ID</param>
/// <returns></returns>
public async Task<DataResult<List<InvoiceApplicationDetailDto>>> GetApplicationDetailsAsync(params long[] ids)
{
var query = CreateApplicationDetailQuery((d, f, s) => ids.Contains(d.ApplicationId) && d.Category == DetailCategory.InvoiceApplication && (d.OriginalAmount - d.OriginalProcessedAmount) != 0);
var details = await TenantDb.Queryable(query).LeftJoin<InvoiceApplication>((x, y) => x.ApplicationId == y.Id)
.Select((x, y) => new InvoiceApplicationDetailDto
{
Id = x.Id,
ApplicationId = x.ApplicationId,
BusinessId = x.BusinessId,
BusinessType = x.BusinessType,
RecordId = x.RecordId,
FeeName = x.FeeName,
FeeType = x.FeeType,
ApplyAmount = x.ApplyAmount,
RestAmount = x.ApplyAmount - x.ProcessedAmount,
OriginalCurrency = x.OriginalCurrency, //原始币别
ExchangeRate = x.ExchangeRate, //折算汇率
OriginalAmount = x.OriginalAmount, //原始金额
SaleName = x.SaleName,
CustomerNo = x.CustomerNo,
MBLNO = x.MBLNO,
ClientName = x.ClientName,
ETD = x.ETD,
SourceName = x.SourceName,
AuditTime = y.AuditTime
}).ToListAsync();
return DataResult<List<InvoiceApplicationDetailDto>>.Success(details);
}
protected override Task<DataResult> PreSaveAsync(Entity.Invoice invoice)
{
invoice.Type = InvoiceType.Applcation;
return Task.FromResult(DataResult.Success);
}
protected override Task PostSaveAsync(Entity.Invoice invoice)
{
return Task.Factory.StartNew(UpdateInvoiceApplications, new List<Entity.Invoice> { invoice });
}
protected override async Task OnDeleteDetailAsync(List<Entity.Invoice> invoices, DeleteOption deleteOption)
{
var list = invoices.SelectMany(x => x.Details).Where(x => x.DetailId.HasValue).Select(x => new ApplicationDetail
{
Id = x.DetailId.GetValueOrDefault(),
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();
await base.OnDeleteDetailAsync(invoices, deleteOption);
}
protected override Task PostDeleteAsync(List<Entity.Invoice> invoices, DeleteOption deleteOption)
{
return Task.Factory.StartNew(UpdateInvoiceApplications, invoices);
}
//更新发票申请的状态
void UpdateInvoiceApplications(object? state)
{
var list = state as IEnumerable<Entity.Invoice>;
if (list == null || !list.Any())
return;
var ids = list.SelectMany(x => x.Details).Where(x => x.RefId.HasValue).Select(x => x.RefId.GetValueOrDefault()).Distinct().ToList();
var appDetails = TenantDb.Queryable<ApplicationDetail>().Where(d => ids.Contains(d.ApplicationId))
.Select(d => new ApplicationDetail
{
Id = d.Id,
ApplicationId = d.ApplicationId,
OriginalAmount = d.OriginalAmount,
OriginalProcessedAmount = d.OriginalProcessedAmount
}).ToList();
List<InvoiceApplication> list2 = new(ids.Count);
foreach (var id in ids)
{
var entity = new InvoiceApplication { Id = id };
var inv = list.FirstOrDefault(x => x.Details.Any(y => y.RefId == id));
entity.AcutalInvoiceNO = inv?.InvoiceNO;
var details = appDetails.FindAll(x => x.ApplicationId == id);
if (details.All(x => x.OriginalAmount == x.OriginalAmount - x.OriginalProcessedAmount))
{
entity.Status = InvoiceApplicationStatus.Invoiced;
list2.Add(entity);
}
else if (details.All(x => x.OriginalAmount - x.OriginalProcessedAmount == 0))
{
entity.Status = InvoiceApplicationStatus.AuditPassed;
list2.Add(entity);
}
else if (details.Exists(x => x.OriginalAmount != x.OriginalAmount - x.OriginalProcessedAmount))
{
entity.Status = InvoiceApplicationStatus.PartialInvoiced;
list2.Add(entity);
}
}
TenantDb.Updateable(list2).UpdateColumns(x => new { x.Status, x.AcutalInvoiceNO }).ExecuteCommand();
}
}
}

@ -3,8 +3,8 @@ 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.Application.Method;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Method;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Invoice.Interface;
@ -19,10 +19,9 @@ namespace DS.WMS.Core.Invoice.Method
/// 发票服务基类
/// </summary>
/// <typeparam name="TEntity"></typeparam>
public class InvoiceService<TEntity> : FeeServiceBase, IInvoiceService<TEntity>
public class InvoiceService<TEntity> : ApplicationServiceBase, IInvoiceService<TEntity>
where TEntity : Entity.Invoice, new()
{
readonly Lazy<ICommonService> CommonService;
/// <summary>
@ -162,6 +161,8 @@ namespace DS.WMS.Core.Invoice.Method
return DataResult<InvoiceDto>.Success(invoice);
}
#pragma warning disable CS4014
/// <summary>
/// 提交发票开票
/// </summary>
@ -193,6 +194,75 @@ namespace DS.WMS.Core.Invoice.Method
if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
//按发票申请
if (request.Applications != null && request.Applications.Count > 0)
{
var ids = request.Applications.Select(x => x.ApplicationId);
var details = await TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<InvoiceApplication>((x, y) => x.ApplicationId == y.Id)
.Where((x, y) => ids.Contains(x.ApplicationId) && x.Category == DetailCategory.InvoiceApplication)
.Select((x, y) => new
{
x.Id,
x.ApplicationId,
x.RecordId,
x.CustomerName,
x.FeeId,
x.FeeType,
x.FeeName,
x.ApplyAmount,
x.OriginalAmount,
x.Currency,
x.OriginalCurrency,
x.ProcessedAmount,
x.OriginalProcessedAmount,
y.CustomerId
}).ToListAsync();
invoice.Details = new List<ApplicationDetail>(details.Count);
foreach (var item in details)
{
if (request.Invoice.CustomerId == 0)
{
request.Invoice.CustomerId = item.CustomerId;
request.Invoice.CustomerName = item.CustomerName;
}
else if (request.Invoice.CustomerId != item.CustomerId) //校验开票单位是否一致
{
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.InvoiceCustomerOnlyOne));
}
//需转换为费用明细
var detail = new ApplicationDetail
{
ApplicationId = request.Invoice.Id,
RefId = item.ApplicationId,
DetailId = item.Id,
RecordId = item.RecordId,
Category = DetailCategory.InvoiceIssuance,
CustomerName = item.CustomerName,
FeeId = item.FeeId,
FeeName = item.FeeName,
FeeType = item.FeeType,
Currency = RMB_CODE,
OriginalCurrency = item.Currency,
ApplyAmount = item.ApplyAmount - item.ProcessedAmount,
OriginalAmount = item.OriginalAmount - item.OriginalProcessedAmount
};
var app = request.Applications.Find(x => x.ApplicationId == item.ApplicationId);
if (app != null && app.Currency != invoice.Currency)
detail.ExchangeRate = app.ExchangeRate;
else
detail.ExchangeRate = 1m;
if (detail.ExchangeRate.HasValue)
detail.ApplyAmount = detail.ApplyAmount * detail.ExchangeRate.Value;
invoice.Details.Add(detail);
}
}
//自由申请
if (request.Details?.Count > 0)
{
if (invoice.Id == 0 && invoice.CustomerId == 0)
@ -202,11 +272,14 @@ namespace DS.WMS.Core.Invoice.Method
invoice.CustomerName = first.CustomerName;
}
//将请求明细转换为数据库的费用明细
invoice.Details = request.Details.Select(x => new ApplicationDetail
{
ApplicationId = x.ApplicationId,
RefId = x.RefId,
DetailId = x.Id == 0 ? null : x.Id,
RecordId = x.RecordId,
Category = DetailCategory.InvoiceIssuance,
CustomerName = x.CustomerName ?? invoice.CustomerName,
FeeId = x.FeeId,
FeeName = x.FeeName,
@ -217,7 +290,10 @@ namespace DS.WMS.Core.Invoice.Method
OriginalAmount = x.OriginalAmount,
OriginalCurrency = x.OriginalCurrency ?? (invoice.Currency.IsNullOrEmpty() ? x.Currency : invoice.Currency),
}).ToList();
}
if (invoice.Details?.Count > 0)
{
//金额禁止为0
if (invoice.Details.Any(x => x.ApplyAmount == 0 || x.OriginalAmount == 0))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero));
@ -233,16 +309,15 @@ namespace DS.WMS.Core.Invoice.Method
return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
invoice.ApplyAmount = invoice.Details.Sum(x => x.ApplyAmount);
invoice.AmountUppercase = new Money(invoice.InvoiceAmount).ToString();
invoice.AmountUppercase = new Money(invoice.ApplyAmount).ToString();
invoice.OriginalAmount = invoice.Details.Sum(x => x.OriginalAmount);
invoice.OtherInvoiceAmount = invoice.Details.Where(x => x.Currency != RMB_CODE).Sum(x => x.OriginalAmount);
invoice.OtherInvoiceAmount = invoice.Details.Where(x => x.Currency != RMB_CODE).Sum(x => x.OriginalAmount);
}
await TenantDb.Ado.BeginTranAsync();
try
{
//关联导航属性插入
if (invoice.Id == 0)
if (invoice.Id == 0)//新增
{
//创建时需要生成申请单编号
var sequence = CommonService.Value.GetSequenceNext<TEntity>();
@ -251,10 +326,10 @@ namespace DS.WMS.Core.Invoice.Method
return DataResult<TEntity>.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist);
}
invoice.BillNO = sequence.Data;
//关联导航属性插入
await TenantDb.InsertNav(invoice).Include(x => x.Details).ExecuteCommandAsync();
}
else
else//编辑
{
if (invoice.Details?.Count > 0)
{
@ -262,11 +337,26 @@ namespace DS.WMS.Core.Invoice.Method
//因需要重新生成明细,所以要先清空现有发票明细
await TenantDb.Deleteable<InvoiceDetail>().Where(x => x.ApplicationId == invoice.Id).ExecuteCommandAsync();
}
else if (invoice.InvoiceDetails?.Count > 0)
{
await TenantDb.Updateable(invoice.InvoiceDetails).UpdateColumns(x => new
{
x.Name,
x.Specification,
x.Unit,
x.UnitPrice,
x.TaxRate,
x.TaxAmount,
x.UpdateTime,
x.UpdateBy
}).ExecuteCommandAsync();
}
await TenantDb.Updateable(invoice).IgnoreColumns(x => new
{
x.BillNO,
x.IsLocked,
x.CreateBy,
x.CreateTime,
x.Deleted,
@ -295,7 +385,10 @@ namespace DS.WMS.Core.Invoice.Method
await OnSaveAsync(invoice);
await TenantDb.Ado.CommitTranAsync();
return DataResult<TEntity>.Success(await PostSaveAsync(invoice));
PostSaveAsync(invoice);
return DataResult<TEntity>.Success(invoice);
}
catch (Exception ex)
{
@ -311,40 +404,27 @@ namespace DS.WMS.Core.Invoice.Method
/// <param name="invoice">提交的发票</param>
/// <param name="dbValue">数据库值新增时为null</param>
/// <returns></returns>
protected virtual DataResult EnsureSettlement(TEntity invoice, TEntity? dbValue)
{
return DataResult.Success;
}
protected virtual DataResult EnsureSettlement(TEntity invoice, TEntity? dbValue) => DataResult.Success;
/// <summary>
/// 在保存前调用
/// </summary>
/// <param name="invoice">发票</param>
/// <returns></returns>
protected virtual Task<DataResult> PreSaveAsync(TEntity invoice)
{
return Task.FromResult(DataResult.Success);
}
protected virtual Task<DataResult> PreSaveAsync(TEntity invoice) => Task.FromResult(DataResult.Success);
/// <summary>
/// 在保存时调用
/// </summary>
/// <param name="invoice">要保存的发票</param>
/// <returns></returns>
protected virtual Task OnSaveAsync(TEntity invoice)
{
return Task.CompletedTask;
}
protected virtual Task OnSaveAsync(TEntity invoice) => Task.CompletedTask;
/// <summary>
/// 在保存完成后调用
/// </summary>
/// <param name="invoice">发票</param>
protected virtual Task<TEntity> PostSaveAsync(TEntity invoice)
{
return Task.FromResult(invoice);
}
protected virtual Task PostSaveAsync(TEntity invoice) => Task.CompletedTask;
/// <summary>
@ -364,7 +444,10 @@ namespace DS.WMS.Core.Invoice.Method
{
Id = x.Id,
ApplicationId = x.ApplicationId,
DetailId = x.DetailId,
RefId = x.RefId,
RecordId = x.RecordId,
ApplyAmount = x.ApplyAmount,
OriginalAmount = x.OriginalAmount
}).ToListAsync();
@ -379,8 +462,10 @@ namespace DS.WMS.Core.Invoice.Method
{
await OnDeleteDetailAsync(apps, DeleteOption.Entire);
await TenantDb.DeleteNav<TEntity>(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
PostDeleteAsync(apps, DeleteOption.Entire);
return DataResult.Success;
}
catch (Exception ex)
@ -403,7 +488,10 @@ namespace DS.WMS.Core.Invoice.Method
{
Id = x.Id,
ApplicationId = x.ApplicationId,
DetailId = x.DetailId,
RefId = x.RefId,
RecordId = x.RecordId,
ApplyAmount = x.ApplyAmount,
OriginalAmount = x.OriginalAmount
}).ToListAsync();
var appIds = details.Select(x => x.ApplicationId).Distinct().ToList();
@ -425,8 +513,10 @@ namespace DS.WMS.Core.Invoice.Method
{
await OnDeleteDetailAsync(apps, DeleteOption.DetailOnly);
await TenantDb.Deleteable(details).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
PostDeleteAsync(apps, DeleteOption.Entire);
return DataResult.Success;
}
catch (Exception ex)
@ -458,11 +548,13 @@ namespace DS.WMS.Core.Invoice.Method
/// <returns></returns>
protected virtual async Task OnDeleteDetailAsync(List<TEntity> invoices, DeleteOption deleteOption)
{
var excludeIds = invoices.SelectMany(x => x.Details).Select(x => x.Id).ToList();
await TenantDb.Deleteable<InvoiceDetail>().Where(x => excludeIds.Contains(x.Id)).ExecuteCommandAsync();
if (deleteOption == DeleteOption.DetailOnly)
{
//删除明细需要同时变更发票明细
var appIds = invoices.Select(x => x.Id).ToList();
var excludeIds = invoices.SelectMany(x => x.Details).Select(x => x.Id).ToList();
//删除明细需要同时变更发票明细
var details = await TenantDb.Queryable<ApplicationDetail>().Where(x => appIds.Contains(x.ApplicationId) && !excludeIds.Contains(x.Id))
.Select(x => new ApplicationDetail
{
@ -474,12 +566,12 @@ namespace DS.WMS.Core.Invoice.Method
}).ToListAsync();
foreach (var item in invoices)
{
//重新设置申请明细
//重新设置申请明细与总金额
item.Details = details.FindAll(x => x.ApplicationId == item.Id);
item.ApplyAmount = item.Details.Sum(x => x.ApplyAmount);
item.AmountUppercase = new Money(item.ApplyAmount).ToString();
}
await TenantDb.Deleteable<InvoiceDetail>().Where(x => appIds.Contains(x.ApplicationId)).ExecuteCommandAsync();
await CreateInvoiceDetailsAsync(invoices);
var invDetails = invoices.SelectMany(x => x.InvoiceDetails).ToList();
if (invDetails.Count > 0)
@ -499,6 +591,13 @@ namespace DS.WMS.Core.Invoice.Method
.ExecuteCommandAsync();
}
/// <summary>
/// 在删除完成后调用
/// </summary>
/// <param name="invoices">发票及其明细</param>
/// <param name="deleteOption">发票删除选项</param>
protected virtual Task PostDeleteAsync(List<TEntity> invoices, DeleteOption deleteOption) => Task.CompletedTask;
/// <summary>
/// 生成发票明细
/// </summary>
@ -591,4 +690,5 @@ namespace DS.WMS.Core.Invoice.Method
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
}
}

@ -319,7 +319,7 @@ namespace DS.WMS.Core.Settlement.Method
}
/// <summary>
/// 获取费用明细
/// 获取费用申请明细
/// </summary>
/// <param name="id">申请单ID</param>
/// <returns></returns>
@ -327,8 +327,7 @@ namespace DS.WMS.Core.Settlement.Method
{
var details = await TenantDb.Queryable<ApplicationDetail>().Where(d => d.ApplicationId == id && d.Category == DetailCategory.PaidApplication && (d.ApplyAmount - d.ProcessedAmount) != 0)
.LeftJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.LeftJoin<BusinessFeeStatus>((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType)
.Select((d, f, b) => new PaymentApplicationDetailDto
.Select((d, f) => new PaymentApplicationDetailDto
{
Id = d.Id,
ApplicationId = d.ApplicationId,

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Invoice.Entity;
@ -24,6 +25,42 @@ namespace DS.WMS.FeeApi.Controllers
_service = service;
}
/// <summary>
/// 获取发票申请分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetApplicationList")]
public async Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync([FromBody]PageRequest request)
{
return await _service.GetApplicationListAsync(request);
}
/// <summary>
/// 获取发票申请明细
/// </summary>
/// <param name="id">申请单ID</param>
/// <returns></returns>
[HttpGet, Route("GetApplicationDetails")]
public async Task<DataResult<List<InvoiceApplicationDetailDto>>> GetApplicationDetailsAsync([FromQuery]long id)
{
return await _service.GetApplicationDetailsAsync(id);
}
/// <summary>
/// 获取发票申请明细
/// </summary>
/// <param name="model">一组申请单ID</param>
/// <returns></returns>
[HttpPost, Route("GetApplicationDetails")]
public async Task<DataResult<List<InvoiceApplicationDetailDto>>> GetApplicationDetailsAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult<List<InvoiceApplicationDetailDto>>.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _service.GetApplicationDetailsAsync(model.Ids);
}
/// <summary>
/// 获取发票详情
/// </summary>
@ -41,7 +78,7 @@ namespace DS.WMS.FeeApi.Controllers
/// <param name="request">请求参数</param>
/// <returns></returns>
[HttpPost, Route("Save")]
public async Task<DataResult<Invoice>> SaveAsync(InvoiceRequest<Invoice> request)
public async Task<DataResult<Invoice>> SaveAsync([FromBody]InvoiceRequest<Invoice> request)
{
if (!ModelState.IsValid)
return DataResult<Invoice>.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);

@ -1,99 +0,0 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Invoice.Entity;
using DS.WMS.Core.Invoice.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 发票开具API
/// </summary>
public class InvoiceController : ApiController
{
readonly IInvoiceService<Invoice> _service;
/// <summary>
/// 初始化
/// </summary>
/// <param name="service"></param>
public InvoiceController(IInvoiceService<Invoice> service)
{
_service = service;
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>注意【申请编号】OtherQueryCondition 属性传入</remarks>
[HttpPost, Route("GetList")]
public async Task<DataResult<List<InvoiceDto>>> ListAsync([FromBody] PageRequest<string> request)
{
return await _service.GetListAsync(request);
}
/// <summary>
/// 提交发票开票
/// </summary>
/// <param name="request">请求参数</param>
/// <returns></returns>
[HttpPost, Route("Save")]
public async Task<DataResult<Invoice>> SaveAsync(InvoiceRequest<Invoice> request)
{
if (!ModelState.IsValid)
return DataResult<Invoice>.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
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>
/// <param name="model">发票ID</param>
/// <returns></returns>
[HttpPost, Route("SetLock")]
public async Task<DataResult> SetLockAsync([FromBody] 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);
}
}
}

@ -2805,3 +2805,143 @@
2024-07-16 14:04:36.3120 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-16 14:04:36.3120 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 14:04:36.3280 Info Configuration initialized.
2024-07-16 15:16:41.3055 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 15:16:41.3820 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 15:16:41.3820 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 15:16:41.4080 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-16 15:16:41.4080 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-16 15:16:41.4080 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 15:16:41.4301 Info Configuration initialized.
2024-07-16 16:08:38.1338 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 16:08:38.1871 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 16:08:38.1871 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 16:08:38.2151 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-16 16:08:38.2236 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-16 16:08:38.2236 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 16:08:38.2236 Info Configuration initialized.
2024-07-16 16:09:53.2111 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 16:09:53.2540 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 16:09:53.2540 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 16:09:53.2709 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-16 16:09:53.2709 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-16 16:09:53.2838 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 16:09:53.2838 Info Configuration initialized.
2024-07-16 16:15:41.1311 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 16:15:41.1732 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 16:15:41.1732 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 16:15:41.1922 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-16 16:15:41.1922 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-16 16:15:41.1922 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 16:15:41.2058 Info Configuration initialized.
2024-07-16 16:19:26.3527 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 16:19:26.3883 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 16:19:26.3920 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 16:19:26.4069 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-16 16:19:26.4069 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-16 16:19:26.4069 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 16:19:26.4275 Info Configuration initialized.
2024-07-16 16:21:34.0963 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 16:21:34.1862 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 16:21:34.1941 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 16:21:34.2173 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-16 16:21:34.2301 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-16 16:21:34.2356 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 16:21:34.2356 Info Configuration initialized.
2024-07-16 16:28:31.2423 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 16:28:31.2794 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 16:28:31.2843 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 16:28:31.3002 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-16 16:28:31.3002 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-16 16:28:31.3002 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 16:28:31.3181 Info Configuration initialized.
2024-07-16 17:13:13.4236 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 17:13:13.4789 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 17:13:13.4859 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 17:13:13.4997 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-16 17:13:13.4997 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-16 17:13:13.4997 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 17:13:13.4997 Info Configuration initialized.
2024-07-16 17:19:08.0729 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-16 17:19:08.1226 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-16 17:19:08.1262 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-16 17:19:08.1399 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-16 17:19:08.1399 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-16 17:19:08.1399 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-16 17:19:08.1399 Info Configuration initialized.
2024-07-17 08:59:01.8820 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 08:59:01.9023 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 08:59:01.9023 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 08:59:01.9403 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-17 08:59:01.9403 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-17 08:59:01.9403 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 08:59:01.9533 Info Configuration initialized.
2024-07-17 14:08:02.0324 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 14:08:02.0839 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 14:08:02.0839 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 14:08:02.0974 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-17 14:08:02.0974 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-17 14:08:02.1046 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 14:08:02.1046 Info Configuration initialized.
2024-07-17 14:31:00.1996 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 14:31:00.2399 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 14:31:00.2482 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 14:31:00.2640 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-17 14:31:00.2640 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-17 14:31:00.2766 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 14:31:00.2766 Info Configuration initialized.
2024-07-17 14:35:33.6868 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 14:35:33.7210 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 14:35:33.7210 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 14:35:33.7391 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-17 14:35:33.7455 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-17 14:35:33.7455 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 14:35:33.7455 Info Configuration initialized.
2024-07-17 14:39:05.6869 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 14:39:05.7174 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 14:39:05.7174 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 14:39:05.7347 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-17 14:39:05.7347 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-17 14:39:05.7347 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 14:39:05.7471 Info Configuration initialized.
2024-07-17 14:45:27.4998 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 14:45:27.5320 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 14:45:27.5457 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 14:45:27.5622 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-17 14:45:27.5622 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-17 14:45:27.5728 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 14:45:27.5728 Info Configuration initialized.
2024-07-17 14:47:07.0131 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 14:47:07.0528 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 14:47:07.0591 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 14:47:07.0768 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-17 14:47:07.0768 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-17 14:47:07.0768 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 14:47:07.0948 Info Configuration initialized.
2024-07-17 15:08:51.5487 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 15:08:51.5803 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 15:08:51.5803 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 15:08:51.5951 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-17 15:08:51.5951 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-17 15:08:51.5951 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 15:08:51.6071 Info Configuration initialized.
2024-07-17 15:19:31.1678 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 15:19:31.2347 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 15:19:31.2347 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 15:19:31.2591 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-17 15:19:31.2664 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-17 15:19:31.2664 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 15:19:31.2780 Info Configuration initialized.
2024-07-17 15:25:29.9213 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 15:25:29.9612 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 15:25:29.9681 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 15:25:29.9842 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-17 15:25:29.9842 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-17 15:25:29.9842 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 15:25:29.9990 Info Configuration initialized.
2024-07-17 15:41:56.3877 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 15:41:56.4227 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 15:41:56.4227 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 15:41:56.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-17 15:41:56.4414 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-17 15:41:56.4498 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 15:41:56.4498 Info Configuration initialized.

Loading…
Cancel
Save