cjy 5 months ago
commit 66bbf80822

@ -25,11 +25,12 @@ namespace DS.WMS.Core.Settlement.Dtos
_items = source;
UnchargedRMB = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnchargedUSD = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnchargedOther = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnchargedUSD = Items.FindAll(x => x.Currency == FeeServiceBase.USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnchargedOther = Items.FindAll(x => x.Currency != FeeServiceBase.RMB_CODE && x.Currency != FeeServiceBase.USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount);
UnpaidRMB = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
UnpaidUSD = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
UnpaidOther = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
UnpaidUSD = Items.FindAll(x => x.Currency == FeeServiceBase.USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
UnpaidOther = Items.FindAll(x => x.Currency != FeeServiceBase.RMB_CODE && x.Currency != FeeServiceBase.USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount);
}
/// <summary>
@ -71,7 +72,7 @@ namespace DS.WMS.Core.Settlement.Dtos
/// <summary>
/// 费用记录ID
/// </summary>
public long Id { get; set; }
public long RecordId { get; set; }
/// <summary>
/// 业务ID
@ -83,11 +84,21 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 客户ID
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 客户名称
/// </summary>
public string? CustomerName { get; set; }
/// <summary>
/// 费用ID
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用名称
/// </summary>
@ -99,9 +110,9 @@ namespace DS.WMS.Core.Settlement.Dtos
public FeeType FeeType { get; set; }
/// <summary>
/// 金额
/// 金额
/// </summary>
public decimal Amount { get; set; }
public decimal TotalAmount { get; set; }
/// <summary>
/// 币别
@ -116,7 +127,12 @@ namespace DS.WMS.Core.Settlement.Dtos
/// <summary>
/// 本次结算金额
/// </summary>
public decimal SettlementAmount { get; set; }
public decimal Amount { get; set; }
/// <summary>
/// 本次结算原始金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// 原始汇率

@ -157,9 +157,9 @@ namespace DS.WMS.Core.Settlement.Dtos
}
/// <summary>
/// 付费自由结算
/// 付费自由结算返回明细
/// </summary>
public class FreePaymentSettlementDto : PaymentSettlementDto
public class FreeSettlement
{
/// <summary>
/// 结算明细

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.WMS.Core.Application.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
@ -11,11 +12,32 @@ namespace DS.WMS.Core.Settlement.Interface
public interface IPaymentFreeSettlementService : ISettlementService<PaymentSettlement>
{
/// <summary>
/// 获取待结算费用分页列表
/// 获取待结算业务分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <remarks>查询条件请参考<see cref="FeeDto"/>中定义的字段</remarks>
Task<DataResult<List<SettlementBiz>>> GetBizListAsync(PageRequest request);
/// <summary>
/// 根据业务编号及类型获取关联费用记录
/// </summary>
/// <param name="items">业务ID与业务类型</param>
/// <returns></returns>
Task<DataResult<FeeForm>> GetFeesAsync(params BizItem[] items);
/// <summary>
/// 获取付费自由结算单
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
Task<DataResult<PaymentSettlementDto>> GetAsync(long id);
/// <summary>
/// 获取付费结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<FreeSettlement>> GetDetailsAsync(PageRequest<long> request);
}
}

@ -7,7 +7,7 @@ using DS.WMS.Core.Settlement.Entity;
namespace DS.WMS.Core.Settlement.Interface
{
/// <summary>
/// 付费结算
/// 付费申请结算
/// </summary>
public interface IPaymentSettlementService : ISettlementService<PaymentSettlement>
{
@ -19,12 +19,19 @@ namespace DS.WMS.Core.Settlement.Interface
Task<DataResult<List<PaymentSettlementDto>>> GetListAsync(PageRequest request);
/// <summary>
/// 获取付费结算及其明细
/// 获取付费申请结算单
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
Task<DataResult<PaymentSettlementDto>> GetAsync(long id);
/// <summary>
/// 获取付费结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(PageRequest<long> request);
/// <summary>
/// 获取付费申请分页列表
/// </summary>
@ -45,12 +52,5 @@ namespace DS.WMS.Core.Settlement.Interface
/// <param name="ids">申请单明细ID</param>
/// <returns></returns>
Task<DataResult<List<PaymentApplicationDetailDto>>> GetApplicationDetailsAsync(long[] ids);
/// <summary>
/// 提交结算单
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<PaymentSettlement>> SaveAsync(SettlementRequest<PaymentSettlement> request);
}
}

