| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.property.entity.PropertyCompanyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCompanyService; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.mapper.DeptMapper; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | | import org.springblade.modules.system.vo.DeptDetailVO; |
| | | import org.springblade.modules.system.vo.DeptVO; |
| | | import org.springblade.modules.system.wrapper.DeptWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 数据处理(区域网格编号绑定) |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Object dataRegionGridCodeBindHandle() { |
| | | // 查询网格对应的机构信息(包含父级机构名称) |
| | | List<DeptVO> deptVOS = baseMapper.getGridDeptAndParentList(); |
| | | //遍历处理 |
| | | for (DeptVO deptVO : deptVOS) { |
| | | GridEntity gridEntity = SpringUtils.getBean(IGridService.class).getGridByNames(deptVO.getDeptName(),deptVO.getParentName()); |
| | | if (null!=gridEntity){ |
| | | deptVO.setRegionCode(gridEntity.getGridCode()); |
| | | // 更新 |
| | | updateById(deptVO); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |