package com.casic.missiles.mapper.business;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.dto.business.siteExecutive.SiteExecuteLogRequest;
import com.casic.missiles.model.business.BusinessSiteExecutiveLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 现场检测记录表 Mapper 接口
 * </p>
 *
 * @author wangpeng
 * @since 2023-03-23
 */
public interface BusinessSiteExecutiveLogMapper extends BaseMapper<BusinessSiteExecutiveLog> {

    @Select("SELECT IFNULL(max(RIGHT(log_no, 12)), 0) from  business_site_executive_log")
    Long selectMaxCode();

    Page<BusinessSiteExecutiveLog> siteExecutiveLogListPage(Page<BusinessSiteExecutiveLog> page, @Param("request") SiteExecuteLogRequest request);

    String getLaboratoryName(@Param("laboratoryId") Long laboratoryId);
}
