package com.leromro.core.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leromro.core.domain.OrderSettlementApplication;
import com.leromro.core.domain.dto.OrderSettlementApplicationListDTO;
import com.leromro.core.domain.dto.SettlementOrderApplyDTO;
import com.leromro.core.domain.dto.SettlementOrderAuditorDTO;
import com.leromro.core.domain.vo.OrderSettlementApplicationDetailVO;
import com.leromro.core.domain.vo.OrderSettlementApplicationListVO;

import java.util.List;

/**
 * 订单费用结算申请Service接口
 * 
 * @author lsd
 * @date 2025-05-13
 */
public interface IOrderSettlementApplicationService extends IService<OrderSettlementApplication>
{
    /**
     * 查询订单费用结算申请
     * 
     * @param id 订单费用结算申请主键
     * @return 订单费用结算申请
     */
    public OrderSettlementApplicationDetailVO selectOrderSettlementApplicationById(Long id);

    /**
     * 查询订单费用结算申请列表
     * 
     * @param orderSettlementApplicationListDTO 订单费用结算申请
     * @return 订单费用结算申请集合
     */
    public List<OrderSettlementApplicationListVO> selectOrderSettlementApplicationList(OrderSettlementApplicationListDTO orderSettlementApplicationListDTO);

    /**
     * 新增订单费用结算申请
     * 
     * @param orderSettlementApplication 订单费用结算申请
     * @return 结果
     */
    public Boolean insertOrderSettlementApplication(OrderSettlementApplication orderSettlementApplication);

    /**
     * 修改订单费用结算申请
     * 
     * @param orderSettlementApplication 订单费用结算申请
     * @return 结果
     */
    public Boolean updateOrderSettlementApplication(OrderSettlementApplication orderSettlementApplication);

    /**
     * 批量删除订单费用结算申请
     * 
     * @param ids 需要删除的订单费用结算申请主键集合
     * @return 结果
     */
    public int deleteOrderSettlementApplicationByIds(Long[] ids);

    /**
     * 删除订单费用结算申请信息
     * 
     * @param id 订单费用结算申请主键
     * @return 结果
     */
    public int deleteOrderSettlementApplicationById(Long id);

    /**
     * 修改结算申请记录状态
     * @param id 结算申请记录id
     * @param status 状态
     * @return 结果
     */
    public void updateAuditorStatus(Long id, Integer status);

    /**
     * 取消待审核的结算申请记录
     * @param mainOrderIds
     */
    void cancelPendingRecord(List<Long> mainOrderIds);


    /**
     * 申请订单结算
     * @param settlementOrderApplyDTO
     */
    void applyOrderSettlement(SettlementOrderApplyDTO settlementOrderApplyDTO);

    /**
     * 审核订单结算
     * @param settlementOrderAuditorDTO
     */
    void auditorOrderSettlement(SettlementOrderAuditorDTO settlementOrderAuditorDTO);
}