@ -153,33 +153,41 @@ namespace DS.WMS.Core.Settlement.Method
(f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0)
.Select(f => new FeeItem
{
Id = f.Id,
RecordId = f.Id,
BusinessId = f.BusinessId,
BusinessType = f.BusinessType,
CustomerId = f.CustomerId,
CustomerName = f.CustomerName,
FeeId = f.FeeId,
FeeName = f.FeeName,
FeeType = f.FeeType,
Amount = f.Amount,
TotalAmount = f.Amount,
Currency = f.Currency,
OriginalRate = f.ExchangeRate,
RestAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount,
SettlementAmount = f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount,
InvoiceAmount = f.InvoiceAmount,
AccTaxRate = f.AccTaxRate,
Remark = f.Remark
}).ToListAsync();
foreach (var item in list)
{
//本次结算金额默认等于剩余金额
item.Amount = item.RestAmount;
item.OriginalAmount = item.RestAmount;
}
return DataResult<FeeForm>.Success(new FeeForm(list));
}
/// <summary>
/// 获取付费自由结算及其明细
/// 获取付费自由结算
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
public async Task<DataResult<FreePaymentSettlementDto>> GetAsync(long id)
public async Task<DataResult<PaymentSettlementDto>> GetAsync(long id)
{
var model = await TenantDb.Queryable<PaymentSettlement>().Select(x => new FreePaymentSettlementDto
var model = await TenantDb.Queryable<PaymentSettlement>().Select(x => new PaymentSettlementDto
{
Id = x.Id,
ApplicationNO = x.ApplicationNO, //申请编号
@ -220,11 +228,20 @@ namespace DS.WMS.Core.Settlement.Method
AdvanceAmount = x.AdvanceAmount, //预收支资料
AdvanceCurrency = x.AdvanceCurrency,
AdvanceRate = x.AdvanceRate,
}).FirstAsync();
}).FirstAsync(x => x.Id == id && x.Mode == SettlementMode.FreeSettlement);
if (model != null)
{
model.Details = await TenantDb.Queryable<ApplicationDetail>().Where(x => x.ApplicationId == id && x.Category == FeeCategory.PaidFreeSettlement)
return DataResult<PaymentSettlementDto>.Success(model);
}
/// <summary>
/// 获取付费自由结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<FreeSettlement>> GetDetailsAsync(PageRequest<long> request)
{
var model = new FreeSettlement();
model.Details = await TenantDb.Queryable<ApplicationDetail>().Where(x => x.ApplicationId == request.OtherQueryCondition && x.Category == FeeCategory.PaidFreeSettlement)
.InnerJoin<FeeRecord>((d, f) => d.RecordId == f.Id)
.Select((d, f) => new FreeSettlementDetailDto
{
@ -244,74 +261,76 @@ namespace DS.WMS.Core.Settlement.Method
Note = d.Note
}).ToListAsync();
var gList = model.Details.GroupBy(x => x.BusinessType);
foreach (var g in gList)
var gList = model.Details.GroupBy(x => x.BusinessType);
foreach (var g in gList)
{
var ids = g.Select(x => x.BusinessId);
switch (g.Key)
{
var ids = g.Select(x => x.BusinessId);
switch (g.Key)
{
case BusinessType.OceanShippingExport:
var list1 = await TenantDb.Queryable<SeaExport>().Where(x => ids.Contains(x.Id))
.LeftJoin<CodeSource>((s, cs) => s.SourceId == cs.Id)
.Select((s, cs) => new
{
s.Id,
s.MBLNO,
s.HBLNO,
s.CustomerNo,
ClientName = s.CustomerName,
s.ETD,
cs.SourceName,
s.Sale,
s.AccountDate,
s.Vessel,
Voyage = s.Voyno,
s.Carrier,
s.Enterprise,
s.CustomNo
}).ToListAsync();
foreach (var item in g)
case BusinessType.OceanShippingExport:
var list1 = await TenantDb.Queryable<SeaExport>().Where(x => ids.Contains(x.Id))
.LeftJoin<CodeSource>((s, cs) => s.SourceId == cs.Id)
.Select((s, cs) => new
{
s.Id,
s.MBLNO,
s.HBLNO,
s.CustomerNo,
ClientName = s.CustomerName,
s.ETD,
cs.SourceName,
s.Sale,
s.AccountDate,
s.Vessel,
Voyage = s.Voyno,
s.Carrier,
s.Enterprise,
s.CustomNo
}).ToListAsync();
foreach (var item in g)
{
var biz = list1.Find(x => x.Id == item.BusinessId);
if (biz != null)
{
var biz = list1.Find(x => x.Id == item.BusinessId);
if (biz != null)
{
item.MBLNO = biz.MBLNO;
item.HBLNO = biz.HBLNO;
item.CustomerNo = biz.CustomerNo;
item.ClientName = biz.ClientName;
item.ETD = biz.ETD;
item.SourceName = biz.SourceName;
item.Sale = biz.Sale;
item.AccountDate = biz.AccountDate;
item.Vessel = biz.Vessel;
item.Voyage = biz.Voyage;
item.Carrier = biz.Carrier;
item.Enterprise = biz.Enterprise;
item.CustomNo = biz.CustomNo;
}
item.MBLNO = biz.MBLNO;
item.HBLNO = biz.HBLNO;
item.CustomerNo = biz.CustomerNo;
item.ClientName = biz.ClientName;
item.ETD = biz.ETD;
item.SourceName = biz.SourceName;
item.Sale = biz.Sale;
item.AccountDate = biz.AccountDate;
item.Vessel = biz.Vessel;
item.Voyage = biz.Voyage;
item.Carrier = biz.Carrier;
item.Enterprise = biz.Enterprise;
item.CustomNo = biz.CustomNo;
}
}
break;
break;
case BusinessType.OceanShippingImport:
break;
}
case BusinessType.OceanShippingImport:
break;
}
model.SummaryItems = model.Details.GroupBy(x => new { x.FeeType, x.Currency }).Select(x => new SummaryItem
{
FeeType = x.Key.FeeType,
Currency = x.Key.Currency,
Amount = x.Sum(y => y.ApplyAmount)
}).ToList();
}
return DataResult<FreePaymentSettlementDto>.Success(model);
model.SummaryItems = model.Details.GroupBy(x => new { x.FeeType, x.Currency }).Select(x => new SummaryItem
{
FeeType = x.Key.FeeType,
Currency = x.Key.Currency,
Amount = x.Sum(y => y.ApplyAmount)
}).ToList();
return DataResult<FreeSettlement>.Success(model);
}
protected override async Task<DataResult> PreSaveAsync(PaymentSettlement settlement)
{
settlement.Mode = SettlementMode.FreeSettlement;
settlement.BillType = SettlementBillType.Payment;
//获取剩余待结算金额
var ids = settlement.Details.Select(x => x.RecordId);
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.Id) && x.FeeStatus == FeeStatus.AuditPassed)
@ -324,7 +343,7 @@ namespace DS.WMS.Core.Settlement.Method
StringBuilder sb = new();
foreach (var detail in settlement.Details)
{
var item = fees.Find(x => x.Id == detail.DetailId);
var item = fees.Find(x => x.Id == detail.RecordId);
if (item == null)
{
sb.Append(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.EmptyData)));
@ -343,6 +362,8 @@ namespace DS.WMS.Core.Settlement.Method
sb.Append("");
continue;
}
detail.Category = FeeCategory.PaidApplicationSettlement;
}
return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;
@ -356,17 +377,5 @@ namespace DS.WMS.Core.Settlement.Method
return DataResult.Success;
}
//protected override async Task OnDeleteDetailAsync(List<PaymentSettlement> settlements)
//{
// await base.OnDeleteDetailAsync(settlements);
// var detailList = settlements.SelectMany(x => x.Details);
// //还原费用表的已结算金额
// var fees = detailList.Select(x => new FeeRecord { Id = x.RecordId, SettlementAmount = x.OriginalAmount }).ToList();
// await TenantDb.Updateable(fees)
// .PublicSetColumns(it => it.SettlementAmount, "-")
// .UpdateColumns(x => new { x.SettlementAmount })
// .ExecuteCommandAsync();
//}
}
}

