package cn.iocoder.yudao.module.system.dal.mysql.linefixedassetstemporarytable;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.linefixedassetstemporarytable.LineFixedAssetsTemporaryTableDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.linefixedassetstemporarytable.vo.*;

/**
 * 打包线固定资产（excel 临时表） Mapper
 *
 * @author 艾楷
 */
@Mapper
public interface LineFixedAssetsTemporaryTableMapper extends BaseMapperX<LineFixedAssetsTemporaryTableDO> {

    default PageResult<LineFixedAssetsTemporaryTableDO> selectPage(LineFixedAssetsTemporaryTablePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<LineFixedAssetsTemporaryTableDO>()
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getLineNo, reqVO.getLineNo())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getSku, reqVO.getSku())
                .likeIfPresent(LineFixedAssetsTemporaryTableDO::getName, reqVO.getName())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getModelNo, reqVO.getModelNo())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getManufacturer, reqVO.getManufacturer())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getUnit, reqVO.getUnit())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getNum, reqVO.getNum())
                .betweenIfPresent(LineFixedAssetsTemporaryTableDO::getNameplateDate, reqVO.getNameplateDate())
                .betweenIfPresent(LineFixedAssetsTemporaryTableDO::getUseDate, reqVO.getUseDate())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getStatus, reqVO.getStatus())
                .likeIfPresent(LineFixedAssetsTemporaryTableDO::getFactoryName, reqVO.getFactoryName())
                .eqIfPresent(LineFixedAssetsTemporaryTableDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(LineFixedAssetsTemporaryTableDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(LineFixedAssetsTemporaryTableDO::getId));
    }

}