| | |
| | | query.setProhibitedAreaCountMin(null); |
| | | query.setProhibitedAreaCountMax(null); |
| | | } |
| | | |
| | | public static String getPinyinInitials(String chinese) { |
| | | StringBuilder pinyinInitials = new StringBuilder(); |
| | | for (char c : chinese.toCharArray()) { |
| | |
| | | } |
| | | return pinyinInitials.toString(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | XpElectronicFence electronicFence = this.getById(dto.getId()); |
| | | Integer status = electronicFence.getStatus(); |
| | | |
| | | |
| | | // 更新主表数据 |
| | | XpElectronicFence xpElectronicFence = new XpElectronicFence(); |
| | | BeanUtils.copyProperties(dto, xpElectronicFence); |
| | |
| | | LambdaQueryWrapper<XpPoint> pointLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | pointLambdaQueryWrapper.in(XpPoint::getElectronicAreaId, areaIds).eq(XpPoint::getPointType, 1); |
| | | List<XpPoint> xpPoints = xpPointMapper.selectList(pointLambdaQueryWrapper); |
| | | List<XpPoint> updatePoints = new ArrayList<>(); |
| | | if (!xpPoints.isEmpty()) { |
| | | List<Long> electronicAreaId = xpPoints.stream().map(XpPoint::getElectronicAreaId).distinct().collect(Collectors.toList()); |
| | | if (!electronicAreaId.isEmpty()) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //如果区域状态从停用改为启用,需将区域内的点位全部启用 |
| | | if (status ==3 && dto.getStatus() == 2 && !xpPoints.isEmpty()){ |
| | | for (XpPoint xpPoint : xpPoints) { |
| | | xpPoint.setOperationStatus(2); |
| | | xpPointMapper.updateById(xpPoint); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 计算围栏中心点 |
| | | * |
| | | * @param coordinates |
| | | * @return |
| | | */ |