@ -105,7 +105,7 @@ namespace DS.WMS.Core.Settlement.Method
}
/// <summary>
/// 获取付费结算及其明细
/// 获取付费结算
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
@ -152,69 +152,10 @@ namespace DS.WMS.Core.Settlement.Method
AdvanceAmount = x.AdvanceAmount, //预收支资料
AdvanceCurrency = x.AdvanceCurrency,
AdvanceRate = x.AdvanceRate,
}).FirstAsync(x => x.Id == id);
}).FirstAsync(x => x.Id == id && x.Mode == SettlementMode.Payment);
if (model != null)
{
var details = await TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<ApplicationDetail>((d, pd) => d.DetailId == pd.Id)
.InnerJoin<PaymentApplication>((d, pd, pa) => pd.ApplicationId == pa.Id)
.Where(d => d.ApplicationId == id)
.Select((d, pd, pa) => new
{
d.Id,
d.ApplicationId,
d.ApplyAmount,
//d.Currency,
d.OriginalCurrency,
d.OriginalAmount,
pa.ApplicationNO,
pa.Status,
pa.CreateTime,
pa.CreateBy,
pa.PaymentDate,
pa.Note
}).ToListAsync();
var gp = details.GroupBy(x => x.ApplicationId);
model.Details = new List<SettlementDetailDto>();
foreach (var g in gp)
{
var firstItem = g.FirstOrDefault();
var dto = new SettlementDetailDto
{
ApplicationId = g.Key,
Ids = g.Select(x => x.Id),
RMBApplyAmount = g.Where(x => x.OriginalCurrency == RMB_CODE).Sum(x => x.ApplyAmount),
USDApplyAmount = g.Where(x => x.OriginalCurrency == USD_CODE).Sum(x => x.ApplyAmount),
ApplicationNO = firstItem.ApplicationNO,
Status = firstItem.Status,
CreateTime = firstItem?.CreateTime,
CreateBy = firstItem?.CreateBy,
PaymentDate = firstItem?.PaymentDate,
Note = firstItem?.Note
};
//包含多个币别
if (g.GroupBy(x => x.OriginalCurrency).Select(x => x.Key).Count() > 1)
{
//原始币别=不等于结算单币别的首个币别参考DS7
dto.OriginalCurrency = g.Where(x => x.OriginalCurrency != model.Currency).Select(x => x.OriginalCurrency).FirstOrDefault();
//原始金额=当前结算单的币别合计
dto.OriginalAmount = g.Where(x => x.OriginalCurrency == model.Currency).Sum(x => x.ApplyAmount);
}
else
{
dto.OriginalCurrency = firstItem?.OriginalCurrency;
dto.OriginalAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount);
}
//结算金额=原申请的原始币别合计
dto.SettlementAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount);
model.Details.Add(dto);
}
if (model.Details.Count > 0)
{
//关联用户名称
@ -231,6 +172,75 @@ namespace DS.WMS.Core.Settlement.Method
return DataResult<PaymentSettlementDto>.Success(model);
}
/// <summary>
/// 获取付费结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(PageRequest<long> request)
{
var list = await TenantDb.Queryable<ApplicationDetail>()
.InnerJoin<ApplicationDetail>((d, pd) => d.DetailId == pd.Id)
.InnerJoin<PaymentApplication>((d, pd, pa) => pd.ApplicationId == pa.Id)
.Where(d => d.ApplicationId == request.OtherQueryCondition)
.Select((d, pd, pa) => new
{
d.Id,
d.ApplicationId,
d.ApplyAmount,
d.Currency,
d.OriginalCurrency,
d.OriginalAmount,
pa.ApplicationNO,
pa.Status,
pa.CreateTime,
pa.CreateBy,
pa.PaymentDate,
pa.Note
}).ToListAsync();
var gp = list.GroupBy(x => x.ApplicationId);
var details = new List<SettlementDetailDto>();
foreach (var g in gp)
{
var firstItem = g.FirstOrDefault();
var dto = new SettlementDetailDto
{
ApplicationId = g.Key,
Ids = g.Select(x => x.Id),
RMBApplyAmount = g.Where(x => x.OriginalCurrency == RMB_CODE).Sum(x => x.ApplyAmount),
USDApplyAmount = g.Where(x => x.OriginalCurrency == USD_CODE).Sum(x => x.ApplyAmount),
ApplicationNO = firstItem.ApplicationNO,
Status = firstItem.Status,
CreateTime = firstItem?.CreateTime,
CreateBy = firstItem?.CreateBy,
PaymentDate = firstItem?.PaymentDate,
Note = firstItem?.Note
};
//包含多个币别
if (g.GroupBy(x => x.OriginalCurrency).Select(x => x.Key).Count() > 1)
{
//原始币别=不等于结算单币别的首个币别参考DS7
dto.OriginalCurrency = g.Select(x => x.OriginalCurrency).FirstOrDefault();
//原始金额=当前结算单的币别合计
dto.OriginalAmount = g.Sum(x => x.ApplyAmount);
}
else
{
dto.OriginalCurrency = firstItem?.OriginalCurrency;
dto.OriginalAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount);
}
//结算金额=原申请的原始币别合计
dto.SettlementAmount = g.Where(x => x.OriginalCurrency == dto.OriginalCurrency).Sum(x => x.ApplyAmount);
details.Add(dto);
}
return DataResult<List<SettlementDetailDto>>.Success(details);
}
/// <summary>
/// 获取付费申请分页列表
/// </summary>
@ -481,6 +491,8 @@ namespace DS.WMS.Core.Settlement.Method
sb.Append("");
continue;
}
detail.Category = FeeCategory.PaidFreeSettlement;
}
return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;

@ -84,7 +84,6 @@ namespace DS.WMS.Core.Settlement.Method
FeeId = x.FeeId,
FeeName = x.FeeName,
FeeType = x.FeeType,
Category = FeeCategory.PaidApplicationSettlement,
ApplyAmount = x.Amount,
Currency = x.Currency,
ExchangeRate = x.ExchangeRate,
@ -236,6 +235,7 @@ namespace DS.WMS.Core.Settlement.Method
ApplicationId = x.ApplicationId,
RecordId = x.RecordId,
DetailId = x.DetailId,
ApplyAmount = x.ApplyAmount,
OriginalAmount = x.OriginalAmount,
ProcessedAmount = x.ProcessedAmount,
OriginalProcessedAmount = x.OriginalProcessedAmount
@ -251,7 +251,10 @@ namespace DS.WMS.Core.Settlement.Method
}).ToListAsync();
foreach (var app in apps)
{
app.Details = details.FindAll(x => x.ApplicationId == app.Id);
app.Amount = app.Details.Sum(x => x.ApplyAmount);
}
var result = PreDelete(apps);
if (!result.Succeeded)
@ -264,13 +267,9 @@ namespace DS.WMS.Core.Settlement.Method
await TenantDb.Deleteable(details).ExecuteCommandAsync();
//更新结算单的结算总金额
var apps2 = await TenantDb.Queryable<ApplicationDetail>().Where(x => appIds.Contains(x.ApplicationId) && !ids.Contains(x.Id))
.GroupBy(x => x.ApplicationId).Select(x => new TEntity
{
Id = x.ApplicationId,
Amount = SqlFunc.AggregateSum(x.ApplyAmount)
}).ToListAsync();
await TenantDb.Updateable(apps2).UpdateColumns(x => new { x.Amount }).ExecuteCommandAsync();
await TenantDb.Updateable(apps)
.PublicSetColumns(it => it.Amount, "-").UpdateColumns(x => new { x.Amount })
.ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;
@ -356,9 +355,10 @@ namespace DS.WMS.Core.Settlement.Method
//还原费用表的已结算金额
var fees = settlements.SelectMany(x => x.Details).Select(x => new FeeRecord { Id = x.RecordId, SettlementAmount = x.OriginalAmount }).ToList();
await TenantDb.Updateable(fees)
.PublicSetColumns(it => it.SettlementAmount, "-")
.UpdateColumns(x => new { x.SettlementAmount })
.ExecuteCommandAsync();
.PublicSetColumns(it => it.SettlementAmount, "-").UpdateColumns(x => new { x.SettlementAmount })
.ExecuteCommandAsync();
await UpdateFeeStatus(fees.Select(x => x.Id));
}
#endregion
@ -441,6 +441,11 @@ namespace DS.WMS.Core.Settlement.Method
item.FeeStatus = FeeStatus.PartialSettlement;
list.Add(item);
}
else if (item.SettlementAmount == 0)
{
item.FeeStatus = FeeStatus.AuditPassed;
list.Add(item);
}
}
await TenantDb.Updateable(list).UpdateColumns(x => new { x.FeeStatus }).ExecuteCommandAsync();

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Settlement.Dtos;
using DS.WMS.Core.Settlement.Entity;
using DS.WMS.Core.Settlement.Interface;
@ -24,17 +25,49 @@ namespace DS.WMS.FeeApi.Controllers
}
/// <summary>
/// 获取待结算费用分页列表
/// 获取待结算业务分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetFeeList")]
public async Task<DataResult<List<SettlementBiz>>> GetFeeListAsync([FromBody] PageRequest request)
[HttpPost, Route("GetBizList")]
public async Task<DataResult<List<SettlementBiz>>> GetBizListAsync([FromBody] PageRequest request)
{
return await _service.GetBizListAsync(request);
}
/// <summary>
/// 根据业务编号及类型获取关联费用记录
/// </summary>
/// <param name="items">业务ID与业务类型</param>
/// <returns></returns>
[HttpPost, Route("GetFees")]
public async Task<DataResult<FeeForm>> GetFeesAsync([FromBody] BizItem[] items)
{
return await _service.GetFeesAsync(items);
}
/// <summary>
/// 获取付费自由结算单
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
[HttpGet, Route("Get")]
public async Task<DataResult<PaymentSettlementDto>> GetAsync(long id)
{
return await _service.GetAsync(id);
}
/// <summary>
/// 获取付费自由结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetDetails")]
public async Task<DataResult<FreeSettlement>> GetDetailsAsync(PageRequest<long> request)
{
return await _service.GetDetailsAsync(request);
}
/// <summary>
/// 根据付费申请创建结算单
/// </summary>

