DESKTOP-2K9OVK9\siwei 7 maanden geleden
bovenliggende
commit
4fabc54366

+ 8 - 6
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/TGdbhGdServiceImpl.java

@@ -243,14 +243,16 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
                         }
                         Double dr_hou4 = dr_hou;
                         if (i + 5 <= len) {
-                            TGdbhFlightDto dto_hou2 = flightDtoList.get(i + 2);
-                            dr_hou4 = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou.getLongitude(), dto_hou.getLatitude(), dto_hou2.getLongitude(), dto_hou2.getLatitude()));
                             if (dr_hou4 <= 10) {
-                                TGdbhFlightDto dto_hou3 = flightDtoList.get(i + 3);
-                                dr_hou4 = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou2.getLongitude(), dto_hou2.getLatitude(), dto_hou3.getLongitude(), dto_hou3.getLatitude()));
+                                TGdbhFlightDto dto_hou2 = flightDtoList.get(i + 2);
+                                dr_hou4 = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou.getLongitude(), dto_hou.getLatitude(), dto_hou2.getLongitude(), dto_hou2.getLatitude()));
                                 if (dr_hou4 <= 10) {
-                                    TGdbhFlightDto dto_hou4 = flightDtoList.get(i + 4);
-                                    dr_hou4 = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou3.getLongitude(), dto_hou3.getLatitude(), dto_hou4.getLongitude(), dto_hou4.getLatitude()));
+                                    TGdbhFlightDto dto_hou3 = flightDtoList.get(i + 3);
+                                    dr_hou4 = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou2.getLongitude(), dto_hou2.getLatitude(), dto_hou3.getLongitude(), dto_hou3.getLatitude()));
+                                    if (dr_hou4 <= 10) {
+                                        TGdbhFlightDto dto_hou4 = flightDtoList.get(i + 4);
+                                        dr_hou4 = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou3.getLongitude(), dto_hou3.getLatitude(), dto_hou4.getLongitude(), dto_hou4.getLatitude()));
+                                    }
                                 }
                             }
                         } else if (i + 5 > len) {