DESKTOP-2K9OVK9\siwei 2 days ago
parent
commit
46e8d08a40

+ 7 - 4
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/TGdbhGdServiceImpl.java

@@ -241,11 +241,14 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
                         Double dr_hou4 = dr_hou;
                         if (i + 5 <= len) {
                             TGdbhFlightDto dto_hou2 = flightDtoList.get(i + 2);
-                            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()));
+                            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) {
                             dr_hou4 = dr_hou + 15;