@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 付费结算API
/// 付费申请结算API
/// </summary>
public class PaymentSettlementController : ApiController
{
@ -36,7 +36,7 @@ namespace DS.WMS.FeeApi.Controllers
}
/// <summary>
/// 获取付费结算及其明细
/// 获取付费申请结算单
/// </summary>
/// <param name="id">结算单ID</param>
/// <returns></returns>
@ -46,6 +46,17 @@ namespace DS.WMS.FeeApi.Controllers
return await _service.GetAsync(id);
}
/// <summary>
/// 获取付费自由结算明细
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetDetails")]
public async Task<DataResult<List<SettlementDetailDto>>> GetDetailsAsync(PageRequest<long> request)
{
return await _service.GetDetailsAsync(request);
}
/// <summary>
/// 获取付费申请分页列表
/// </summary>
@ -62,7 +73,7 @@ namespace DS.WMS.FeeApi.Controllers
/// </summary>
/// <param name="id">付费申请单ID</param>
/// <returns></returns>
[HttpGet, Route("GetApplicationDetails")]
[HttpGet, Route("GetApplicationDetailsById")]
public async Task<DataResult<List<PaymentApplicationDetailDto>>> GetApplicationDetailsAsync(long id)
{
return await _service.GetApplicationDetailsAsync(id);
@ -73,7 +84,7 @@ namespace DS.WMS.FeeApi.Controllers
/// </summary>
/// <param name="model">申请明细ID</param>
/// <returns></returns>
[HttpPost, Route("GetDetails")]
[HttpPost, Route("GetApplicationDetailsByDetail")]
public async Task<DataResult<List<PaymentApplicationDetailDto>>> GetApplicationDetailsAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)

