根据业务编号及类型获取关联费用记录

usertest
嵇文龙 6 months ago
parent 0b2432b61e
commit 6567708e5f

@ -1,14 +1,18 @@
using DS.Module.Core.Enums; using DS.Module.Core;
using SqlSugar; using System.Runtime.Serialization;
using DS.Module.Core.Enums;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Fee.Dtos namespace DS.WMS.Core.Fee.Dtos
{ {
/// <summary>
/// 费用申请单
/// </summary>
public class FeeApplicationDto public class FeeApplicationDto
{ {
/// <summary> /// <summary>
/// 申请单编号 /// 申请单编号
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请单编号", IsNullable = false, Length = 20)]
public string ApplicationNO { get; set; } public string ApplicationNO { get; set; }
/// <summary> /// <summary>
@ -29,12 +33,12 @@ namespace DS.WMS.Core.Fee.Dtos
/// <summary> /// <summary>
/// 申请币别 /// 申请币别
/// </summary> /// </summary>
public string Currency { get; set; } public string? Currency { get; set; }
/// <summary> /// <summary>
/// 折算汇率 /// 折算汇率
/// </summary> /// </summary>
public decimal ExchangeRate { get; set; } public decimal? ExchangeRate { get; set; }
/// <summary> /// <summary>
/// 审核人 /// 审核人
@ -44,7 +48,6 @@ namespace DS.WMS.Core.Fee.Dtos
/// <summary> /// <summary>
/// 审核人名称 /// 审核人名称
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "审核人名称")]
public string? AuditerName { get; set; } public string? AuditerName { get; set; }
/// <summary> /// <summary>
@ -160,5 +163,154 @@ namespace DS.WMS.Core.Fee.Dtos
public long CreateBy { get; set; } public long CreateBy { get; set; }
public string CreateByName { get; set; } public string CreateByName { get; set; }
public List<FeeApplicationDetailDto>? Details { get; set; }
}
/// <summary>
/// 费用申请单明细
/// </summary>
public class FeeApplicationDetailDto
{
/// <summary>
/// 业务类型
/// </summary>
[IgnoreDataMember]
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[IgnoreDataMember]
public BusinessType BusinessType { get; set; }
/// <summary>
/// 主提单号
/// </summary>
public string? MBLNO { get; set; }
/// <summary>
/// 委托编号
/// </summary>
public string? CustomerNo { get; set; }
/// <summary>
/// 委托单位
/// </summary>
public string? CustomerName { get; set; }
/// <summary>
/// 业务锁定
/// </summary>
public bool? IsBusinessLocking { get; set; }
/// <summary>
/// 费用锁定
/// </summary>
public bool? IsFeeLocking { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 业务来源
/// </summary>
public string? SourceName { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public string? SaleName { get; set; }
/// <summary>
/// 集装箱
/// </summary>
public string? CntrTotal { get; set; }
/// <summary>
/// 会计期间
/// </summary>
public string? AccountDate { get; set; }
/// <summary>
/// 所属分部
/// </summary>
public string? SaleDeptName { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string? FeeName { get; set; }
/// <summary>
/// 费用类型
/// </summary>
public FeeType FeeType { get; set; }
/// <summary>
/// 费用对象
/// </summary>
public string? FeeObject { get; set; }
/// <summary>
/// 申请金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 原始币别
/// </summary>
public string OriginalCurrency { get; set; }
/// <summary>
/// 原始汇率
/// </summary>
public decimal? OriginalRate { get; set; }
/// <summary>
/// 折算汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 原始金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// 销项税率
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 更改单
/// </summary>
public string? ChangeOrder { get; set; }
/// <summary>
/// 操作
/// </summary>
public string? Operator { get; set; }
/// <summary>
/// 船名
/// </summary>
public string? Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string? Voyage { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string? Carrier { get; set; }
/// <summary>
/// 订舱代理
/// </summary>
public string? Forwarder { get; set; }
} }
} }

@ -96,7 +96,7 @@ namespace DS.WMS.Core.Fee.Dtos
/// <summary> /// <summary>
/// 会计期间 /// 会计期间
/// </summary> /// </summary>
public DateTime? AccountDate { get; set; } public string? AccountDate { get; set; }
/// <summary> /// <summary>
/// 业务来源 /// 业务来源

@ -0,0 +1,69 @@
using System.Runtime.Serialization;
using DS.Module.Core;
namespace DS.WMS.Core.Fee.Dtos
{
/// <summary>
/// 费用记录
/// </summary>
public class FeeRecordDto
{
/// <summary>
/// 费用记录ID
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string? FeeName { get; set; }
/// <summary>
/// 费用类型
/// </summary>
public FeeType FeeType { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal? Amount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 原始汇率
/// </summary>
public decimal? OriginalRate { get; set; }
/// <summary>
/// 未结金额
/// </summary>
public decimal? RestAmount { get; set; }
/// <summary>
/// 申请金额
/// </summary>
public decimal? ApplyAmount { get; set; }
/// <summary>
/// 开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Remark { get; set; }
[IgnoreDataMember]
public long CreateBy { get; set; }
/// <summary>
/// 录入人
/// </summary>
public string? CreateByName { get; set; }
}
}

@ -12,7 +12,7 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary> /// <summary>
/// 申请单编号 /// 申请单编号
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请单编号", IsNullable = false, Length = 20)] [SugarColumn(ColumnDescription = "申请单编号", Length = 20)]
public string ApplicationNO { get; set; } public string ApplicationNO { get; set; }
/// <summary> /// <summary>
@ -24,49 +24,49 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary> /// <summary>
/// 人民币申请金额 /// 人民币申请金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "人民币申请金额")] [SugarColumn(ColumnDescription = "人民币申请金额", IsNullable = true)]
public decimal? AmountRMB { get; set; } public decimal? AmountRMB { get; set; }
/// <summary> /// <summary>
/// 美元申请金额 /// 美元申请金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "美元申请金额")] [SugarColumn(ColumnDescription = "美元申请金额", IsNullable = true)]
public decimal? AmountUSD { get; set; } public decimal? AmountUSD { get; set; }
/// <summary> /// <summary>
/// 申请币别 /// 申请币别
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请币别", IsNullable = false, Length = 3)] [SugarColumn(ColumnDescription = "申请币别", IsNullable = true, Length = 3)]
public string Currency { get; set; } public string? Currency { get; set; }
/// <summary> /// <summary>
/// 折算汇率 /// 折算汇率
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "折算汇率")] [SugarColumn(ColumnDescription = "折算汇率", IsNullable = true)]
public decimal ExchangeRate { get; set; } public decimal? ExchangeRate { get; set; }
/// <summary> /// <summary>
/// 审核人 /// 审核人
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "审核人")] [SugarColumn(ColumnDescription = "审核人", IsNullable = true)]
public long? AuditerId { get; set; } public long? AuditerId { get; set; }
/// <summary> /// <summary>
/// 审核人名称 /// 审核人名称
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "审核人名称")] [SugarColumn(ColumnDescription = "审核人名称", IsNullable = true)]
public string? AuditerName { get; set; } public string? AuditerName { get; set; }
/// <summary> /// <summary>
/// 审核时间 /// 审核时间
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "审核时间")] [SugarColumn(ColumnDescription = "审核时间", IsNullable = true)]
public DateTime? AuditTime { get; set; } public DateTime? AuditTime { get; set; }
/// <summary> /// <summary>
/// 审核备注 /// 审核备注
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "审核备注", Length = 200)] [SugarColumn(ColumnDescription = "审核备注", Length = 200, IsNullable = true)]
public string? AuditRemark { get; set; } public string? AuditRemark { get; set; }
/// <summary> /// <summary>
@ -84,25 +84,25 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary> /// <summary>
/// 打印人 /// 打印人
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "打印人")] [SugarColumn(ColumnDescription = "打印人", IsNullable = true)]
public long? PrinterId { get; set; } public long? PrinterId { get; set; }
/// <summary> /// <summary>
/// 打印人名称 /// 打印人名称
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "打印人名称")] [SugarColumn(ColumnDescription = "打印人名称", IsNullable = true)]
public string? PrinterName { get; set; } public string? PrinterName { get; set; }
/// <summary> /// <summary>
/// 打印时间 /// 打印时间
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "打印时间")] [SugarColumn(ColumnDescription = "打印时间", IsNullable = true)]
public DateTime? PrintTime { get; set; } public DateTime? PrintTime { get; set; }
/// <summary> /// <summary>
/// 驳回原因 /// 驳回原因
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "驳回原因", Length = 200)] [SugarColumn(ColumnDescription = "驳回原因", Length = 200, IsNullable = true)]
public string? Reason { get; set; } public string? Reason { get; set; }
/// <summary> /// <summary>

