using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using System;
using XYY.Core.Standard.Mvc;
using XYY.Service.Standard.Finance;
using XYY.Model.Standard.FeeCount;

namespace XYY.Api.Finance.Controllers
{

    /// <summary>
    /// 财务费用计算
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class FinanceFeeCountController : ApiControllerBase
    {
        IFinanceFeeCountService _financeFeeCountService;


        public FinanceFeeCountController(IFinanceFeeCountService financeFeeCountService)
        {
            _financeFeeCountService = financeFeeCountService;
         
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<IActionResult> GetOrderFee(FinanceOrderFeeParam param)
        {
            try
            {
                string feeQueryParam = await _financeFeeCountService.GetFeesQueryParamByOrder(param);
                return Ok();
            } catch (Exception e)
            {
                return  Error(e.Message);
            }

                  
        }


    }
}
