jinpengyong
2023-09-08 1f65fd011582ac6587d60475315d2ee6662d9d5b
screen-manage/src/main/java/com/moral/api/service/impl/ManageCoordinateDetailServiceImpl.java
@@ -170,10 +170,15 @@
            String[] rs = data.split("_");
            String flyLon = rs[0];
            String flyLat = rs[1];
//            double lonDouble = Double.parseDouble(flyLon);
//            double latDouble = Double.parseDouble(flyLat);
            for (ManageCoordinateDetail manageCoordinateDetail : manageCoordinateDetails) {
                String latitude = manageCoordinateDetail.getLatitude().toString();
                String longitude = manageCoordinateDetail.getLongitude().toString();
                if (latitude.equals(flyLat) && longitude.equals(flyLon)){
//                double lonDouble1 = Double.parseDouble(longitude);
//                double latDouble1 = Double.parseDouble(latitude);
//                if (latDouble1==latDouble && lonDouble==lonDouble1){
                if (flyLon.equals(longitude) && flyLat.equals(latitude)){
                    manageCoordinateDetail.setCode(data);
                    manageCoordinateDetail.setLongitude(cruiserDTO.getFlyLon());
                    manageCoordinateDetail.setLatitude(cruiserDTO.getFlyLat());
@@ -215,6 +220,7 @@
        int j =0;
        List<ManageCoordinateDetail> manageCoordinateDetails = manageCoordinateDetailMapper.selectList(queryWrapper);
        List<CruiserDTO> cruiserInfo = historySecondCruiserMapper.getCruiserInfo(params);
        cruiserInfo = cruiserInfo.stream().distinct().collect(Collectors.toList());
        if (ObjectUtils.isEmpty(manageCoordinateDetails)){
            for (CruiserDTO cruiserDTO : cruiserInfo) {
                Double flyLat = cruiserDTO.getFlyLat();
@@ -238,7 +244,10 @@
                for (ManageCoordinateDetail manageCoordinateDetail : manageCoordinateDetails) {
                    String latitude = manageCoordinateDetail.getLatitude().toString();
                    String longitude = manageCoordinateDetail.getLongitude().toString();
                    if (latitude.equals(flyLat+"") && longitude.equals(flyLon+"")){
//                    double lonDouble1 = Double.parseDouble(longitude);
//                    double latDouble1 = Double.parseDouble(latitude);
//                    if (lonDouble1==flyLon && flyLat==latDouble1 ){
                    if (longitude.equals(flyLon+"") && latitude.equals(flyLat+"")){
                        cruiserInfo.remove(i);
                        break;
                    }