@ -8,6 +8,12 @@ namespace DS.WMS.Core.Fee.Entity
[SugarTable("fee_application", TableDescription = "付费申请")] [SugarTable("fee_application", TableDescription = "付费申请")]
public class FeeApplication : ApplicationBase public class FeeApplication : ApplicationBase
{ {
/// <summary>
/// 客户ID
/// </summary>
[SugarColumn(ColumnDescription = "客户ID", IsNullable = false)]
public long CustomerId { get; set; }
/// <summary> /// <summary>
/// 客户名称 /// 客户名称
/// </summary> /// </summary>

@ -29,10 +29,16 @@ namespace DS.WMS.Core.Fee.Entity
[SugarColumn(ColumnDescription = "业务类型")] [SugarColumn(ColumnDescription = "业务类型")]
public BusinessType BusinessType { get; set; } public BusinessType BusinessType { get; set; }
/// <summary>
/// 费用记录ID
/// </summary>
[SugarColumn(ColumnDescription = "费用记录ID")]
public long RecordId { get; set; }
/// <summary> /// <summary>
/// 结算对象名称 /// 结算对象名称
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "结算对象名称", Length = 200)] [SugarColumn(ColumnDescription = "结算对象名称", Length = 200, IsNullable = true)]
public string? CustomerName { get; set; } public string? CustomerName { get; set; }
/// <summary> /// <summary>
@ -54,10 +60,10 @@ namespace DS.WMS.Core.Fee.Entity
public string? FeeName { get; set; } public string? FeeName { get; set; }
/// <summary> /// <summary>
/// 类别(//1-付费申请结算 2-收费自由结算 3-发票结算 4-收费申请 5-付费申请 6-发票申请 7-发票开出 8-付费自由结算 9-收费申请结算) /// 类别(1-付费申请结算 2-收费自由结算 3-发票结算 4-收费申请 5-付费申请 6-发票申请 7-发票开出 8-付费自由结算 9-收费申请结算)
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "类别")] [SugarColumn(ColumnDescription = "类别", IsNullable = true)]
public FeeCategory Category { get; set; } public FeeCategory? Category { get; set; }
/// <summary> /// <summary>
/// 金额 /// 金额
@ -80,8 +86,8 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary> /// <summary>
/// 折算汇率 /// 折算汇率
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "折算汇率")] [SugarColumn(ColumnDescription = "折算汇率", IsNullable = true)]
public decimal ExchangeRate { get; set; } public decimal? ExchangeRate { get; set; }
/// <summary> /// <summary>
/// 原始币别 /// 原始币别
@ -90,16 +96,21 @@ namespace DS.WMS.Core.Fee.Entity
public string OriginalCurrency { get; set; } public string OriginalCurrency { get; set; }
/// <summary> /// <summary>
/// 金额 /// 原始金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "原始金额")] [SugarColumn(ColumnDescription = "原始金额")]
public decimal? OriginalAmount { get; set; } public decimal OriginalAmount { get; set; }
/// <summary> /// <summary>
/// 原始已处理金额 /// 原始已处理金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "原始已处理金额")] [SugarColumn(ColumnDescription = "原始已处理金额")]
public decimal? OriginalProcessedAmount { get; set; } public decimal OriginalProcessedAmount { get; set; }
/// <summary>
/// 费用记录
/// </summary>
[Navigate(NavigateType.ManyToOne, nameof(FeeRecord.Id))]
public FeeRecord? Record { get; set; }
} }
} }

