Commit 0056063fc2066550e5a58198e4a58decafeaa904
1 parent
f19a4a39
时刻表分析 加一列表头“路牌”
Showing
3 changed files
with
25 additions
and
9 deletions
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| @@ -611,7 +611,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -611,7 +611,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 611 | try { | 611 | try { |
| 612 | 612 | ||
| 613 | String sql = "select schedule_date_str,xl_name,bc_type,gs_name,fgs_name,fgs_bm,bcs," | 613 | String sql = "select schedule_date_str,xl_name,bc_type,gs_name,fgs_name,fgs_bm,bcs," |
| 614 | - +"fcno,fcsj,fcsj_actual,zdsj,zdsj_actual,bcsj,qdz_name,sp_id,cc_service" | 614 | + +"fcno,fcsj,fcsj_actual,zdsj,zdsj_actual,bcsj,qdz_name,sp_id,cc_service,lp_name" |
| 615 | +" from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate | 615 | +" from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate |
| 616 | +"' and schedule_date_str <= '"+endDate+"'"; | 616 | +"' and schedule_date_str <= '"+endDate+"'"; |
| 617 | if(line.length() != 0){ | 617 | if(line.length() != 0){ |
| @@ -650,6 +650,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -650,6 +650,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 650 | schedule.setQdzName(rs.getString("qdz_name")); | 650 | schedule.setQdzName(rs.getString("qdz_name")); |
| 651 | schedule.setSpId(rs.getLong("sp_id")); | 651 | schedule.setSpId(rs.getLong("sp_id")); |
| 652 | schedule.setCcService(rs.getBoolean("cc_service")); | 652 | schedule.setCcService(rs.getBoolean("cc_service")); |
| 653 | + schedule.setLpName(rs.getString("lp_name")); | ||
| 653 | 654 | ||
| 654 | if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){ | 655 | if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){ |
| 655 | schedule.setFcsjActual(null); | 656 | schedule.setFcsjActual(null); |
| @@ -718,7 +719,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -718,7 +719,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 718 | continue; | 719 | continue; |
| 719 | } | 720 | } |
| 720 | 721 | ||
| 721 | - String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj()+"/"+schedule.getFgsBm(); | 722 | + String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj()+"/"+schedule.getFgsBm()+"/"+schedule.getLpName(); |
| 722 | if(model.length() != 0){ | 723 | if(model.length() != 0){ |
| 723 | if(ttSet.contains(schedule.getSpId())){ | 724 | if(ttSet.contains(schedule.getSpId())){ |
| 724 | if(!keyMap.containsKey(key)) | 725 | if(!keyMap.containsKey(key)) |
| @@ -810,6 +811,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -810,6 +811,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 810 | tempMap.put("line", split[0]); | 811 | tempMap.put("line", split[0]); |
| 811 | tempMap.put("qdz", split[1]); | 812 | tempMap.put("qdz", split[1]); |
| 812 | tempMap.put("jhfc", split[2]); | 813 | tempMap.put("jhfc", split[2]); |
| 814 | + tempMap.put("lp", split[4]); | ||
| 813 | tempMap.put("jhbc", jhbc); | 815 | tempMap.put("jhbc", jhbc); |
| 814 | tempMap.put("sjbc", sjbc); | 816 | tempMap.put("sjbc", sjbc); |
| 815 | tempList.add(tempMap); | 817 | tempList.add(tempMap); |
| @@ -819,27 +821,32 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -819,27 +821,32 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 819 | Map<String, List<Map<String, Object>>> listMap = new HashMap<String, List<Map<String, Object>>>(); | 821 | Map<String, List<Map<String, Object>>> listMap = new HashMap<String, List<Map<String, Object>>>(); |
| 820 | Map<String, List<Map<String, Object>>> listMap2 = new HashMap<String, List<Map<String, Object>>>(); | 822 | Map<String, List<Map<String, Object>>> listMap2 = new HashMap<String, List<Map<String, Object>>>(); |
| 821 | for(Map<String, Object> m : tempList){ | 823 | for(Map<String, Object> m : tempList){ |
| 822 | - String key = m.get("line").toString() + m.get("qdz") + m.get("subCompany"); | 824 | + String key = m.get("line").toString() + "/" + m.get("qdz") + "/" + m.get("subCompany"); |
| 823 | if(!listMap.containsKey(key)) | 825 | if(!listMap.containsKey(key)) |
| 824 | listMap.put(key, new ArrayList<Map<String, Object>>()); | 826 | listMap.put(key, new ArrayList<Map<String, Object>>()); |
| 825 | listMap.get(key).add(m); | 827 | listMap.get(key).add(m); |
| 826 | } | 828 | } |
| 827 | for(String key : listMap.keySet()){ | 829 | for(String key : listMap.keySet()){ |
| 828 | - Map<Integer, Map<String, Object>> tempMap = new HashMap<Integer, Map<String,Object>>(); | 830 | + Map<Integer, List<Map<String, Object>>> tempMap = new HashMap<Integer, List<Map<String,Object>>>(); |
| 829 | List<Integer> keyList = new ArrayList<Integer>(); | 831 | List<Integer> keyList = new ArrayList<Integer>(); |
| 830 | for(Map<String, Object> m : listMap.get(key)){ | 832 | for(Map<String, Object> m : listMap.get(key)){ |
| 831 | String[] split = m.get("jhfc").toString().split(":"); | 833 | String[] split = m.get("jhfc").toString().split(":"); |
| 832 | int jhfc = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | 834 | int jhfc = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 833 | - tempMap.put(jhfc, m); | ||
| 834 | - keyList.add(jhfc); | 835 | + if(!tempMap.containsKey(jhfc)){ |
| 836 | + tempMap.put(jhfc, new ArrayList<Map<String, Object>>()); | ||
| 837 | + keyList.add(jhfc); | ||
| 838 | + } | ||
| 839 | + tempMap.get(jhfc).add(m); | ||
| 840 | + | ||
| 835 | } | 841 | } |
| 836 | Collections.sort(keyList); | 842 | Collections.sort(keyList); |
| 837 | for(Integer Int : keyList){ | 843 | for(Integer Int : keyList){ |
| 838 | - Map<String, Object> m = tempMap.get(Int); | 844 | + List<Map<String, Object>> l = tempMap.get(Int); |
| 845 | + Map<String, Object> m = l.get(0); | ||
| 839 | String str = m.get("line").toString(); | 846 | String str = m.get("line").toString(); |
| 840 | if(!listMap2.containsKey(str)) | 847 | if(!listMap2.containsKey(str)) |
| 841 | listMap2.put(str, new ArrayList<Map<String, Object>>()); | 848 | listMap2.put(str, new ArrayList<Map<String, Object>>()); |
| 842 | - listMap2.get(str).add(m); | 849 | + listMap2.get(str).addAll(l); |
| 843 | } | 850 | } |
| 844 | } | 851 | } |
| 845 | for(String str : listMap2.keySet()){ | 852 | for(String str : listMap2.keySet()){ |
| @@ -860,6 +867,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -860,6 +867,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 860 | 867 | ||
| 861 | //导出 | 868 | //导出 |
| 862 | if(type.equals("export")){ | 869 | if(type.equals("export")){ |
| 870 | + for(Map<String, Object> m : resList){ | ||
| 871 | + if(m.get("lp") != null){ | ||
| 872 | + if(m.get("lp").toString().contains("+") || m.get("lp").toString().contains("-")){ | ||
| 873 | + m.put("lp", "\'" + m.get("lp").toString().trim()); | ||
| 874 | + } | ||
| 875 | + } | ||
| 876 | + } | ||
| 863 | String lineName = ""; | 877 | String lineName = ""; |
| 864 | if(map.containsKey("lineName")) | 878 | if(map.containsKey("lineName")) |
| 865 | lineName = map.get("lineName").toString(); | 879 | lineName = map.get("lineName").toString(); |
src/main/resources/static/pages/forms/mould/scheduleAnaly.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| @@ -79,6 +79,7 @@ | @@ -79,6 +79,7 @@ | ||
| 79 | <th width="8%">分公司</th> | 79 | <th width="8%">分公司</th> |
| 80 | <th width="8%">线路</th> | 80 | <th width="8%">线路</th> |
| 81 | <th width="8%">起点站名</th> | 81 | <th width="8%">起点站名</th> |
| 82 | + <th width="6%">路牌</th> | ||
| 82 | <th width="6%">计发时间</th> | 83 | <th width="6%">计发时间</th> |
| 83 | <th width="6%">计划运送时间(分)</th> | 84 | <th width="6%">计划运送时间(分)</th> |
| 84 | <th width="6%">计划完成次数</th> | 85 | <th width="6%">计划完成次数</th> |
| @@ -424,6 +425,7 @@ | @@ -424,6 +425,7 @@ | ||
| 424 | <td>{{obj.subCompany}}</td> | 425 | <td>{{obj.subCompany}}</td> |
| 425 | <td>{{obj.line}}</td> | 426 | <td>{{obj.line}}</td> |
| 426 | <td>{{obj.qdz}}</td> | 427 | <td>{{obj.qdz}}</td> |
| 428 | + <td>{{obj.lp}}</td> | ||
| 427 | <td>{{obj.jhfc}}</td> | 429 | <td>{{obj.jhfc}}</td> |
| 428 | <td>{{obj.bcsj}}</td> | 430 | <td>{{obj.bcsj}}</td> |
| 429 | <td>{{obj.jhbc}}</td> | 431 | <td>{{obj.jhbc}}</td> |
| @@ -438,7 +440,7 @@ | @@ -438,7 +440,7 @@ | ||
| 438 | {{/each}} | 440 | {{/each}} |
| 439 | {{if list.length == 0}} | 441 | {{if list.length == 0}} |
| 440 | <tr> | 442 | <tr> |
| 441 | - <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | 443 | + <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> |
| 442 | </tr> | 444 | </tr> |
| 443 | {{/if}} | 445 | {{/if}} |
| 444 | </script> | 446 | </script> |
| 445 | \ No newline at end of file | 447 | \ No newline at end of file |