| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | projectDataVOList.add(projectDataVO); |
| | | } |
| | | |
| | | List<YwRoom> ywRoomList = ywRoomMapper.selectList(new QueryWrapper<YwRoom>().lambda() |
| | | List<YwRoom> ywRoomList = ywRoomMapper.selectJoinList(YwRoom.class,new MPJLambdaWrapper<YwRoom>() |
| | | .selectAll(YwRoom.class) |
| | | // .select(" ( SELECT count(1) FROM yw_contract y1 " + |
| | | // " left join yw_contract_room y2 on y1.id = y2.contract_id " + |
| | | // " where 1 = 1 and y2.type = 0 and y1.`STATUS` in( 0,1,2) " + |
| | | // " and y1.START_DATE < now() and y1.END_DATE > now() and y2.ROOM_ID = yw_room.id ) as investmentStatus ") |
| | | .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END " + |
| | | "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0 " + |
| | | "where y1.`STATUS` <> 4 and y2.room_id = t.id order by y1.create_date desc limit 1 ) ,0) ",YwRoom::getLeaseStatus) |
| | | .eq(YwRoom::getIsdeleted,Constants.ZERO) |
| | | .eq(YwRoom::getStatus,Constants.ZERO) |
| | | .eq(YwRoom::getIsInvestment,Constants.ONE) |
| | |
| | | projectDataVO.setArea(data.getRentArea().setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | projectDataVO.setPId(data.getFloor()); |
| | | projectDataVO.setLv(Constants.THREE); |
| | | projectDataVO.setLeaseStatus(data.getLeaseStatus()); |
| | | projectDataVOList.add(projectDataVO); |
| | | } |
| | | |