package cn.quantgroup.customer.service;

import cn.quantgroup.customer.entity.OpLog;
import cn.quantgroup.customer.model.order.*;
import cn.quantgroup.customer.rest.param.ordermapping.EarlySettleUpOrderQueryParam;
import cn.quantgroup.customer.rest.param.ordermapping.OperateEntryParam;
import cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam;
import cn.quantgroup.customer.rest.vo.JsonResult;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author Wang Xiangwei
 * @version 2020/3/10
 */
public interface IOrderService{

    /**
     * 查看流程图
     * @param applyOrderNo
     * @return
     */
    JsonResult<List<FlowNode>> findFlowChart(String applyOrderNo);


    JsonResult<LoanOrderDetail> getLoanOrderDetail(Long loanId);

    /**
     * 查询订单信息
     * @param orderQuery
     * @return
     */
    JsonResult<OrderInfoVo> queryOrderInfo(OrderQueryParam orderQuery);

    /**
     * 查询提前一次性结清订单信息
     *
     * @param orderQuery
     * @return
     */
    JsonResult<List<EarlySettleUpOrder>> queryEarlySettleUpOrders(EarlySettleUpOrderQueryParam orderQuery);

    /**
     * 设置/取消提前结清白名单入口
     *
     * @param operateEntryParam
     * @return
     */
    JsonResult<Boolean> setOrCancelSettleUpWhiteList(OperateEntryParam operateEntryParam);

    /**
     * 提前一次性结清金额试算
     *
     * @param loanId
     * @return
     */
    JsonResult<List<Map<String, Object>>> earlySettleUpTrial(Long loanId);

    /**
     * 查询操作日志
     *
     * @param loanId
     * @return
     */
    JsonResult<List<OpLog>> queryOperateLog(Long loanId);

    /**
     * 申请结清证明
     * http://open.quantgroups.com/project/121/interface/api/3528
     * @param loanId
     * @return
     */
    JsonResult applySettle(Long loanId);

    /**
     * 结清证明下载
     * http://open.quantgroups.com/project/121/interface/api/3535
     * @param loanId
     * @return
     */
    JsonResult downloadSettle(HttpServletResponse response, Long loanId);
}
