package com.aircraft.modules.order.service;

import com.aircraft.modules.order.domain.SettlementMain;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 订单结算主表 服务类
 * </p>
 *
 * @author cli
 * @since 2025-07-10
 */

public interface ISettlementMainService extends IService<SettlementMain> {

    /**
     * 根据批次号获取数据
     *
     * @param batchNo  结算批次号
     * @param page  {@link IPage<SettlementMain> }
     * @return  {@link List<SettlementMain>}
     */
    IPage<SettlementMain> allSettlementOrderList(String batchNo, Page<SettlementMain> page);

    /**
     * 批量新增结算订单
     *
     * @param settlementMainList  {List<SettlementMain>}
     */
    List<SettlementMain> batchInsert(List<SettlementMain> settlementMainList);

    /**
     * 根据ID获取数据
     *
     * @param settlementOrderId  结算单ID
     * @return  {@link SettlementMain}
     */
    SettlementMain obtainSettlementMainById(Long settlementOrderId);

    /**
     *
     * 更新结算单状态
     *
     * @param settlementOrderId  结算单ID
     * @param settlementOrderStatus  结算单状态: 0=结算中, 1=已确认, 2=已完成, 3=结算完成, 4=已取消
     */
    void updateSettlementStatus(Long settlementOrderId, Integer settlementOrderStatus);
}
