diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs index 41a69e78..f01e34ba 100644 --- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs @@ -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 /* diff --git a/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicaitonBiz.cs b/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicaitonBiz.cs index 2a66910e..ce39b894 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicaitonBiz.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicaitonBiz.cs @@ -9,11 +9,6 @@ namespace DS.WMS.Core.Application.Dtos /// public class FeeRecordDto { - /// - /// 申请单ID - /// - public long ApplicationId { get; set; } - /// /// 费用记录ID /// @@ -45,7 +40,7 @@ namespace DS.WMS.Core.Application.Dtos public string? FeeName { get; set; } /// - /// 费用类型 + /// 收付/费用类型 /// public FeeType FeeType { get; set; } @@ -65,10 +60,15 @@ namespace DS.WMS.Core.Application.Dtos public decimal RestAmount { get; set; } /// - /// 本次申请金额 + /// 本次申请/开票金额 /// public decimal ApplyAmount { get; set; } + /// + /// 原始汇率 + /// + public decimal? ExchangeRate { get; set; } + [IgnoreDataMember] public long CreateBy { get; set; } @@ -77,6 +77,11 @@ namespace DS.WMS.Core.Application.Dtos /// public string? CreateByName { get; set; } + /// + /// 录入方式 + /// + public string? InputMethod { get; set; } + /// /// 备注 /// diff --git a/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs b/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs index aff575d5..0eb21a26 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Dtos/ApplicationDetailDto.cs @@ -228,7 +228,7 @@ namespace DS.WMS.Core.Application.Dtos public decimal? OutstandingAmount { get; set; } /// - /// 申请/结算金额 + /// 申请/结算/开票金额 /// public decimal ApplyAmount { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/Application/Dtos/BizApplication.cs b/ds-wms-service/DS.WMS.Core/Application/Dtos/BizApplication.cs index f3d283eb..9edcfcef 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Dtos/BizApplication.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Dtos/BizApplication.cs @@ -137,6 +137,11 @@ namespace DS.WMS.Core.Fee.Dtos /// 所属部门名称 /// public string? SaleDeptName { get; set; } + + /// + /// 备注 + /// + public string? Note { get; set; } } /// @@ -254,11 +259,6 @@ namespace DS.WMS.Core.Fee.Dtos /// 发票号 /// public string? InvoiceNO { get; set; } - - /// - /// 费用范围 - /// - public FeeRange? FeeRange { get; set; } } /// diff --git a/ds-wms-service/DS.WMS.Core/Application/Dtos/PaymentApplicationQueryModel.cs b/ds-wms-service/DS.WMS.Core/Application/Dtos/PaymentApplicationQueryModel.cs index 4c3b8d2b..df7dfb07 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Dtos/PaymentApplicationQueryModel.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Dtos/PaymentApplicationQueryModel.cs @@ -1,5 +1,8 @@ namespace DS.WMS.Core.Application.Dtos { + /// + /// 1=未审核,2=已审核,3=仅需自己审核 + /// public enum AuditStatusForQuery { /// diff --git a/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationDetail.cs b/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationDetail.cs index 6129b451..3f72a14d 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationDetail.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Entity/ApplicationDetail.cs @@ -37,7 +37,7 @@ namespace DS.WMS.Core.Application.Entity public long? DetailId { get; set; } /// - /// 引用的明细(用于结算) + /// 引用的明细 /// [Navigate(NavigateType.OneToOne, nameof(DetailId))] public ApplicationDetail? RefDetail { get; set; } diff --git a/ds-wms-service/DS.WMS.Core/Application/Interface/IInvoiceApplicationService.cs b/ds-wms-service/DS.WMS.Core/Application/Interface/IInvoiceApplicationService.cs index ba514c40..9cd66d61 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Interface/IInvoiceApplicationService.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Interface/IInvoiceApplicationService.cs @@ -22,7 +22,7 @@ namespace DS.WMS.Core.Application.Interface /// /// /// - Task>> GetBizListAsync(PageRequest request); + Task>> GetBizListAsync(PageRequest request); /// /// 获取申请单详情 diff --git a/ds-wms-service/DS.WMS.Core/Application/Method/InvoiceApplicationService.cs b/ds-wms-service/DS.WMS.Core/Application/Method/InvoiceApplicationService.cs index ccab478d..0c26cf26 100644 --- a/ds-wms-service/DS.WMS.Core/Application/Method/InvoiceApplicationService.cs +++ b/ds-wms-service/DS.WMS.Core/Application/Method/InvoiceApplicationService.cs @@ -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 /// /// /// - public async Task>> GetBizListAsync(PageRequest request) + public async Task>> GetBizListAsync(PageRequest 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); diff --git a/ds-wms-service/DS.WMS.Core/Fee/Dtos/BusinessDto.cs b/ds-wms-service/DS.WMS.Core/Fee/Dtos/BusinessDto.cs new file mode 100644 index 00000000..c9b71234 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Fee/Dtos/BusinessDto.cs @@ -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 +{ + /// + /// 业务 + /// + public class BusinessDto + { + /// + /// 业务ID + /// + public long BusinessId { get; set; } + + /// + /// 业务类型 + /// + public BusinessType BusinessType { get; set; } + + /// + /// 业务类型描述 + /// + public string BusinessTypeText => BusinessType.GetDescription(); + + /// + /// 应收费用状态 + /// + public BillFeeStatus? ARFeeStatus { get; set; } + + /// + /// 应收费用状态描述 + /// + public string ARFeeStatusText => ARFeeStatus?.GetDescription(); + + /// + /// 应付费用状态 + /// + public BillFeeStatus? APFeeStatus { get; set; } + + /// + /// 应付费用状态描述 + /// + public string APFeeStatusText => APFeeStatus?.GetDescription(); + + /// + /// 委托单位ID + /// + public long ClientId { get; set; } + + /// + /// 委托单位名称 + /// + public string? ClientName { get; set; } + + /// + /// 主提单号 + /// + public string? MBLNO { get; set; } + + /// + /// 分提单号 + /// + public string? HBLNO { get; set; } + + /// + /// 开船日期 + /// + public DateTime? ETD { get; set; } + + /// + /// 业务状态 + /// + public string? BusinessStatus { get; set; } + + /// + /// 业务锁定 + /// + public bool? IsBusinessLocking { get; set; } + + /// + /// 费用锁定 + /// + public bool? IsFeeLocking { get; set; } + + /// + /// 委托编号 + /// + public string CustomerNo { get; set; } + + /// + /// 报关单号 + /// + public string? CustomNo { get; set; } + + /// + /// 揽货人ID + /// + //[IgnoreDataMember] + public long? SaleId { get; set; } + + /// + /// 揽货人名称 + /// + + public string? Sale { get; set; } + + /// + /// 集装箱 + /// + public string? CntrTotal { get; set; } + + /// + /// 会计期间 + /// + public string? AccountDate { get; set; } + + //[IgnoreDataMember] + public long? SourceId { get; set; } + + /// + /// 业务来源 + /// + public string? SourceName { get; set; } + + //[IgnoreDataMember] + public long? SourceDetailId { get; set; } + + /// + /// 来源明细 + /// + + public string? DetailName { get; set; } + + /// + /// 经营单位 + /// + public string? BusinessUnit { get; set; } + + /// + /// 备注 + /// + public string? Remark { get; set; } + + /// + /// 其他备注 + /// + public string? Note { get; set; } + + /// + /// 创建人ID + /// + //[IgnoreDataMember] + public long CreateBy { get; set; } + + /// + /// 创建人用户名 + /// + public string CreateByName { get; set; } + + /// + /// 操作ID + /// + //[IgnoreDataMember] + public long? OperatorId { get; set; } + + /// + /// 操作员 + /// + + public string? Operator { get; set; } + + /// + /// 起运港 + /// + public string? LoadPort { get; set; } + + /// + /// 卸货港 + /// + public string? DischargePort { get; set; } + + /// + /// 船名 + /// + public string? Vessel { get; set; } + + /// + /// 航次 + /// + public string? Voyage { get; set; } + + /// + /// 客服员ID + /// + //[IgnoreDataMember] + public long? CustomerServiceId { get; set; } + + /// + /// 客服员 + /// + public string? CustomerServiceName { get; set; } + + /// + /// 收货地 + /// + public string? ReceiptPlace { get; set; } + + /// + /// 目的地 + /// + public string? Destination { get; set; } + + /// + /// 订单号 + /// + public string? OrderNo { get; set; } + + /// + /// 运杂费比例 + /// + public decimal? FreightRatio { get; set; } + + /// + /// 品名 + /// + public string? GoodsName { get; set; } + + /// + /// 付费方式 + /// + public string? MBLFrt { get; set; } + + /// + /// 承运人/船公司 + /// + public string? Carrier { get; set; } + + /// + /// 场站 + /// + public string? Yard { get; set; } + + /// + /// 订舱公司 + /// + public string? Forwarder { get; set; } + + /// + /// 签单方式 + /// + public string? IssueType { get; set; } + + /// + /// 运费协议号 + /// + public string? ContractNo { get; set; } + + /// + /// 所属分部ID + /// + //[IgnoreDataMember] + public long SaleDeptId { get; set; } + + /// + /// 所属分部名 + /// + public string? SaleDeptName { get; set; } + + /// + /// 装运方式 + /// + public string? BLType { get; set; } + + /// + /// 货物标识 + /// + public string? CargoId { get; set; } + + /// + /// 危险品等级 + /// + public string? DangerClass { get; set; } + + /// + /// 运输类型 + /// + public string? ShipmentType { get; set; } + + /// + /// 业务日期 + /// + public DateTime? BusinessDate { get; set; } + + /// + /// 国外代理ID + /// + public long? AgentId { get; set; } + + /// + /// 发票号 + /// + public string? InvoiceNo { get; set; } + + /// + /// 订舱编号 + /// + public string? BookingNo { get; set; } + + /// + /// 结算方式 + /// + public string? StlName { get; set; } + } + + /// + /// 业务费用 + /// + public class BusinessFeeDto : BusinessDto + { + /// + /// 费用记录ID + /// + public long RecordId { get; set; } + + /// + /// 费用状态 + /// + public FeeStatus FeeStatus { get; set; } + + /// + /// 费用状态描述 + /// + public string FeeStatusText { get { return FeeStatus.GetDescription(); } } + + /// + /// 收付类型(收、付) 1应收 2 应付 + /// + public FeeType FeeType { get; set; } + + /// + /// 收付类型描述 + /// + public string FeeTypeText { get { return FeeType.GetDescription(); } } + + /// + /// 费用ID + /// + public long FeeId { get; set; } + + /// + /// 费用名称 + /// + public string FeeName { get; set; } + + /// + /// 费用英文名称 + /// + public string? FeeEnName { get; set; } + + /// + /// 费用对象ID + /// + public long CustomerId { get; set; } + + /// + /// 费用对象 + /// + public string CustomerName { get; set; } + + /// + /// 费用对象全称 + /// + public string? CustomerFullName { get; set; } + + /// + /// 费用标准 + /// + public string? Unit { get; set; } + + /// + /// 单价 + /// + public decimal UnitPrice { get; set; } + + /// + /// 数量 + /// + public decimal Quantity { get; set; } + + /// + /// 金额 + /// + public decimal Amount { get; set; } + + /// + /// 币别 + /// + public string Currency { get; set; } + + /// + /// 汇率 + /// + public decimal? ExchangeRate { get; set; } + + /// + /// 佣金比率 + /// + public decimal CommissionRate { get; set; } + + /// + /// 结算金额 + /// + public decimal SettlementAmount { get; set; } + + /// + /// 开票金额 + /// + public decimal InvoiceAmount { get; set; } + + /// + /// 申请金额 + /// + public decimal OrderAmount { get; set; } + + /// + /// 申请开票金额 + /// + public decimal OrderInvoiceAmount { get; set; } + + /// + /// 申请结算金额 + /// + public decimal OrderSettlementAmount { get; set; } + + /// + /// 申请发票开票金额 + /// + public decimal OrderInvSettlementAmount { get; set; } + + ///// + ///// 未开票金额 + ///// + //public decimal InvoiceAmountRest { get; set; } + + /// + /// 是否机密费用 + /// + public bool IsOpen { get; set; } + + /// + /// 对帐编号 + /// + public string? DebitNo { get; set; } + + /// + /// 是否对帐 + /// + public bool IsDebit { get; set; } + + /// + /// 是否垫付费用 + /// + public bool IsAdvancedPay { get; set; } + + /// + /// 是否禁开发票 + /// + public bool IsInvoice { get; set; } + + /// + /// 是否财务费用 + /// + public bool IsAcc { get; set; } + + /// + /// 税率 + /// + public decimal TaxRate { get; set; } + + /// + /// 含税单价 + /// + public decimal TaxUnitPrice { get; set; } + + /// + /// 不含税金额 + /// + public decimal NoTaxAmount { get; set; } + + /// + /// 财务税率 (销项税率) + /// + public decimal AccTaxRate { get; set; } + + /// + /// 销项税额 + /// + public decimal AccTax { get { return Amount * AccTaxRate; } } + + /// + /// 销项金额 + /// + public decimal AccTaxValue { get { return Amount - AccTax; } } + + /// + /// 税额 + /// + public decimal Tax { get; set; } + + /// + /// 核算单位Id + /// + public long SaleOrgId { get; set; } + + /// + /// 核算单位 + /// + public string? SaleOrg { get; set; } + + /// + /// 创建人 + /// + public long CreateBy { get; set; } + + /// + /// 创建人名字 + /// + public string CreateByName { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + } +} diff --git a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs index 02eabde1..83b537d7 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs @@ -209,17 +209,17 @@ namespace DS.WMS.Core.Fee.Entity /// 是否垫付费用 /// [SugarColumn(ColumnDescription = "是否垫付费用", DefaultValue = "0")] - public bool? IsAdvancedPay { get; set; } = false; + public bool IsAdvancedPay { get; set; } = false; /// /// 是否禁开发票 /// [SugarColumn(ColumnDescription = "是否禁开发票", DefaultValue = "0")] - public bool? IsInvoice { get; set; } = false; + public bool IsInvoice { get; set; } = false; /// /// 是否销售订舱 /// [SugarColumn(ColumnDescription = "是否销售订舱", DefaultValue = "0")] - public bool? IsCrmOrderFee { get; set; } = false; + public bool IsCrmOrderFee { get; set; } = false; /// /// 发票号 diff --git a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeServiceBase.cs b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeServiceBase.cs index c6246f09..ebb4c952 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeServiceBase.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeServiceBase.cs @@ -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(); } + /// + /// 返回针对费用及其关联业务的查询对象 + /// + /// 关联条件1 + /// 查询对象 + public ISugarQueryable CreateFeeQuery( + Expression>? expr1 = null) + { + //海运出口 + var query1 = TenantDb.Queryable() + .InnerJoin((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> { query1 }); + } + /// /// 查找模板 /// diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs b/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs new file mode 100644 index 00000000..198f02f0 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Invoice/Dtos/InvoiceRequest.cs @@ -0,0 +1,21 @@ +using DS.WMS.Core.Application.Dtos; + +namespace DS.WMS.Core.Invoice.Dtos +{ + /// + /// 提交结算单请求参数 + /// + public class InvoiceRequest where TEntity : Entity.Invoice + { + /// + /// 发票 + /// + public TEntity Invoice { get; set; } + + /// + /// 结算费用明细 + /// + public List? Details { get; set; } + + } +} diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Entity/Invoice.cs b/ds-wms-service/DS.WMS.Core/Invoice/Entity/Invoice.cs index cf661c9e..fd05f3a5 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Entity/Invoice.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Entity/Invoice.cs @@ -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; } + /// + /// 费用明细 + /// + [Navigate(NavigateType.OneToMany, nameof(ApplicationDetail.ApplicationId))] + public List? Details { get; set; } + /// + /// 发票明细 + /// + [Navigate(NavigateType.OneToMany, nameof(InvoiceDetail.ApplicationId))] + public List? InvoiceDetails { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs b/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs new file mode 100644 index 00000000..f64a0058 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Invoice/Interface/IFreeInvoiceService.cs @@ -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 +{ + /// + /// 自由开票 + /// + public interface IFreeInvoiceService : IInvoiceService + { + /// + /// 获取待开票的业务列表 + /// + /// + /// + Task>> GetBizListAsync(PageRequest request); + + /// + /// 根据业务编号及类型获取费用记录 + /// + /// 业务ID与业务类型 + /// + Task> GetFeesAsync(params BizItem[] items); + } +} diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Interface/IInvoiceService`1.cs b/ds-wms-service/DS.WMS.Core/Invoice/Interface/IInvoiceService`1.cs index c5cd3157..3fcee63f 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Interface/IInvoiceService`1.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Interface/IInvoiceService`1.cs @@ -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 { /// - /// 结算单基础服务定义 + /// 开票基础服务定义 /// /// 实体的类型声明 public interface IInvoiceService where TEntity : Entity.Invoice, new() { - ///// - ///// 提交结算单 - ///// - ///// - ///// - //Task> SaveAsync(SettlementRequest request); + /// + /// 获取分页列表 + /// + /// + /// + Task>> GetListAsync(PageRequest request); + + /// /// 删除发票明细 diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs b/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs new file mode 100644 index 00000000..a4ef863a --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Invoice/Method/FreeInvoiceService.cs @@ -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 +{ + /// + /// 自由开票实现 + /// + public class FreeInvoiceService : InvoiceService, IFreeInvoiceService + { + /// + /// 初始化 + /// + /// + public FreeInvoiceService(IServiceProvider provider) : base(provider) + { + } + + ///// + ///// 获取发票详情 + ///// + ///// 申请单ID + ///// + //public Task> GetAsync(long id) + //{ + + //} + + /// + /// 获取待开票的业务列表 + /// + /// + /// + public async Task>> GetBizListAsync(PageRequest request) + { + var expr = Expressionable.Create().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().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().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().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().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().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; + } + + /// + /// 根据业务编号及类型获取费用记录 + /// + /// 业务ID与业务类型 + /// + public async Task> 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() + .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.Success(new InvoiceApplicaitonBiz(list)); + } + } +} diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs b/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs index 7bd681e1..3c3e7607 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceService`1.cs @@ -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 : FeeServiceBase, IInvoiceService where TEntity : Entity.Invoice, new() { + protected readonly Lazy CommonService; + /// /// 初始化 /// /// public InvoiceService(IServiceProvider provider) : base(provider) { + CommonService = new Lazy(provider.GetRequiredService()); } /// @@ -104,6 +111,177 @@ namespace DS.WMS.Core.Invoice.Method return result; } + /// + /// 提交发票开票 + /// + /// 请求参数 + /// + public async Task> SaveAsync(InvoiceRequest 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().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.FailedWithDesc(nameof(MultiLanguageConst.InvoiceIsLocked)); + } + var result = EnsureSettlement(request.Invoice, dbValue); + if (!result.Succeeded) + return DataResult.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.FailedWithDesc(nameof(MultiLanguageConst.AmountCannotBeZero)); + + if (invoice.Details.Any(x => x.OriginalCurrency.IsNullOrEmpty())) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.OriginalCurrencyCanNotNull)); + + if (invoice.Details.Any(x => x.Currency != invoice.Currency && x.ExchangeRate == null)) + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NeedExchangeRate)); + + result = await PreSaveAsync(invoice); + if (!result.Succeeded) + return DataResult.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(); + if (!sequence.Succeeded) + { + return DataResult.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.Success(await PostSaveAsync(invoice)); + } + catch (Exception ex) + { + await TenantDb.Ado.RollbackTranAsync(); + await ex.LogAsync(Db); + return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed)); + } + } + + /// + /// 用于发票的状态检查 + /// + /// 提交的发票 + /// 数据库值,新增时为null + /// + protected virtual DataResult EnsureSettlement(TEntity invoice, TEntity? dbValue) + { + return DataResult.Success; + } + + /// + /// 在保存前调用 + /// + /// 发票 + /// + protected virtual Task PreSaveAsync(TEntity invoice) + { + return Task.FromResult(DataResult.Success); + } + + /// + /// 在保存时调用 + /// + /// 要保存的发票 + /// + protected virtual Task OnSaveAsync(TEntity invoice) + { + return Task.CompletedTask; + } + + /// + /// 在保存完成后调用 + /// + /// 发票 + protected virtual Task PostSaveAsync(TEntity invoice) + { + return Task.FromResult(invoice); + } + + public Task DeleteAsync(params long[] ids) diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs new file mode 100644 index 00000000..811df2bf --- /dev/null +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/FreeInvoiceController.cs @@ -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 +{ + /// + /// 自由开票API + /// + public class FreeInvoiceController : ApiController + { + readonly IFreeInvoiceService _service; + + /// + /// 初始化 + /// + /// + public FreeInvoiceController(IFreeInvoiceService service) + { + _service = service; + } + + /// + /// 获取待开票的业务列表 + /// + /// + /// 注意!!【费用范围】需通过 OtherQueryCondition 字段传入 + [HttpPost, Route("GetBizList")] + public async Task>> GetBizListAsync(PageRequest request) + { + return await _service.GetBizListAsync(request); + } + } +} diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceApplicationController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceApplicationController.cs index e4a44ec0..7eb12dc5 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceApplicationController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceApplicationController.cs @@ -41,8 +41,9 @@ namespace DS.WMS.FeeApi.Controllers /// /// /// + /// 注意!!【费用范围】一栏需通过 OtherQueryCondition 字段传入枚举值 [HttpPost, Route("GetBizList")] - public async Task>> BizListAsync([FromBody] PageRequest request) + public async Task>> BizListAsync([FromBody] PageRequest request) { return await _service.GetBizListAsync(request); } diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceController.cs new file mode 100644 index 00000000..b0f298f2 --- /dev/null +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/InvoiceController.cs @@ -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 +{ + /// + /// 发票开具API + /// + public class InvoiceController : ApiController + { + readonly IInvoiceService _service; + + /// + /// 初始化 + /// + /// + public InvoiceController(IInvoiceService service) + { + _service = service; + } + + /// + /// 获取列表 + /// + /// + /// + /// 注意!!【申请编号】OtherQueryCondition 属性传入 + [HttpPost, Route("GetList")] + public async Task>> ListAsync([FromBody] PageRequest request) + { + return await _service.GetListAsync(request); + } + } +} diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentApplicationAuditController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentApplicationAuditController.cs index 12bbfcc6..47e75966 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentApplicationAuditController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentApplicationAuditController.cs @@ -30,6 +30,7 @@ namespace DS.WMS.FeeApi.Controllers /// /// /// + /// 注意!!【审核状态】需要通过 OtherQueryCondition 属性传入,取值范围请参考 AuditStatusForQuery 枚举 [HttpPost, Route("GetList")] public async Task>> ListAsync([FromBody] PageRequest request) { diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentFreeSettlementController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentFreeSettlementController.cs index 9a05bf92..4d2157a6 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentFreeSettlementController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentFreeSettlementController.cs @@ -62,6 +62,7 @@ namespace DS.WMS.FeeApi.Controllers /// /// /// + /// 注意!!需要指定结算单ID,通过 OtherQueryCondition 传入 [HttpPost, Route("GetDetails")] public async Task> GetDetailsAsync(PageRequest request) { diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs index 662ea004..6e5064be 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/PaymentSettlementController.cs @@ -47,10 +47,11 @@ namespace DS.WMS.FeeApi.Controllers } /// - /// 获取付费自由结算明细 + /// 获取付费申请结算明细 /// /// /// + /// 注意!!需要指定结算单ID,通过 OtherQueryCondition 传入 [HttpPost, Route("GetDetails")] public async Task>> GetDetailsAsync(PageRequest request) { @@ -62,6 +63,7 @@ namespace DS.WMS.FeeApi.Controllers /// /// /// + /// 注意!!【仅未结申请】、【装货港/卸货港】需要通过 OtherQueryCondition 属性传入,对象结构请参考 ApplicationListQuery [HttpPost, Route("GetApplicationList")] public async Task>> GetApplicationListAsync([FromBody] PageRequest request) { diff --git a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt index b6211f74..1d7af84d 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt @@ -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. diff --git a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index e71199ac..53fa6e90 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/ds-wms-service/DS.WMS.FeeApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>D:\Publish\DS8\FeeApi - 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||; + 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||; \ No newline at end of file