Commit 877412e99b90a3021a15a373deb5dab583f028ab

Authored by 潘钊
2 parents 635bde76 03747e39

Merge branch 'minhang' into qingpu

# Conflicts:
#	src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfo_input.java
#	src/main/resources/datatools/ktrs/ttinfodetailDataInput.ktr
src/main/java/com/bsth/data/directive/FirstScheduleCheckThread.java
... ... @@ -31,7 +31,8 @@ public class FirstScheduleCheckThread extends Thread{
31 31  
32 32 Logger logger = LoggerFactory.getLogger(this.getClass());
33 33  
34   - private final static long THREE_MINUTES = 1000 * 60 * 3L;
  34 + //提前半小时下发指令
  35 + private final static long THREE_MINUTES = 1000 * 60 * 30L;
35 36  
36 37 @Override
37 38 public void run() {
... ...
src/main/java/com/bsth/data/pilot80/PilotReport.java
... ... @@ -55,7 +55,7 @@ public class PilotReport {
55 55  
56 56 //private static ScheduleComparator.FCNO schComp;
57 57  
58   - private static ArrayListMultimap<Integer, D80> d80MultiMap;
  58 + private static ArrayListMultimap<String, D80> d80MultiMap;
59 59  
60 60 Logger logger = LoggerFactory.getLogger(PilotReport.class);
61 61  
... ... @@ -68,7 +68,7 @@ public class PilotReport {
68 68 //入库
69 69 d80Repository.save(d80);
70 70 //入缓存
71   - d80MultiMap.put(d80.getData().getLineId(), d80);
  71 + d80MultiMap.put(d80.getData().getLineId().toString(), d80);
72 72  
73 73 String nbbm = BasicData.deviceId2NbbmMap.get(d80.getDeviceId());
74 74 //处理
... ... @@ -251,7 +251,7 @@ public class PilotReport {
251 251 * @Description: TODO(根据lineCode 获取未处理的80数据)
252 252 */
253 253 public List<D80> unconfirmed80(Integer lineCode){
254   - List<D80> lineAll = d80MultiMap.get(lineCode)
  254 + List<D80> lineAll = d80MultiMap.get(lineCode.toString())
255 255 ,rs = new ArrayList<>();
256 256  
257 257 for(D80 d80 : lineAll)
... ... @@ -283,7 +283,7 @@ public class PilotReport {
283 283  
284 284 public void clear(String lineCode){
285 285 logger.info("清除 80数据 before: " + d80MultiMap.size());
286   - d80MultiMap.removeAll(Integer.parseInt(lineCode));
  286 + d80MultiMap.removeAll(lineCode);
287 287 logger.info("清除 80数据 after: " + d80MultiMap.size());
288 288 }
289 289  
... ...
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
... ... @@ -437,7 +437,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
437 437 Collections.sort(d80s, new Comparator<D80>() {
438 438 @Override
439 439 public int compare(D80 o1, D80 o2) {
440   - return (int) (o1.getTimestamp() - o2.getTimestamp());
  440 + return (int) (o2.getTimestamp() - o1.getTimestamp());
441 441 }
442 442 });
443 443  
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -315,6 +315,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
315 315 t.setRealExecDate(schDate);
316 316 t.setCreateBy(user);
317 317 t.setSflj(true);
  318 + t.setLate(false);
318 319 //班次历时
319 320 t.setBcsj(DateUtils.calcHHmmDiff(t.getFcsj(), t.getZdsj()) / 1000 / 60);
320 321  
... ...
src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfo_input.java
1   -package com.bsth.service.schedule.rules.ttinfo;
2   -
3   -import com.bsth.entity.schedule.TTInfo;
4   -import org.apache.commons.lang3.StringUtils;
5   -import org.joda.time.DateTime;
6   -import org.joda.time.format.DateTimeFormat;
7   -
8   -import java.util.ArrayList;
9   -import java.util.List;
10   -
11   -/**
12   - * 时刻表_输入
13   - */
14   -public class TTInfo_input implements Comparable<TTInfo_input> {
15   - /** 时刻表id */
16   - private String ttInfoId;
17   - /** 线路Id */
18   - private String xlId;
19   - /** 周一到周日是否启用 */
20   - private List<Boolean> weekdays = new ArrayList<>();
21   - /** 特殊节假日 */
22   - private List<DateTime> specialDays = new ArrayList<>();
23   - /** 最新修改时间 */
24   - private DateTime updateDate;
25   - /** 是否启用 */
26   - private Boolean isEnable;
27   - /** 启用日期 */
28   - private DateTime qyDate;
29   -
30   - public TTInfo_input() {
31   -
32   - }
33   -
34   - @Override
35   - public int compareTo(TTInfo_input ttInfo_input) {
36   - if (ttInfo_input != null) {
37   - if (ttInfo_input.updateDate != null && this.updateDate != null)
38   - return - this.updateDate.compareTo(ttInfo_input.updateDate);
39   - }
40   - return -1;
41   - }
42   -
43   - public TTInfo_input(TTInfo ttInfo) {
44   - this.ttInfoId = String.valueOf(ttInfo.getId());
45   - this.xlId = String.valueOf(ttInfo.getXl().getId());
46   - String[] days = ttInfo.getRule_days().split(",");
47   - System.out.println(days.length);
48   - for (int i = 0; i < 7; i++) {
49   - if ("1".equals(days[i])) {
50   - weekdays.add(true);
51   - } else {
52   - weekdays.add(false);
53   - }
54   - }
55   - if (StringUtils.isNotEmpty(ttInfo.getSpecial_days())) {
56   - String[] sdays = ttInfo.getSpecial_days().split(",");
57   - for (int i = 0; i < sdays.length; i++) {
58   - specialDays.add(DateTimeFormat.forPattern("yyyy-MM-dd").
59   - parseDateTime(sdays[i]));
60   - }
61   - }
62   -
63   - this.updateDate = new DateTime(ttInfo.getUpdateDate());
64   - this.isEnable = ttInfo.getIsEnableDisTemplate();
65   - this.qyDate = new DateTime(ttInfo.getQyrq());
66   -
67   - }
68   -
69   - public String getTtInfoId() {
70   - return ttInfoId;
71   - }
72   -
73   - public void setTtInfoId(String ttInfoId) {
74   - this.ttInfoId = ttInfoId;
75   - }
76   -
77   - public String getXlId() {
78   - return xlId;
79   - }
80   -
81   - public void setXlId(String xlId) {
82   - this.xlId = xlId;
83   - }
84   -
85   - public List<Boolean> getWeekdays() {
86   - return weekdays;
87   - }
88   -
89   - public void setWeekdays(List<Boolean> weekdays) {
90   - this.weekdays = weekdays;
91   - }
92   -
93   - public List<DateTime> getSpecialDays() {
94   - return specialDays;
95   - }
96   -
97   - public void setSpecialDays(List<DateTime> specialDays) {
98   - this.specialDays = specialDays;
99   - }
100   -
101   - public DateTime getUpdateDate() {
102   - return updateDate;
103   - }
104   -
105   - public void setUpdateDate(DateTime updateDate) {
106   - this.updateDate = updateDate;
107   - }
108   -
109   - public Boolean getIsEnable() {
110   - return isEnable;
111   - }
112   -
113   - public void setIsEnable(Boolean isEnable) {
114   - this.isEnable = isEnable;
115   - }
116   -
117   - public DateTime getQyDate() {
118   - return qyDate;
119   - }
120   -
121   - public void setQyDate(DateTime qyDate) {
122   - this.qyDate = qyDate;
123   - }
124   -}
  1 +package com.bsth.service.schedule.rules.ttinfo;
  2 +
  3 +import com.bsth.entity.schedule.TTInfo;
  4 +import org.apache.commons.lang3.StringUtils;
  5 +import org.joda.time.DateTime;
  6 +import org.joda.time.format.DateTimeFormat;
  7 +
  8 +import java.util.ArrayList;
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * 时刻表_输入
  13 + */
  14 +public class TTInfo_input implements Comparable<TTInfo_input> {
  15 + /** 时刻表id */
  16 + private String ttInfoId;
  17 + /** 线路Id */
  18 + private String xlId;
  19 + /** 周一到周日是否启用 */
  20 + private List<Boolean> weekdays = new ArrayList<>();
  21 + /** 特殊节假日 */
  22 + private List<DateTime> specialDays = new ArrayList<>();
  23 + /** 最新修改时间 */
  24 + private DateTime updateDate;
  25 + /** 是否启用 */
  26 + private Boolean isEnable;
  27 + /** 启用日期 */
  28 + private DateTime qyDate;
  29 +
  30 + public TTInfo_input() {
  31 +
  32 + }
  33 +
  34 + @Override
  35 + public int compareTo(TTInfo_input ttInfo_input) {
  36 + if (ttInfo_input != null) {
  37 + if (ttInfo_input.updateDate != null && this.updateDate != null)
  38 + return - this.updateDate.compareTo(ttInfo_input.updateDate);
  39 + }
  40 + return -1;
  41 + }
  42 +
  43 + public TTInfo_input(TTInfo ttInfo) {
  44 + this.ttInfoId = String.valueOf(ttInfo.getId());
  45 + this.xlId = String.valueOf(ttInfo.getXl().getId());
  46 + String[] days = ttInfo.getRule_days().split(",");
  47 + System.out.println(days.length);
  48 + for (int i = 0; i < 7; i++) {
  49 + if ("1".equals(days[i])) {
  50 + weekdays.add(true);
  51 + } else {
  52 + weekdays.add(false);
  53 + }
  54 + }
  55 + if (StringUtils.isNotEmpty(ttInfo.getSpecial_days())) {
  56 + String[] sdays = ttInfo.getSpecial_days().split(",");
  57 + for (int i = 0; i < sdays.length; i++) {
  58 + specialDays.add(DateTimeFormat.forPattern("yyyy-MM-dd").
  59 + parseDateTime(sdays[i]));
  60 + }
  61 + }
  62 +
  63 + this.updateDate = new DateTime(ttInfo.getUpdateDate());
  64 + this.isEnable = ttInfo.getIsEnableDisTemplate();
  65 + this.qyDate = new DateTime(ttInfo.getQyrq());
  66 +
  67 + }
  68 +
  69 + public String getTtInfoId() {
  70 + return ttInfoId;
  71 + }
  72 +
  73 + public void setTtInfoId(String ttInfoId) {
  74 + this.ttInfoId = ttInfoId;
  75 + }
  76 +
  77 + public String getXlId() {
  78 + return xlId;
  79 + }
  80 +
  81 + public void setXlId(String xlId) {
  82 + this.xlId = xlId;
  83 + }
  84 +
  85 + public List<Boolean> getWeekdays() {
  86 + return weekdays;
  87 + }
  88 +
  89 + public void setWeekdays(List<Boolean> weekdays) {
  90 + this.weekdays = weekdays;
  91 + }
  92 +
  93 + public List<DateTime> getSpecialDays() {
  94 + return specialDays;
  95 + }
  96 +
  97 + public void setSpecialDays(List<DateTime> specialDays) {
  98 + this.specialDays = specialDays;
  99 + }
  100 +
  101 + public DateTime getUpdateDate() {
  102 + return updateDate;
  103 + }
  104 +
  105 + public void setUpdateDate(DateTime updateDate) {
  106 + this.updateDate = updateDate;
  107 + }
  108 +
  109 + public Boolean getIsEnable() {
  110 + return isEnable;
  111 + }
  112 +
  113 + public void setIsEnable(Boolean isEnable) {
  114 + this.isEnable = isEnable;
  115 + }
  116 +
  117 + public DateTime getQyDate() {
  118 + return qyDate;
  119 + }
  120 +
  121 + public void setQyDate(DateTime qyDate) {
  122 + this.qyDate = qyDate;
  123 + }
  124 +}
... ...
src/main/java/com/bsth/websocket/handler/RealControlSocketHandler.java
... ... @@ -120,7 +120,7 @@ public class RealControlSocketHandler implements WebSocketHandler {
120 120 user.sendMessage(message);
121 121 }
122 122 } catch (IOException e) {
123   - e.printStackTrace();
  123 + logger.error("sendMessageToLine error ....", e);
124 124 }
125 125 }
126 126 }
... ...
src/main/resources/datatools/ktrs/ttinfodetailDataInput.ktr
... ... @@ -2591,4 +2591,4 @@
2591 2591 </slave-step-copy-partition-distribution>
2592 2592 <slave_transformation>N</slave_transformation>
2593 2593  
2594   -</transformation>
  2594 +</transformation>
2595 2595 \ No newline at end of file
... ...
src/main/resources/static/pages/control/line/index.html
... ... @@ -228,7 +228,7 @@ function countDown(name){
228 228  
229 229 <script>
230 230 var updateLog = {
231   - text: '<div class="updete_log"><p>1、修正因设备状态异常导致的第一个营运班次被跳过问题。</p><p>2、修复发车信息微调报出的“未知异常”问题。</p></div>'
  231 + text: '<div class="updete_log"><p>1、...</p></div>'
232 232 ,title: '2016年8月28号更新日志'
233 233 }
234 234  
... ...