@ -133,8 +133,6 @@ namespace DS.WMS.Core.Fee.Entity
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "备注", Length = 1000, IsNullable = true)] [SugarColumn(ColumnDescription = "备注", Length = 1000, IsNullable = true)]
public string Remark { get; set; } public string Remark { get; set; }
/// <summary> /// <summary>
/// Desc:佣金比率 /// Desc:佣金比率
/// </summary> /// </summary>
@ -142,19 +140,19 @@ namespace DS.WMS.Core.Fee.Entity
public decimal? CommissionRate { get; set; } = 0; public decimal? CommissionRate { get; set; } = 0;
/// <summary> /// <summary>
/// Desc:结算金额 /// 结算金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "结算金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] [SugarColumn(ColumnDescription = "结算金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
public decimal? SettlementAmount { get; set; } = 0; public decimal? SettlementAmount { get; set; } = 0;
/// <summary> /// <summary>
/// Desc:开票金额 /// 开票金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "开票金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] [SugarColumn(ColumnDescription = "开票金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
public decimal? InvoiceAmount { get; set; } = 0; public decimal? InvoiceAmount { get; set; } = 0;
/// <summary> /// <summary>
/// Desc:申请金额 ///申请金额
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "申请金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")] [SugarColumn(ColumnDescription = "申请金额", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
public decimal? OrderAmount { get; set; } = 0; public decimal? OrderAmount { get; set; } = 0;
/// <summary> /// <summary>
/// Desc:申请开票金额 /// Desc:申请开票金额

@ -1,6 +1,7 @@
using DS.Module.Core; using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity; using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Fee.Interface namespace DS.WMS.Core.Fee.Interface
{ {
@ -23,6 +24,21 @@ namespace DS.WMS.Core.Fee.Interface
/// <returns></returns> /// <returns></returns>
Task<DataResult<List<FeeApplicationBiz>>> GetBizListAsync(PageRequest request); Task<DataResult<List<FeeApplicationBiz>>> GetBizListAsync(PageRequest request);
/// <summary>
/// 获取申请单详情
/// </summary>
/// <param name="id">申请单ID</param>
/// <returns></returns>
Task<DataResult<FeeApplicationDto>> GetAsync(long id);
/// <summary>
/// 根据业务编号及类型获取关联费用记录
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
Task<DataResult<List<FeeRecordDto>>> GetFeesAsync(long id, BusinessType businessType);
/// <summary> /// <summary>
/// 提交申请单 /// 提交申请单
/// </summary> /// </summary>
@ -30,6 +46,13 @@ namespace DS.WMS.Core.Fee.Interface
/// <returns></returns> /// <returns></returns>
Task<DataResult> SaveAsync(FeeApplication application); Task<DataResult> SaveAsync(FeeApplication application);
/// <summary>
/// 删除申请单明细
/// </summary>
/// <param name="ids">申请单明细ID</param>
/// <returns></returns>
Task<DataResult> DeleteDetailAsync(params long[] ids);
/// <summary> /// <summary>
/// 删除申请单 /// 删除申请单
/// </summary> /// </summary>

@ -1,4 +1,5 @@
using DS.Module.Core; using System.Text;
using DS.Module.Core;
using DS.Module.Core.Enums; using DS.Module.Core.Enums;
using DS.Module.Core.Extensions; using DS.Module.Core.Extensions;
using DS.WMS.Core.Fee.Dtos; 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.Flow.Interface;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface;
using LanguageExt.Common;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using SqlSugar; using SqlSugar;
@ -20,6 +23,7 @@ namespace DS.WMS.Core.Fee.Method
public class FeeApplicationService : FeeServiceBase, IFeeApplicationService public class FeeApplicationService : FeeServiceBase, IFeeApplicationService
{ {
readonly IClientFlowInstanceService flowService; readonly IClientFlowInstanceService flowService;
readonly ICommonService commonService;
/// <summary> /// <summary>
/// 初始化 /// 初始化
@ -28,6 +32,7 @@ namespace DS.WMS.Core.Fee.Method
public FeeApplicationService(IServiceProvider serviceProvider) : base(serviceProvider) public FeeApplicationService(IServiceProvider serviceProvider) : base(serviceProvider)
{ {
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>(); flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
commonService = serviceProvider.GetRequiredService<ICommonService>();
} }
/// <summary> /// <summary>
@ -125,6 +130,46 @@ namespace DS.WMS.Core.Fee.Method
return TenantDb.UnionAll(new List<ISugarQueryable<FeeApplicationBiz>> { query1 }); return TenantDb.UnionAll(new List<ISugarQueryable<FeeApplicationBiz>> { query1 });
} }
/// <summary>
/// 根据业务编号及类型获取关联费用记录
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
public async Task<DataResult<List<FeeRecordDto>>> GetFeesAsync(long id, BusinessType businessType)
{
var list = await TenantDb.Queryable<FeeRecord>()
.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<SysUser>().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<List<FeeRecordDto>>.Success(list);
}
/// <summary> /// <summary>
/// 获取分页列表 /// 获取分页列表
/// </summary> /// </summary>
@ -149,25 +194,171 @@ namespace DS.WMS.Core.Fee.Method
} }
/// <summary> /// <summary>
/// 提交保存申请单 /// 获取申请单详情
/// </summary>
/// <param name="id">申请单ID</param>
/// <returns></returns>
public async Task<DataResult<FeeApplicationDto>> GetAsync(long id)
{
var dto = await TenantDb.Queryable<FeeApplication>().Where(x => x.Id == id).Select<FeeApplicationDto>().FirstAsync();
if (dto != null)
{
dto.Details = await TenantDb.Queryable<FeeApplicationDetail>()
.LeftJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.LeftJoin<BusinessFeeStatus>((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<SeaExport>().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<FeeApplicationDto>.Success(dto);
}
/// <summary>
/// 提交保存费用申请单
/// </summary> /// </summary>
/// <param name="application">申请单</param> /// <param name="application">申请单</param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult> SaveAsync(FeeApplication application) public async Task<DataResult> SaveAsync(FeeApplication application)
{ {
application.Details ??= [];
if (application.Id > 0) if (application.Id > 0)
{ {
//修改需检查申请单状态 //修改需检查申请单状态
if (await TenantDb.Queryable<FeeApplication>().AnyAsync(x => var model = await TenantDb.Queryable<FeeApplication>().Where(x => x.Id == application.Id).Select(
x.Id == application.Id && (x.Status == ApplicationStatus.AuditSubmittd || x.Status == ApplicationStatus.AuditPassed))) x => new { x.Status, x.Currency }).FirstAsync();
if (model.Status == ApplicationStatus.AuditSubmittd || model.Status == ApplicationStatus.AuditPassed)
return DataResult.Failed("只能修改状态为:未提交/审核驳回的申请单"); return DataResult.Failed("只能修改状态为:未提交/审核驳回的申请单");
if (application.Details.Count > 0 && !string.Equals(model.Currency, application.Currency, StringComparison.OrdinalIgnoreCase))
return DataResult.Failed("提交币别需与原申请单币别一致");
}
List<FeeRecord>? 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<FeeRecord>().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 userIds = new long?[] { application.SettlerId, application.PaymentApplicantId };
var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync(); //var users = await Db.Queryable<SysUser>().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.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; //application.PaymentApplicantName = application.PaymentApplicantId.HasValue ? users.Find(x => x.Id == application.PaymentApplicantId.Value)?.UserName : string.Empty;
await TenantDb.Ado.BeginTranAsync(); await TenantDb.Ado.BeginTranAsync();
try try
@ -175,14 +366,36 @@ namespace DS.WMS.Core.Fee.Method
//关联导航属性插入 //关联导航属性插入
if (application.Id == 0) if (application.Id == 0)
{ {
//创建时需要生成申请单编号
var sequence = commonService.GetSequenceNext<FeeApplication>();
if (!sequence.Succeeded)
{
return DataResult.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist);
}
application.ApplicationNO = sequence.Data;
await TenantDb.InsertNav(application).Include(x => x.Details).ExecuteCommandAsync(); await TenantDb.InsertNav(application).Include(x => x.Details).ExecuteCommandAsync();
} }
//关联导航属性更新
else 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(); await TenantDb.Ado.CommitTranAsync();
return DataResult.Success; return DataResult.Success;
} }
@ -194,6 +407,44 @@ namespace DS.WMS.Core.Fee.Method
} }
} }
/// <summary>
/// 删除申请单明细
/// </summary>
/// <param name="ids">申请单明细ID</param>
/// <returns></returns>
public async Task<DataResult> DeleteDetailAsync(params long[] ids)
{
var details = await TenantDb.Queryable<FeeApplicationDetail>().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("删除失败!");
}
}
/// <summary> /// <summary>
/// 删除申请单 /// 删除申请单
/// </summary> /// </summary>
@ -204,8 +455,35 @@ namespace DS.WMS.Core.Fee.Method
if (await TenantDb.Queryable<FeeApplication>().AnyAsync(x => ids.Contains(x.Id) && (x.Status != ApplicationStatus.Pending && x.Status != ApplicationStatus.AuditRejected))) if (await TenantDb.Queryable<FeeApplication>().AnyAsync(x => ids.Contains(x.Id) && (x.Status != ApplicationStatus.Pending && x.Status != ApplicationStatus.AuditRejected)))
return DataResult.Failed("只能删除状态为‘待审核’或‘驳回’的申请单", MultiLanguageConst.FeeRecordDelete); return DataResult.Failed("只能删除状态为‘待审核’或‘驳回’的申请单", MultiLanguageConst.FeeRecordDelete);
bool result = await TenantDb.DeleteNav<FeeApplication>(x => ids.Contains(x.Id)).Include(x => x.Details).ExecuteCommandAsync(); var details = await TenantDb.Queryable<FeeApplicationDetail>().Where(x => ids.Contains(x.ApplicationId)).Select(
return result ? DataResult.Successed("删除成功!") : DataResult.Failed("删除失败!"); 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<FeeApplication>(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("删除失败!");
}
} }
/// <summary> /// <summary>
@ -306,7 +584,7 @@ namespace DS.WMS.Core.Fee.Method
{ {
await Db.Updateable(flows).UpdateColumns(x => new { x.FlowStatus, x.MakerList }).ExecuteCommandAsync(); 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.Status = ApplicationStatus.Pending;
item.FlowId = null; item.FlowId = null;

@ -151,7 +151,7 @@ namespace DS.WMS.Core.Fee.Method
.Select((s, b, f, cs, csd) => new FeeAuditBusiness .Select((s, b, f, cs, csd) => new FeeAuditBusiness
{ {
Id = s.Id, Id = s.Id,
AccountDate = SqlFunc.ToDate(s.AccountDate), AccountDate = s.AccountDate,
APFeeStatus = b.APFeeStatus, APFeeStatus = b.APFeeStatus,
ARFeeStatus = b.ARFeeStatus, ARFeeStatus = b.ARFeeStatus,
BusinessType = BusinessType.OceanShippingExport, BusinessType = BusinessType.OceanShippingExport,
@ -236,7 +236,7 @@ namespace DS.WMS.Core.Fee.Method
.Select((s, b, cs, csd) => new FeeAuditBusiness .Select((s, b, cs, csd) => new FeeAuditBusiness
{ {
Id = s.Id, Id = s.Id,
AccountDate = SqlFunc.ToDate(s.AccountDate), AccountDate = s.AccountDate,
APFeeStatus = b.APFeeStatus, APFeeStatus = b.APFeeStatus,
ARFeeStatus = b.ARFeeStatus, ARFeeStatus = b.ARFeeStatus,
BusinessType = BusinessType.OceanShippingExport, BusinessType = BusinessType.OceanShippingExport,

@ -3,6 +3,7 @@ using DS.Module.Core.Data;
using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity; using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface; using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.Op.Entity;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers namespace DS.WMS.FeeApi.Controllers
@ -45,6 +46,29 @@ namespace DS.WMS.FeeApi.Controllers
return await _service.GetBizListAsync(request); return await _service.GetBizListAsync(request);
} }
/// <summary>
/// 获取申请单详情
/// </summary>
/// <param name="id">申请单ID</param>
/// <returns></returns>
[HttpGet, Route("Get")]
public async Task<DataResult<FeeApplicationDto>> GetAsync([FromQuery] long id)
{
return await _service.GetAsync(id);
}
/// <summary>
/// 根据业务编号及类型获取关联费用记录
/// </summary>
/// <param name="id">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
[HttpGet, Route("GetFees")]
public async Task<DataResult<List<FeeRecordDto>>> GetFeesAsync([FromQuery] long id, [FromQuery] BusinessType businessType)
{
return await _service.GetFeesAsync(id, businessType);
}
/// <summary> /// <summary>
/// 提交申请单 /// 提交申请单
/// </summary> /// </summary>
@ -56,6 +80,20 @@ namespace DS.WMS.FeeApi.Controllers
return await _service.SaveAsync(application); return await _service.SaveAsync(application);
} }
/// <summary>
/// 删除申请单明细
/// </summary>
/// <param name="model">申请单明细ID</param>
/// <returns></returns>
[HttpPost, Route("DeleteDetail")]
public async Task<DataResult> DeleteDetailAsync([FromBody] IdModel model)
{
if (model.Ids == null || model.Ids.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return await _service.DeleteDetailAsync(model.Ids);
}
/// <summary> /// <summary>
/// 删除申请单 /// 删除申请单
/// </summary> /// </summary>
@ -64,7 +102,7 @@ namespace DS.WMS.FeeApi.Controllers
[HttpPost, Route("Delete")] [HttpPost, Route("Delete")]
public async Task<DataResult> DeleteAsync([FromBody] IdModel model) public async Task<DataResult> 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 DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return await _service.DeleteAsync(model.Ids); return await _service.DeleteAsync(model.Ids);

@ -77,7 +77,7 @@ namespace DS.WMS.FeeApi.Controllers
[HttpPost, Route("AuditBusiness")] [HttpPost, Route("AuditBusiness")]
public async Task<DataResult> AuditBusinessAsync(FeeBizAuditRequest request) public async Task<DataResult> 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 DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return await _auditService.AuditBusinessAsync(request); return await _auditService.AuditBusinessAsync(request);

@ -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 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 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-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.

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl> <_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-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||;</History> <History>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||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -6,7 +6,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\Code\PublishCopy\ds8-mainapi</_PublishTargetUrl> <_PublishTargetUrl>D:\Code\PublishCopy\ds8-mainapi</_PublishTargetUrl>
<History>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;</History> <History>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||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>
Loading…
Cancel
Save