| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.utils.IdUtils; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.common.utils.SpringUtils; |
| | |
| | | import org.springblade.modules.house.vo.HouseVO; |
| | | import org.springblade.modules.label.entity.LabelEntity; |
| | | import org.springblade.modules.label.service.ILabelService; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private IGridRangeService gridRangeService; |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Override |
| | | public IPage<HouseVO> selectHousePage(IPage<HouseVO> page, HouseVO house) { |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null != dept) { |
| | | house.setRegionCode(dept.getRegionCode()); |
| | | } |
| | | List<HouseVO> houseVOS = baseMapper.selectHousePage(page, house); |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | List<HouseVO> houseVOS = baseMapper.selectHousePage(page, house,regionChildCodesList,isAdministrator); |
| | | // 遍历查询网格 |
| | | // for (HouseVO houseVO : houseVOS) { |
| | | // // 设置对应的网格名称 |
| | |
| | | } |
| | | // 户籍类型 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getResidentType())){ |
| | | householdEntity.setResidentType(Integer.parseInt(houseAndHoldExcel.getResidentType())); |
| | | householdEntity.setResidentType(Integer.parseInt(houseAndHoldExcel.getResidentType().trim())); |
| | | } |
| | | // 户籍地区县 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getResidentAdcode())){ |
| | |
| | | userHouseLabelEntity.setLabelId(BigDecimal.valueOf(one1.getId()).longValue()); |
| | | userHouseLabelEntity.setHouseholdId(householdEntity.getId()); |
| | | // 设置默认的绿色 |
| | | userHouseLabelEntity.setColor("#30D17C"); |
| | | userHouseLabelEntity.setColor("green"); |
| | | userHouseLabelEntity.setLableType(1); |
| | | userHouseLabelEntity.setLabelName(s); |
| | | userHouseLabelEntity.setHouseCode(houseAndHoldExcel.getHouseCode()); |
| | |
| | | userHouseLabelEntity.setLableType(1); |
| | | userHouseLabelEntity.setLabelName(s); |
| | | // 设置默认的绿色 |
| | | userHouseLabelEntity.setColor("#30D17C"); |
| | | userHouseLabelEntity.setColor("green"); |
| | | userHouseLabelEntity.setHouseCode(houseAndHoldExcel.getHouseCode()); |
| | | bean.save(userHouseLabelEntity); |
| | | } |
| | |
| | | } |
| | | return objectObjectHashMap; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getHouseBuilding(String districtCode) { |
| | | return baseMapper.getHouseBuilding(districtCode); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getHouseUnit(String districtCode, String building) { |
| | | return baseMapper.getHouseUnit(districtCode, building); |
| | | } |
| | | } |