|
@@ -164,17 +164,16 @@ public class TmsshipShipLocationController extends BaseRESTfulController {
|
|
|
if(columnList != null && !columnList.isEmpty()) {
|
|
|
for (Map<String, Object> map : columnList) {
|
|
|
String locationRouteTime = map.get("locationRouteTime").toString();
|
|
|
- if(locationRouteTime != null && !"".equals(locationRouteTime) ){
|
|
|
+ if(locationRouteTime != null && !locationRouteTime.isEmpty()){
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
Date locationRouteTimeDate = sdf.parse(locationRouteTime);
|
|
|
long starTime=locationRouteTimeDate.getTime();
|
|
|
long endTime=(new Date()).getTime();
|
|
|
long num=endTime-starTime;//时间戳相差的毫秒数
|
|
|
- System.out.println("相差天数为:"+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");
|
|
|
}
|
|
|
}
|
|
|
}
|