@ -2497,3 +2497,94 @@
2024-07-10 17:10:02.9237 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-10 17:10:02.9358 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 17:10:02.9358 Info Configuration initialized.
2024-07-10 17:32:36.3440 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 17:32:36.4802 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 17:32:36.4838 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 17:32:36.9533 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-10 17:32:36.9744 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-10 17:32:36.9744 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 17:32:36.9890 Info Configuration initialized.
2024-07-10 18:00:45.0387 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-10 18:00:45.1183 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-10 18:00:45.1183 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-10 18:00:45.1459 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-10 18:00:45.1573 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-10 18:00:45.1573 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-10 18:00:45.1678 Info Configuration initialized.
2024-07-11 08:53:21.5461 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 08:53:21.5790 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 08:53:21.5790 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 08:53:21.5960 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 08:53:21.5960 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 08:53:21.5960 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 08:53:21.6080 Info Configuration initialized.
2024-07-11 09:19:52.2051 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 09:19:52.2607 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 09:19:52.2707 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 09:19:52.2810 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 09:19:52.2810 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 09:19:52.2810 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 09:19:52.2810 Info Configuration initialized.
2024-07-11 09:58:47.5807 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 09:58:47.6117 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 09:58:47.6117 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 09:58:47.6280 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 09:58:47.6280 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 09:58:47.6280 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 09:58:47.6280 Info Configuration initialized.
2024-07-11 10:04:06.6413 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 10:04:06.7033 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 10:04:06.7033 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 10:04:06.7266 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 10:04:06.7341 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 10:04:06.7341 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 10:04:06.7341 Info Configuration initialized.
2024-07-11 10:22:21.5658 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 10:22:21.5980 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 10:22:21.5980 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 10:22:21.6188 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 10:22:21.6277 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 10:22:21.6277 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 10:22:21.6277 Info Configuration initialized.
2024-07-11 10:36:07.5331 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 10:36:07.5628 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 10:36:07.5628 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 10:36:07.5628 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 10:36:07.5628 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 10:36:07.5830 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 10:36:07.5830 Info Configuration initialized.
2024-07-11 10:36:46.9559 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 10:36:47.0250 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 10:36:47.0297 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 10:36:47.0482 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 10:36:47.0482 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 10:36:47.0654 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 10:36:47.0654 Info Configuration initialized.
2024-07-11 11:02:09.7503 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 11:02:09.8063 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 11:02:09.8063 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 11:02:09.8276 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 11:02:09.8333 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 11:02:09.8333 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 11:02:09.8485 Info Configuration initialized.
2024-07-11 11:08:09.2561 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 11:08:09.2883 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 11:08:09.2883 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 11:08:09.3020 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 11:08:09.3020 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 11:08:09.3109 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 11:08:09.3109 Info Configuration initialized.
2024-07-11 11:09:09.5009 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 11:09:09.5385 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 11:09:09.5385 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 11:09:09.5566 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 11:09:09.5566 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 11:09:09.5566 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 11:09:09.5723 Info Configuration initialized.
2024-07-11 11:11:00.1636 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-11 11:11:00.1957 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-11 11:11:00.1957 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-11 11:11:00.2128 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-11 11:11:00.2186 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-07-11 11:11:00.2186 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-11 11:11:00.2186 Info Configuration initialized.

Loading…
Cancel
Save