| | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.grid.vo.GridVO; |
| | | import org.springblade.modules.house.entity.HouseEntity; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.entity.UserHouseLabelEntity; |
| | |
| | | |
| | | @Override |
| | | public IPage<HouseVO> selectHousePage(IPage<HouseVO> page, HouseVO house) { |
| | | return page.setRecords(baseMapper.selectHousePage(page, house)); |
| | | List<HouseVO> houseVOS = baseMapper.selectHousePage(page, house); |
| | | // 遍历查询网格 |
| | | for (HouseVO houseVO : houseVOS) { |
| | | // 设置对应的网格名称 |
| | | GridVO gridVO = gridService.getGridDetailByHouseCode(houseVO.getHouseCode()); |
| | | if (null!= gridVO){ |
| | | houseVO.setGridName(gridVO.getGridName()); |
| | | } |
| | | } |
| | | return page.setRecords(houseVOS); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getHouseStatistics(String code, String roleType,String aoiCode,String buildingCode,String uniCode) { |
| | | public Map<String, Object> getHouseStatistics(String code, String roleType,String aoiCode,String buildingCode,String unitCode) { |
| | | Map<String, Object> objectObjectHashMap = new HashMap<>(); |
| | | if (roleType.equals("1")) { |
| | | // result1 查询楼栋数 result2 查询房屋套数 result3 查询住户数 result4 查询单元数 |
| | | Integer result1 = baseMapper.getHouseStatisticsOne(code, AuthUtil.getUserId(),aoiCode,buildingCode,uniCode); |
| | | Integer result2 = baseMapper.getHouseStatisticsTwo(code, AuthUtil.getUserId(),aoiCode,buildingCode,uniCode); |
| | | Integer result3 = baseMapper.getHouseStatisticsThree(code, AuthUtil.getUserId(),aoiCode,buildingCode,uniCode); |
| | | Integer result4 = baseMapper.getHouseStatisticsFour(code, AuthUtil.getUserId(),aoiCode,buildingCode,uniCode); |
| | | Integer result1 = baseMapper.getHouseStatisticsOne(code, AuthUtil.getUserId(),aoiCode,buildingCode,unitCode); |
| | | Integer result2 = baseMapper.getHouseStatisticsTwo(code, AuthUtil.getUserId(),aoiCode,buildingCode,unitCode); |
| | | Integer result3 = baseMapper.getHouseStatisticsThree(code, AuthUtil.getUserId(),aoiCode,buildingCode,unitCode); |
| | | Integer result4 = baseMapper.getHouseStatisticsFour(code, AuthUtil.getUserId(),aoiCode,buildingCode,unitCode); |
| | | objectObjectHashMap.put("result1", result1); |
| | | objectObjectHashMap.put("result2", result2); |
| | | objectObjectHashMap.put("result3", result3); |
| | | objectObjectHashMap.put("result4", result4); |
| | | } else { |
| | | Integer result1 = baseMapper.getHouseStatisticsOne(code, null,aoiCode,buildingCode,uniCode); |
| | | Integer result2 = baseMapper.getHouseStatisticsTwo(code, null,aoiCode,buildingCode,uniCode); |
| | | Integer result3 = baseMapper.getHouseStatisticsThree(code, null,aoiCode,buildingCode,uniCode); |
| | | Integer result4 = baseMapper.getHouseStatisticsFour(code, null,aoiCode,buildingCode,uniCode); |
| | | Integer result1 = baseMapper.getHouseStatisticsOne(code, null,aoiCode,buildingCode,unitCode); |
| | | Integer result2 = baseMapper.getHouseStatisticsTwo(code, null,aoiCode,buildingCode,unitCode); |
| | | Integer result3 = baseMapper.getHouseStatisticsThree(code, null,aoiCode,buildingCode,unitCode); |
| | | Integer result4 = baseMapper.getHouseStatisticsFour(code, null,aoiCode,buildingCode,unitCode); |
| | | objectObjectHashMap.put("result1", result1); |
| | | objectObjectHashMap.put("result2", result2); |
| | | objectObjectHashMap.put("result3", result3); |