Quellcode durchsuchen

增加无向船只数据

shs vor 1 Jahr
Ursprung
Commit
647473490b

+ 13 - 9
aidex-system/src/main/java/com/aidex/common/app/server/impl/AppService.java

@@ -102,6 +102,8 @@ public class AppService implements IAppService {
 //            }
 //            locationList.add(locationVO);
 //        }
+        List<LocationEntity> noDir = locationEntities.stream().filter(local -> Double.valueOf(local.getDir()) <= 0).collect(Collectors.toList());
+        calcList.addAll(noDir);
         return  calcList;
     }
 
@@ -262,17 +264,19 @@ public class AppService implements IAppService {
 
             res.setDistSiteNum(distSiteNum);
 
-            // 船只已经停靠入站离我最近的站
-            if (isStopOperation && (mySite != null || shipSite != null)) {
-                if(res.getIsLongStop())
+            if(res.getIsLongStop())
+                res.setStopWharf(wharfShip);
+            else {
+                if(shipSite == null && mySite != null){
+                    res.setStopWharf(wharf);
+                }else {
                     res.setStopWharf(wharfShip);
-                else {
-                    if(shipSite == null && mySite != null){
-                        res.setStopWharf(wharf);
-                    }else {
-                        res.setStopWharf(wharfShip);
-                    }
                 }
+            }
+
+            // 船只已经停靠入站离我最近的站
+            if (isStopOperation && (mySite != null || shipSite != null)) {
+
                 res.setIsArrival(Boolean.TRUE);
                 // 如果离我最近与停靠站点不是同一站点则计算时间
                 if(!wharfShip.getWharfNanme().equals(wharf.getWharfNanme())) {