瀏覽代碼

船舶动态表增加提醒

shxiaoc 1 年之前
父節點
當前提交
ce8dba474f
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/main/java/com/steerinfo/dil/controller/TmsshipShipLocationController.java

+ 3 - 4
src/main/java/com/steerinfo/dil/controller/TmsshipShipLocationController.java

@@ -164,17 +164,16 @@ public class TmsshipShipLocationController extends BaseRESTfulController {
         if(columnList != null && !columnList.isEmpty()) {
         if(columnList != null && !columnList.isEmpty()) {
             for (Map<String, Object> map : columnList) {
             for (Map<String, Object> map : columnList) {
                 String locationRouteTime = map.get("locationRouteTime").toString();
                 String locationRouteTime = map.get("locationRouteTime").toString();
-                if(locationRouteTime != null && !"".equals(locationRouteTime) ){
+                if(locationRouteTime != null && !locationRouteTime.isEmpty()){
                     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                     Date locationRouteTimeDate = sdf.parse(locationRouteTime);
                     Date locationRouteTimeDate = sdf.parse(locationRouteTime);
                     long starTime=locationRouteTimeDate.getTime();
                     long starTime=locationRouteTimeDate.getTime();
                     long endTime=(new Date()).getTime();
                     long endTime=(new Date()).getTime();
                     long num=endTime-starTime;//时间戳相差的毫秒数
                     long num=endTime-starTime;//时间戳相差的毫秒数
-                    System.out.println("相差天数为:"+num/24/60/60/1000);
                     //超过15天提醒
                     //超过15天提醒
                     if((num/(24*60*60*1000)) > 15){
                     if((num/(24*60*60*1000)) > 15){
-                        list.add(""+ map.get("materialName") +" \""+ map.get("foreignShipName") +"\" "+map.get("capacityName")
-                                +" 离岗日期"+ map.get("locationRouteTime") +" 离岗已超过十五天,请确定船舶状态;          ");
+                        list.add(map.get("materialName") +" \""+ map.get("foreignShipName") +"\" "+map.get("capacityName")
+                                +" 离港日期"+ map.get("locationRouteTime") +" 离港已超过十五天,请确定船舶状态;\r\r\r\r\r");
                     }
                     }
                 }
                 }
             }
             }