jiangping
2025-06-06 a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwBuildingServiceImpl.java
@@ -111,11 +111,11 @@
    @Override
    public YwBuilding findById(Integer id) {
        MPJLambdaWrapper<YwBuilding> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper.selectAll(YwBuilding.class )
                .selectAs(YwProject::getName,YwBuilding::getProjectName)
                .select(" (select ifnull(sum(y.FEE_AREA),0) from yw_room y where y.ISDELETED = 0 and y.status = 0 and y.IS_INVESTMENT = 1 and y.BUILDING_ID = t.id ) ",YwBuilding::getRoomFeeArea)
                .select(" (select ifnull(sum(y.RENT_AREA),0) from yw_room y where y.ISDELETED = 0 and y.status = 0 and y.IS_INVESTMENT = 1 and y.BUILDING_ID = t.id ) ",YwBuilding::getRoomRentArea)
                .leftJoin(YwProject.class,YwProject::getId,YwBuilding::getProjectId)
                .eq(YwBuilding::getId,id)
                .last(" limit 1 ")
@@ -147,7 +147,8 @@
        Utils.MP.blankToNull(pageWrap.getModel());
        pageWrap.getModel().setIsdeleted(Constants.ZERO);
        queryWrapper.select(" (select count(1) from yw_room a where a.isdeleted=0 and a.BUILDING_ID=t.id) as roomNum "+
                ",(select count(1) from yw_room a where a.isdeleted=0 and a.BUILDING_ID=t.id and a.IS_INVESTMENT=1) as roomRentNum");
                ",(select count(1) from yw_room a where a.isdeleted=0 and a.BUILDING_ID=t.id and a.IS_INVESTMENT=1) as roomRentNum " +
                ", ( select ifnull(sum(a.RENT_AREA),0) from  yw_room a where a.isdeleted=0 and a.BUILDING_ID=t.id ) as manageArea");
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.eq(YwBuilding::getId, pageWrap.getModel().getId());
        }