| | |
| | | package org.springblade.modules.house.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | |
| | | import org.springblade.modules.house.entity.HouseEntity; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.excel.HouseAndHoldExcel; |
| | | import org.springblade.modules.house.excel.HouseExcel; |
| | | import org.springblade.modules.house.mapper.HouseMapper; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.house.vo.HouseParam; |
| | | import org.springblade.modules.house.vo.HouseTree; |
| | | import org.springblade.modules.house.vo.HouseVO; |
| | | import org.springblade.modules.house.mapper.HouseMapper; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.modules.house.excel.HouseExcel; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 房屋 服务实现类 |
| | |
| | | householdService.save(householdEntity); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getHouseStatistics(String code, String roleType) { |
| | | Map<String, Object> objectObjectHashMap = new HashMap<>(); |
| | | if (roleType.equals("1")) { |
| | | // result1 查询楼栋数 result2 查询房屋套数 result3 查询住户数 result4 查询单元数 |
| | | Integer result1 = baseMapper.getHouseStatisticsOne(code, AuthUtil.getUserId()); |
| | | Integer result2 = baseMapper.getHouseStatisticsTwo(code, AuthUtil.getUserId()); |
| | | Integer result3 = baseMapper.getHouseStatisticsThree(code, AuthUtil.getUserId()); |
| | | Integer result4 = baseMapper.getHouseStatisticsFour(code, AuthUtil.getUserId()); |
| | | objectObjectHashMap.put("result1", result1); |
| | | objectObjectHashMap.put("result2", result2); |
| | | objectObjectHashMap.put("result3", result3); |
| | | objectObjectHashMap.put("result4", result4); |
| | | } else { |
| | | Integer result1 = baseMapper.getHouseStatisticsOne(code, null); |
| | | Integer result2 = baseMapper.getHouseStatisticsTwo(code, null); |
| | | Integer result3 = baseMapper.getHouseStatisticsThree(code, null); |
| | | Integer result4 = baseMapper.getHouseStatisticsFour(code, null); |
| | | objectObjectHashMap.put("result1", result1); |
| | | objectObjectHashMap.put("result2", result2); |
| | | objectObjectHashMap.put("result3", result3); |
| | | objectObjectHashMap.put("result4", result4); |
| | | } |
| | | return objectObjectHashMap; |
| | | } |
| | | } |