package com.clx.performance.dao.settle;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.mapper.settle.SettlementDriverDetailMapper;
import com.clx.performance.model.settle.SettlementDriverDetail;
import com.clx.performance.param.pc.driver.PageCarrierSettlementDriverDetailParam;
import com.msl.common.base.Optional;
import com.msl.common.dao.BaseDao;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: aiqinguo
 * @Description: 车主运单计费明细
 * @Date: 2023-10-11 18:00:53
 * @Version: 1.0
 */
public interface SettlementDriverDetailDao extends BaseDao<SettlementDriverDetailMapper, SettlementDriverDetail, Integer> {

    boolean updateSettlementNo(SettlementDriverDetail item);
    boolean updateClearSettlementNo(SettlementDriverDetail item);

    boolean updateInvoiceTypeAndPrepayFreightFlag(SettlementDriverDetail item);
    boolean updateConvertOrdinary(SettlementDriverDetail item);
    boolean updatePreFreight(SettlementDriverDetail item);


    Optional<SettlementDriverDetail> getByChildNo(String childNo);

    IPage<SettlementDriverDetail> pageSettlementDriverDetail(PageCarrierSettlementDriverDetailParam param);

    List<SettlementDriverDetail> listUnPay(LocalDateTime beginTime);

    List<SettlementDriverDetail> findByDriverSettlementIds(List<Integer> ids);

    void updateLoanFlagByChildNoList(List<String> childNoList);

    SettlementDriverDetail selectLoanFlag(String orderNo);

    SettlementDriverDetail selectLoanTypeFlag(String orderNo);

    List<SettlementDriverDetail> selectListByLoanFlag(Integer code);

    List<SettlementDriverDetail> findListByIdList(List<Integer> idList);
}
