package cn.iocoder.yudao.module.pms.dal.mysql.iotrddailyreportitem;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.pms.controller.admin.iotrddailyreportitem.vo.IotRdDailyReportItemPageReqVO;
import cn.iocoder.yudao.module.pms.dal.dataobject.iotrddailyreportitem.IotRdDailyReportItemDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 瑞都日报 (工作量)明细 Mapper
 *
 * @author ruiqi
 */
@Mapper
public interface IotRdDailyReportItemMapper extends BaseMapperX<IotRdDailyReportItemDO> {

    default PageResult<IotRdDailyReportItemDO> selectPage(IotRdDailyReportItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IotRdDailyReportItemDO>()
                .eqIfPresent(IotRdDailyReportItemDO::getReportId, reqVO.getReportId())
                .eqIfPresent(IotRdDailyReportItemDO::getDeptId, reqVO.getDeptId())
                .eqIfPresent(IotRdDailyReportItemDO::getProjectId, reqVO.getProjectId())
                .eqIfPresent(IotRdDailyReportItemDO::getTaskId, reqVO.getTaskId())
                .eqIfPresent(IotRdDailyReportItemDO::getProjectClassification, reqVO.getProjectClassification())
                .eqIfPresent(IotRdDailyReportItemDO::getTechnique, reqVO.getTechnique())
                .eqIfPresent(IotRdDailyReportItemDO::getReportAttrIdentifier, reqVO.getReportAttrIdentifier())
                .likeIfPresent(IotRdDailyReportItemDO::getReportAttrName, reqVO.getReportAttrName())
                .eqIfPresent(IotRdDailyReportItemDO::getReportAttrValue, reqVO.getReportAttrValue())
                .eqIfPresent(IotRdDailyReportItemDO::getSort, reqVO.getSort())
                .eqIfPresent(IotRdDailyReportItemDO::getRemark, reqVO.getRemark())
                .eqIfPresent(IotRdDailyReportItemDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(IotRdDailyReportItemDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(IotRdDailyReportItemDO::getId));
    }

}