Commit 5fef2d7b12b74f8c7e6f1f1323780215e38ac78d
Merge branch 'pudong' of 192.168.168.201:panzhaov5/bsth_control into pudong
Showing
22 changed files
with
678 additions
and
151 deletions
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -215,7 +215,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -215,7 +215,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 215 | 215 | ||
| 216 | if(model.length() != 0){ | 216 | if(model.length() != 0){ |
| 217 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; | 217 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; |
| 218 | - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | 218 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'" + |
| 219 | + " and bc_type != 'ldks' and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | ||
| 219 | 220 | ||
| 220 | ttList = jdbcTemplate.query(sql, | 221 | ttList = jdbcTemplate.query(sql, |
| 221 | new RowMapper<Long>(){ | 222 | new RowMapper<Long>(){ |
| @@ -1843,7 +1844,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -1843,7 +1844,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 1843 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("气候") != -1){ | 1844 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("气候") != -1){ |
| 1844 | qhbc++; | 1845 | qhbc++; |
| 1845 | // qhlc = qhlc.add(lc); | 1846 | // qhlc = qhlc.add(lc); |
| 1846 | - }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("外援") != -1){ | 1847 | + }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("援外") != -1){ |
| 1847 | wybc++; | 1848 | wybc++; |
| 1848 | // wylc = wylc.add(lc); | 1849 | // wylc = wylc.add(lc); |
| 1849 | } else { | 1850 | } else { |
| @@ -3003,6 +3004,27 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -3003,6 +3004,27 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 3003 | tempMap.put("zdzdl", (bcs>0?df.format((double)zdzd/bcs*100):0)+"%"); | 3004 | tempMap.put("zdzdl", (bcs>0?df.format((double)zdzd/bcs*100):0)+"%"); |
| 3004 | resList.add(tempMap); | 3005 | resList.add(tempMap); |
| 3005 | } | 3006 | } |
| 3007 | + | ||
| 3008 | + if(map.containsKey("type") && map.get("type").toString().equals("export")){ | ||
| 3009 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 3010 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 3011 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 3012 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 3013 | + ReportUtils ee = new ReportUtils(); | ||
| 3014 | + try { | ||
| 3015 | + listI.add(resList.iterator()); | ||
| 3016 | + m.put("date1", startDate); | ||
| 3017 | + m.put("date2", endDate); | ||
| 3018 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 3019 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime.xls", | ||
| 3020 | + path+"export/发车到站准点率" + sdfSimple.format(sdfMonth.parse(startDate)) + | ||
| 3021 | + (startDate.equals(endDate)?"":"-"+sdfSimple.format(sdfMonth.parse(endDate))) + ".xls"); | ||
| 3022 | + } catch (Exception e) { | ||
| 3023 | + // TODO: handle exception | ||
| 3024 | + e.printStackTrace(); | ||
| 3025 | + } | ||
| 3026 | + } | ||
| 3027 | + | ||
| 3006 | } else if(map.get("flag").toString().trim().equals("1")) { | 3028 | } else if(map.get("flag").toString().trim().equals("1")) { |
| 3007 | for(String xl : keyMap.keySet()){ | 3029 | for(String xl : keyMap.keySet()){ |
| 3008 | List<List<Map<String, Object>>> list1 = keyMap.get(xl); | 3030 | List<List<Map<String, Object>>> list1 = keyMap.get(xl); |
| @@ -3031,17 +3053,61 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -3031,17 +3053,61 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 3031 | resList.add(tempMap); | 3053 | resList.add(tempMap); |
| 3032 | } | 3054 | } |
| 3033 | } | 3055 | } |
| 3056 | + | ||
| 3057 | + if(map.containsKey("type") && map.get("type").toString().equals("export")){ | ||
| 3058 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 3059 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 3060 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 3061 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 3062 | + ReportUtils ee = new ReportUtils(); | ||
| 3063 | + try { | ||
| 3064 | + listI.add(resList.iterator()); | ||
| 3065 | + m.put("date1", startDate); | ||
| 3066 | + m.put("date2", endDate); | ||
| 3067 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 3068 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime1.xls", | ||
| 3069 | + path+"export/发车到站准点率明细.xls"); | ||
| 3070 | + } catch (Exception e) { | ||
| 3071 | + // TODO: handle exception | ||
| 3072 | + e.printStackTrace(); | ||
| 3073 | + } | ||
| 3074 | + } | ||
| 3075 | + | ||
| 3034 | } else if(map.get("flag").toString().trim().equals("2")) { | 3076 | } else if(map.get("flag").toString().trim().equals("2")) { |
| 3077 | + int i = 0; | ||
| 3035 | for(String xl : keyMap.keySet()){ | 3078 | for(String xl : keyMap.keySet()){ |
| 3036 | List<List<Map<String, Object>>> list1 = keyMap.get(xl); | 3079 | List<List<Map<String, Object>>> list1 = keyMap.get(xl); |
| 3037 | if(list1.size() == 0 || list1.get(0).size() == 0) | 3080 | if(list1.size() == 0 || list1.get(0).size() == 0) |
| 3038 | continue; | 3081 | continue; |
| 3039 | for(List<Map<String, Object>> list2 : list1){ | 3082 | for(List<Map<String, Object>> list2 : list1){ |
| 3040 | for(Map<String, Object> m : list2){ | 3083 | for(Map<String, Object> m : list2){ |
| 3084 | + m.put("no", ++i); | ||
| 3085 | + if(m.containsKey("line")) | ||
| 3086 | + line = m.get("line").toString(); | ||
| 3041 | resList.add(m); | 3087 | resList.add(m); |
| 3042 | } | 3088 | } |
| 3043 | } | 3089 | } |
| 3044 | } | 3090 | } |
| 3091 | + | ||
| 3092 | + if(map.containsKey("type") && map.get("type").toString().equals("export")){ | ||
| 3093 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 3094 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 3095 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 3096 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 3097 | + ReportUtils ee = new ReportUtils(); | ||
| 3098 | + try { | ||
| 3099 | + listI.add(resList.iterator()); | ||
| 3100 | + m.put("date", startDate); | ||
| 3101 | + m.put("line", line); | ||
| 3102 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 3103 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime2.xls", | ||
| 3104 | + path+"export/发车到站准点率详细"+sdfSimple.format(sdfMonth.parse(startDate))+".xls"); | ||
| 3105 | + } catch (Exception e) { | ||
| 3106 | + // TODO: handle exception | ||
| 3107 | + e.printStackTrace(); | ||
| 3108 | + } | ||
| 3109 | + } | ||
| 3110 | + | ||
| 3045 | } | 3111 | } |
| 3046 | 3112 | ||
| 3047 | return resList; | 3113 | return resList; |
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java
| @@ -44,6 +44,7 @@ import com.bsth.util.BatchSaveUtils; | @@ -44,6 +44,7 @@ import com.bsth.util.BatchSaveUtils; | ||
| 44 | import com.bsth.util.ComparableChild; | 44 | import com.bsth.util.ComparableChild; |
| 45 | import com.bsth.util.ComparableReal; | 45 | import com.bsth.util.ComparableReal; |
| 46 | import com.bsth.util.ReportRelatedUtils; | 46 | import com.bsth.util.ReportRelatedUtils; |
| 47 | +import com.bsth.util.ReportUtils; | ||
| 47 | import com.google.common.util.concurrent.AbstractScheduledService.Scheduler; | 48 | import com.google.common.util.concurrent.AbstractScheduledService.Scheduler; |
| 48 | 49 | ||
| 49 | @Service | 50 | @Service |
| @@ -611,6 +612,24 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -611,6 +612,24 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 611 | } | 612 | } |
| 612 | 613 | ||
| 613 | } | 614 | } |
| 615 | + | ||
| 616 | + if(map.containsKey("type") && map.get("type").toString().equals("export")){ | ||
| 617 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 618 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 619 | + m.put("date", date); | ||
| 620 | + m.put("endDate", endDate); | ||
| 621 | + ReportUtils ee = new ReportUtils(); | ||
| 622 | + try { | ||
| 623 | + listI.add(listmap.iterator()); | ||
| 624 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 625 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "sheetList.xls", | ||
| 626 | + path + "export/发车准点率"+date.replaceAll("-", "")+"-"+endDate.replaceAll("-", "")+".xls"); | ||
| 627 | + } catch (Exception e) { | ||
| 628 | + // TODO: handle exception | ||
| 629 | + e.printStackTrace(); | ||
| 630 | + } | ||
| 631 | + } | ||
| 632 | + | ||
| 614 | return listmap; | 633 | return listmap; |
| 615 | } | 634 | } |
| 616 | 635 | ||
| @@ -738,7 +757,33 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -738,7 +757,33 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 738 | // TODO Auto-generated catch block | 757 | // TODO Auto-generated catch block |
| 739 | e.printStackTrace(); | 758 | e.printStackTrace(); |
| 740 | } | 759 | } |
| 741 | - | 760 | + } |
| 761 | + | ||
| 762 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 763 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 764 | + ReportUtils ee = new ReportUtils(); | ||
| 765 | + try { | ||
| 766 | + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | ||
| 767 | + for(int i = 0; i < list.size(); i++){ | ||
| 768 | + Map<String, Object> temp = new HashMap<String, Object>(); | ||
| 769 | + Sheet s = list.get(i); | ||
| 770 | + temp.put("id", i+1); | ||
| 771 | + temp.put("date", s.getDate()); | ||
| 772 | + temp.put("line", s.getLine()); | ||
| 773 | + temp.put("zdname", s.getZdname()); | ||
| 774 | + temp.put("jhsj", s.getJhsj()); | ||
| 775 | + temp.put("sjsj", s.getSjsj()); | ||
| 776 | + temp.put("sfzd", s.getSfzd()); | ||
| 777 | + tempList.add(temp); | ||
| 778 | + } | ||
| 779 | + listI.add(tempList.iterator()); | ||
| 780 | + m.put("date", sheet.getDate()); | ||
| 781 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 782 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/sheetList2.xls", | ||
| 783 | + path + "export/发车准点率"+sheet.getDate().replaceAll("-", "")+".xls"); | ||
| 784 | + } catch (Exception e) { | ||
| 785 | + // TODO: handle exception | ||
| 786 | + e.printStackTrace(); | ||
| 742 | } | 787 | } |
| 743 | 788 | ||
| 744 | return list; | 789 | return list; |
| @@ -800,6 +845,24 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -800,6 +845,24 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 800 | listmap.add(newmap); | 845 | listmap.add(newmap); |
| 801 | } | 846 | } |
| 802 | } | 847 | } |
| 848 | + | ||
| 849 | + if(map.containsKey("type") && map.get("type").toString().equals("export")){ | ||
| 850 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 851 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 852 | + m.put("date", date); | ||
| 853 | + m.put("endDate", endDate); | ||
| 854 | + ReportUtils ee = new ReportUtils(); | ||
| 855 | + try { | ||
| 856 | + listI.add(listmap.iterator()); | ||
| 857 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 858 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "sheetList1.xls", | ||
| 859 | + path + "export/发车准点率"+date.replaceAll("-", "")+"-"+endDate.replaceAll("-", "")+".xls"); | ||
| 860 | + } catch (Exception e) { | ||
| 861 | + // TODO: handle exception | ||
| 862 | + e.printStackTrace(); | ||
| 863 | + } | ||
| 864 | + } | ||
| 865 | + | ||
| 803 | return listmap; | 866 | return listmap; |
| 804 | } | 867 | } |
| 805 | 868 |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| @@ -636,8 +636,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -636,8 +636,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 636 | 636 | ||
| 637 | if(model.length() != 0){ | 637 | if(model.length() != 0){ |
| 638 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; | 638 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; |
| 639 | - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | ||
| 640 | - | 639 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'" + |
| 640 | + " and bc_type != 'ldks' and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | ||
| 641 | + | ||
| 641 | ttList = jdbcTemplate.query(sql, | 642 | ttList = jdbcTemplate.query(sql, |
| 642 | new RowMapper<Long>(){ | 643 | new RowMapper<Long>(){ |
| 643 | @Override | 644 | @Override |
| @@ -1208,7 +1209,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1208,7 +1209,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1208 | try { | 1209 | try { |
| 1209 | long qyrq = sdf.parse(m.get("qyrq").toString()).getTime(); | 1210 | long qyrq = sdf.parse(m.get("qyrq").toString()).getTime(); |
| 1210 | if(qyrq > date2.getTime()) | 1211 | if(qyrq > date2.getTime()) |
| 1211 | - break; | 1212 | + break DO; |
| 1212 | } catch (ParseException e) { | 1213 | } catch (ParseException e) { |
| 1213 | // TODO Auto-generated catch block | 1214 | // TODO Auto-generated catch block |
| 1214 | e.printStackTrace(); | 1215 | e.printStackTrace(); |
| @@ -1344,7 +1345,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1344,7 +1345,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1344 | tempMap.put("date", date.substring(5)); | 1345 | tempMap.put("date", date.substring(5)); |
| 1345 | tempMap.put("line", xlName); | 1346 | tempMap.put("line", xlName); |
| 1346 | List<Long> up1 = new ArrayList<Long>(); | 1347 | List<Long> up1 = new ArrayList<Long>(); |
| 1347 | - List<Long> up2 = new ArrayList<Long>();; | 1348 | + List<Long> up2 = new ArrayList<Long>(); |
| 1348 | List<Long> dn1 = new ArrayList<Long>(); | 1349 | List<Long> dn1 = new ArrayList<Long>(); |
| 1349 | List<Long> dn2 = new ArrayList<Long>(); | 1350 | List<Long> dn2 = new ArrayList<Long>(); |
| 1350 | Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>(); | 1351 | Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>(); |
| @@ -1484,7 +1485,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1484,7 +1485,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1484 | } | 1485 | } |
| 1485 | 1486 | ||
| 1486 | try { | 1487 | try { |
| 1487 | - String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," | 1488 | + String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_bm, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," |
| 1488 | + " a.cc_service, a.remarks, a.adjust_exps, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" | 1489 | + " a.cc_service, a.remarks, a.adjust_exps, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" |
| 1489 | + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'" | 1490 | + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'" |
| 1490 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; | 1491 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| @@ -1501,6 +1502,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1501,6 +1502,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1501 | schedule.setScheduleDateStr(rs.getString("schedule_date_str")); | 1502 | schedule.setScheduleDateStr(rs.getString("schedule_date_str")); |
| 1502 | schedule.setRealExecDate(rs.getString("real_exec_date")); | 1503 | schedule.setRealExecDate(rs.getString("real_exec_date")); |
| 1503 | schedule.setXlName(rs.getString("xl_name")); | 1504 | schedule.setXlName(rs.getString("xl_name")); |
| 1505 | + schedule.setXlBm(rs.getString("xl_bm")); | ||
| 1504 | schedule.setFcsj(rs.getString("fcsj")); | 1506 | schedule.setFcsj(rs.getString("fcsj")); |
| 1505 | schedule.setFcsjActual(rs.getString("fcsj_actual")); | 1507 | schedule.setFcsjActual(rs.getString("fcsj_actual")); |
| 1506 | schedule.setZdsj(rs.getString("zdsj")); | 1508 | schedule.setZdsj(rs.getString("zdsj")); |
| @@ -1552,6 +1554,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1552,6 +1554,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1552 | } | 1554 | } |
| 1553 | 1555 | ||
| 1554 | Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>(); | 1556 | Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>(); |
| 1557 | + Map<String, String> xlMap = new HashMap<String, String>(); | ||
| 1555 | String companyName = "", subCompanyName = ""; | 1558 | String companyName = "", subCompanyName = ""; |
| 1556 | 1559 | ||
| 1557 | for(ScheduleRealInfo s : list){ | 1560 | for(ScheduleRealInfo s : list){ |
| @@ -1569,6 +1572,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1569,6 +1572,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1569 | companyName = s.getGsName(); | 1572 | companyName = s.getGsName(); |
| 1570 | if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | 1573 | if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) |
| 1571 | subCompanyName = s.getFgsName(); | 1574 | subCompanyName = s.getFgsName(); |
| 1575 | + xlMap.put(xlName, s.getXlBm()); | ||
| 1572 | } | 1576 | } |
| 1573 | 1577 | ||
| 1574 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); | 1578 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| @@ -1589,9 +1593,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1589,9 +1593,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1589 | String date = dateMap.get(l); | 1593 | String date = dateMap.get(l); |
| 1590 | Map<String, Object> temp = new HashMap<String, Object>(); | 1594 | Map<String, Object> temp = new HashMap<String, Object>(); |
| 1591 | temp.put("date", date.substring(5)); | 1595 | temp.put("date", date.substring(5)); |
| 1596 | + temp.put("dates", date); | ||
| 1592 | temp.put("line", xlName); | 1597 | temp.put("line", xlName); |
| 1598 | + temp.put("xlbm", xlMap.get(xlName)); | ||
| 1593 | List<Long> up1 = new ArrayList<Long>(); | 1599 | List<Long> up1 = new ArrayList<Long>(); |
| 1594 | - List<Long> up2 = new ArrayList<Long>();; | 1600 | + List<Long> up2 = new ArrayList<Long>(); |
| 1595 | List<Long> dn1 = new ArrayList<Long>(); | 1601 | List<Long> dn1 = new ArrayList<Long>(); |
| 1596 | List<Long> dn2 = new ArrayList<Long>(); | 1602 | List<Long> dn2 = new ArrayList<Long>(); |
| 1597 | Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>(); | 1603 | Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>(); |
| @@ -1638,6 +1644,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1638,6 +1644,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1638 | } else { | 1644 | } else { |
| 1639 | Map<String, Object> m = new HashMap<String, Object>(); | 1645 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1640 | m.put("date", date.substring(5)); | 1646 | m.put("date", date.substring(5)); |
| 1647 | + m.put("dates", date); | ||
| 1641 | m.put("line", xlName); | 1648 | m.put("line", xlName); |
| 1642 | m.put("firstOrLast", "上行首发"); | 1649 | m.put("firstOrLast", "上行首发"); |
| 1643 | m.put("qdz", s1.getQdzName()); | 1650 | m.put("qdz", s1.getQdzName()); |
| @@ -1654,6 +1661,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1654,6 +1661,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1654 | } else { | 1661 | } else { |
| 1655 | Map<String, Object> m = new HashMap<String, Object>(); | 1662 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1656 | m.put("date", date.substring(5)); | 1663 | m.put("date", date.substring(5)); |
| 1664 | + m.put("dates", date); | ||
| 1657 | m.put("line", xlName); | 1665 | m.put("line", xlName); |
| 1658 | m.put("firstOrLast", "上行末发"); | 1666 | m.put("firstOrLast", "上行末发"); |
| 1659 | m.put("qdz", s3.getQdzName()); | 1667 | m.put("qdz", s3.getQdzName()); |
| @@ -1698,6 +1706,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1698,6 +1706,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1698 | } else { | 1706 | } else { |
| 1699 | Map<String, Object> m = new HashMap<String, Object>(); | 1707 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1700 | m.put("date", date.substring(5)); | 1708 | m.put("date", date.substring(5)); |
| 1709 | + m.put("dates", date); | ||
| 1701 | m.put("line", xlName); | 1710 | m.put("line", xlName); |
| 1702 | m.put("firstOrLast", "下行首发"); | 1711 | m.put("firstOrLast", "下行首发"); |
| 1703 | m.put("qdz", s1.getQdzName()); | 1712 | m.put("qdz", s1.getQdzName()); |
| @@ -1715,6 +1724,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1715,6 +1724,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1715 | } else { | 1724 | } else { |
| 1716 | Map<String, Object> m = new HashMap<String, Object>(); | 1725 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1717 | m.put("date", date.substring(5)); | 1726 | m.put("date", date.substring(5)); |
| 1727 | + m.put("dates", date); | ||
| 1718 | m.put("line", xlName); | 1728 | m.put("line", xlName); |
| 1719 | m.put("firstOrLast", "下行末发"); | 1729 | m.put("firstOrLast", "下行末发"); |
| 1720 | m.put("qdz", s3.getQdzName()); | 1730 | m.put("qdz", s3.getQdzName()); |
| @@ -1744,8 +1754,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1744,8 +1754,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1744 | tempMap.put("map", tempList); | 1754 | tempMap.put("map", tempList); |
| 1745 | tempMap.put("company", companyName); | 1755 | tempMap.put("company", companyName); |
| 1746 | tempMap.put("subCompany", subCompanyName); | 1756 | tempMap.put("subCompany", subCompanyName); |
| 1747 | - tempMap.put("date", dates); | 1757 | + tempMap.put("xlbm", xlMap.get(xlName)); |
| 1748 | tempMap.put("line", xlName); | 1758 | tempMap.put("line", xlName); |
| 1759 | + tempMap.put("date", dates); | ||
| 1749 | tempMap.put("jhbc", jhbc); | 1760 | tempMap.put("jhbc", jhbc); |
| 1750 | tempMap.put("sjbc", sjbc); | 1761 | tempMap.put("sjbc", sjbc); |
| 1751 | tempMap.put("zdl", (jhbc<1?"0":nf.format((float) sjbc / jhbc *100)) + "%"); | 1762 | tempMap.put("zdl", (jhbc<1?"0":nf.format((float) sjbc / jhbc *100)) + "%"); |
| @@ -1790,6 +1801,36 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1790,6 +1801,36 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1790 | // TODO: handle exception | 1801 | // TODO: handle exception |
| 1791 | e.printStackTrace(); | 1802 | e.printStackTrace(); |
| 1792 | } | 1803 | } |
| 1804 | + } else if(type.equals("exportMap")){ | ||
| 1805 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 1806 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 1807 | + ReportUtils ee = new ReportUtils(); | ||
| 1808 | + try { | ||
| 1809 | + if(resList.size() > 0) | ||
| 1810 | + listI.add(((List<Map<String, Object>>)resList.get(0).get("map")).iterator()); | ||
| 1811 | + listI.add(resList.iterator()); | ||
| 1812 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 1813 | + ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_map.xls", | ||
| 1814 | + path+"export/线路首末班明细.xls"); | ||
| 1815 | + } catch (Exception e) { | ||
| 1816 | + // TODO: handle exception | ||
| 1817 | + e.printStackTrace(); | ||
| 1818 | + } | ||
| 1819 | + } else if(type.equals("delay_export")){ | ||
| 1820 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 1821 | + Map<String,Object> m = new HashMap<String, Object>(); | ||
| 1822 | + ReportUtils ee = new ReportUtils(); | ||
| 1823 | + try { | ||
| 1824 | + if(resList.size() > 0) | ||
| 1825 | + listI.add(((List<Map<String, Object>>)resList.get(resList.size() - 1).get("map")).iterator()); | ||
| 1826 | + listI.add(resList.iterator()); | ||
| 1827 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 1828 | + ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls", | ||
| 1829 | + path+"export/首末班误点班次.xls"); | ||
| 1830 | + } catch (Exception e) { | ||
| 1831 | + // TODO: handle exception | ||
| 1832 | + e.printStackTrace(); | ||
| 1833 | + } | ||
| 1793 | } | 1834 | } |
| 1794 | 1835 | ||
| 1795 | return resList; | 1836 | return resList; |
src/main/resources/static/pages/base/timesmodel/tepms/fcjx_temp.html
| @@ -86,6 +86,95 @@ | @@ -86,6 +86,95 @@ | ||
| 86 | 86 | ||
| 87 | <div class="form-group"> | 87 | <div class="form-group"> |
| 88 | <div class="col-md-6"> | 88 | <div class="col-md-6"> |
| 89 | + <label class="control-label col-md-5">上行进场时间 : | ||
| 90 | + </label> | ||
| 91 | + <div class="col-md-5"> | ||
| 92 | + <input type="text" class="form-control" name="upInTimer" value="{{map.upInTimer}}" id="upInTimer_id" | ||
| 93 | + placeholder="请输入上行进场时间"> | ||
| 94 | + </div> | ||
| 95 | + </div> | ||
| 96 | + <div class="col-md-6"> | ||
| 97 | + <label class="control-label col-md-5">上行出场时间 : | ||
| 98 | + </label> | ||
| 99 | + <div class="col-md-5"> | ||
| 100 | + <input type="text" class="form-control" name="upOutTimer" value="{{map.upOutTimer}}" id="upOutTimer_id" | ||
| 101 | + placeholder="请输入上行出场时间"> | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | + </div> | ||
| 105 | + | ||
| 106 | + <div class="form-group"> | ||
| 107 | + <div class="col-md-6"> | ||
| 108 | + <label class="control-label col-md-5">下行进场时间 : | ||
| 109 | + </label> | ||
| 110 | + <div class="col-md-5"> | ||
| 111 | + <input type="text" class="form-control" name="downInTimer" value="{{map.downInTimer}}" id="downInTimer_id" | ||
| 112 | + placeholder="请输入下行进场时间"> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + <div class="col-md-6"> | ||
| 116 | + <label class="control-label col-md-5">下行出场时间 : | ||
| 117 | + </label> | ||
| 118 | + <div class="col-md-5"> | ||
| 119 | + <input type="text" class="form-control" name="downOutTimer" value="{{map.downOutTimer}}" id="downOutTimer_id" | ||
| 120 | + placeholder="请输入下行出场时间"> | ||
| 121 | + </div> | ||
| 122 | + </div> | ||
| 123 | + </div> | ||
| 124 | + | ||
| 125 | + <div class="form-group"> | ||
| 126 | + <div class="col-md-6"> | ||
| 127 | + <label class="control-label col-md-5">早高峰上行时间 :</label> | ||
| 128 | + <div class="col-md-5"> | ||
| 129 | + <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTime_id" | ||
| 130 | + placeholder="请输入早高峰上行时间"> | ||
| 131 | + </div> | ||
| 132 | + </div> | ||
| 133 | + <div class="col-md-6"> | ||
| 134 | + <label class="control-label col-md-5">早高峰下行时间 :</label> | ||
| 135 | + <div class="col-md-5"> | ||
| 136 | + <input type="text" class="form-control" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTime_id" | ||
| 137 | + placeholder="请输入早高峰下行时间"> | ||
| 138 | + </div> | ||
| 139 | + </div> | ||
| 140 | + </div> | ||
| 141 | + | ||
| 142 | + <div class="form-group"> | ||
| 143 | + <div class="col-md-6"> | ||
| 144 | + <label class="control-label col-md-5">晚高峰上行时间 :</label> | ||
| 145 | + <div class="col-md-5"> | ||
| 146 | + <input type="text" class="form-control" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTime_id" | ||
| 147 | + placeholder="请输入晚高峰上行时间"> | ||
| 148 | + </div> | ||
| 149 | + </div> | ||
| 150 | + <div class="col-md-6"> | ||
| 151 | + <label class="control-label col-md-5">晚高峰下行时间 :</label> | ||
| 152 | + <div class="col-md-5"> | ||
| 153 | + <input type="text" class="form-control" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTime_id" | ||
| 154 | + placeholder="请输入晚高峰下行时间"> | ||
| 155 | + </div> | ||
| 156 | + </div> | ||
| 157 | + </div> | ||
| 158 | + | ||
| 159 | + <div class="form-group"> | ||
| 160 | + <div class="col-md-6"> | ||
| 161 | + <label class="control-label col-md-5">低谷上行时间 :</label> | ||
| 162 | + <div class="col-md-5"> | ||
| 163 | + <input type="text" class="form-control" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTime_id" | ||
| 164 | + placeholder="请输入低谷上行时间"> | ||
| 165 | + </div> | ||
| 166 | + </div> | ||
| 167 | + <div class="col-md-6"> | ||
| 168 | + <label class="control-label col-md-5">低谷下行时间 :</label> | ||
| 169 | + <div class="col-md-5"> | ||
| 170 | + <input type="text" class="form-control" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTime_id" | ||
| 171 | + placeholder="请输入低谷下行时间"> | ||
| 172 | + </div> | ||
| 173 | + </div> | ||
| 174 | + </div> | ||
| 175 | + | ||
| 176 | + <div class="form-group"> | ||
| 177 | + <div class="col-md-6"> | ||
| 89 | <label class="control-label col-md-5"> | 178 | <label class="control-label col-md-5"> |
| 90 | <span class="required"> * </span> 线路规划类型 : | 179 | <span class="required"> * </span> 线路规划类型 : |
| 91 | </label> | 180 | </label> |
| @@ -126,6 +215,7 @@ | @@ -126,6 +215,7 @@ | ||
| 126 | </div> | 215 | </div> |
| 127 | </div> | 216 | </div> |
| 128 | 217 | ||
| 218 | + | ||
| 129 | <div class="form-group"> | 219 | <div class="form-group"> |
| 130 | <div class="col-md-6"> | 220 | <div class="col-md-6"> |
| 131 | <label class="control-label col-md-5">工作餐午餐时间 :</label> | 221 | <label class="control-label col-md-5">工作餐午餐时间 :</label> |
| @@ -244,18 +334,18 @@ | @@ -244,18 +334,18 @@ | ||
| 244 | <input type="hidden" name="upTravelTime" value="{{map.upTravelTime}}" id="upTravelTime_id"/> | 334 | <input type="hidden" name="upTravelTime" value="{{map.upTravelTime}}" id="upTravelTime_id"/> |
| 245 | <input type="hidden" name="downTravelTime" value="{{map.downTravelTime}}" id="downTravelTime_id"/> | 335 | <input type="hidden" name="downTravelTime" value="{{map.downTravelTime}}" id="downTravelTime_id"/> |
| 246 | <!-- 早高峰/晚高峰上下行行驶时间 --> | 336 | <!-- 早高峰/晚高峰上下行行驶时间 --> |
| 247 | - <input type="hidden" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTime_id" /> | ||
| 248 | - <input type="hidden" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTime_id" /> | ||
| 249 | - <input type="hidden" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTime_id"/> | ||
| 250 | - <input type="hidden" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTime_id"/> | 337 | + <!--<input type="hidden" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTime_id" />--> |
| 338 | + <!--<input type="hidden" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTime_id" />--> | ||
| 339 | + <!--<input type="hidden" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTime_id"/>--> | ||
| 340 | + <!--<input type="hidden" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTime_id"/>--> | ||
| 251 | <!-- 低谷上下行行驶时间 --> | 341 | <!-- 低谷上下行行驶时间 --> |
| 252 | - <input type="hidden" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTime_id"/> | ||
| 253 | - <input type="hidden" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTime_id"/> | 342 | + <!--<input type="hidden" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTime_id"/>--> |
| 343 | + <!--<input type="hidden" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTime_id"/>--> | ||
| 254 | <!-- 上下行进场出场时间 --> | 344 | <!-- 上下行进场出场时间 --> |
| 255 | - <input type="hidden" name="upInTimer" value="{{map.upInTimer}}" id="upInTimer_id"/> | ||
| 256 | - <input type="hidden" name="downInTimer" value="{{map.downInTimer}}" id="downInTimer_id"/> | ||
| 257 | - <input type="hidden" name="upOutTimer" value="{{map.upOutTimer}}" id="upOutTimer_id"/> | ||
| 258 | - <input type="hidden" name="downOutTimer" value="{{map.downOutTimer}}" id="downOutTimer_id"/> | 345 | + <!--<input type="hidden" name="upInTimer" value="{{map.upInTimer}}" id="upInTimer_id"/>--> |
| 346 | + <!--<input type="hidden" name="downInTimer" value="{{map.downInTimer}}" id="downInTimer_id"/>--> | ||
| 347 | + <!--<input type="hidden" name="upOutTimer" value="{{map.upOutTimer}}" id="upOutTimer_id"/>--> | ||
| 348 | + <!--<input type="hidden" name="downOutTimer" value="{{map.downOutTimer}}" id="downOutTimer_id"/>--> | ||
| 259 | 349 | ||
| 260 | <!-- 隐藏字段-里程 --> | 350 | <!-- 隐藏字段-里程 --> |
| 261 | <!-- 上下行行驶里程 --> | 351 | <!-- 上下行行驶里程 --> |
| @@ -366,6 +456,89 @@ | @@ -366,6 +456,89 @@ | ||
| 366 | <div class="form-group"> | 456 | <div class="form-group"> |
| 367 | <div class="col-md-6"> | 457 | <div class="col-md-6"> |
| 368 | <label class="control-label col-md-5"> | 458 | <label class="control-label col-md-5"> |
| 459 | + <span class="required"> * </span> 上行进场时间 : | ||
| 460 | + </label> | ||
| 461 | + <div class="col-md-5"> | ||
| 462 | + <p class="form-control-static" data-display="upInTimer"> </p> | ||
| 463 | + </div> | ||
| 464 | + </div> | ||
| 465 | + <div class="col-md-6"> | ||
| 466 | + <label class="control-label col-md-5"> | ||
| 467 | + <span class="required"> * </span> 上行出场时间 : | ||
| 468 | + </label> | ||
| 469 | + <div class="col-md-5"> | ||
| 470 | + <p class="form-control-static" data-display="upOutTimer"> </p> | ||
| 471 | + </div> | ||
| 472 | + </div> | ||
| 473 | + </div> | ||
| 474 | + | ||
| 475 | + <div class="form-group"> | ||
| 476 | + <div class="col-md-6"> | ||
| 477 | + <label class="control-label col-md-5"> | ||
| 478 | + <span class="required"> * </span> 下行进场时间 : | ||
| 479 | + </label> | ||
| 480 | + <div class="col-md-5"> | ||
| 481 | + <p class="form-control-static" data-display="downInTimer"> </p> | ||
| 482 | + </div> | ||
| 483 | + </div> | ||
| 484 | + <div class="col-md-6"> | ||
| 485 | + <label class="control-label col-md-5"> | ||
| 486 | + <span class="required"> * </span> 下行出场时间 : | ||
| 487 | + </label> | ||
| 488 | + <div class="col-md-5"> | ||
| 489 | + <p class="form-control-static" data-display="downOutTimer"> </p> | ||
| 490 | + </div> | ||
| 491 | + </div> | ||
| 492 | + </div> | ||
| 493 | + | ||
| 494 | + <div class="form-group"> | ||
| 495 | + <div class="col-md-6"> | ||
| 496 | + <label class="control-label col-md-5"> 早高峰上行时间 : </label> | ||
| 497 | + <div class="col-md-6"> | ||
| 498 | + <p class="form-control-static" data-display="earlyUpTime"> </p> | ||
| 499 | + </div> | ||
| 500 | + </div> | ||
| 501 | + <div class="col-md-6"> | ||
| 502 | + <label class="control-label col-md-5"> 早高峰下行时间 : </label> | ||
| 503 | + <div class="col-md-4"> | ||
| 504 | + <p class="form-control-static" data-display="earlyDownTime"> </p> | ||
| 505 | + </div> | ||
| 506 | + </div> | ||
| 507 | + </div> | ||
| 508 | + | ||
| 509 | + <div class="form-group"> | ||
| 510 | + <div class="col-md-6"> | ||
| 511 | + <label class="control-label col-md-5"> 晚高峰上行时间 : </label> | ||
| 512 | + <div class="col-md-4"> | ||
| 513 | + <p class="form-control-static" data-display="lateUpTime"> </p> | ||
| 514 | + </div> | ||
| 515 | + </div> | ||
| 516 | + <div class="col-md-6"> | ||
| 517 | + <label class="control-label col-md-5"> 晚高峰下行时间 :</label> | ||
| 518 | + <div class="col-md-4"> | ||
| 519 | + <p class="form-control-static" data-display="lateDownTime"> </p> | ||
| 520 | + </div> | ||
| 521 | + </div> | ||
| 522 | + </div> | ||
| 523 | + | ||
| 524 | + <div class="form-group"> | ||
| 525 | + <div class="col-md-6"> | ||
| 526 | + <label class="control-label col-md-5">低谷上行时间 : </label> | ||
| 527 | + <div class="col-md-4"> | ||
| 528 | + <p class="form-control-static" data-display="troughUpTime"> </p> | ||
| 529 | + </div> | ||
| 530 | + </div> | ||
| 531 | + <div class="col-md-6"> | ||
| 532 | + <label class="control-label col-md-5"> 低谷下行时间 : </label> | ||
| 533 | + <div class="col-md-4"> | ||
| 534 | + <p class="form-control-static" data-display="troughDownTime"> </p> | ||
| 535 | + </div> | ||
| 536 | + </div> | ||
| 537 | + </div> | ||
| 538 | + | ||
| 539 | + <div class="form-group"> | ||
| 540 | + <div class="col-md-6"> | ||
| 541 | + <label class="control-label col-md-5"> | ||
| 369 | <span class="required"> * </span> 线路规划类型 : | 542 | <span class="required"> * </span> 线路规划类型 : |
| 370 | </label> | 543 | </label> |
| 371 | <div class="col-md-4"> | 544 | <div class="col-md-4"> |
src/main/resources/static/pages/forms/mould/firstAndLastBus_delay.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/firstAndLastBus_map.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/onTime.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/onTime1.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/onTime2.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/sheetList.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/sheetList1.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/sheetList2.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/busInterval.html
| @@ -305,6 +305,7 @@ | @@ -305,6 +305,7 @@ | ||
| 305 | params['company'] = company; | 305 | params['company'] = company; |
| 306 | params['subCompany'] = subCompany; | 306 | params['subCompany'] = subCompany; |
| 307 | params['type'] = "query"; | 307 | params['type'] = "query"; |
| 308 | + var i = layer.load(2); | ||
| 308 | // $(".hidden").removeClass("hidden"); | 309 | // $(".hidden").removeClass("hidden"); |
| 309 | $get('/busInterval/interval', params, function(result){ | 310 | $get('/busInterval/interval', params, function(result){ |
| 310 | // 把数据填充到模版中 | 311 | // 把数据填充到模版中 |
| @@ -316,6 +317,7 @@ | @@ -316,6 +317,7 @@ | ||
| 316 | _w_table_rowspan("#forms tbody", 3); | 317 | _w_table_rowspan("#forms tbody", 3); |
| 317 | _w_table_rowspan("#forms tbody", 4); | 318 | _w_table_rowspan("#forms tbody", 4); |
| 318 | _w_table_rowspan("#forms tbody", 5); | 319 | _w_table_rowspan("#forms tbody", 5); |
| 320 | + layer.close(i); | ||
| 319 | 321 | ||
| 320 | }); | 322 | }); |
| 321 | } | 323 | } |
| @@ -341,10 +343,12 @@ | @@ -341,10 +343,12 @@ | ||
| 341 | params['company'] = company; | 343 | params['company'] = company; |
| 342 | params['subCompany'] = subCompany; | 344 | params['subCompany'] = subCompany; |
| 343 | params['type'] = "export"; | 345 | params['type'] = "export"; |
| 346 | + var i = layer.load(2); | ||
| 344 | $get('/busInterval/interval', params, function(result){ | 347 | $get('/busInterval/interval', params, function(result){ |
| 345 | window.open("/downloadFile/download?fileName=班次间隔统计表" | 348 | window.open("/downloadFile/download?fileName=班次间隔统计表" |
| 346 | +moment(startDate).format("YYYYMMDD")+"-" | 349 | +moment(startDate).format("YYYYMMDD")+"-" |
| 347 | +moment(endDate).format("YYYYMMDD")); | 350 | +moment(endDate).format("YYYYMMDD")); |
| 351 | + layer.close(i); | ||
| 348 | }); | 352 | }); |
| 349 | }); | 353 | }); |
| 350 | 354 | ||
| @@ -395,21 +399,38 @@ | @@ -395,21 +399,38 @@ | ||
| 395 | flag = 1; | 399 | flag = 1; |
| 396 | var treeData = []; | 400 | var treeData = []; |
| 397 | var params = {}; | 401 | var params = {}; |
| 402 | +// if(statu == 0) | ||
| 403 | +// params['line'] = " "; | ||
| 404 | +// if(statu == 1) | ||
| 405 | +// params['line'] = line; | ||
| 406 | +// params['startDate'] = startDate; | ||
| 407 | +// params['endDate'] = endDate; | ||
| 408 | +// $get('/pcpc/getModel', params, function(result){ | ||
| 409 | +// treeData = createTreeData(result); | ||
| 410 | +// var options = '<option value="">请选择...</option>'; | ||
| 411 | +// $.each(treeData, function(i, g){ | ||
| 412 | +// options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 413 | +// }); | ||
| 414 | +// $('#model').html(options)/* .select2() */; | ||
| 415 | +// flag = 0; | ||
| 416 | +// }); | ||
| 398 | if(statu == 0) | 417 | if(statu == 0) |
| 399 | - params['line'] = " "; | ||
| 400 | - if(statu == 1) | ||
| 401 | - params['line'] = line; | ||
| 402 | - params['startDate'] = startDate; | ||
| 403 | - params['endDate'] = endDate; | ||
| 404 | - $get('/pcpc/getModel', params, function(result){ | ||
| 405 | - treeData = createTreeData(result); | ||
| 406 | var options = '<option value="">请选择...</option>'; | 418 | var options = '<option value="">请选择...</option>'; |
| 407 | - $.each(treeData, function(i, g){ | ||
| 408 | - options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 409 | - }); | ||
| 410 | $('#model').html(options)/* .select2() */; | 419 | $('#model').html(options)/* .select2() */; |
| 411 | flag = 0; | 420 | flag = 0; |
| 412 | - }); | 421 | + if(statu == 1){ |
| 422 | + params['xl.lineCode_eq'] = line; | ||
| 423 | + $get('/tic_ec', params, function(result){ | ||
| 424 | + treeData = createTreeData(result.data.content); | ||
| 425 | + var options = '<option value="">请选择...</option>'; | ||
| 426 | + $.each(treeData, function(i, g){ | ||
| 427 | + if(!g.isCancel) | ||
| 428 | + options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 429 | + }); | ||
| 430 | + $('#model').html(options)/* .select2() */; | ||
| 431 | + flag = 0; | ||
| 432 | + }); | ||
| 433 | + } | ||
| 413 | } | 434 | } |
| 414 | 435 | ||
| 415 | /** | 436 | /** |
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
| @@ -230,7 +230,7 @@ | @@ -230,7 +230,7 @@ | ||
| 230 | // 把渲染好的模版html文本追加到表格中 | 230 | // 把渲染好的模版html文本追加到表格中 |
| 231 | $('#forms tbody').html(tbodyHtml); | 231 | $('#forms tbody').html(tbodyHtml); |
| 232 | 232 | ||
| 233 | - if(result.length == 0) | 233 | + if(list.length == 0) |
| 234 | $("#export").attr('disabled',"true"); | 234 | $("#export").attr('disabled',"true"); |
| 235 | else | 235 | else |
| 236 | $("#export").removeAttr("disabled"); | 236 | $("#export").removeAttr("disabled"); |
| @@ -240,13 +240,32 @@ | @@ -240,13 +240,32 @@ | ||
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | $("#export").on("click",function(){ | 242 | $("#export").on("click",function(){ |
| 243 | - $("#forms").table2excel({ | ||
| 244 | - exclue: ".noExl", | ||
| 245 | - name: "Excel Document Name.xlsx", | ||
| 246 | - filename: "首末班误点班次", | ||
| 247 | - exclude_img: true, | ||
| 248 | - exclude_links: true, | ||
| 249 | - exclude_inputs: true | 243 | +// $("#forms").table2excel({ |
| 244 | +// exclue: ".noExl", | ||
| 245 | +// name: "Excel Document Name.xlsx", | ||
| 246 | +// filename: "首末班误点班次", | ||
| 247 | +// exclude_img: true, | ||
| 248 | +// exclude_links: true, | ||
| 249 | +// exclude_inputs: true | ||
| 250 | +// }); | ||
| 251 | + var i = layer.load(2); | ||
| 252 | + var params = {}; | ||
| 253 | + company = $("#company").val(); | ||
| 254 | + subCompany = $("#subCompany").val(); | ||
| 255 | + line = $("#line").val(); | ||
| 256 | + startDate = $("#startDate").val(); | ||
| 257 | + endDate = $("#endDate").val(); | ||
| 258 | + if(line == " ") | ||
| 259 | + line = ""; | ||
| 260 | + params['company'] = company; | ||
| 261 | + params['subCompany'] = subCompany; | ||
| 262 | + params['line'] = line; | ||
| 263 | + params['startDate'] = startDate; | ||
| 264 | + params['endDate'] = endDate; | ||
| 265 | + params['type'] = "delay_export"; | ||
| 266 | + $get('/pcpc/firstAndLastBus_sum', params, function(result){ | ||
| 267 | + window.open("/downloadFile/download?fileName=首末班误点班次"); | ||
| 268 | + layer.close(i); | ||
| 250 | }); | 269 | }); |
| 251 | }); | 270 | }); |
| 252 | 271 |
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
| @@ -239,11 +239,13 @@ | @@ -239,11 +239,13 @@ | ||
| 239 | }); | 239 | }); |
| 240 | 240 | ||
| 241 | var list; | 241 | var list; |
| 242 | + var tempLine; | ||
| 242 | $("#forms tbody").on("click","a",function(){ | 243 | $("#forms tbody").on("click","a",function(){ |
| 243 | var index = $(this).parent().parent().index(); | 244 | var index = $(this).parent().parent().index(); |
| 244 | if(index < list.length - 1){ | 245 | if(index < list.length - 1){ |
| 245 | $.each(list, function(i, g){ | 246 | $.each(list, function(i, g){ |
| 246 | if(index == i){ | 247 | if(index == i){ |
| 248 | + tempLine = g.xlbm; | ||
| 247 | var tbodyHtml = template('list_maps',{list:g.map}); | 249 | var tbodyHtml = template('list_maps',{list:g.map}); |
| 248 | $('#map tbody').html(tbodyHtml); | 250 | $('#map tbody').html(tbodyHtml); |
| 249 | $("#sumMap tr").addClass("hidden"); | 251 | $("#sumMap tr").addClass("hidden"); |
| @@ -304,11 +306,13 @@ | @@ -304,11 +306,13 @@ | ||
| 304 | $("#sumMap tr").addClass("hidden"); | 306 | $("#sumMap tr").addClass("hidden"); |
| 305 | $("#exportMap").addClass("hidden"); | 307 | $("#exportMap").addClass("hidden"); |
| 306 | $("#exportSumMap").addClass("hidden"); | 308 | $("#exportSumMap").addClass("hidden"); |
| 309 | + var i = layer.load(2); | ||
| 307 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ | 310 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ |
| 308 | // 把数据填充到模版中 | 311 | // 把数据填充到模版中 |
| 309 | var tbodyHtml = template('list_firstAndLastBus_sum',{list:result}); | 312 | var tbodyHtml = template('list_firstAndLastBus_sum',{list:result}); |
| 310 | // 把渲染好的模版html文本追加到表格中 | 313 | // 把渲染好的模版html文本追加到表格中 |
| 311 | $('#forms tbody').html(tbodyHtml); | 314 | $('#forms tbody').html(tbodyHtml); |
| 315 | + layer.close(i); | ||
| 312 | 316 | ||
| 313 | list = result; | 317 | list = result; |
| 314 | 318 | ||
| @@ -327,30 +331,56 @@ | @@ -327,30 +331,56 @@ | ||
| 327 | params['startDate'] = startDate; | 331 | params['startDate'] = startDate; |
| 328 | params['endDate'] = endDate; | 332 | params['endDate'] = endDate; |
| 329 | params['type'] = "export"; | 333 | params['type'] = "export"; |
| 334 | + var i = layer.load(2); | ||
| 330 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ | 335 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ |
| 331 | window.open("/downloadFile/download?fileName=线路首末班准点率"+moment(startDate).format("YYYYMMDD")+(startDate==endDate?"":("-"+moment(endDate).format("YYYYMMDD")))); | 336 | window.open("/downloadFile/download?fileName=线路首末班准点率"+moment(startDate).format("YYYYMMDD")+(startDate==endDate?"":("-"+moment(endDate).format("YYYYMMDD")))); |
| 337 | + layer.close(i); | ||
| 332 | }); | 338 | }); |
| 333 | }); | 339 | }); |
| 334 | 340 | ||
| 335 | $("#exportMap").on("click",function(){ | 341 | $("#exportMap").on("click",function(){ |
| 336 | - $("#map").table2excel({ | ||
| 337 | - exclue: ".noExl", | ||
| 338 | - name: "Excel Document Name.xlsx", | ||
| 339 | - filename: "线路首末班", | ||
| 340 | - exclude_img: true, | ||
| 341 | - exclude_links: true, | ||
| 342 | - exclude_inputs: true | 342 | +// $("#map").table2excel({ |
| 343 | +// exclue: ".noExl", | ||
| 344 | +// name: "Excel Document Name.xlsx", | ||
| 345 | +// filename: "线路首末班", | ||
| 346 | +// exclude_img: true, | ||
| 347 | +// exclude_links: true, | ||
| 348 | +// exclude_inputs: true | ||
| 349 | +// }); | ||
| 350 | + var i = layer.load(2); | ||
| 351 | + var params = {}; | ||
| 352 | + params['company'] = company; | ||
| 353 | + params['subCompany'] = subCompany; | ||
| 354 | + params['line'] = tempLine; | ||
| 355 | + params['startDate'] = startDate; | ||
| 356 | + params['endDate'] = endDate; | ||
| 357 | + params['type'] = "exportMap"; | ||
| 358 | + $get('/pcpc/firstAndLastBus_sum', params, function(result){ | ||
| 359 | + window.open("/downloadFile/download?fileName=线路首末班明细"); | ||
| 360 | + layer.close(i); | ||
| 343 | }); | 361 | }); |
| 344 | }); | 362 | }); |
| 345 | 363 | ||
| 346 | $("#exportSumMap").on("click",function(){ | 364 | $("#exportSumMap").on("click",function(){ |
| 347 | - $("#sumMap").table2excel({ | ||
| 348 | - exclue: ".noExl", | ||
| 349 | - name: "Excel Document Name.xlsx", | ||
| 350 | - filename: "首末班误点班次", | ||
| 351 | - exclude_img: true, | ||
| 352 | - exclude_links: true, | ||
| 353 | - exclude_inputs: true | 365 | +// $("#sumMap").table2excel({ |
| 366 | +// exclue: ".noExl", | ||
| 367 | +// name: "Excel Document Name.xlsx", | ||
| 368 | +// filename: "首末班误点班次", | ||
| 369 | +// exclude_img: true, | ||
| 370 | +// exclude_links: true, | ||
| 371 | +// exclude_inputs: true | ||
| 372 | +// }); | ||
| 373 | + var i = layer.load(2); | ||
| 374 | + var params = {}; | ||
| 375 | + params['company'] = company; | ||
| 376 | + params['subCompany'] = subCompany; | ||
| 377 | + params['line'] = line; | ||
| 378 | + params['startDate'] = startDate; | ||
| 379 | + params['endDate'] = endDate; | ||
| 380 | + params['type'] = "delay_export"; | ||
| 381 | + $get('/pcpc/firstAndLastBus_sum', params, function(result){ | ||
| 382 | + window.open("/downloadFile/download?fileName=首末班误点班次"); | ||
| 383 | + layer.close(i); | ||
| 354 | }); | 384 | }); |
| 355 | }); | 385 | }); |
| 356 | 386 |
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
| @@ -388,11 +388,14 @@ | @@ -388,11 +388,14 @@ | ||
| 388 | params['company'] = company; | 388 | params['company'] = company; |
| 389 | params['subCompany'] = subCompany; | 389 | params['subCompany'] = subCompany; |
| 390 | params['type'] = "query"; | 390 | params['type'] = "query"; |
| 391 | + var i = layer.load(2); | ||
| 391 | $("#forms .hidden").removeClass("hidden"); | 392 | $("#forms .hidden").removeClass("hidden"); |
| 392 | $get('/busInterval/lineTimeAnaliy', params, function(result){ | 393 | $get('/busInterval/lineTimeAnaliy', params, function(result){ |
| 393 | console.log(result); | 394 | console.log(result); |
| 394 | // 把数据填充到模版中 | 395 | // 把数据填充到模版中 |
| 395 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); | 396 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); |
| 397 | + layer.close(i); | ||
| 398 | + | ||
| 396 | // 把渲染好的模版html文本追加到表格中 | 399 | // 把渲染好的模版html文本追加到表格中 |
| 397 | $('#forms tbody').html(tbodyHtml); | 400 | $('#forms tbody').html(tbodyHtml); |
| 398 | $("#works_hidden").addClass("hidden"); | 401 | $("#works_hidden").addClass("hidden"); |
| @@ -470,14 +473,25 @@ | @@ -470,14 +473,25 @@ | ||
| 470 | flag = 1; | 473 | flag = 1; |
| 471 | var treeData = []; | 474 | var treeData = []; |
| 472 | var params = {}; | 475 | var params = {}; |
| 473 | - params['line'] = line; | ||
| 474 | - params['startDate'] = startDate; | ||
| 475 | - params['endDate'] = endDate; | ||
| 476 | - $get('/pcpc/getModel', params, function(result){ | ||
| 477 | - treeData = createTreeData(result); | 476 | +// params['line'] = line; |
| 477 | +// params['startDate'] = startDate; | ||
| 478 | +// params['endDate'] = endDate; | ||
| 479 | +// $get('/pcpc/getModel', params, function(result){ | ||
| 480 | +// treeData = createTreeData(result); | ||
| 481 | +// var options = '<option value="">请选择...</option>'; | ||
| 482 | +// $.each(treeData, function(i, g){ | ||
| 483 | +// options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 484 | +// }); | ||
| 485 | +// $('#model').html(options)/* .select2() */; | ||
| 486 | +// flag = 0; | ||
| 487 | +// }); | ||
| 488 | + params['xl.lineCode_eq'] = line; | ||
| 489 | + $get('/tic_ec', params, function(result){ | ||
| 490 | + treeData = createTreeData(result.data.content); | ||
| 478 | var options = '<option value="">请选择...</option>'; | 491 | var options = '<option value="">请选择...</option>'; |
| 479 | $.each(treeData, function(i, g){ | 492 | $.each(treeData, function(i, g){ |
| 480 | - options += '<option value="'+g.id+'">'+g.name+'</option>'; | 493 | + if(!g.isCancel) |
| 494 | + options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 481 | }); | 495 | }); |
| 482 | $('#model').html(options)/* .select2() */; | 496 | $('#model').html(options)/* .select2() */; |
| 483 | flag = 0; | 497 | flag = 0; |
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| @@ -252,11 +252,13 @@ | @@ -252,11 +252,13 @@ | ||
| 252 | params['subCompany'] = subCompany; | 252 | params['subCompany'] = subCompany; |
| 253 | params['type'] = "query"; | 253 | params['type'] = "query"; |
| 254 | $(".hidden").removeClass("hidden"); | 254 | $(".hidden").removeClass("hidden"); |
| 255 | + var i = layer.load(2); | ||
| 255 | $get('/pcpc/scheduleAnaly', params, function(result){ | 256 | $get('/pcpc/scheduleAnaly', params, function(result){ |
| 256 | // 把数据填充到模版中 | 257 | // 把数据填充到模版中 |
| 257 | var tbodyHtml = template('list_scheduleAnaly',{list:result.dataList}); | 258 | var tbodyHtml = template('list_scheduleAnaly',{list:result.dataList}); |
| 258 | // 把渲染好的模版html文本追加到表格中 | 259 | // 把渲染好的模版html文本追加到表格中 |
| 259 | $('#forms tbody').html(tbodyHtml); | 260 | $('#forms tbody').html(tbodyHtml); |
| 261 | + layer.close(i); | ||
| 260 | 262 | ||
| 261 | if(result.dataList.length == 0) | 263 | if(result.dataList.length == 0) |
| 262 | $("#export").attr('disabled',"true"); | 264 | $("#export").attr('disabled',"true"); |
| @@ -286,8 +288,10 @@ | @@ -286,8 +288,10 @@ | ||
| 286 | params['subCompany'] = subCompany; | 288 | params['subCompany'] = subCompany; |
| 287 | params['bcType'] = bcType; | 289 | params['bcType'] = bcType; |
| 288 | params['type'] = "export"; | 290 | params['type'] = "export"; |
| 291 | + var i = layer.load(2); | ||
| 289 | $get('/pcpc/scheduleAnaly', params, function(result){ | 292 | $get('/pcpc/scheduleAnaly', params, function(result){ |
| 290 | window.open("/downloadFile/download?fileName=时刻表分析"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | 293 | window.open("/downloadFile/download?fileName=时刻表分析"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); |
| 294 | + layer.close(i); | ||
| 291 | }); | 295 | }); |
| 292 | }); | 296 | }); |
| 293 | 297 | ||
| @@ -311,16 +315,27 @@ | @@ -311,16 +315,27 @@ | ||
| 311 | flag = 1; | 315 | flag = 1; |
| 312 | var treeData = []; | 316 | var treeData = []; |
| 313 | var params = {}; | 317 | var params = {}; |
| 314 | - params['line'] = line; | ||
| 315 | - params['startDate'] = startDate; | ||
| 316 | - params['endDate'] = endDate; | ||
| 317 | - $get('/pcpc/getModel', params, function(result){ | ||
| 318 | - treeData = createTreeData(result); | 318 | +// params['line'] = line; |
| 319 | +// params['startDate'] = startDate; | ||
| 320 | +// params['endDate'] = endDate; | ||
| 321 | +// $get('/pcpc/getModel', params, function(result){ | ||
| 322 | +// treeData = createTreeData(result); | ||
| 323 | +// var options = '<option value="">请选择...</option>'; | ||
| 324 | +// var size = 0; | ||
| 325 | +// $.each(treeData, function(i, g){ | ||
| 326 | +// options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 327 | +// size++; | ||
| 328 | +// }); | ||
| 329 | +// $('#model').html(options)/* .select2() */; | ||
| 330 | +// flag = 0; | ||
| 331 | +// }); | ||
| 332 | + params['xl.lineCode_eq'] = line; | ||
| 333 | + $get('/tic_ec', params, function(result){ | ||
| 334 | + treeData = createTreeData(result.data.content); | ||
| 319 | var options = '<option value="">请选择...</option>'; | 335 | var options = '<option value="">请选择...</option>'; |
| 320 | - var size = 0; | ||
| 321 | $.each(treeData, function(i, g){ | 336 | $.each(treeData, function(i, g){ |
| 322 | - options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 323 | - size++; | 337 | + if(!g.isCancel) |
| 338 | + options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 324 | }); | 339 | }); |
| 325 | $('#model').html(options)/* .select2() */; | 340 | $('#model').html(options)/* .select2() */; |
| 326 | flag = 0; | 341 | flag = 0; |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| @@ -121,14 +121,6 @@ | @@ -121,14 +121,6 @@ | ||
| 121 | if (!$('body').hasClass('page-sidebar-closed')) | 121 | if (!$('body').hasClass('page-sidebar-closed')) |
| 122 | $('.menu-toggler.sidebar-toggler').click(); | 122 | $('.menu-toggler.sidebar-toggler').click(); |
| 123 | 123 | ||
| 124 | - $("#startDate").datetimepicker({ | ||
| 125 | - format : 'YYYY-MM-DD', | ||
| 126 | - locale : 'zh-cn' | ||
| 127 | - }); | ||
| 128 | - $("#endDate").datetimepicker({ | ||
| 129 | - format : 'YYYY-MM-DD', | ||
| 130 | - locale : 'zh-cn' | ||
| 131 | - }); | ||
| 132 | 124 | ||
| 133 | $("#times1").datetimepicker({ | 125 | $("#times1").datetimepicker({ |
| 134 | format : 'HH:mm', | 126 | format : 'HH:mm', |
| @@ -140,6 +132,7 @@ | @@ -140,6 +132,7 @@ | ||
| 140 | }); | 132 | }); |
| 141 | 133 | ||
| 142 | var d = new Date(); | 134 | var d = new Date(); |
| 135 | + d.setTime(d.getTime() - 1*1000*60*60*24); | ||
| 143 | var year = d.getFullYear(); | 136 | var year = d.getFullYear(); |
| 144 | var month = d.getMonth() + 1; | 137 | var month = d.getMonth() + 1; |
| 145 | var day = d.getDate(); | 138 | var day = d.getDate(); |
| @@ -147,8 +140,19 @@ | @@ -147,8 +140,19 @@ | ||
| 147 | month = "0" + month; | 140 | month = "0" + month; |
| 148 | if(day < 10) | 141 | if(day < 10) |
| 149 | day = "0" + day; | 142 | day = "0" + day; |
| 150 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 151 | - $("#endDate").val(year + "-" + month + "-" + day); | 143 | + var dateTime = year + "-" + month + "-" + day; |
| 144 | + $("#startDate").datetimepicker({ | ||
| 145 | + format : 'YYYY-MM-DD', | ||
| 146 | + locale : 'zh-cn', | ||
| 147 | + maxDate : dateTime | ||
| 148 | + }); | ||
| 149 | + $("#endDate").datetimepicker({ | ||
| 150 | + format : 'YYYY-MM-DD', | ||
| 151 | + locale : 'zh-cn', | ||
| 152 | + maxDate : dateTime | ||
| 153 | + }); | ||
| 154 | + $("#startDate").val(dateTime); | ||
| 155 | + $("#endDate").val(dateTime); | ||
| 152 | 156 | ||
| 153 | $("#times1").val("05:00"); | 157 | $("#times1").val("05:00"); |
| 154 | $("#times2").val("23:00"); | 158 | $("#times2").val("23:00"); |
| @@ -329,6 +333,7 @@ | @@ -329,6 +333,7 @@ | ||
| 329 | params['subCompany'] = subCompany; | 333 | params['subCompany'] = subCompany; |
| 330 | params['type'] = "query"; | 334 | params['type'] = "query"; |
| 331 | // $(".hidden").removeClass("hidden"); | 335 | // $(".hidden").removeClass("hidden"); |
| 336 | + var i = layer.load(2); | ||
| 332 | $get('/busInterval/timeAndSpeed', params, function(result){ | 337 | $get('/busInterval/timeAndSpeed', params, function(result){ |
| 333 | // 把数据填充到模版中 | 338 | // 把数据填充到模版中 |
| 334 | var tbodyHtml = template('list_timeAndSpeed', {list:result}); | 339 | var tbodyHtml = template('list_timeAndSpeed', {list:result}); |
| @@ -336,6 +341,7 @@ | @@ -336,6 +341,7 @@ | ||
| 336 | $('#forms').html(tbodyHtml); | 341 | $('#forms').html(tbodyHtml); |
| 337 | list = result; | 342 | list = result; |
| 338 | $("#works_hidden").addClass("hidden"); | 343 | $("#works_hidden").addClass("hidden"); |
| 344 | + layer.close(i); | ||
| 339 | 345 | ||
| 340 | _w_table_rowspan("#forms", 1); | 346 | _w_table_rowspan("#forms", 1); |
| 341 | _w_table_rowspan("#forms", 2); | 347 | _w_table_rowspan("#forms", 2); |
| @@ -388,10 +394,12 @@ | @@ -388,10 +394,12 @@ | ||
| 388 | params['company'] = company; | 394 | params['company'] = company; |
| 389 | params['subCompany'] = subCompany; | 395 | params['subCompany'] = subCompany; |
| 390 | params['type'] = "export"; | 396 | params['type'] = "export"; |
| 397 | + var i = layer.load(2); | ||
| 391 | $get('/busInterval/timeAndSpeed', params, function(result){ | 398 | $get('/busInterval/timeAndSpeed', params, function(result){ |
| 392 | window.open("/downloadFile/download?fileName=行驶时间及车速统计表" | 399 | window.open("/downloadFile/download?fileName=行驶时间及车速统计表" |
| 393 | +moment(startDate).format("YYYYMMDD")+"-" | 400 | +moment(startDate).format("YYYYMMDD")+"-" |
| 394 | +moment(endDate).format("YYYYMMDD")); | 401 | +moment(endDate).format("YYYYMMDD")); |
| 402 | + layer.close(i); | ||
| 395 | }); | 403 | }); |
| 396 | }); | 404 | }); |
| 397 | 405 | ||
| @@ -447,21 +455,38 @@ | @@ -447,21 +455,38 @@ | ||
| 447 | flag = 1; | 455 | flag = 1; |
| 448 | var treeData = []; | 456 | var treeData = []; |
| 449 | var params = {}; | 457 | var params = {}; |
| 458 | +// if(statu == 0) | ||
| 459 | +// params['line'] = " "; | ||
| 460 | +// if(statu == 1) | ||
| 461 | +// params['line'] = line; | ||
| 462 | +// params['startDate'] = startDate; | ||
| 463 | +// params['endDate'] = endDate; | ||
| 464 | +// $get('/pcpc/getModel', params, function(result){ | ||
| 465 | +// treeData = createTreeData(result); | ||
| 466 | +// var options = '<option value="">请选择...</option>'; | ||
| 467 | +// $.each(treeData, function(i, g){ | ||
| 468 | +// options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 469 | +// }); | ||
| 470 | +// $('#model').html(options); | ||
| 471 | +// flag = 0; | ||
| 472 | +// }); | ||
| 450 | if(statu == 0) | 473 | if(statu == 0) |
| 451 | - params['line'] = " "; | ||
| 452 | - if(statu == 1) | ||
| 453 | - params['line'] = line; | ||
| 454 | - params['startDate'] = startDate; | ||
| 455 | - params['endDate'] = endDate; | ||
| 456 | - $get('/pcpc/getModel', params, function(result){ | ||
| 457 | - treeData = createTreeData(result); | ||
| 458 | var options = '<option value="">请选择...</option>'; | 474 | var options = '<option value="">请选择...</option>'; |
| 459 | - $.each(treeData, function(i, g){ | ||
| 460 | - options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 461 | - }); | ||
| 462 | - $('#model').html(options); | 475 | + $('#model').html(options)/* .select2() */; |
| 463 | flag = 0; | 476 | flag = 0; |
| 464 | - }); | 477 | + if(statu == 1){ |
| 478 | + params['xl.lineCode_eq'] = line; | ||
| 479 | + $get('/tic_ec', params, function(result){ | ||
| 480 | + treeData = createTreeData(result.data.content); | ||
| 481 | + var options = '<option value="">请选择...</option>'; | ||
| 482 | + $.each(treeData, function(i, g){ | ||
| 483 | + if(!g.isCancel) | ||
| 484 | + options += '<option value="'+g.id+'">'+g.name+'</option>'; | ||
| 485 | + }); | ||
| 486 | + $('#model').html(options)/* .select2() */; | ||
| 487 | + flag = 0; | ||
| 488 | + }); | ||
| 489 | + } | ||
| 465 | } | 490 | } |
| 466 | 491 | ||
| 467 | function updateLp(ttId){ | 492 | function updateLp(ttId){ |
src/main/resources/static/pages/punctual/list.html
| @@ -75,22 +75,31 @@ | @@ -75,22 +75,31 @@ | ||
| 75 | }); | 75 | }); |
| 76 | }); | 76 | }); |
| 77 | $("#exportList").on('click',function(){ | 77 | $("#exportList").on('click',function(){ |
| 78 | - $("#forms_2").table2excel({ | ||
| 79 | - // 不被导出的表格行的CSS class类 | ||
| 80 | - exclude: ".noExl", | ||
| 81 | - // 导出的Excel文档的名称,(没看到作用) | ||
| 82 | - name: "Excel Document Name.xlsx", | ||
| 83 | - // Excel文件的名称 | ||
| 84 | - filename: "发车到站准点率" | 78 | +// $("#forms_2").table2excel({ |
| 79 | +// // 不被导出的表格行的CSS class类 | ||
| 80 | +// exclude: ".noExl", | ||
| 81 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 82 | +// name: "Excel Document Name.xlsx", | ||
| 83 | +// // Excel文件的名称 | ||
| 84 | +// filename: "发车到站准点率" | ||
| 85 | +// }); | ||
| 86 | + var date = no.split("_")[0]; | ||
| 87 | + var endDate = date; | ||
| 88 | + var line = no.split("_")[1]; | ||
| 89 | + var fgs=$('#fgsdm').val(); | ||
| 90 | + var gs=$('#gsdm').val(); | ||
| 91 | + $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2,type:"export"},function(result){ | ||
| 92 | + window.open("/downloadFile/download?fileName=发车到站准点率详细"+moment(date).format("YYYYMMDD")); | ||
| 85 | }); | 93 | }); |
| 86 | - }); | 94 | + |
| 95 | + }); | ||
| 87 | 96 | ||
| 88 | }); | 97 | }); |
| 89 | </script> | 98 | </script> |
| 90 | <script type="text/html" id="onTime_2"> | 99 | <script type="text/html" id="onTime_2"> |
| 91 | {{each list as obj i}} | 100 | {{each list as obj i}} |
| 92 | <tr> | 101 | <tr> |
| 93 | - <td>{{i+1}}</td> | 102 | + <td>{{obj.no}}</td> |
| 94 | <td>{{obj.zd}}</td> | 103 | <td>{{obj.zd}}</td> |
| 95 | <td>{{obj.clzbh}}</td> | 104 | <td>{{obj.clzbh}}</td> |
| 96 | <td>{{obj.jsy}}</td> | 105 | <td>{{obj.jsy}}</td> |
src/main/resources/static/pages/punctual/onTime.html
| @@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
| 98 | </table> | 98 | </table> |
| 99 | </div> | 99 | </div> |
| 100 | 100 | ||
| 101 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 101 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px" id="forms_1_div"> |
| 102 | <input class="btn btn-default hidden" type="button" id="export_1" value="导出"/> | 102 | <input class="btn btn-default hidden" type="button" id="export_1" value="导出"/> |
| 103 | <table class="table table-bordered table-hover table-checkable" id="forms_1"> | 103 | <table class="table table-bordered table-hover table-checkable" id="forms_1"> |
| 104 | <thead> | 104 | <thead> |
| @@ -269,19 +269,27 @@ | @@ -269,19 +269,27 @@ | ||
| 269 | $('#forms_h tbody').html(template('onTime_h',{list:result})); | 269 | $('#forms_h tbody').html(template('onTime_h',{list:result})); |
| 270 | $('.btn-onTime').on('click', showSheetList); | 270 | $('.btn-onTime').on('click', showSheetList); |
| 271 | layer.close(i); | 271 | layer.close(i); |
| 272 | + | ||
| 273 | + $("#forms_1_div").addClass("hidden"); | ||
| 274 | + if(result.length == 0) | ||
| 275 | + $("#export").attr('disabled',"true"); | ||
| 276 | + else | ||
| 277 | + $("#export").removeAttr("disabled"); | ||
| 272 | }); | 278 | }); |
| 273 | }); | 279 | }); |
| 280 | + var line1; | ||
| 274 | function showSheetList(){ | 281 | function showSheetList(){ |
| 275 | - var line = $(this).data('id'); | 282 | + line1 = $(this).data('id'); |
| 276 | var date = $("#date").val(); | 283 | var date = $("#date").val(); |
| 277 | var endDate = $("#endDate").val(); | 284 | var endDate = $("#endDate").val(); |
| 278 | var fgs=$('#fgsdm').val(); | 285 | var fgs=$('#fgsdm').val(); |
| 279 | var gs=$('#gsdm').val(); | 286 | var gs=$('#gsdm').val(); |
| 280 | var i = layer.load(2); | 287 | var i = layer.load(2); |
| 281 | - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1},function(result){ | 288 | + $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1},function(result){ |
| 282 | var onTime = template('onTime_1',{list:result}); | 289 | var onTime = template('onTime_1',{list:result}); |
| 283 | $('#forms_1 tbody').html(onTime); | 290 | $('#forms_1 tbody').html(onTime); |
| 284 | $('#forms_1_h tbody').html(template('onTime_1_h',{list:result})); | 291 | $('#forms_1_h tbody').html(template('onTime_1_h',{list:result})); |
| 292 | + $("#forms_1_div").removeClass("hidden"); | ||
| 285 | $("#forms_1 .hidden").removeClass("hidden"); | 293 | $("#forms_1 .hidden").removeClass("hidden"); |
| 286 | $('.btn-onTime_1').on('click', openSheetList); | 294 | $('.btn-onTime_1').on('click', openSheetList); |
| 287 | $("#export_1").removeClass("hidden"); | 295 | $("#export_1").removeClass("hidden"); |
| @@ -312,30 +320,47 @@ | @@ -312,30 +320,47 @@ | ||
| 312 | }); | 320 | }); |
| 313 | } | 321 | } |
| 314 | $("#export").on("click",function(){ | 322 | $("#export").on("click",function(){ |
| 323 | +// $("#forms_h").table2excel({ | ||
| 324 | +// // 不被导出的表格行的CSS class类 | ||
| 325 | +// exclude: ".noExl", | ||
| 326 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 327 | +// name: "Excel Document Name.xlsx", | ||
| 328 | +// // Excel文件的名称 | ||
| 329 | +// filename: date+"-"+endDate+"发车到站准点率" | ||
| 330 | +// }); | ||
| 331 | + var line = $("#line").val(); | ||
| 315 | var date = $("#date").val(); | 332 | var date = $("#date").val(); |
| 316 | var endDate = $("#endDate").val(); | 333 | var endDate = $("#endDate").val(); |
| 317 | - $("#forms_h").table2excel({ | ||
| 318 | - // 不被导出的表格行的CSS class类 | ||
| 319 | - exclude: ".noExl", | ||
| 320 | - // 导出的Excel文档的名称,(没看到作用) | ||
| 321 | - name: "Excel Document Name.xlsx", | ||
| 322 | - // Excel文件的名称 | ||
| 323 | - filename: date+"-"+endDate+"发车到站准点率" | 334 | + var fgs=$('#fgsdm').val(); |
| 335 | + var gs=$('#gsdm').val(); | ||
| 336 | + var i = layer.load(2); | ||
| 337 | + $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export"},function(result){ | ||
| 338 | + window.open("/downloadFile/download?fileName=发车到站准点率"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | ||
| 339 | + layer.close(i); | ||
| 324 | }); | 340 | }); |
| 325 | }) | 341 | }) |
| 326 | 342 | ||
| 327 | $("#export_1").on("click",function(){ | 343 | $("#export_1").on("click",function(){ |
| 344 | +// var date = $("#date").val(); | ||
| 345 | +// var endDate = $("#endDate").val(); | ||
| 346 | +// $("#forms_1_h").table2excel({ | ||
| 347 | +// // 不被导出的表格行的CSS class类 | ||
| 348 | +// exclude: ".noExl", | ||
| 349 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 350 | +// name: "Excel Document Name.xlsx", | ||
| 351 | +// // Excel文件的名称 | ||
| 352 | +// filename: date+"-"+endDate+"发车到站准点率" | ||
| 353 | +// }); | ||
| 328 | var date = $("#date").val(); | 354 | var date = $("#date").val(); |
| 329 | var endDate = $("#endDate").val(); | 355 | var endDate = $("#endDate").val(); |
| 330 | - $("#forms_1_h").table2excel({ | ||
| 331 | - // 不被导出的表格行的CSS class类 | ||
| 332 | - exclude: ".noExl", | ||
| 333 | - // 导出的Excel文档的名称,(没看到作用) | ||
| 334 | - name: "Excel Document Name.xlsx", | ||
| 335 | - // Excel文件的名称 | ||
| 336 | - filename: date+"-"+endDate+"发车到站准点率" | 356 | + var fgs=$('#fgsdm').val(); |
| 357 | + var gs=$('#gsdm').val(); | ||
| 358 | + var i = layer.load(2); | ||
| 359 | + $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1,type:"export"},function(result){ | ||
| 360 | + window.open("/downloadFile/download?fileName=发车到站准点率明细"); | ||
| 361 | + layer.close(i); | ||
| 337 | }); | 362 | }); |
| 338 | - }) | 363 | + }); |
| 339 | 364 | ||
| 340 | }); | 365 | }); |
| 341 | </script> | 366 | </script> |
src/main/resources/static/pages/report/sheet/list.html
| @@ -56,25 +56,30 @@ | @@ -56,25 +56,30 @@ | ||
| 56 | if (!$('body').hasClass('page-sidebar-closed')) | 56 | if (!$('body').hasClass('page-sidebar-closed')) |
| 57 | $('.menu-toggler.sidebar-toggler').click(); | 57 | $('.menu-toggler.sidebar-toggler').click(); |
| 58 | var no=""; | 58 | var no=""; |
| 59 | - $("#sheetList").on('init', function (e, id) { | ||
| 60 | - no=id; | ||
| 61 | - $get('/sheet/sheetList',{id:id},function(result){ | 59 | + var date = ""; |
| 60 | + $("#sheetList").on('init', function (e, id) { | ||
| 61 | + no=id.split(",")[0]; | ||
| 62 | + var dates = id.split(",")[1].split("-"); | ||
| 63 | + date = dates[0] + dates[1] + dates[2]; | ||
| 64 | + $get('/sheet/sheetList',{id:no},function(result){ | ||
| 62 | var sheetList_2 = template('sheetList_2',{list:result}); | 65 | var sheetList_2 = template('sheetList_2',{list:result}); |
| 63 | $('#forms_2 tbody').html(sheetList_2); | 66 | $('#forms_2 tbody').html(sheetList_2); |
| 64 | }); | 67 | }); |
| 65 | - }) | ||
| 66 | - $("#exportList").on('click',function(){ | ||
| 67 | - $("#forms_2").table2excel({ | ||
| 68 | - // 不被导出的表格行的CSS class类 | ||
| 69 | - exclude: ".noExl", | ||
| 70 | - // 导出的Excel文档的名称,(没看到作用) | ||
| 71 | - name: "Excel Document Name.xlsx", | ||
| 72 | - // Excel文件的名称 | ||
| 73 | - filename: "班次准点率" | ||
| 74 | - }); | ||
| 75 | -// $get('/sheet/exportList',params,function(result){ | ||
| 76 | -// window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD")); | 68 | + }) |
| 69 | + $("#exportList").on('click',function(){ | ||
| 70 | +// $("#forms_2").table2excel({ | ||
| 71 | +// // 不被导出的表格行的CSS class类 | ||
| 72 | +// exclude: ".noExl", | ||
| 73 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 74 | +// name: "Excel Document Name.xlsx", | ||
| 75 | +// // Excel文件的名称 | ||
| 76 | +// filename: "班次准点率" | ||
| 77 | // }); | 77 | // }); |
| 78 | + var i = layer.load(2); | ||
| 79 | + $get('/sheet/exportList',{id:no},function(result){ | ||
| 80 | + window.open("/downloadFile/download?fileName=发车准点率"+date); | ||
| 81 | + layer.close(i); | ||
| 82 | + }); | ||
| 78 | }); | 83 | }); |
| 79 | 84 | ||
| 80 | 85 |
src/main/resources/static/pages/report/sheet/sheetList.html
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | <span class="item-label" style="width: 80px;">公司: </span> | 31 | <span class="item-label" style="width: 80px;">公司: </span> |
| 32 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | 32 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 33 | </div> | 33 | </div> |
| 34 | - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv"> | 34 | + <div style="display: inline-block; margin-left: 38px;" id="fgsdmDiv"> |
| 35 | <span class="item-label" style="width: 80px;">分公司: </span> | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | 36 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> |
| 37 | </div> | 37 | </div> |
| @@ -51,6 +51,7 @@ | @@ -51,6 +51,7 @@ | ||
| 51 | </div> | 51 | </div> |
| 52 | 52 | ||
| 53 | <div class="form-group"> | 53 | <div class="form-group"> |
| 54 | + <input type="hidden" id="id"/> | ||
| 54 | <input class="btn btn-default" type="button" id="query" value="查询"/> | 55 | <input class="btn btn-default" type="button" id="query" value="查询"/> |
| 55 | <input class="btn btn-default" type="button" id="export" value="导出"/> | 56 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 56 | </div> | 57 | </div> |
| @@ -244,9 +245,9 @@ | @@ -244,9 +245,9 @@ | ||
| 244 | $("#fgsdm").attr("disabled", true); | 245 | $("#fgsdm").attr("disabled", true); |
| 245 | } | 246 | } |
| 246 | }); | 247 | }); |
| 248 | + | ||
| 249 | + $("#export").attr('disabled',"true"); | ||
| 247 | 250 | ||
| 248 | - | ||
| 249 | - | ||
| 250 | //查询 | 251 | //查询 |
| 251 | $("#query").on('click',function(){ | 252 | $("#query").on('click',function(){ |
| 252 | var line = $("#line").val(); | 253 | var line = $("#line").val(); |
| @@ -263,14 +264,19 @@ | @@ -263,14 +264,19 @@ | ||
| 263 | $('#forms_h tbody').html(sheetList_h); | 264 | $('#forms_h tbody').html(sheetList_h); |
| 264 | $('.btn-sheetList').on('click', showSheetList); | 265 | $('.btn-sheetList').on('click', showSheetList); |
| 265 | layer.close(i); | 266 | layer.close(i); |
| 267 | + if(result.length == 0) | ||
| 268 | + $("#export").attr('disabled',"true"); | ||
| 269 | + else | ||
| 270 | + $("#export").removeAttr("disabled"); | ||
| 266 | }); | 271 | }); |
| 267 | -// $post('/sheet/saveListSheet',function(result){ | 272 | +// $post('/sheet/saveListSheet',function(result){ |
| 268 | // }); | 273 | // }); |
| 269 | }); | 274 | }); |
| 270 | function showSheetList(){ | 275 | function showSheetList(){ |
| 271 | var id = $(this).data('id'); | 276 | var id = $(this).data('id'); |
| 272 | var date = $("#date").val(); | 277 | var date = $("#date").val(); |
| 273 | var endDate = $("#endDate").val(); | 278 | var endDate = $("#endDate").val(); |
| 279 | + $("#id").val(id); | ||
| 274 | $get('/sheet/listSheet',{id:id,date:date,endDate:endDate},function(result){ | 280 | $get('/sheet/listSheet',{id:id,date:date,endDate:endDate},function(result){ |
| 275 | var sheetList = template('sheetList_1',{list:result}); | 281 | var sheetList = template('sheetList_1',{list:result}); |
| 276 | var sheetList_h = template('sheetList_1_h',{list:result}); | 282 | var sheetList_h = template('sheetList_1_h',{list:result}); |
| @@ -285,6 +291,7 @@ | @@ -285,6 +291,7 @@ | ||
| 285 | } | 291 | } |
| 286 | function openSheetList(){ | 292 | function openSheetList(){ |
| 287 | var id = $(this).data('id'); | 293 | var id = $(this).data('id'); |
| 294 | + id += ","+$(this).data('date'); | ||
| 288 | $.get('/pages/report/sheet/list.html', function (content) { | 295 | $.get('/pages/report/sheet/list.html', function (content) { |
| 289 | layer.open({ | 296 | layer.open({ |
| 290 | type: 1, | 297 | type: 1, |
| @@ -300,29 +307,43 @@ | @@ -300,29 +307,43 @@ | ||
| 300 | }); | 307 | }); |
| 301 | } | 308 | } |
| 302 | $("#export").on("click",function(){ | 309 | $("#export").on("click",function(){ |
| 310 | + var line = $("#line").val(); | ||
| 303 | var date = $("#date").val(); | 311 | var date = $("#date").val(); |
| 304 | var endDate = $("#endDate").val(); | 312 | var endDate = $("#endDate").val(); |
| 305 | - $("#forms_h").table2excel({ | ||
| 306 | - // 不被导出的表格行的CSS class类 | ||
| 307 | - exclude: ".noExl", | ||
| 308 | - // 导出的Excel文档的名称,(没看到作用) | ||
| 309 | - name: "Excel Document Name.xlsx", | ||
| 310 | - // Excel文件的名称 | ||
| 311 | - filename: date+"-"+endDate+"班次准点率" | 313 | + var fgs=$('#fgsdm').val(); |
| 314 | + var gs=$('#gsdm').val(); | ||
| 315 | + var i = layer.load(2); | ||
| 316 | + $get('/sheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,type:"export"},function(result){ | ||
| 317 | + window.open("/downloadFile/download?fileName=发车准点率"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | ||
| 318 | + layer.close(i); | ||
| 312 | }); | 319 | }); |
| 313 | - }) | 320 | +// $("#forms_h").table2excel({ |
| 321 | +// // 不被导出的表格行的CSS class类 | ||
| 322 | +// exclude: ".noExl", | ||
| 323 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 324 | +// name: "Excel Document Name.xlsx", | ||
| 325 | +// // Excel文件的名称 | ||
| 326 | +// filename: date+"-"+endDate+"班次准点率" | ||
| 327 | +// }); | ||
| 328 | + }); | ||
| 314 | 329 | ||
| 315 | $("#export_1").on("click",function(){ | 330 | $("#export_1").on("click",function(){ |
| 331 | + var id = $("#id").val(); | ||
| 316 | var date = $("#date").val(); | 332 | var date = $("#date").val(); |
| 317 | var endDate = $("#endDate").val(); | 333 | var endDate = $("#endDate").val(); |
| 318 | - $("#forms_1_h").table2excel({ | ||
| 319 | - // 不被导出的表格行的CSS class类 | ||
| 320 | - exclude: ".noExl", | ||
| 321 | - // 导出的Excel文档的名称,(没看到作用) | ||
| 322 | - name: "Excel Document Name.xlsx", | ||
| 323 | - // Excel文件的名称 | ||
| 324 | - filename: date+"-"+endDate+"班次准点率" | 334 | + var i = layer.load(2); |
| 335 | + $get('/sheet/listSheet',{id:id,date:date,endDate:endDate,type:"export"},function(result){ | ||
| 336 | + window.open("/downloadFile/download?fileName=发车准点率"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | ||
| 337 | + layer.close(i); | ||
| 325 | }); | 338 | }); |
| 339 | +// $("#forms_1_h").table2excel({ | ||
| 340 | +// // 不被导出的表格行的CSS class类 | ||
| 341 | +// exclude: ".noExl", | ||
| 342 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 343 | +// name: "Excel Document Name.xlsx", | ||
| 344 | +// // Excel文件的名称 | ||
| 345 | +// filename: date+"-"+endDate+"班次准点率" | ||
| 346 | +// }); | ||
| 326 | }) | 347 | }) |
| 327 | 348 | ||
| 328 | }); | 349 | }); |
| @@ -379,7 +400,7 @@ | @@ -379,7 +400,7 @@ | ||
| 379 | <td>{{obj.zdlv}}</td> | 400 | <td>{{obj.zdlv}}</td> |
| 380 | <td> | 401 | <td> |
| 381 | <button type="button" class="btn btn-sm blue btn-sheetList_1" | 402 | <button type="button" class="btn btn-sm blue btn-sheetList_1" |
| 382 | - data-id="{{obj.id}}">详细</button> | 403 | + data-id="{{obj.id}}" data-date="{{obj.date}}">详细</button> |
| 383 | </td> | 404 | </td> |
| 384 | </tr> | 405 | </tr> |
| 385 | {{/each}} | 406 | {{/each}} |