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.BusinessQCParameterDataDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 质控样检测参数数据业务 Mapper
 *
 * @author 后台管理
 */
@Mapper
public interface BusinessQCParameterDataMapper extends BaseMapperX<BusinessQCParameterDataDO> {

    default PageResult<BusinessQCParameterDataDO> selectPage(BusinessQCParameterDataPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BusinessQCParameterDataDO>()
                .eqIfPresent(BusinessQCParameterDataDO::getBusinessQCProjectDataId, reqVO.getBusinessQCProjectDataId())
                .eqIfPresent(BusinessQCParameterDataDO::getConfigAssayMethodProjectParameterId, reqVO.getConfigAssayMethodProjectParameterId())
                .eqIfPresent(BusinessQCParameterDataDO::getDictionaryParameterId, reqVO.getDictionaryParameterId())
                .eqIfPresent(BusinessQCParameterDataDO::getValue, reqVO.getValue())
                .eqIfPresent(BusinessQCParameterDataDO::getDataType, reqVO.getDataType())
                .eqIfPresent(BusinessQCParameterDataDO::getDecimalPosition, reqVO.getDecimalPosition())
                .eqIfPresent(BusinessQCParameterDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
                .betweenIfPresent(BusinessQCParameterDataDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(BusinessQCParameterDataDO::getUpdateCount, reqVO.getUpdateCount())
                .eqIfPresent(BusinessQCParameterDataDO::getRemark, reqVO.getRemark())
                .orderByDesc(BusinessQCParameterDataDO::getId));
    }

}