Commit 6d293f6ba9a72242a3403e38ee95219195a74e30

Authored by 娄高锋
1 parent b690e4c1

公司统计项添加几个新的分公司;到离站信号排班时判断下一个信号是否同车同站。

src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -230,11 +230,15 @@ public class ReportServiceImpl implements ReportService{ @@ -230,11 +230,15 @@ public class ReportServiceImpl implements ReportService{
230 t1.setJzsj(sdf.format(new Date(t1.getTs()))); 230 t1.setJzsj(sdf.format(new Date(t1.getTs())));
231 for(int j=0;j<lists.size();j++){ 231 for(int j=0;j<lists.size();j++){
232 ArrivalInfo t2=lists.get(j); 232 ArrivalInfo t2=lists.get(j);
233 - if(t2.getInOut()==1 && t2.getDeviceId().equals(t1.getDeviceId()) 233 + if(t2.getDeviceId().equals(t1.getDeviceId())
234 && t2.getStopNo().equals(t1.getStopNo()) 234 && t2.getStopNo().equals(t1.getStopNo())
235 && t2.getTs()>t1.getTs()){ 235 && t2.getTs()>t1.getTs()){
236 - t1.setCzsj(sdf.format(new Date(t2.getTs())));  
237 - break; 236 + if(t2.getInOut() == 1){//下一个同站同车是出站信号则获取出站时间
  237 + t1.setCzsj(sdf.format(new Date(t2.getTs())));
  238 + break;//下一个同站同车是进站信号则认为出站信号丢失
  239 + } else if(t2.getInOut() == 0){
  240 + break;
  241 + }
238 } 242 }
239 } 243 }
240 list.add(t1); 244 list.add(t1);
@@ -2567,6 +2571,14 @@ public class ReportServiceImpl implements ReportService{ @@ -2567,6 +2571,14 @@ public class ReportServiceImpl implements ReportService{
2567 2571
2568 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); 2572 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>();
2569 Map<String, Object> temp = new HashMap<String, Object>(); 2573 Map<String, Object> temp = new HashMap<String, Object>();
  2574 +
  2575 + temp = new HashMap<String, Object>();
  2576 + temp.put("gsName", "杨高");temp.put("fgsName", "一分");temp.put("key", "05_11");
  2577 + resList.add(temp);keyMap.put("05_11", temp);
  2578 + temp = new HashMap<String, Object>();
  2579 + temp.put("gsName", "杨高");temp.put("fgsName", "二分");temp.put("key", "05_12");
  2580 + resList.add(temp);keyMap.put("05_12", temp);
  2581 + temp = new HashMap<String, Object>();
2570 temp.put("gsName", "杨高");temp.put("fgsName", "杨高分");temp.put("key", "05_5"); 2582 temp.put("gsName", "杨高");temp.put("fgsName", "杨高分");temp.put("key", "05_5");
2571 resList.add(temp);keyMap.put("05_5", temp); 2583 resList.add(temp);keyMap.put("05_5", temp);
2572 temp = new HashMap<String, Object>(); 2584 temp = new HashMap<String, Object>();
@@ -2615,6 +2627,15 @@ public class ReportServiceImpl implements ReportService{ @@ -2615,6 +2627,15 @@ public class ReportServiceImpl implements ReportService{
2615 resList.add(temp);keyMap.put("22_sum", temp); 2627 resList.add(temp);keyMap.put("22_sum", temp);
2616 2628
2617 temp = new HashMap<String, Object>(); 2629 temp = new HashMap<String, Object>();
  2630 + temp.put("gsName", "南汇");temp.put("fgsName", "川沙");temp.put("key", "26_11");
  2631 + resList.add(temp);keyMap.put("26_11", temp);
  2632 + temp = new HashMap<String, Object>();
  2633 + temp.put("gsName", "南汇");temp.put("fgsName", "新场");temp.put("key", "26_12");
  2634 + resList.add(temp);keyMap.put("26_12", temp);
  2635 + temp = new HashMap<String, Object>();
  2636 + temp.put("gsName", "南汇");temp.put("fgsName", "惠南");temp.put("key", "26_13");
  2637 + resList.add(temp);keyMap.put("26_13", temp);
  2638 + temp = new HashMap<String, Object>();
2618 temp.put("gsName", "南汇");temp.put("fgsName", "一分");temp.put("key", "26_1"); 2639 temp.put("gsName", "南汇");temp.put("fgsName", "一分");temp.put("key", "26_1");
2619 resList.add(temp);keyMap.put("26_1", temp); 2640 resList.add(temp);keyMap.put("26_1", temp);
2620 temp = new HashMap<String, Object>(); 2641 temp = new HashMap<String, Object>();
@@ -2624,6 +2645,9 @@ public class ReportServiceImpl implements ReportService{ @@ -2624,6 +2645,9 @@ public class ReportServiceImpl implements ReportService{
2624 temp.put("gsName", "南汇");temp.put("fgsName", "三分");temp.put("key", "26_3"); 2645 temp.put("gsName", "南汇");temp.put("fgsName", "三分");temp.put("key", "26_3");
2625 resList.add(temp);keyMap.put("26_3", temp); 2646 resList.add(temp);keyMap.put("26_3", temp);
2626 temp = new HashMap<String, Object>(); 2647 temp = new HashMap<String, Object>();
  2648 + temp.put("gsName", "南汇");temp.put("fgsName", "五分");temp.put("key", "26_7");
  2649 + resList.add(temp);keyMap.put("26_7", temp);
  2650 + temp = new HashMap<String, Object>();
2627 temp.put("gsName", "南汇");temp.put("fgsName", "六分");temp.put("key", "26_6"); 2651 temp.put("gsName", "南汇");temp.put("fgsName", "六分");temp.put("key", "26_6");
2628 resList.add(temp);keyMap.put("26_6", temp); 2652 resList.add(temp);keyMap.put("26_6", temp);
2629 temp = new HashMap<String, Object>(); 2653 temp = new HashMap<String, Object>();