using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Invoice.Dtos; using DS.WMS.Core.Settlement.Dtos; using DS.WMS.Core.Settlement.Entity; using DS.WMS.Core.Settlement.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.FeeApi.Controllers { /// /// 发票结算API /// public class InvoiceSettlementController : ApiController { readonly IInvoiceSettlementService _service; /// /// 初始化 /// /// public InvoiceSettlementController(IInvoiceSettlementService service) { _service = service; } /// /// 获取发票结算单详情 /// /// 结算单ID /// [HttpGet, Route("Get")] public async Task> GetAsync(long id) { return await _service.GetAsync(id); } /// /// 获取待结算的发票列表 /// /// /// [HttpPost, Route("GetInvoiceList")] public async Task>> GetInvoiceListAsync([FromBody] PageRequest request) { return await _service.GetInvoiceListAsync(request); } /// /// 获取发票申请费用明细 /// /// /// [HttpPost, Route("GetInvoiceDetails")] public async Task>> GetInvoiceDetailsAsync([FromBody] IdModel idModel) { return await _service.GetInvoiceDetailsAsync(idModel.Ids); } /// /// 获取发票费用明细的原始币别 /// /// /// [HttpPost, Route("GetExchanges")] public async Task>> GetExchangesAsync([FromBody] List documents) { return await _service.GetExchangesAsync(documents); } /// /// 根据发票创建结算单 /// /// /// [HttpPost, Route("Save")] public async Task> SaveAsync([FromBody] SettlementRequest request) { return await _service.SaveAsync(request); } } }