Commit c9d535101e7e20d7c01aa654fe7eca52570a62ad
Merge branch 'pudong' of http://222.66.0.204:8090//panzhaov5/bsth_control into pudong
Showing
4 changed files
with
23 additions
and
5 deletions
src/main/java/com/bsth/data/directive/DirectivesPstThread.java
| @@ -7,6 +7,8 @@ import com.bsth.entity.directive.Directive; | @@ -7,6 +7,8 @@ import com.bsth.entity.directive.Directive; | ||
| 7 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 7 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 8 | import com.bsth.repository.directive.D60Repository; | 8 | import com.bsth.repository.directive.D60Repository; |
| 9 | import com.bsth.repository.directive.D64Repository; | 9 | import com.bsth.repository.directive.D64Repository; |
| 10 | +import org.joda.time.format.DateTimeFormat; | ||
| 11 | +import org.joda.time.format.DateTimeFormatter; | ||
| 10 | import org.slf4j.Logger; | 12 | import org.slf4j.Logger; |
| 11 | import org.slf4j.LoggerFactory; | 13 | import org.slf4j.LoggerFactory; |
| 12 | import org.springframework.beans.factory.annotation.Autowired; | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -32,6 +34,8 @@ public class DirectivesPstThread extends Thread { | @@ -32,6 +34,8 @@ public class DirectivesPstThread extends Thread { | ||
| 32 | @Autowired | 34 | @Autowired |
| 33 | DayOfSchedule dayOfSchedule; | 35 | DayOfSchedule dayOfSchedule; |
| 34 | 36 | ||
| 37 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | ||
| 38 | + | ||
| 35 | @Override | 39 | @Override |
| 36 | public void run() { | 40 | public void run() { |
| 37 | 41 | ||
| @@ -52,6 +56,8 @@ public class DirectivesPstThread extends Thread { | @@ -52,6 +56,8 @@ public class DirectivesPstThread extends Thread { | ||
| 52 | continue; | 56 | continue; |
| 53 | } | 57 | } |
| 54 | } | 58 | } |
| 59 | + //日期 | ||
| 60 | + d60.setRq(fmtyyyyMMdd.print(d60.getTimestamp())); | ||
| 55 | d60Repository.save(d60); | 61 | d60Repository.save(d60); |
| 56 | } | 62 | } |
| 57 | 63 |
src/main/java/com/bsth/data/gpsdata_v2/cache/GpsCacheData.java
| @@ -9,6 +9,8 @@ import org.slf4j.Logger; | @@ -9,6 +9,8 @@ import org.slf4j.Logger; | ||
| 9 | import org.slf4j.LoggerFactory; | 9 | import org.slf4j.LoggerFactory; |
| 10 | 10 | ||
| 11 | import java.util.*; | 11 | import java.util.*; |
| 12 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 13 | +import java.util.concurrent.ConcurrentMap; | ||
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| 14 | * gps 数据缓存 | 16 | * gps 数据缓存 |
| @@ -17,10 +19,10 @@ import java.util.*; | @@ -17,10 +19,10 @@ import java.util.*; | ||
| 17 | public class GpsCacheData { | 19 | public class GpsCacheData { |
| 18 | 20 | ||
| 19 | /** | 21 | /** |
| 20 | - * 每辆车缓存最后300条gps | 22 | + * 每辆车缓存最后200条gps |
| 21 | */ | 23 | */ |
| 22 | - private static final int CACHE_SIZE = 300; | ||
| 23 | - private static Map<String, CircleQueue<GpsEntity>> gpsCacheMap = new HashMap<>(); | 24 | + private static final int CACHE_SIZE = 200; |
| 25 | + private static ConcurrentMap<String, CircleQueue<GpsEntity>> gpsCacheMap = new ConcurrentHashMap<>(); | ||
| 24 | 26 | ||
| 25 | /** | 27 | /** |
| 26 | * 车辆执行班次的详细 进出站数据 | 28 | * 车辆执行班次的详细 进出站数据 |
src/main/java/com/bsth/entity/directive/Directive.java
| @@ -28,6 +28,8 @@ public class Directive { | @@ -28,6 +28,8 @@ public class Directive { | ||
| 28 | * 时间戳 | 28 | * 时间戳 |
| 29 | */ | 29 | */ |
| 30 | protected Long timestamp; | 30 | protected Long timestamp; |
| 31 | + | ||
| 32 | + private String rq; | ||
| 31 | 33 | ||
| 32 | /** | 34 | /** |
| 33 | * 时间 HH:mm | 35 | * 时间 HH:mm |
| @@ -113,4 +115,12 @@ public class Directive { | @@ -113,4 +115,12 @@ public class Directive { | ||
| 113 | public void setSender(String sender) { | 115 | public void setSender(String sender) { |
| 114 | this.sender = sender; | 116 | this.sender = sender; |
| 115 | } | 117 | } |
| 118 | + | ||
| 119 | + public String getRq() { | ||
| 120 | + return rq; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + public void setRq(String rq) { | ||
| 124 | + this.rq = rq; | ||
| 125 | + } | ||
| 116 | } | 126 | } |
src/main/resources/static/pages/summary/temp_sch_detail/list.html