package com.ruoyi.oa.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.oa.domain.SysOaClaim;
import com.ruoyi.oa.domain.vo.SysOaClaimVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 差旅费报销Mapper接口
 *
 * @author ruoyi
 * @date 2025-02-21
 */
public interface SysOaClaimMapper extends BaseMapperPlus<SysOaClaimMapper, SysOaClaim, SysOaClaimVo> {

    SysOaClaimVo selectSysOaClaimVoById(Long claimId);

    Page<SysOaClaimVo> selectPageVo(Page<Object> build, @Param(Constants.WRAPPER) Wrapper<SysOaClaim> lqw);

    SysOaClaimVo selectSysOaClaimVoByProcInsId(String procInsId);

    Double getClaimCost(Long claimId);

    @Select("select * from sys_oa_claim where project_id = #{projectId} and del_flag = 0")
    List<SysOaClaim> List(@Param("projectId") Long projectId);
}
