package com.zt.plat.module.qms.business.bus.dal.mapper;

import java.util.*;

import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 班组判定数据业务 Mapper
 *
 * @author 后台管理
 */
@Mapper
public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<BusinessSubParentSampleAssessmentDO> {

    default PageResult<BusinessSubParentSampleAssessmentDO> selectPage(BusinessSubParentSampleAssessmentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BusinessSubParentSampleAssessmentDO>()
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getDataType, reqVO.getDataType())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getDecimalPosition, reqVO.getDecimalPosition())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getAssessmentValue, reqVO.getAssessmentValue())
                .likeIfPresent(BusinessSubParentSampleAssessmentDO::getColumnName, reqVO.getColumnName())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getAssessmentStatus, reqVO.getAssessmentStatus())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getIsReported, reqVO.getIsReported())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getReporter, reqVO.getReporter())
                .betweenIfPresent(BusinessSubParentSampleAssessmentDO::getReportTime, reqVO.getReportTime())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
                .betweenIfPresent(BusinessSubParentSampleAssessmentDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getUpdateCount, reqVO.getUpdateCount())
                .eqIfPresent(BusinessSubParentSampleAssessmentDO::getRemark, reqVO.getRemark())
                .orderByDesc(BusinessSubParentSampleAssessmentDO::getId));
    }

}