package com.ruoyi.gysl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
import com.ruoyi.gysl.mapper.BuildingInformationMapper;
import com.ruoyi.gysl.entity.BuildingInformation;
import com.ruoyi.gysl.service.BuildingInformationService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (BuildingInformation)表服务实现类
 *
 * @author makejava
 * @since 2025-02-24 11:10:06
 */
@Service("buildingInformationService")
public class BuildingInformationServiceImpl extends ServiceImpl<BuildingInformationMapper, BuildingInformation> implements BuildingInformationService {

    /**
     * 查询所有数据
     *
     * @param zwIdPageReq 查询实体
     * @return 所有数据
     */
    @Override
    public List<BuildingInformation> selectAll(ZwIdPageReq zwIdPageReq) {
        return baseMapper.selectAll(zwIdPageReq);
    }

    /**
     * 分组之后拿到每个项目id对应的一个每个值都是max的楼栋
     */
    @Override
    public BuildingInformation getOneXmIdToMax(Long id) {
        return baseMapper.getOneXmIdToMax(id);
    }

    /**
     * 最大值
     */
    @Override
    public BuildingInformation getAllMax() {
        return baseMapper.getAllMax();
    }

    /**
     * 查询所有的建筑信息,只保留是重要楼栋Max
     */
    @Override
    public List<BuildingInformation> getImportantBuildings() {
        return baseMapper.getImportantBuildings();
    }
}

