提交发票开票

usertest
嵇文龙 4 months ago
parent a38309c4f6
commit 487216dfc6

@ -628,6 +628,14 @@ public static class MultiLanguageConst
public const string OriginalCurrencyCanNotNull = "OriginalCurrency_CanNot_Null";
#endregion
#region 发票相关
[Description("发票已被锁定,禁止提交")]
public const string InvoiceIsLocked = "Invoice_IsLocked";
[Description("发票币别与费用明细币别不一致,需要进行汇率转换")]
public const string NeedExchangeRate = "Need_ExchangeRate";
#endregion
#region 预订舱API
/*

@ -9,11 +9,6 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public class FeeRecordDto
{
/// <summary>
/// 申请单ID
/// </summary>
public long ApplicationId { get; set; }
/// <summary>
/// 费用记录ID
/// </summary>
@ -45,7 +40,7 @@ namespace DS.WMS.Core.Application.Dtos
public string? FeeName { get; set; }
/// <summary>
/// 费用类型
/// 收付/费用类型
/// </summary>
public FeeType FeeType { get; set; }
@ -65,10 +60,15 @@ namespace DS.WMS.Core.Application.Dtos
public decimal RestAmount { get; set; }
/// <summary>
/// 本次申请金额
/// 本次申请/开票金额
/// </summary>
public decimal ApplyAmount { get; set; }
/// <summary>
/// 原始汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
[IgnoreDataMember]
public long CreateBy { get; set; }
@ -77,6 +77,11 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary>
public string? CreateByName { get; set; }
/// <summary>
/// 录入方式
/// </summary>
public string? InputMethod { get; set; }
/// <summary>
/// 备注
/// </summary>

@ -228,7 +228,7 @@ namespace DS.WMS.Core.Application.Dtos
public decimal? OutstandingAmount { get; set; }
/// <summary>
/// 申请/结算金额
/// 申请/结算/开票金额
/// </summary>
public decimal ApplyAmount { get; set; }

@ -137,6 +137,11 @@ namespace DS.WMS.Core.Fee.Dtos
/// 所属部门名称
/// </summary>
public string? SaleDeptName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Note { get; set; }
}
/// <summary>
@ -254,11 +259,6 @@ namespace DS.WMS.Core.Fee.Dtos
/// 发票号
/// </summary>
public string? InvoiceNO { get; set; }
/// <summary>
/// 费用范围
/// </summary>
public FeeRange? FeeRange { get; set; }
}
/// <summary>

@ -1,5 +1,8 @@
namespace DS.WMS.Core.Application.Dtos
{
/// <summary>
/// 1=未审核2=已审核3=仅需自己审核
/// </summary>
public enum AuditStatusForQuery
{
/// <summary>

@ -37,7 +37,7 @@ namespace DS.WMS.Core.Application.Entity
public long? DetailId { get; set; }
/// <summary>
/// 引用的明细(用于结算)
/// 引用的明细
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(DetailId))]
public ApplicationDetail? RefDetail { get; set; }

@ -22,7 +22,7 @@ namespace DS.WMS.Core.Application.Interface
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest request);
Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request);
/// <summary>
/// 获取申请单详情

@ -11,7 +11,6 @@ using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using SqlSugar;
using static System.Net.Mime.MediaTypeNames;
namespace DS.WMS.Core.Application.Method
{
@ -91,65 +90,52 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest request)
public async Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request)
{
var query = CreateBizQuery();
if (!request.QueryCondition.IsNullOrEmpty())
{
var whereList = Db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
int? index = null;
foreach (var item in whereList)
{
ConditionalModel? model = item as ConditionalModel;
if (model == null)
continue;
query = query.Where(whereList);
}
//设置了费用范围筛选
if (string.Equals(model.FieldName, nameof(BizInvoiceApplication.FeeRange)) && int.TryParse(model.FieldValue, out int val))
{
FeeRange feeRange = (FeeRange)val;
switch (feeRange)
{
case FeeRange.Unsettled:
query = query.Where(x => x.SettlementAmount == 0);
break;
case FeeRange.Settled:
query = query.Where(x => x.SettlementAmount > 0);
break;
case FeeRange.PaidNotReceived:
query = query.Where(x => x.UnSettlementPaid == 0 && x.UnSettlementCharged > 0);
break;
case FeeRange.ReceivedNotPaid:
query = query.Where(x => x.UnSettlementPaid > 0 && x.UnSettlementCharged == 0);
break;
case FeeRange.NotAppliedSettled:
query = query.Where(x => x.OrderAmount == 0 && x.SettlementAmount == 0);
break;
case FeeRange.UnreconciledSettled:
query = query.Where(x => x.DebitNo == null && x.SettlementAmount == 0);
break;
case FeeRange.NotIssuedSettled:
query = query.Where(x => x.InvoiceAmount == 0 && x.SettlementAmount == 0);
break;
case FeeRange.ReconciledNotSettled:
query = query.Where(x => x.DebitNo != null && x.SettlementAmount == 0);
break;
case FeeRange.NotReceivedPaid:
query = query.Where(x => x.UnSettlementPaid > 0 && x.UnSettlementCharged > 0);
break;
case FeeRange.SettledNotIssued:
query = query.Where(x => x.InvoiceAmount == 0 && x.SettlementAmount > 0);
break;
}
index = whereList.IndexOf(item);
if (request.OtherQueryCondition.HasValue)
{
FeeRange feeRange = request.OtherQueryCondition.Value;
switch (feeRange)
{
case FeeRange.Unsettled:
query = query.Where(x => x.SettlementAmount == 0);
break;
case FeeRange.Settled:
query = query.Where(x => x.SettlementAmount > 0);
break;
case FeeRange.PaidNotReceived:
query = query.Where(x => x.UnSettlementPaid == 0 && x.UnSettlementCharged > 0);
break;
case FeeRange.ReceivedNotPaid:
query = query.Where(x => x.UnSettlementPaid > 0 && x.UnSettlementCharged == 0);
break;
case FeeRange.NotAppliedSettled:
query = query.Where(x => x.OrderAmount == 0 && x.SettlementAmount == 0);
break;
case FeeRange.UnreconciledSettled:
query = query.Where(x => x.DebitNo == null && x.SettlementAmount == 0);
break;
case FeeRange.NotIssuedSettled:
query = query.Where(x => x.InvoiceAmount == 0 && x.SettlementAmount == 0);
break;
case FeeRange.ReconciledNotSettled:
query = query.Where(x => x.DebitNo != null && x.SettlementAmount == 0);
break;
case FeeRange.NotReceivedPaid:
query = query.Where(x => x.UnSettlementPaid > 0 && x.UnSettlementCharged > 0);
break;
case FeeRange.SettledNotIssued:
query = query.Where(x => x.InvoiceAmount == 0 && x.SettlementAmount > 0);
break;
}
}
if (index.HasValue)
whereList.RemoveAt(index.Value);
query = query.Where(whereList);
}
var result = await query.ToQueryPageAsync(request.PageCondition);

@ -0,0 +1,538 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos
{
/// <summary>
/// 业务
/// </summary>
public class BusinessDto
{
/// <summary>
/// 业务ID
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 业务类型描述
/// </summary>
public string BusinessTypeText => BusinessType.GetDescription();
/// <summary>
/// 应收费用状态
/// </summary>
public BillFeeStatus? ARFeeStatus { get; set; }
/// <summary>
/// 应收费用状态描述
/// </summary>
public string ARFeeStatusText => ARFeeStatus?.GetDescription();
/// <summary>
/// 应付费用状态
/// </summary>
public BillFeeStatus? APFeeStatus { get; set; }
/// <summary>
/// 应付费用状态描述
/// </summary>
public string APFeeStatusText => APFeeStatus?.GetDescription();
/// <summary>
/// 委托单位ID
/// </summary>
public long ClientId { get; set; }
/// <summary>
/// 委托单位名称
/// </summary>
public string? ClientName { get; set; }
/// <summary>
/// 主提单号
/// </summary>
public string? MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public string? HBLNO { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 业务状态
/// </summary>
public string? BusinessStatus { get; set; }
/// <summary>
/// 业务锁定
/// </summary>
public bool? IsBusinessLocking { get; set; }
/// <summary>
/// 费用锁定
/// </summary>
public bool? IsFeeLocking { get; set; }
/// <summary>
/// 委托编号
/// </summary>
public string CustomerNo { get; set; }
/// <summary>
/// 报关单号
/// </summary>
public string? CustomNo { get; set; }
/// <summary>
/// 揽货人ID
/// </summary>
//[IgnoreDataMember]
public long? SaleId { get; set; }
/// <summary>
/// 揽货人名称
/// </summary>
public string? Sale { get; set; }
/// <summary>
/// 集装箱
/// </summary>
public string? CntrTotal { get; set; }
/// <summary>
/// 会计期间
/// </summary>
public string? AccountDate { get; set; }
//[IgnoreDataMember]
public long? SourceId { get; set; }
/// <summary>
/// 业务来源
/// </summary>
public string? SourceName { get; set; }
//[IgnoreDataMember]
public long? SourceDetailId { get; set; }
/// <summary>
/// 来源明细
/// </summary>
public string? DetailName { get; set; }
/// <summary>
/// 经营单位
/// </summary>
public string? BusinessUnit { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Remark { get; set; }
/// <summary>
/// 其他备注
/// </summary>
public string? Note { get; set; }
/// <summary>
/// 创建人ID
/// </summary>
//[IgnoreDataMember]
public long CreateBy { get; set; }
/// <summary>
/// 创建人用户名
/// </summary>
public string CreateByName { get; set; }
/// <summary>
/// 操作ID
/// </summary>
//[IgnoreDataMember]
public long? OperatorId { get; set; }
/// <summary>
/// 操作员
/// </summary>
public string? Operator { get; set; }
/// <summary>
/// 起运港
/// </summary>
public string? LoadPort { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string? DischargePort { get; set; }
/// <summary>
/// 船名
/// </summary>
public string? Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string? Voyage { get; set; }
/// <summary>
/// 客服员ID
/// </summary>
//[IgnoreDataMember]
public long? CustomerServiceId { get; set; }
/// <summary>
/// 客服员
/// </summary>
public string? CustomerServiceName { get; set; }
/// <summary>
/// 收货地
/// </summary>
public string? ReceiptPlace { get; set; }
/// <summary>
/// 目的地
/// </summary>
public string? Destination { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string? OrderNo { get; set; }
/// <summary>
/// 运杂费比例
/// </summary>
public decimal? FreightRatio { get; set; }
/// <summary>
/// 品名
/// </summary>
public string? GoodsName { get; set; }
/// <summary>
/// 付费方式
/// </summary>
public string? MBLFrt { get; set; }
/// <summary>
/// 承运人/船公司
/// </summary>
public string? Carrier { get; set; }
/// <summary>
/// 场站
/// </summary>
public string? Yard { get; set; }
/// <summary>
/// 订舱公司
/// </summary>
public string? Forwarder { get; set; }
/// <summary>
/// 签单方式
/// </summary>
public string? IssueType { get; set; }
/// <summary>
/// 运费协议号
/// </summary>
public string? ContractNo { get; set; }
/// <summary>
/// 所属分部ID
/// </summary>
//[IgnoreDataMember]
public long SaleDeptId { get; set; }
/// <summary>
/// 所属分部名
/// </summary>
public string? SaleDeptName { get; set; }
/// <summary>
/// 装运方式
/// </summary>
public string? BLType { get; set; }
/// <summary>
/// 货物标识
/// </summary>
public string? CargoId { get; set; }
/// <summary>
/// 危险品等级
/// </summary>
public string? DangerClass { get; set; }
/// <summary>
/// 运输类型
/// </summary>
public string? ShipmentType { get; set; }
/// <summary>
/// 业务日期
/// </summary>
public DateTime? BusinessDate { get; set; }
/// <summary>
/// 国外代理ID
/// </summary>
public long? AgentId { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string? InvoiceNo { get; set; }
/// <summary>
/// 订舱编号
/// </summary>
public string? BookingNo { get; set; }
/// <summary>
/// 结算方式
/// </summary>
public string? StlName { get; set; }
}
/// <summary>
/// 业务费用
/// </summary>
public class BusinessFeeDto : BusinessDto
{
/// <summary>
/// 费用记录ID
/// </summary>
public long RecordId { get; set; }
/// <summary>
/// 费用状态
/// </summary>
public FeeStatus FeeStatus { get; set; }
/// <summary>
/// 费用状态描述
/// </summary>
public string FeeStatusText { get { return FeeStatus.GetDescription(); } }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>
public FeeType FeeType { get; set; }
/// <summary>
/// 收付类型描述
/// </summary>
public string FeeTypeText { get { return FeeType.GetDescription(); } }
/// <summary>
/// 费用ID
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string? FeeEnName { get; set; }
/// <summary>
/// 费用对象ID
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 费用对象全称
/// </summary>
public string? CustomerFullName { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string? Unit { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal UnitPrice { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Quantity { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 佣金比率
/// </summary>
public decimal CommissionRate { get; set; }
/// <summary>
/// 结算金额
/// </summary>
public decimal SettlementAmount { get; set; }
/// <summary>
/// 开票金额
/// </summary>
public decimal InvoiceAmount { get; set; }
/// <summary>
/// 申请金额
/// </summary>
public decimal OrderAmount { get; set; }
/// <summary>
/// 申请开票金额
/// </summary>
public decimal OrderInvoiceAmount { get; set; }
/// <summary>
/// 申请结算金额
/// </summary>
public decimal OrderSettlementAmount { get; set; }
/// <summary>
/// 申请发票开票金额
/// </summary>
public decimal OrderInvSettlementAmount { get; set; }
///// <summary>
///// 未开票金额
///// </summary>
//public decimal InvoiceAmountRest { get; set; }
/// <summary>
/// 是否机密费用
/// </summary>
public bool IsOpen { get; set; }
/// <summary>
/// 对帐编号
/// </summary>
public string? DebitNo { get; set; }
/// <summary>
/// 是否对帐
/// </summary>
public bool IsDebit { get; set; }
/// <summary>
/// 是否垫付费用
/// </summary>
public bool IsAdvancedPay { get; set; }
/// <summary>
/// 是否禁开发票
/// </summary>
public bool IsInvoice { get; set; }
/// <summary>
/// 是否财务费用
/// </summary>
public bool IsAcc { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal TaxUnitPrice { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal NoTaxAmount { get; set; }
/// <summary>
/// 财务税率 (销项税率)
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 销项税额
/// </summary>
public decimal AccTax { get { return Amount * AccTaxRate; } }
/// <summary>
/// 销项金额
/// </summary>
public decimal AccTaxValue { get { return Amount - AccTax; } }
/// <summary>
/// 税额
/// </summary>
public decimal Tax { get; set; }
/// <summary>
/// 核算单位Id
/// </summary>
public long SaleOrgId { get; set; }
/// <summary>
/// 核算单位
/// </summary>
public string? SaleOrg { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreateBy { get; set; }
/// <summary>
/// 创建人名字
/// </summary>
public string CreateByName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}

@ -209,17 +209,17 @@ namespace DS.WMS.Core.Fee.Entity
/// 是否垫付费用
/// </summary>
[SugarColumn(ColumnDescription = "是否垫付费用", DefaultValue = "0")]
public bool? IsAdvancedPay { get; set; } = false;
public bool IsAdvancedPay { get; set; } = false;
/// <summary>
/// 是否禁开发票
/// </summary>
[SugarColumn(ColumnDescription = "是否禁开发票", DefaultValue = "0")]
public bool? IsInvoice { get; set; } = false;
public bool IsInvoice { get; set; } = false;
/// <summary>
/// 是否销售订舱
/// </summary>
[SugarColumn(ColumnDescription = "是否销售订舱", DefaultValue = "0")]
public bool? IsCrmOrderFee { get; set; } = false;
public bool IsCrmOrderFee { get; set; } = false;
/// <summary>
/// 发票号

@ -1,9 +1,12 @@
using DS.Module.Core;
using System.Linq.Expressions;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Op.Entity;
using LanguageExt.Pipes;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
@ -69,6 +72,71 @@ namespace DS.WMS.Core.Fee.Method
SaasService = serviceProvider.GetRequiredService<ISaasDbService>();
}
/// <summary>
/// 返回针对费用及其关联业务的查询对象
/// </summary>
/// <param name="expr1">关联条件1</param>
/// <returns>查询对象</returns>
public ISugarQueryable<BusinessFeeDto> CreateFeeQuery(
Expression<Func<SeaExport, FeeRecord, bool>>? expr1 = null)
{
//海运出口
var query1 = TenantDb.Queryable<SeaExport>()
.InnerJoin<FeeRecord>((s, f) => s.Id == f.BusinessId && f.BusinessType == BusinessType.OceanShippingExport)
.WhereIF(expr1 != null, expr1)
.Select((s, f) => new BusinessFeeDto
{
BusinessId = s.Id,
BusinessType = BusinessType.OceanShippingExport,
AccountDate = s.AccountDate,
CntrTotal = s.CntrTotal,
CreateBy = s.CreateBy,
CustomerNo = s.CustomerNo,
ClientName = s.CustomerName, //委托单位
DischargePort = s.DischargePort,
ETD = s.ETD,
HBLNO = s.HBLNO,
LoadPort = s.LoadPort,
MBLNO = s.MBLNO,
OperatorId = s.OperatorId,
SaleDeptId = s.SaleDeptId,
SaleId = s.SaleId,
Sale = s.Sale,//揽货人
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
BookingNo = s.BookingNo,
StlName = s.StlName,
InvoiceNo = s.InvoiceNo,
RecordId = f.Id,
FeeType = f.FeeType,
FeeStatus = f.FeeStatus,
CustomerId = f.CustomerId,//费用对象
CustomerName = f.CustomerName,
FeeId = f.FeeId,
FeeName = f.FeeName,
Currency = f.Currency,
Amount = f.Amount,
ExchangeRate = f.ExchangeRate,
OrderAmount = f.OrderAmount,
InvoiceAmount = f.InvoiceAmount,
SettlementAmount = f.SettlementAmount,
OrderSettlementAmount = f.OrderSettlementAmount,
OrderInvSettlementAmount = f.OrderInvSettlementAmount,
TaxRate = f.TaxRate,
AccTaxRate = f.AccTaxRate,
IsDebit = f.IsDebit,
DebitNo = f.DebitNo,
IsInvoice = f.IsInvoice,
SaleOrgId = f.SaleOrgId,
});
//海运进口
return TenantDb.UnionAll(new List<ISugarQueryable<BusinessFeeDto>> { query1 });
}
/// <summary>
/// 查找模板
/// </summary>

@ -0,0 +1,21 @@
using DS.WMS.Core.Application.Dtos;
namespace DS.WMS.Core.Invoice.Dtos
{
/// <summary>
/// 提交结算单请求参数
/// </summary>
public class InvoiceRequest<TEntity> where TEntity : Entity.Invoice
{
/// <summary>
/// 发票
/// </summary>
public TEntity Invoice { get; set; }
/// <summary>
/// 结算费用明细
/// </summary>
public List<PaymentApplicationDetailDto>? Details { get; set; }
}
}

@ -1,5 +1,6 @@
using DS.Module.Core.Data;
using DS.Module.Core.Enums;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Info.Entity;
using SqlSugar;
@ -316,6 +317,16 @@ namespace DS.WMS.Core.Invoice.Entity
[SugarColumn(ColumnDescription = "作废时间")]
public DateTime CancelTime { get; set; }
/// <summary>
/// 费用明细
/// </summary>
[Navigate(NavigateType.OneToMany, nameof(ApplicationDetail.ApplicationId))]
public List<ApplicationDetail>? Details { get; set; }
/// <summary>
/// 发票明细
/// </summary>
[Navigate(NavigateType.OneToMany, nameof(InvoiceDetail.ApplicationId))]
public List<InvoiceDetail>? InvoiceDetails { get; set; }
}
}

@ -0,0 +1,26 @@
using DS.Module.Core;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Fee.Dtos;
namespace DS.WMS.Core.Invoice.Interface
{
/// <summary>
/// 自由开票
/// </summary>
public interface IFreeInvoiceService : IInvoiceService<Entity.Invoice>
{
/// <summary>
/// 获取待开票的业务列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request);
/// <summary>
/// 根据业务编号及类型获取费用记录
/// </summary>
/// <param name="items">业务ID与业务类型</param>
/// <returns></returns>
Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params BizItem[] items);
}
}

@ -1,20 +1,22 @@
using DS.Module.Core;
using DS.WMS.Core.Invoice.Entity;
using DS.WMS.Core.Invoice.Dto;
namespace DS.WMS.Core.Invoice.Interface
{
/// <summary>
/// 结算单基础服务定义
/// 开票基础服务定义
/// </summary>
/// <typeparam name="TEntity">实体的类型声明</typeparam>
public interface IInvoiceService<TEntity> where TEntity : Entity.Invoice, new()
{
///// <summary>
///// 提交结算单
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//Task<DataResult<TEntity>> SaveAsync(SettlementRequest<TEntity> request);
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<InvoiceDto>>> GetListAsync(PageRequest<string> request);
/// <summary>
/// 删除发票明细

@ -0,0 +1,158 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Invoice.Interface;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using SqlSugar;
namespace DS.WMS.Core.Invoice.Method
{
/// <summary>
/// 自由开票实现
/// </summary>
public class FreeInvoiceService : InvoiceService<Entity.Invoice>, IFreeInvoiceService
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public FreeInvoiceService(IServiceProvider provider) : base(provider)
{
}
///// <summary>
///// 获取发票详情
///// </summary>
///// <param name="id">申请单ID</param>
///// <returns></returns>
//public Task<DataResult<InvoiceDto>> GetAsync(long id)
//{
//}
/// <summary>
/// 获取待开票的业务列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request)
{
var expr = Expressionable.Create<SeaExport, FeeRecord>().And((s, f) => f.FeeStatus == FeeStatus.AuditPassed &&
(f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount) != 0);
if (request.OtherQueryCondition.HasValue)
{
switch (request.OtherQueryCondition.Value)
{
case FeeRange.Unsettled:
expr = expr.And((s, f) => f.SettlementAmount == 0);
break;
case FeeRange.Settled:
expr = expr.And((s, f) => f.SettlementAmount > 0);
break;
}
}
var query = CreateFeeQuery(expr.ToExpression());
if (!request.QueryCondition.IsNullOrEmpty())
{
var whereList = Db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
query = query.Where(whereList);
}
var result = await query.GroupBy(x => x.BusinessId).Select(x => new BizInvoiceApplication
{
Id = x.BusinessId,
BusinessType = x.BusinessType,
AccountDate = x.AccountDate,
CntrTotal = x.CntrTotal,
CreateBy = x.CreateBy,
CustomerNo = x.CustomerNo,
ClientName = x.ClientName,
DischargePort = x.DischargePort,
ETD = x.ETD,
HBLNO = x.HBLNO,
LoadPort = x.LoadPort,
MBLNO = x.MBLNO,
OperatorId = x.OperatorId,
SaleDeptId = x.SaleDeptId,
SaleId = x.SaleId,
SaleName = x.Sale,
Vessel = x.Vessel,
Voyage = x.Voyage,
BookingNO = x.BookingNo,
//未开票金额=金额-已开票金额-申请开票金额+申请开票金额已开票
UnBilledRMB = SqlFunc.Subqueryable<FeeRecord>().Where(f => f.BusinessId == x.BusinessId && f.FeeStatus == FeeStatus.AuditPassed
&& f.Currency == RMB_CODE).Select(f => SqlFunc.AggregateSum(f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount)),
UnBilledUSD = SqlFunc.Subqueryable<FeeRecord>().Where(f => f.BusinessId == x.BusinessId && f.FeeStatus == FeeStatus.AuditPassed
&& f.Currency == USD_CODE).Select(f => SqlFunc.AggregateSum(f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount)),
UnBilledOther = SqlFunc.Subqueryable<FeeRecord>().Where(f => f.BusinessId == x.BusinessId && f.FeeStatus == FeeStatus.AuditPassed
&& f.Currency != RMB_CODE && f.Currency != USD_CODE).Select(f => SqlFunc.AggregateSum(f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount)),
}).ToQueryPageAsync(request.PageCondition);
if (result.Data.Count > 0)
{
//关联用户名称
var userIds = result.Data.Where(x => x.OperatorId.HasValue).Select(x => x.OperatorId.Value)
.Union(result.Data.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();
//关联机构名称
var orgIds = result.Data.Select(x => x.SaleDeptId).Distinct();
var orgs = await Db.Queryable<SysOrg>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.OrgName }).ToListAsync();
foreach (var item in result.Data)
{
item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
if (item.OperatorId.HasValue)
item.Operator = users.Find(x => x.Id == item.OperatorId.Value)?.UserName;
item.SaleDeptName = orgs.Find(x => x.Id == item.SaleDeptId)?.OrgName;
}
}
return result;
}
/// <summary>
/// 根据业务编号及类型获取费用记录
/// </summary>
/// <param name="items">业务ID与业务类型</param>
/// <returns></returns>
public async Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params BizItem[] items)
{
var bizIds = items.Select(x => x.Id).ToList();
var types = items.Select(x => x.BusinessType).ToList();
var list = await TenantDb.Queryable<FeeRecord>()
.Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && f.FeeStatus == FeeStatus.AuditPassed)
.Select(f => new FeeInvoiceDto
{
RecordId = f.Id,
BusinessId = f.BusinessId,
BusinessType = f.BusinessType,
CustomerName = f.CustomerName,
FeeId = f.FeeId,
FeeName = f.FeeName,
FeeType = f.FeeType,
Amount = f.Amount,
Currency = f.Currency,
RestAmount = f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount,
ExchangeRate = f.ExchangeRate,
Remark = f.Remark,
}).ToListAsync();
//移除开票剩余金额为0的项
list.RemoveAll(f => f.RestAmount == 0);
foreach (var item in list)
item.ApplyAmount = item.RestAmount;
return DataResult<InvoiceApplicaitonBiz>.Success(new InvoiceApplicaitonBiz(list));
}
}
}

@ -1,11 +1,15 @@
using DS.Module.Core;
using DS.Module.Core.Enums;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Application.Entity;
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;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
namespace DS.WMS.Core.Invoice.Method
@ -17,12 +21,15 @@ namespace DS.WMS.Core.Invoice.Method
public class InvoiceService<TEntity> : FeeServiceBase, IInvoiceService<TEntity>
where TEntity : Entity.Invoice, new()
{
protected readonly Lazy<ICommonService> CommonService;
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public InvoiceService(IServiceProvider provider) : base(provider)
{
CommonService = new Lazy<ICommonService>(provider.GetRequiredService<ICommonService>());
}
/// <summary>
@ -104,6 +111,177 @@ namespace DS.WMS.Core.Invoice.Method
return result;
}
/// <summary>
/// 提交发票开票
/// </summary>
/// <param name="request">请求参数</param>
/// <returns></returns>
public async Task<DataResult<TEntity>> SaveAsync(InvoiceRequest<TEntity> request)
{
var invoice = request.Invoice;
if (invoice.InvoiceDate == default)
invoice.InvoiceDate = DateTime.Now;
TEntity? dbValue = default;
if (request.Invoice.Id > 0)
{
dbValue = await TenantDb.Queryable<TEntity>().Select(x => new TEntity
{
Id = x.Id,
IsLocked = x.IsLocked,
Type = x.Type,
}).FirstAsync(x => x.Id == request.Invoice.Id);
if (dbValue != null && dbValue.IsLocked)
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.InvoiceIsLocked));
}
var result = EnsureSettlement(request.Invoice, dbValue);
if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
if (request.Details?.Count > 0)
{
if (invoice.Id == 0 && invoice.CustomerId == 0)
{
var first = request.Details[0];
invoice.CustomerId = first.CustomerId.GetValueOrDefault();
invoice.CustomerName = first.CustomerName;
}
invoice.Details = request.Details.Select(x => new ApplicationDetail
{
ApplicationId = x.ApplicationId,
DetailId = x.Id == 0 ? null : x.Id,
RecordId = x.RecordId,
CustomerName = x.CustomerName ?? invoice.CustomerName,
FeeId = x.FeeId,
FeeName = x.FeeName,
FeeType = x.FeeType,
ApplyAmount = x.Amount,
Currency = x.Currency,
ExchangeRate = x.ExchangeRate,
OriginalAmount = x.OriginalAmount,
OriginalCurrency = x.OriginalCurrency ?? (invoice.Currency.IsNullOrEmpty() ? x.Currency : invoice.Currency),
}).ToList();
//金额禁止为0
if (invoice.Details.Any(x => x.ApplyAmount == 0 || x.OriginalAmount == 0))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero));
if (invoice.Details.Any(x => x.OriginalCurrency.IsNullOrEmpty()))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.OriginalCurrencyCanNotNull));
if (invoice.Details.Any(x => x.Currency != invoice.Currency && x.ExchangeRate == null))
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.NeedExchangeRate));
result = await PreSaveAsync(invoice);
if (!result.Succeeded)
return DataResult<TEntity>.Failed(result.Message, result.MultiCode);
invoice.InvoiceAmount = invoice.Details.Sum(x => x.ApplyAmount);
}
await TenantDb.Ado.BeginTranAsync();
try
{
//关联导航属性插入
if (invoice.Id == 0)
{
//创建时需要生成申请单编号
var sequence = CommonService.Value.GetSequenceNext<TEntity>();
if (!sequence.Succeeded)
{
return DataResult<TEntity>.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist);
}
invoice.BillNO = sequence.Data;
await TenantDb.InsertNav(invoice).Include(x => x.Details).ExecuteCommandAsync();
}
else
{
if (invoice.Details.Count > 0)
await TenantDb.Insertable(invoice.Details).ExecuteCommandAsync();
await TenantDb.Updateable(invoice).IgnoreColumns(x => new
{
x.BillNO,
x.IsLocked,
x.CreateBy,
x.CreateTime,
x.Deleted,
x.DeleteBy,
x.DeleteTime
}).ExecuteCommandAsync();
}
await OnSaveAsync(invoice);
if (invoice.Details?.Count > 0)
{
//更新费用记录的已结算金额
var fees = invoice.Details.Select(x => new FeeRecord
{
Id = x.RecordId,
InvoiceAmount = x.OriginalAmount
}).ToList();
await TenantDb.Updateable(fees)
.PublicSetColumns(x => x.InvoiceAmount, "+")
.UpdateColumns(x => new { x.InvoiceAmount })
.ExecuteCommandAsync();
}
await TenantDb.Ado.CommitTranAsync();
return DataResult<TEntity>.Success(await PostSaveAsync(invoice));
}
catch (Exception ex)
{
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult<TEntity>.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
}
/// <summary>
/// 用于发票的状态检查
/// </summary>
/// <param name="invoice">提交的发票</param>
/// <param name="dbValue">数据库值新增时为null</param>
/// <returns></returns>
protected virtual DataResult EnsureSettlement(TEntity invoice, TEntity? dbValue)
{
return DataResult.Success;
}
/// <summary>
/// 在保存前调用
/// </summary>
/// <param name="invoice">发票</param>
/// <returns></returns>
protected virtual Task<DataResult> PreSaveAsync(TEntity invoice)
{
return Task.FromResult(DataResult.Success);
}
/// <summary>
/// 在保存时调用
/// </summary>
/// <param name="invoice">要保存的发票</param>
/// <returns></returns>
protected virtual Task OnSaveAsync(TEntity invoice)
{
return Task.CompletedTask;
}
/// <summary>
/// 在保存完成后调用
/// </summary>
/// <param name="invoice">发票</param>
protected virtual Task<TEntity> PostSaveAsync(TEntity invoice)
{
return Task.FromResult(invoice);
}
public Task<DataResult> DeleteAsync(params long[] ids)

@ -0,0 +1,35 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Invoice.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 自由开票API
/// </summary>
public class FreeInvoiceController : ApiController
{
readonly IFreeInvoiceService _service;
/// <summary>
/// 初始化
/// </summary>
/// <param name="service"></param>
public FreeInvoiceController(IFreeInvoiceService service)
{
_service = service;
}
/// <summary>
/// 获取待开票的业务列表
/// </summary>
/// <param name="request"></param>
/// <returns>注意!!【费用范围】需通过 OtherQueryCondition 字段传入</returns>
[HttpPost, Route("GetBizList")]
public async Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request)
{
return await _service.GetBizListAsync(request);
}
}
}

@ -41,8 +41,9 @@ namespace DS.WMS.FeeApi.Controllers
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>注意!!【费用范围】一栏需通过 OtherQueryCondition 字段传入枚举值</remarks>
[HttpPost, Route("GetBizList")]
public async Task<DataResult<List<BizInvoiceApplication>>> BizListAsync([FromBody] PageRequest request)
public async Task<DataResult<List<BizInvoiceApplication>>> BizListAsync([FromBody] PageRequest<FeeRange?> request)
{
return await _service.GetBizListAsync(request);
}

@ -0,0 +1,37 @@
using DS.Module.Core;
using DS.WMS.Core.Invoice.Dto;
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);
}
}
}

@ -30,6 +30,7 @@ namespace DS.WMS.FeeApi.Controllers
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>注意!!【审核状态】需要通过 OtherQueryCondition 属性传入,取值范围请参考 AuditStatusForQuery 枚举</remarks>
[HttpPost, Route("GetList")]
public async Task<DataResult<List<PaymentApplicationDto>>> ListAsync([FromBody] PageRequest<AuditStatusForQuery> request)
{

@ -62,6 +62,7 @@ namespace DS.WMS.FeeApi.Controllers
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>注意需要指定结算单ID通过 OtherQueryCondition 传入</remarks>
[HttpPost, Route("GetDetails")]
public async Task<DataResult<FreeSettlement>> GetDetailsAsync(PageRequest<long> request)
{

@ -47,10 +47,11 @@ namespace DS.WMS.FeeApi.Controllers
}
/// <summary>
/// 获取付费自由结算明细
/// 获取付费申请结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>注意需要指定结算单ID通过 OtherQueryCondition 传入</remarks>
[HttpPost, Route("GetDetails")]
public async Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(PageRequest<long> request)
{
@ -62,6 +63,7 @@ namespace DS.WMS.FeeApi.Controllers
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>注意!!【仅未结申请】、【装货港/卸货港】需要通过 OtherQueryCondition 属性传入,对象结构请参考 ApplicationListQuery</remarks>
[HttpPost, Route("GetApplicationList")]
public async Task<DataResult<List<PaymentApplicationDtoV2>>> GetApplicationListAsync([FromBody] PageRequest<ApplicationListQuery> request)
{

@ -2588,3 +2588,66 @@
2024-07-11 11:11:00.2186 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-11 11:11:00.2186 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 11:11:00.2186 Info Configuration initialized.
2024-07-12 17:20:58.9861 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-12 17:20:59.0402 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-12 17:20:59.0488 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-12 17:20:59.0617 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-12 17:20:59.0617 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-12 17:20:59.0617 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-12 17:20:59.0617 Info Configuration initialized.
2024-07-12 17:25:16.5094 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-12 17:25:16.5541 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-12 17:25:16.5541 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-12 17:25:16.5727 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-12 17:25:16.5799 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-12 17:25:16.5799 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-12 17:25:16.5799 Info Configuration initialized.
2024-07-12 17:31:52.1443 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-12 17:31:52.2067 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-12 17:31:52.2067 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-12 17:31:52.2380 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-12 17:31:52.2380 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-12 17:31:52.2380 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-12 17:31:52.2605 Info Configuration initialized.
2024-07-15 10:53:36.3917 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-15 10:53:36.5078 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-15 10:53:36.5078 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-15 10:53:36.5332 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-15 10:53:36.5332 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-15 10:53:36.5332 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-15 10:53:36.5481 Info Configuration initialized.
2024-07-15 10:54:08.9867 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-15 10:54:09.0625 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-15 10:54:09.0625 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-15 10:54:09.0824 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-15 10:54:09.0824 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-15 10:54:09.0824 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-15 10:54:09.0970 Info Configuration initialized.
2024-07-15 10:55:21.8759 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-15 10:55:21.9268 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-15 10:55:21.9268 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-15 10:55:21.9411 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-15 10:55:21.9411 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-15 10:55:21.9411 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-15 10:55:21.9539 Info Configuration initialized.
2024-07-15 10:57:23.1468 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-15 10:57:23.2246 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-15 10:57:23.2246 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-15 10:57:23.2468 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-15 10:57:23.2554 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-15 10:57:23.2554 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-15 10:57:23.2658 Info Configuration initialized.
2024-07-15 11:00:55.3225 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-15 11:00:55.3557 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-15 11:00:55.3608 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-15 11:00:55.3608 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-15 11:00:55.3807 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-15 11:00:55.3807 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-15 11:00:55.3911 Info Configuration initialized.
2024-07-15 11:19:59.3326 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-15 11:19:59.3641 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-15 11:19:59.3641 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-15 11:19:59.3801 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-15 11:19:59.3801 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-15 11:19:59.3910 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-15 11:19:59.3910 Info Configuration initialized.

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-07-11T03:40:17.3581147Z||;True|2024-07-04T17:20:50.0175739+08:00||;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>
<History>True|2024-07-12T09:35:11.1225017Z||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;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 />
</PropertyGroup>
</Project>
Loading…
Cancel
Save