From 6567708e5f3814bc303fc7a3a840caab8a12acf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 12 Jun 2024 16:56:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E4=B8=9A=E5=8A=A1=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E5=8F=8A=E7=B1=BB=E5=9E=8B=E8=8E=B7=E5=8F=96=E5=85=B3?= =?UTF-8?q?=E8=81=94=E8=B4=B9=E7=94=A8=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Fee/Dtos/FeeApplicationDto.cs | 164 +++++++++- .../DS.WMS.Core/Fee/Dtos/FeeAudit.cs | 2 +- ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeDto.cs | 69 ++++ .../DS.WMS.Core/Fee/Entity/ApplicationBase.cs | 30 +- .../DS.WMS.Core/Fee/Entity/FeeApplication.cs | 6 + .../Fee/Entity/FeeApplicationDetail.cs | 29 +- .../DS.WMS.Core/Fee/Entity/FeeRecord.cs | 14 +- .../Fee/Interface/IFeeApplicationService.cs | 23 ++ .../Fee/Method/FeeApplicationService.cs | 304 +++++++++++++++++- .../DS.WMS.Core/Fee/Method/FeeAuditService.cs | 4 +- .../Controllers/FeeApplicationController.cs | 40 ++- .../Controllers/FeeAuditController.cs | 2 +- .../DS.WMS.FeeApi/Logs/internal-nlog.txt | 84 +++++ .../FolderProfile1.pubxml.user | 2 +- .../DS.WMS.MainApi/DS.WMS.MainApi.csproj.user | 2 +- .../PublishProfiles/FolderProfile.pubxml.user | 2 +- 16 files changed, 718 insertions(+), 59 deletions(-) create mode 100644 ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeDto.cs diff --git a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeApplicationDto.cs b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeApplicationDto.cs index b1e45aa9..ec72df20 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeApplicationDto.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeApplicationDto.cs @@ -1,14 +1,18 @@ -using DS.Module.Core.Enums; -using SqlSugar; +using DS.Module.Core; +using System.Runtime.Serialization; +using DS.Module.Core.Enums; +using DS.WMS.Core.Op.Entity; namespace DS.WMS.Core.Fee.Dtos { + /// + /// 费用申请单 + /// public class FeeApplicationDto { /// /// 申请单编号 /// - [SugarColumn(ColumnDescription = "申请单编号", IsNullable = false, Length = 20)] public string ApplicationNO { get; set; } /// @@ -29,12 +33,12 @@ namespace DS.WMS.Core.Fee.Dtos /// /// 申请币别 /// - public string Currency { get; set; } + public string? Currency { get; set; } /// /// 折算汇率 /// - public decimal ExchangeRate { get; set; } + public decimal? ExchangeRate { get; set; } /// /// 审核人 @@ -44,7 +48,6 @@ namespace DS.WMS.Core.Fee.Dtos /// /// 审核人名称 /// - [SugarColumn(ColumnDescription = "审核人名称")] public string? AuditerName { get; set; } /// @@ -160,5 +163,154 @@ namespace DS.WMS.Core.Fee.Dtos public long CreateBy { get; set; } public string CreateByName { get; set; } + + public List? Details { get; set; } + } + + /// + /// 费用申请单明细 + /// + public class FeeApplicationDetailDto + { + /// + /// 业务类型 + /// + [IgnoreDataMember] + public long BusinessId { get; set; } + + /// + /// 业务类型 + /// + [IgnoreDataMember] + public BusinessType BusinessType { get; set; } + + /// + /// 主提单号 + /// + public string? MBLNO { get; set; } + + /// + /// 委托编号 + /// + public string? CustomerNo { get; set; } + + /// + /// 委托单位 + /// + public string? CustomerName { get; set; } + + /// + /// 业务锁定 + /// + public bool? IsBusinessLocking { get; set; } + /// + /// 费用锁定 + /// + public bool? IsFeeLocking { get; set; } + + /// + /// 开船日期 + /// + public DateTime? ETD { get; set; } + + /// + /// 业务来源 + /// + public string? SourceName { get; set; } + + /// + /// 揽货人 + /// + public string? SaleName { get; set; } + + /// + /// 集装箱 + /// + public string? CntrTotal { get; set; } + + /// + /// 会计期间 + /// + public string? AccountDate { get; set; } + + /// + /// 所属分部 + /// + public string? SaleDeptName { get; set; } + + /// + /// 费用名称 + /// + public string? FeeName { get; set; } + + /// + /// 费用类型 + /// + public FeeType FeeType { get; set; } + + /// + /// 费用对象 + /// + public string? FeeObject { get; set; } + + /// + /// 申请金额 + /// + public decimal Amount { get; set; } + + /// + /// 原始币别 + /// + public string OriginalCurrency { get; set; } + + /// + /// 原始汇率 + /// + public decimal? OriginalRate { get; set; } + + /// + /// 折算汇率 + /// + public decimal? ExchangeRate { get; set; } + + /// + /// 原始金额 + /// + public decimal OriginalAmount { get; set; } + + /// + /// 销项税率 + /// + public decimal AccTaxRate { get; set; } + + /// + /// 更改单 + /// + public string? ChangeOrder { get; set; } + + /// + /// 操作 + /// + public string? Operator { get; set; } + + /// + /// 船名 + /// + public string? Vessel { get; set; } + + /// + /// 航次 + /// + public string? Voyage { get; set; } + + /// + /// 船公司 + /// + public string? Carrier { get; set; } + + /// + /// 订舱代理 + /// + public string? Forwarder { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeAudit.cs b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeAudit.cs index 44c7324d..c9856a96 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeAudit.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeAudit.cs @@ -96,7 +96,7 @@ namespace DS.WMS.Core.Fee.Dtos /// /// 会计期间 /// - public DateTime? AccountDate { get; set; } + public string? AccountDate { get; set; } /// /// 业务来源 diff --git a/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeDto.cs b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeDto.cs new file mode 100644 index 00000000..7c2c3ff7 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Fee/Dtos/FeeDto.cs @@ -0,0 +1,69 @@ +using System.Runtime.Serialization; +using DS.Module.Core; + +namespace DS.WMS.Core.Fee.Dtos +{ + /// + /// 费用记录 + /// + public class FeeRecordDto + { + /// + /// 费用记录ID + /// + public long Id { get; set; } + + /// + /// 费用名称 + /// + public string? FeeName { get; set; } + + /// + /// 费用类型 + /// + public FeeType FeeType { get; set; } + + /// + /// 金额 + /// + public decimal? Amount { get; set; } + + /// + /// 币别 + /// + public string Currency { get; set; } + + /// + /// 原始汇率 + /// + public decimal? OriginalRate { get; set; } + + /// + /// 未结金额 + /// + public decimal? RestAmount { get; set; } + + /// + /// 申请金额 + /// + public decimal? ApplyAmount { get; set; } + + /// + /// 开票金额 + /// + public decimal? InvoiceAmount { get; set; } + + /// + /// 备注 + /// + public string? Remark { get; set; } + + [IgnoreDataMember] + public long CreateBy { get; set; } + + /// + /// 录入人 + /// + public string? CreateByName { get; set; } + } +} diff --git a/ds-wms-service/DS.WMS.Core/Fee/Entity/ApplicationBase.cs b/ds-wms-service/DS.WMS.Core/Fee/Entity/ApplicationBase.cs index ca513512..8a9576e3 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Entity/ApplicationBase.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Entity/ApplicationBase.cs @@ -12,7 +12,7 @@ namespace DS.WMS.Core.Fee.Entity /// /// 申请单编号 /// - [SugarColumn(ColumnDescription = "申请单编号", IsNullable = false, Length = 20)] + [SugarColumn(ColumnDescription = "申请单编号", Length = 20)] public string ApplicationNO { get; set; } /// @@ -24,49 +24,49 @@ namespace DS.WMS.Core.Fee.Entity /// /// 人民币申请金额 /// - [SugarColumn(ColumnDescription = "人民币申请金额")] + [SugarColumn(ColumnDescription = "人民币申请金额", IsNullable = true)] public decimal? AmountRMB { get; set; } /// /// 美元申请金额 /// - [SugarColumn(ColumnDescription = "美元申请金额")] + [SugarColumn(ColumnDescription = "美元申请金额", IsNullable = true)] public decimal? AmountUSD { get; set; } /// /// 申请币别 /// - [SugarColumn(ColumnDescription = "申请币别", IsNullable = false, Length = 3)] - public string Currency { get; set; } + [SugarColumn(ColumnDescription = "申请币别", IsNullable = true, Length = 3)] + public string? Currency { get; set; } /// /// 折算汇率 /// - [SugarColumn(ColumnDescription = "折算汇率")] - public decimal ExchangeRate { get; set; } + [SugarColumn(ColumnDescription = "折算汇率", IsNullable = true)] + public decimal? ExchangeRate { get; set; } /// /// 审核人 /// - [SugarColumn(ColumnDescription = "审核人")] + [SugarColumn(ColumnDescription = "审核人", IsNullable = true)] public long? AuditerId { get; set; } /// /// 审核人名称 /// - [SugarColumn(ColumnDescription = "审核人名称")] + [SugarColumn(ColumnDescription = "审核人名称", IsNullable = true)] public string? AuditerName { get; set; } /// /// 审核时间 /// - [SugarColumn(ColumnDescription = "审核时间")] + [SugarColumn(ColumnDescription = "审核时间", IsNullable = true)] public DateTime? AuditTime { get; set; } /// /// 审核备注 /// - [SugarColumn(ColumnDescription = "审核备注", Length = 200)] + [SugarColumn(ColumnDescription = "审核备注", Length = 200, IsNullable = true)] public string? AuditRemark { get; set; } /// @@ -84,25 +84,25 @@ namespace DS.WMS.Core.Fee.Entity /// /// 打印人 /// - [SugarColumn(ColumnDescription = "打印人")] + [SugarColumn(ColumnDescription = "打印人", IsNullable = true)] public long? PrinterId { get; set; } /// /// 打印人名称 /// - [SugarColumn(ColumnDescription = "打印人名称")] + [SugarColumn(ColumnDescription = "打印人名称", IsNullable = true)] public string? PrinterName { get; set; } /// /// 打印时间 /// - [SugarColumn(ColumnDescription = "打印时间")] + [SugarColumn(ColumnDescription = "打印时间", IsNullable = true)] public DateTime? PrintTime { get; set; } /// /// 驳回原因 /// - [SugarColumn(ColumnDescription = "驳回原因", Length = 200)] + [SugarColumn(ColumnDescription = "驳回原因", Length = 200, IsNullable = true)] public string? Reason { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplication.cs b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplication.cs index eed587ed..127aaf7c 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplication.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplication.cs @@ -8,6 +8,12 @@ namespace DS.WMS.Core.Fee.Entity [SugarTable("fee_application", TableDescription = "付费申请")] public class FeeApplication : ApplicationBase { + /// + /// 客户ID + /// + [SugarColumn(ColumnDescription = "客户ID", IsNullable = false)] + public long CustomerId { get; set; } + /// /// 客户名称 /// diff --git a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplicationDetail.cs b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplicationDetail.cs index 0f988392..1261c8a9 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplicationDetail.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeApplicationDetail.cs @@ -29,10 +29,16 @@ namespace DS.WMS.Core.Fee.Entity [SugarColumn(ColumnDescription = "业务类型")] public BusinessType BusinessType { get; set; } + /// + /// 费用记录ID + /// + [SugarColumn(ColumnDescription = "费用记录ID")] + public long RecordId { get; set; } + /// /// 结算对象名称 /// - [SugarColumn(ColumnDescription = "结算对象名称", Length = 200)] + [SugarColumn(ColumnDescription = "结算对象名称", Length = 200, IsNullable = true)] public string? CustomerName { get; set; } /// @@ -54,10 +60,10 @@ namespace DS.WMS.Core.Fee.Entity public string? FeeName { get; set; } /// - /// 类别(//1-付费申请结算 2-收费自由结算 3-发票结算 4-收费申请 5-付费申请 6-发票申请 7-发票开出 8-付费自由结算 9-收费申请结算) + /// 类别(1-付费申请结算 2-收费自由结算 3-发票结算 4-收费申请 5-付费申请 6-发票申请 7-发票开出 8-付费自由结算 9-收费申请结算) /// - [SugarColumn(ColumnDescription = "类别")] - public FeeCategory Category { get; set; } + [SugarColumn(ColumnDescription = "类别", IsNullable = true)] + public FeeCategory? Category { get; set; } /// /// 金额 @@ -80,8 +86,8 @@ namespace DS.WMS.Core.Fee.Entity /// /// 折算汇率 /// - [SugarColumn(ColumnDescription = "折算汇率")] - public decimal ExchangeRate { get; set; } + [SugarColumn(ColumnDescription = "折算汇率", IsNullable = true)] + public decimal? ExchangeRate { get; set; } /// /// 原始币别 @@ -90,16 +96,21 @@ namespace DS.WMS.Core.Fee.Entity public string OriginalCurrency { get; set; } /// - /// 金额 + /// 原始金额 /// [SugarColumn(ColumnDescription = "原始金额")] - public decimal? OriginalAmount { get; set; } + public decimal OriginalAmount { get; set; } /// /// 原始已处理金额 /// [SugarColumn(ColumnDescription = "原始已处理金额")] - public decimal? OriginalProcessedAmount { get; set; } + public decimal OriginalProcessedAmount { get; set; } + /// + /// 费用记录 + /// + [Navigate(NavigateType.ManyToOne, nameof(FeeRecord.Id))] + public FeeRecord? Record { 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 f915f0f5..18715a86 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Entity/FeeRecord.cs @@ -133,8 +133,6 @@ namespace DS.WMS.Core.Fee.Entity /// [SugarColumn(ColumnDescription = "备注", Length = 1000, IsNullable = true)] public string Remark { get; set; } - - /// /// Desc:佣金比率 /// @@ -142,19 +140,19 @@ namespace DS.WMS.Core.Fee.Entity public decimal? CommissionRate { get; set; } = 0; /// - /// Desc:结算金额 + /// 已结算金额 /// - [SugarColumn(ColumnDescription = "结算金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] + [SugarColumn(ColumnDescription = "已结算金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] public decimal? SettlementAmount { get; set; } = 0; /// - /// Desc:开票金额 + /// 已开票金额 /// - [SugarColumn(ColumnDescription = "开票金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] + [SugarColumn(ColumnDescription = "已开票金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] public decimal? InvoiceAmount { get; set; } = 0; /// - /// Desc:申请金额 + ///已申请金额 /// - [SugarColumn(ColumnDescription = "申请金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] + [SugarColumn(ColumnDescription = "已申请金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] public decimal? OrderAmount { get; set; } = 0; /// /// Desc:申请开票金额 diff --git a/ds-wms-service/DS.WMS.Core/Fee/Interface/IFeeApplicationService.cs b/ds-wms-service/DS.WMS.Core/Fee/Interface/IFeeApplicationService.cs index 43f3e9c2..1fe82daf 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Interface/IFeeApplicationService.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Interface/IFeeApplicationService.cs @@ -1,6 +1,7 @@ using DS.Module.Core; using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Fee.Entity; +using DS.WMS.Core.Op.Entity; namespace DS.WMS.Core.Fee.Interface { @@ -23,6 +24,21 @@ namespace DS.WMS.Core.Fee.Interface /// Task>> GetBizListAsync(PageRequest request); + /// + /// 获取申请单详情 + /// + /// 申请单ID + /// + Task> GetAsync(long id); + + /// + /// 根据业务编号及类型获取关联费用记录 + /// + /// 业务ID + /// 业务类型 + /// + Task>> GetFeesAsync(long id, BusinessType businessType); + /// /// 提交申请单 /// @@ -30,6 +46,13 @@ namespace DS.WMS.Core.Fee.Interface /// Task SaveAsync(FeeApplication application); + /// + /// 删除申请单明细 + /// + /// 申请单明细ID + /// + Task DeleteDetailAsync(params long[] ids); + /// /// 删除申请单 /// diff --git a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeApplicationService.cs b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeApplicationService.cs index 286a6bda..4acc17ef 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeApplicationService.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeApplicationService.cs @@ -1,4 +1,5 @@ -using DS.Module.Core; +using System.Text; +using DS.Module.Core; using DS.Module.Core.Enums; using DS.Module.Core.Extensions; using DS.WMS.Core.Fee.Dtos; @@ -9,6 +10,8 @@ using DS.WMS.Core.Flow.Entity; using DS.WMS.Core.Flow.Interface; using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Sys.Entity; +using DS.WMS.Core.Sys.Interface; +using LanguageExt.Common; using Microsoft.Extensions.DependencyInjection; using SqlSugar; @@ -20,6 +23,7 @@ namespace DS.WMS.Core.Fee.Method public class FeeApplicationService : FeeServiceBase, IFeeApplicationService { readonly IClientFlowInstanceService flowService; + readonly ICommonService commonService; /// /// 初始化 @@ -28,6 +32,7 @@ namespace DS.WMS.Core.Fee.Method public FeeApplicationService(IServiceProvider serviceProvider) : base(serviceProvider) { flowService = serviceProvider.GetRequiredService(); + commonService = serviceProvider.GetRequiredService(); } /// @@ -125,6 +130,46 @@ namespace DS.WMS.Core.Fee.Method return TenantDb.UnionAll(new List> { query1 }); } + /// + /// 根据业务编号及类型获取关联费用记录 + /// + /// 业务ID + /// 业务类型 + /// + public async Task>> GetFeesAsync(long id, BusinessType businessType) + { + var list = await TenantDb.Queryable() + .Where(f => f.BusinessId == id && f.BusinessType == businessType && f.FeeStatus == FeeStatus.AuditPassed) + .Select(f => new FeeRecordDto + { + Id = f.Id, + FeeName = f.FeeName, + FeeType = f.FeeType, + Amount = f.Amount, + Currency = f.Currency, + OriginalRate = f.ExchangeRate, + RestAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount, + InvoiceAmount = f.InvoiceAmount, + Remark = f.Remark, + CreateBy = f.CreateBy + }).ToListAsync(); + + list.RemoveAll(f => f.RestAmount == 0); + + if (list.Count > 0) + { + //关联用户名称 + var userIds = list.Select(x => x.CreateBy).Distinct(); + var users = await Db.Queryable().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync(); + foreach (var item in list) + { + item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName; + } + } + + return DataResult>.Success(list); + } + /// /// 获取分页列表 /// @@ -149,25 +194,171 @@ namespace DS.WMS.Core.Fee.Method } /// - /// 提交保存申请单 + /// 获取申请单详情 + /// + /// 申请单ID + /// + public async Task> GetAsync(long id) + { + var dto = await TenantDb.Queryable().Where(x => x.Id == id).Select().FirstAsync(); + if (dto != null) + { + dto.Details = await TenantDb.Queryable() + .LeftJoin((d, f) => d.RecordId == f.Id) + .LeftJoin((d, f, b) => f.BusinessId == b.BusinessId && f.BusinessType == b.BusinessType) + .Where(d => d.ApplicationId == id) + .Select((d, f, b) => new FeeApplicationDetailDto + { + AccTaxRate = f.AccTaxRate, + Amount = d.Amount, + FeeName = d.FeeName, + FeeType = f.FeeType, + FeeObject = f.CustomerName, + OriginalCurrency = d.OriginalCurrency, + OriginalRate = f.ExchangeRate, + ExchangeRate = d.ExchangeRate, + OriginalAmount = d.OriginalAmount, + BusinessId = b.BusinessId, + BusinessType = b.BusinessType, + IsBusinessLocking = b.IsBusinessLocking, + IsFeeLocking = b.IsFeeLocking + }).ToListAsync(); + + + var gList = dto.Details.GroupBy(x => x.BusinessType).ToList(); + foreach (var g in gList) + { + switch (g.Key) + { + case BusinessType.OceanShippingExport: + var ids = g.Select(x => x.BusinessId).ToList(); + var list1 = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select(x => new + { + x.Id, + x.MBLNO, + x.CustomerNo, + x.CustomerName, + x.ETD, + x.CntrTotal, + x.AccountDate, + x.OperatorCode, + x.Vessel, + x.Voyno, + x.Carrier, + x.Forwarder + }).ToListAsync(); + foreach (var item in g) + { + var biz = list1.Find(x => x.Id == item.BusinessId); + if (biz != null) + { + item.MBLNO = biz.MBLNO; + item.CustomerName = biz.CustomerName; + item.CustomerNo = biz.CustomerNo; + item.ETD = biz.ETD; + item.CntrTotal = biz.CntrTotal; + item.AccountDate = biz.AccountDate; + item.Operator = biz.OperatorCode; + item.Vessel = biz.Vessel; + item.Voyage = biz.Voyno; + item.Carrier = biz.Carrier; + item.Forwarder = biz.Forwarder; + } + } + break; + + case BusinessType.OceanShippingImport: + break; + } + } + } + + return DataResult.Success(dto); + } + + /// + /// 提交保存费用申请单 /// /// 申请单 /// public async Task SaveAsync(FeeApplication application) { + application.Details ??= []; if (application.Id > 0) { //修改需检查申请单状态 - if (await TenantDb.Queryable().AnyAsync(x => - x.Id == application.Id && (x.Status == ApplicationStatus.AuditSubmittd || x.Status == ApplicationStatus.AuditPassed))) + var model = await TenantDb.Queryable().Where(x => x.Id == application.Id).Select( + x => new { x.Status, x.Currency }).FirstAsync(); + + if (model.Status == ApplicationStatus.AuditSubmittd || model.Status == ApplicationStatus.AuditPassed) return DataResult.Failed("只能修改状态为:未提交/审核驳回的申请单"); + + if (application.Details.Count > 0 && !string.Equals(model.Currency, application.Currency, StringComparison.OrdinalIgnoreCase)) + return DataResult.Failed("提交币别需与原申请单币别一致"); + } + + List? fees = null; + if (application.Details.Count > 0) + { + if (application.Details.GroupBy(x => x.CustomerName).Select(x => x.Key).Count() > 1) + return DataResult.Failed("申请单的结算对象有且只能有一个"); + + if (!application.Currency.IsNullOrEmpty() && application.Details.Any(x => x.Currency != application.Currency)) + return DataResult.Failed($"申请单的所有明细币别必须为 {application.Currency}"); + + //仅处理新增的明细 + var ids = application.Details.FindAll(x => x.Id == 0).Select(x => x.RecordId).ToList(); + fees = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select(x => new FeeRecord + { + Id = x.Id, + Amount = x.Amount, + OrderAmount = x.OrderAmount, + OrderSettlementAmount = x.OrderSettlementAmount, + SettlementAmount = x.SettlementAmount + }).ToListAsync(); + + StringBuilder sb = new(); + foreach (var detail in application.Details) + { + var fee = fees.Find(x => x.Id == detail.RecordId); + if (fee == null) + { + sb.Append($"未能关联明细【{detail.FeeName}】的费用信息;"); + continue; + } + //未申请金额=总金额-结算金额-申请金额+申请金额已结算 + var restAmount = fee.Amount.GetValueOrDefault() - fee.SettlementAmount.GetValueOrDefault() - fee.OrderAmount.GetValueOrDefault() + fee.OrderSettlementAmount; + if (detail.OriginalAmount > 0 && detail.OriginalAmount > restAmount) + { + sb.Append($"申请单明细【{detail.FeeName}】的申请金额不能超出原费用的金额;"); + continue; + } + if (detail.OriginalAmount < 0 && detail.OriginalAmount < restAmount) + { + sb.Append($"申请单明细【{detail.FeeName}】的申请金额不能超出原费用的金额;"); + continue; + } + //更新费用记录的已申请金额 + fee.OrderAmount += detail.OriginalAmount; + + detail.Category = FeeCategory.PaidApplication; + } + + if (sb.Length > 0) + return DataResult.Failed(sb.ToString()); + + if (application.Currency.IsNullOrEmpty()) + application.ExchangeRate = 1m; + + application.AmountRMB = application.Details.Where(x => x.Currency == "CNY").Sum(x => x.Amount); + application.AmountUSD = application.Details.Where(x => x.Currency == "USD").Sum(x => x.Amount); } //关联用户名称 - var userIds = new long?[] { application.SettlerId, application.PaymentApplicantId }; - var users = await Db.Queryable().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync(); - application.SettlerName = application.SettlerId.HasValue ? users.Find(x => x.Id == application.SettlerId.Value)?.UserName : string.Empty; - application.PaymentApplicantName = application.PaymentApplicantId.HasValue ? users.Find(x => x.Id == application.PaymentApplicantId.Value)?.UserName : string.Empty; + //var userIds = new long?[] { application.SettlerId, application.PaymentApplicantId }; + //var users = await Db.Queryable().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync(); + //application.SettlerName = application.SettlerId.HasValue ? users.Find(x => x.Id == application.SettlerId.Value)?.UserName : string.Empty; + //application.PaymentApplicantName = application.PaymentApplicantId.HasValue ? users.Find(x => x.Id == application.PaymentApplicantId.Value)?.UserName : string.Empty; await TenantDb.Ado.BeginTranAsync(); try @@ -175,14 +366,36 @@ namespace DS.WMS.Core.Fee.Method //关联导航属性插入 if (application.Id == 0) { + //创建时需要生成申请单编号 + var sequence = commonService.GetSequenceNext(); + if (!sequence.Succeeded) + { + return DataResult.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist); + } + application.ApplicationNO = sequence.Data; + await TenantDb.InsertNav(application).Include(x => x.Details).ExecuteCommandAsync(); } - //关联导航属性更新 else { - await TenantDb.UpdateNav(application).Include(x => x.Details).ExecuteCommandAsync(); + var createList = application.Details.FindAll(x => x.Id == 0); + if (createList.Count > 0) + await TenantDb.Insertable(createList).ExecuteCommandAsync(); + + await TenantDb.Updateable(application).IgnoreColumns(x => new + { + x.ApplicationNO, + x.CreateBy, + x.CreateTime, + x.Deleted, + x.DeleteBy, + x.DeleteTime + }).ExecuteCommandAsync(); } + if (fees != null) + await TenantDb.Updateable(fees).UpdateColumns(x => new { x.OrderAmount }).ExecuteCommandAsync(); + await TenantDb.Ado.CommitTranAsync(); return DataResult.Success; } @@ -194,6 +407,44 @@ namespace DS.WMS.Core.Fee.Method } } + /// + /// 删除申请单明细 + /// + /// 申请单明细ID + /// + public async Task DeleteDetailAsync(params long[] ids) + { + var details = await TenantDb.Queryable().Where(x => ids.Contains(x.Id)).Select( + x => new FeeApplicationDetail + { + Id = x.Id, + RecordId = x.RecordId, + OriginalAmount = x.OriginalAmount + }).ToListAsync(); + + await TenantDb.Ado.BeginTranAsync(); + try + { + //还原费用表的已申请金额 + var fees = details.Select(x => new FeeRecord { Id = x.RecordId, OrderAmount = x.OriginalAmount }).ToList(); + TenantDb.Updateable(fees) + .PublicSetColumns(it => it.OrderAmount, "-") + .UpdateColumns(x => new { x.OrderAmount }) + .ExecuteCommand(); + + await TenantDb.Deleteable(details).ExecuteCommandAsync(); + + await TenantDb.Ado.CommitTranAsync(); + return DataResult.Success; + } + catch (Exception ex) + { + await TenantDb.Ado.RollbackTranAsync(); + await ex.LogAsync(Db); + return DataResult.Failed("删除失败!"); + } + } + /// /// 删除申请单 /// @@ -204,8 +455,35 @@ namespace DS.WMS.Core.Fee.Method if (await TenantDb.Queryable().AnyAsync(x => ids.Contains(x.Id) && (x.Status != ApplicationStatus.Pending && x.Status != ApplicationStatus.AuditRejected))) return DataResult.Failed("只能删除状态为‘待审核’或‘驳回’的申请单", MultiLanguageConst.FeeRecordDelete); - bool result = await TenantDb.DeleteNav(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync(); - return result ? DataResult.Successed("删除成功!") : DataResult.Failed("删除失败!"); + var details = await TenantDb.Queryable().Where(x => ids.Contains(x.ApplicationId)).Select( + x => new FeeApplicationDetail + { + Id = x.Id, + RecordId = x.RecordId, + OriginalAmount = x.OriginalAmount + }).ToListAsync(); + + await TenantDb.Ado.BeginTranAsync(); + try + { + //还原费用表的已申请金额 + var fees = details.Select(x => new FeeRecord { Id = x.RecordId, OrderAmount = x.OriginalAmount }).ToList(); + TenantDb.Updateable(fees) + .PublicSetColumns(it => it.OrderAmount, "-") + .UpdateColumns(x => new { x.OrderAmount }) + .ExecuteCommand(); + + await TenantDb.DeleteNav(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync(); + + await TenantDb.Ado.CommitTranAsync(); + return DataResult.Success; + } + catch (Exception ex) + { + await TenantDb.Ado.RollbackTranAsync(); + await ex.LogAsync(Db); + return DataResult.Failed("删除失败!"); + } } /// @@ -306,7 +584,7 @@ namespace DS.WMS.Core.Fee.Method { await Db.Updateable(flows).UpdateColumns(x => new { x.FlowStatus, x.MakerList }).ExecuteCommandAsync(); - foreach (var item in list) + foreach (var item in list) { item.Status = ApplicationStatus.Pending; item.FlowId = null; diff --git a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs index 4fb9e787..27744987 100644 --- a/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs +++ b/ds-wms-service/DS.WMS.Core/Fee/Method/FeeAuditService.cs @@ -151,7 +151,7 @@ namespace DS.WMS.Core.Fee.Method .Select((s, b, f, cs, csd) => new FeeAuditBusiness { Id = s.Id, - AccountDate = SqlFunc.ToDate(s.AccountDate), + AccountDate = s.AccountDate, APFeeStatus = b.APFeeStatus, ARFeeStatus = b.ARFeeStatus, BusinessType = BusinessType.OceanShippingExport, @@ -236,7 +236,7 @@ namespace DS.WMS.Core.Fee.Method .Select((s, b, cs, csd) => new FeeAuditBusiness { Id = s.Id, - AccountDate = SqlFunc.ToDate(s.AccountDate), + AccountDate = s.AccountDate, APFeeStatus = b.APFeeStatus, ARFeeStatus = b.ARFeeStatus, BusinessType = BusinessType.OceanShippingExport, diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeApplicationController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeApplicationController.cs index 2f16756f..07f8e8fa 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeApplicationController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeApplicationController.cs @@ -3,6 +3,7 @@ using DS.Module.Core.Data; using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Fee.Entity; using DS.WMS.Core.Fee.Interface; +using DS.WMS.Core.Op.Entity; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.FeeApi.Controllers @@ -45,6 +46,29 @@ namespace DS.WMS.FeeApi.Controllers return await _service.GetBizListAsync(request); } + /// + /// 获取申请单详情 + /// + /// 申请单ID + /// + [HttpGet, Route("Get")] + public async Task> GetAsync([FromQuery] long id) + { + return await _service.GetAsync(id); + } + + /// + /// 根据业务编号及类型获取关联费用记录 + /// + /// 业务ID + /// 业务类型 + /// + [HttpGet, Route("GetFees")] + public async Task>> GetFeesAsync([FromQuery] long id, [FromQuery] BusinessType businessType) + { + return await _service.GetFeesAsync(id, businessType); + } + /// /// 提交申请单 /// @@ -56,6 +80,20 @@ namespace DS.WMS.FeeApi.Controllers return await _service.SaveAsync(application); } + /// + /// 删除申请单明细 + /// + /// 申请单明细ID + /// + [HttpPost, Route("DeleteDetail")] + public async Task DeleteDetailAsync([FromBody] IdModel model) + { + if (model.Ids == null || model.Ids.Length == 0) + return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest); + + return await _service.DeleteDetailAsync(model.Ids); + } + /// /// 删除申请单 /// @@ -64,7 +102,7 @@ namespace DS.WMS.FeeApi.Controllers [HttpPost, Route("Delete")] public async Task DeleteAsync([FromBody] IdModel model) { - if (model.Id == null || model.Ids.Length == 0) + if (model.Ids == null || model.Ids.Length == 0) return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest); return await _service.DeleteAsync(model.Ids); diff --git a/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeAuditController.cs b/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeAuditController.cs index f1fc418f..bab876b2 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeAuditController.cs +++ b/ds-wms-service/DS.WMS.FeeApi/Controllers/FeeAuditController.cs @@ -77,7 +77,7 @@ namespace DS.WMS.FeeApi.Controllers [HttpPost, Route("AuditBusiness")] public async Task AuditBusinessAsync(FeeBizAuditRequest request) { - if (request == null || (request.Result != 1 && request.Result != 2) || request.Items == null || !request.Items.Any()) + if (request == null || (request.Result != 1 && request.Result != 2) || request.Items == null || request.Items.Count == 0) return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest); return await _auditService.AuditBusinessAsync(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 5bfc6d08..dfad1bde 100644 --- a/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.FeeApi/Logs/internal-nlog.txt @@ -1167,3 +1167,87 @@ 2024-06-11 17:00:00.1804 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-06-11 17:00:00.1804 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-06-11 17:00:00.1804 Info Configuration initialized. +2024-06-12 11:26:58.0826 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 11:26:58.0997 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 11:26:58.0997 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 11:26:58.1220 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-06-12 11:26:58.1220 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-06-12 11:26:58.1290 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 11:26:58.1290 Info Configuration initialized. +2024-06-12 11:41:37.2592 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 11:41:37.3125 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 11:41:37.3125 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 11:41:37.3272 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-06-12 11:41:37.3334 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-06-12 11:41:37.3334 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 11:41:37.3334 Info Configuration initialized. +2024-06-12 11:46:01.6380 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 11:46:01.6662 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 11:46:01.6662 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 11:46:01.6861 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-06-12 11:46:01.6944 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-06-12 11:46:01.6944 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 11:46:01.7209 Info Configuration initialized. +2024-06-12 11:58:34.0931 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 11:58:34.1238 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 11:58:34.1238 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 11:58:34.1401 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-06-12 11:58:34.1455 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-06-12 11:58:34.1455 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 11:58:34.1455 Info Configuration initialized. +2024-06-12 14:21:09.6723 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 14:21:09.7028 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 14:21:09.7085 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 14:21:09.7085 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-06-12 14:21:09.7286 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-06-12 14:21:09.7286 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 14:21:09.7386 Info Configuration initialized. +2024-06-12 14:26:46.8901 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 14:26:46.9344 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 14:26:46.9344 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 14:26:46.9540 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-06-12 14:26:46.9591 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-06-12 14:26:46.9591 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 14:26:46.9591 Info Configuration initialized. +2024-06-12 14:36:23.6327 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 14:36:23.6609 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 14:36:23.6609 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 14:36:23.6758 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-06-12 14:36:23.6758 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-06-12 14:36:23.6758 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 14:36:23.6758 Info Configuration initialized. +2024-06-12 15:38:30.6238 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 15:38:30.6594 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 15:38:30.6635 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 15:38:30.6761 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-06-12 15:38:30.6761 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-06-12 15:38:30.6761 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 15:38:30.6970 Info Configuration initialized. +2024-06-12 15:43:09.0733 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 15:43:09.1009 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 15:43:09.1009 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 15:43:09.1136 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-06-12 15:43:09.1136 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-06-12 15:43:09.1136 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 15:43:09.1136 Info Configuration initialized. +2024-06-12 16:50:57.6309 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 16:50:57.6788 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 16:50:57.6788 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 16:50:57.6959 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-06-12 16:50:57.6959 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-06-12 16:50:57.6959 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 16:50:57.7091 Info Configuration initialized. +2024-06-12 16:51:16.5669 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 16:51:16.5952 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 16:51:16.5991 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 16:51:16.5991 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-06-12 16:51:16.6164 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-06-12 16:51:16.6164 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 16:51:16.6164 Info Configuration initialized. +2024-06-12 16:55:30.4049 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-06-12 16:55:30.4343 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-06-12 16:55:30.4343 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-06-12 16:55:30.4490 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-06-12 16:55:30.4490 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-06-12 16:55:30.4490 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-06-12 16:55:30.4490 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 4cf4d2b4..4c398b13 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-06-06T09:41:51.1810315Z||;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-06-11T09:03:44.8328978Z||;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 diff --git a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user index eda2cdce..73975b0c 100644 --- a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user +++ b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user @@ -1,6 +1,6 @@  - D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml + D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile.pubxml.user b/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile.pubxml.user index 1ceca3a1..a9cf79b6 100644 --- a/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -6,7 +6,7 @@ <_PublishTargetUrl>D:\Code\PublishCopy\ds8-mainapi - True|2024-06-07T07:23:11.1389680Z;True|2024-06-07T10:23:59.6079620+08:00;True|2024-06-06T17:42:56.1843783+08:00;True|2024-06-04T14:20:46.7742295+08:00;True|2024-05-31T17:57:35.6858600+08:00;True|2024-05-31T15:25:20.8503086+08:00;True|2024-05-30T17:22:52.2563382+08:00;True|2024-05-30T17:05:35.7504154+08:00;True|2024-05-29T17:17:39.6966826+08:00; + True|2024-06-11T09:08:01.8930314Z||;True|2024-06-07T15:23:11.1389680+08:00||;True|2024-06-07T10:23:59.6079620+08:00||;True|2024-06-06T17:42:56.1843783+08:00||;True|2024-06-04T14:20:46.7742295+08:00||;True|2024-05-31T17:57:35.6858600+08:00||;True|2024-05-31T15:25:20.8503086+08:00||;True|2024-05-30T17:22:52.2563382+08:00||;True|2024-05-30T17:05:35.7504154+08:00||;True|2024-05-29T17:17:39.6966826+08:00||; \ No newline at end of file