| | |
| | | ArrayList<String> coordinates = new ArrayList<>(); |
| | | List<Point> points = polygon.getPoints().getPoints(); |
| | | for (Point point : points) { |
| | | coordinates.add( point.getY()+","+point.getX() ); |
| | | coordinates.add( point.getX()+","+point.getY() ); |
| | | } |
| | | String collect = coordinates.stream().collect(Collectors.joining(";")); |
| | | if (ElectricFenceUtil.areaMonitoring(collect, dto.getLatitude()+","+dto.getLongitude())) { |
| | | if (ElectricFenceUtil.areaMonitoring(collect, dto.getLongitude()+","+dto.getLatitude())) { |
| | | String fenceId = polygon.getFenceId(); |
| | | XpElectronicFence xpElectronicFence = xpElectronicFenceMapper.selectById(fenceId); |
| | | if(xpElectronicFence!=null){ |