Commit be2ff35289ee8bddf369ddf5a5019a50d196a976

Authored by 廖磊
1 parent 705ee0e0

报表修改

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -374,6 +374,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -374,6 +374,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
374 return scheduleRealInfoService.realScheduleList(line,date); 374 return scheduleRealInfoService.realScheduleList(line,date);
375 } 375 }
376 376
  377 + @RequestMapping(value="/realScheduleListQp")
  378 + public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){
  379 + return scheduleRealInfoService.realScheduleListQp(line,date);
  380 + }
  381 +
377 @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST) 382 @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST)
378 public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){ 383 public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){
379 cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson); 384 cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson);
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -120,9 +120,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -120,9 +120,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
120 void deleteByLineCodeAndDate(String xlBm, String schDate); 120 void deleteByLineCodeAndDate(String xlBm, String schDate);
121 121
122 //去掉了 xlBm is not null 122 //去掉了 xlBm is not null
123 - @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by (s.lpName+1), s.realExecDate,s.fcsj") 123 + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.realExecDate,s.fcsj, (s.lpName+1)")
124 List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); 124 List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date);
125 125
  126 + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by (s.lpName+1), s.realExecDate,s.fcsj")
  127 + List<ScheduleRealInfo> scheduleByDateAndLineQp(String line,String date);
  128 +
126 @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out') order by s.xlBm") 129 @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out') order by s.xlBm")
127 List<ScheduleRealInfo> scheduleByDateAndLine2(String line,String date); 130 List<ScheduleRealInfo> scheduleByDateAndLine2(String line,String date);
128 131
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -124,7 +124,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -124,7 +124,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
124 Map<String,Object> scheduleDaily(String line,String date); 124 Map<String,Object> scheduleDaily(String line,String date);
125 125
126 List<ScheduleRealInfo> realScheduleList(String line,String date); 126 List<ScheduleRealInfo> realScheduleList(String line,String date);
127 - 127 + List<ScheduleRealInfo> realScheduleListQp(String line,String date);
128 128
129 List<Map<String,Object>> yesterdayDataList(String line,String date); 129 List<Map<String,Object>> yesterdayDataList(String line,String date);
130 130
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -2046,7 +2046,99 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2046,7 +2046,99 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2046 String zdsjActual=""; 2046 String zdsjActual="";
2047 String zdsj1=""; 2047 String zdsj1="";
2048 String zdsjActual1=""; 2048 String zdsjActual1="";
2049 - List<ScheduleRealInfo> listInfo=scheduleRealInfoRepository.scheduleByDateAndLine(line, date); 2049 + List<ScheduleRealInfo> listInfo=scheduleRealInfoRepository.scheduleByDateAndLineQp(line, date);
  2050 + for (int i = 0; i < listInfo.size(); i++) {
  2051 + ScheduleRealInfo t=listInfo.get(i);
  2052 + if(!lpName.equals(t.getLpName())){
  2053 + zdsjActual=t.getZdsjActual();
  2054 + zdsj=t.getZdsj();
  2055 + t.setZdsjActual("");
  2056 + t.setZdsj("");
  2057 + }else{
  2058 + zdsj1=t.getZdsj();
  2059 + zdsjActual1=t.getZdsjActual();
  2060 + t.setZdsjActual(zdsjActual);
  2061 + t.setZdsj(zdsj);
  2062 + zdsj=zdsj1;
  2063 + zdsjActual=zdsjActual1;
  2064 + }
  2065 + lpName=t.getLpName();
  2066 + list.add(t);
  2067 + }
  2068 +
  2069 + List<ScheduleRealInfo> listInfo2=scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
  2070 + List<ScheduleRealInfo> xList=new ArrayList<ScheduleRealInfo>();
  2071 + List<ScheduleRealInfo> yList=new ArrayList<ScheduleRealInfo>();
  2072 + List<ScheduleRealInfo> zList=new ArrayList<ScheduleRealInfo>();
  2073 + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  2074 + if(listInfo2.size()>0){
  2075 + int a=listInfo2.size()%3;
  2076 + int b=listInfo2.size()/3;
  2077 + int x = 0,y=0;
  2078 + if(a==2){
  2079 + x=b+1;y=x*2;;
  2080 + }else if(b==1){
  2081 + x=b+1;y=x*2-1;;
  2082 + }else{
  2083 + x=b;
  2084 + y=2*x;
  2085 +
  2086 + }
  2087 + for (int i = 0; i < listInfo2.size(); i++) {
  2088 + ScheduleRealInfo s=listInfo2.get(i);
  2089 + if(i+1<=x){
  2090 + xList.add(s);
  2091 + }else if((i+1)>x&&(i+1)<=y){
  2092 + yList.add(s);
  2093 + }else{
  2094 + zList.add(s);
  2095 + }
  2096 + }
  2097 + for (int i = 0; i < x; i++) {
  2098 + newList.add(xList.get(i));
  2099 + if(yList.size()>i){
  2100 + newList.add(yList.get(i));
  2101 + }else{
  2102 + newList.add(new ScheduleRealInfo());
  2103 + }
  2104 + if(zList.size()>i){
  2105 + newList.add(zList.get(i));
  2106 + }else{
  2107 + newList.add(new ScheduleRealInfo());
  2108 + }
  2109 +
  2110 + }
  2111 + }
  2112 + for (int i = 0; i < newList.size(); i++) {
  2113 + ScheduleRealInfo t1=newList.get(i);
  2114 + for (int j = 0; j < list.size(); j++) {
  2115 + ScheduleRealInfo t2=list.get(j);
  2116 + if(t1.getId()==t2.getId()){
  2117 + t1=t2;
  2118 + }
  2119 + }
  2120 + }
  2121 + return newList;
  2122 + }
  2123 +
  2124 + @Override
  2125 + public List<ScheduleRealInfo> realScheduleListQp(String line, String date) {
  2126 + /*List<ScheduleRealInfo> listInfo = scheduleRealInfoRepository.queryUserInfo(line, date);
  2127 + List<ScheduleRealInfo> listTotal = scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
  2128 + for(ScheduleRealInfo info:listInfo){
  2129 + for(ScheduleRealInfo total:listTotal){
  2130 + if(info.getjGh().equals(total.getjGh()) && info.getLpName().equals(total.getLpName()) && info.getClZbh().equals(total.getClZbh())){
  2131 +
  2132 + }
  2133 + }
  2134 + }*/
  2135 + List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>();
  2136 + String lpName="lpName";
  2137 + String zdsj="";
  2138 + String zdsjActual="";
  2139 + String zdsj1="";
  2140 + String zdsjActual1="";
  2141 + List<ScheduleRealInfo> listInfo=scheduleRealInfoRepository.scheduleByDateAndLineQp(line, date);
2050 for (int i = 0; i < listInfo.size(); i++) { 2142 for (int i = 0; i < listInfo.size(); i++) {
2051 ScheduleRealInfo t=listInfo.get(i); 2143 ScheduleRealInfo t=listInfo.get(i);
2052 if(!lpName.equals(t.getLpName())){ 2144 if(!lpName.equals(t.getLpName())){
@@ -2081,7 +2173,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2081,7 +2173,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2081 return list; 2173 return list;
2082 } 2174 }
2083 2175
2084 -  
2085 public List<Map<String, Object>> yesterdayDataList(String line, String date) { 2176 public List<Map<String, Object>> yesterdayDataList(String line, String date) {
2086 //前一天日期 2177 //前一天日期
2087 // String date = sdfMonth.format(org.apache.commons.lang.time.DateUtils.addDays(new Date(), -1)); 2178 // String date = sdfMonth.format(org.apache.commons.lang.time.DateUtils.addDays(new Date(), -1));
src/main/resources/static/pages/forms/statement/scheduleDaily.html
@@ -52,8 +52,8 @@ @@ -52,8 +52,8 @@
52 </tr> 52 </tr>
53 <tr> 53 <tr>
54 <td rowspan="3">路线别</td> 54 <td rowspan="3">路线别</td>
55 - <td colspan="16"><c>全日</c>营运里程(公里)</td>  
56 - <td colspan="15"><c>全日</c>营运班次</td> 55 + <td colspan="16">全日营运里程(公里)</td>
  56 + <td colspan="15">全日营运班次</td>
57 <td colspan="9">大间隔情况</td> 57 <td colspan="9">大间隔情况</td>
58 </tr> 58 </tr>
59 <tr> 59 <tr>
@@ -84,13 +84,13 @@ @@ -84,13 +84,13 @@
84 <td>气候</td> 84 <td>气候</td>
85 <td>援外</td> 85 <td>援外</td>
86 <td>其他</td> 86 <td>其他</td>
87 - <td><c>全日</c></td> 87 + <td>全日</td>
88 <td>早高峰</td> 88 <td>早高峰</td>
89 <td>晚高峰</td> 89 <td>晚高峰</td>
90 - <td><c>全日</c></td> 90 + <td>全日</td>
91 <td>早高峰</td> 91 <td>早高峰</td>
92 <td>晚高峰</td> 92 <td>晚高峰</td>
93 - <td><c>全日</c></td> 93 + <td>全日</td>
94 <td>早高峰</td> 94 <td>早高峰</td>
95 <td>晚高峰</td> 95 <td>晚高峰</td>
96 <td><c>全日</c></td> 96 <td><c>全日</c></td>
@@ -263,9 +263,17 @@ @@ -263,9 +263,17 @@
263 format : 'YYYY-MM-DD', 263 format : 'YYYY-MM-DD',
264 locale : 'zh-cn' 264 locale : 'zh-cn'
265 }); 265 });
266 - 266 + var d = new Date();
  267 + var year = d.getFullYear();
  268 + var month = d.getMonth() + 1;
  269 + var day = d.getDate();
  270 + if(month < 10)
  271 + month = "0" + month;
  272 + if(day < 10)
  273 + day = "0" + day;
  274 + $("#date").val(year + "-" + month + "-" + day);
267 275
268 - $("#ddrbBody").height($(window).height()-300); 276 + $("#ddrbBody").height($(window).height()-250);
269 $.get('/basic/lineCode2Name',function(result){ 277 $.get('/basic/lineCode2Name',function(result){
270 var data=[]; 278 var data=[];
271 279
src/main/resources/static/pages/forms/statement/scheduleDailyQp.html
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 18
19 <div class="page-head"> 19 <div class="page-head">
20 <div class="page-title"> 20 <div class="page-title">
21 - <h1>调度工作日报表</h1> 21 + <h1>调度日报</h1>
22 </div> 22 </div>
23 </div> 23 </div>
24 24
@@ -26,252 +26,226 @@ @@ -26,252 +26,226 @@
26 <div class="col-md-12"> 26 <div class="col-md-12">
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 - <form id="history" class="form-inline" action="">  
30 - <div style="display: inline-block; margin-left: 10px;" id="company1">  
31 - <span class="item-label" style="width: 80px;">公司: </span>  
32 - <select class="form-control" name="company" id="company" style="width: 160px;"></select>  
33 - </div>  
34 - <div style="display: inline-block; margin-left: 10px;" id="subCompany1">  
35 - <span class="item-label" style="width: 80px;">分公司: </span>  
36 - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>  
37 - </div>  
38 - <div style="display: inline-block; margin-left: 10px;">  
39 - <span class="item-label" style="width: 80px;">线路: </span>  
40 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
41 - </div>  
42 - <div style="display: inline-block;margin-left: 10px;">  
43 - <span class="item-label" style="width: 80px;">时间: </span>  
44 - <input class="form-control" type="text" id="date" style="width: 180px;"/>  
45 - </div>  
46 - <div class="form-group">  
47 - <input class="btn btn-default" type="button" id="query" value="筛选"/>  
48 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
49 - </div> 29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 15px;">
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  37 + </div>
  38 + <div class="form-group">
  39 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  40 + <input class="btn btn-default" type="button" id="month" value="按月查询"/>
  41 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  42 + </div>
50 </form> 43 </form>
51 </div> 44 </div>
52 - <div class="portlet-body" >  
53 - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 506px;height: 400px"> 45 + <div class="portlet-body">
  46 + <div class="table-container" id="ddrbBody" style="margin-top: 10px;overflow:auto;min-width: 906px">
  47 + <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
54 <table class="table table-bordered table-hover table-checkable" id="forms"> 48 <table class="table table-bordered table-hover table-checkable" id="forms">
55 - <thead >  
56 - <tr >  
57 - <th style="text-align:center;vertical-align:middle;" rowspan="3">路牌</th>  
58 - <th style="text-align:center;vertical-align:middle;"  
59 - rowspan="2" colspan="2">车号</th>  
60 - <th rowspan="3">班别</th>  
61 - <th colspan="3" style="text-align:center;vertical-align:middle;">驾驶员</th>  
62 - <th colspan="3" style="text-align:center;vertical-align:middle;">售票员</th>  
63 - <th rowspan="3" style="text-align:center;vertical-align:middle;">路牌</th>  
64 - <th rowspan="4" style="text-align:center;vertical-align:middle;">记录项目</th>  
65 - <th colspan="3" style="text-align:center;vertical-align:middle;">1</th>  
66 - <th colspan="3" style="text-align:center;vertical-align:middle;">2</th>  
67 - <th colspan="3" style="text-align:center;vertical-align:middle;">3</th>  
68 - <th colspan="3" style="text-align:center;vertical-align:middle;">4</th>  
69 - <th colspan="3" style="text-align:center;vertical-align:middle;">5</th>  
70 - <th colspan="3" style="text-align:center;vertical-align:middle;">6</th>  
71 - <th colspan="3" style="text-align:center;vertical-align:middle;">7</th>  
72 - <th colspan="3" style="text-align:center;vertical-align:middle;">8</th>  
73 - <th colspan="3" style="text-align:center;vertical-align:middle;">9</th>  
74 - <th colspan="3" style="text-align:center;vertical-align:middle;">10</th>  
75 - <th colspan="3" style="text-align:center;vertical-align:middle;">11</th>  
76 - <th colspan="3" style="text-align:center;vertical-align:middle;">12</th>  
77 - <th colspan="3" style="text-align:center;vertical-align:middle;">13</th>  
78 - <th colspan="3" style="text-align:center;vertical-align:middle;">14</th>  
79 - <th colspan="3" style="text-align:center;vertical-align:middle;">15</th>  
80 - <th colspan="3" style="text-align:center;vertical-align:middle;">16</th>  
81 - <th colspan="3" style="text-align:center;vertical-align:middle;">17</th>  
82 - <th colspan="3" style="text-align:center;vertical-align:middle;">18</th>  
83 - <th colspan="3" style="text-align:center;vertical-align:middle;">19</th>  
84 - <th colspan="3" style="text-align:center;vertical-align:middle;">20</th>  
85 - 49 + <thead>
  50 + <tr>
  51 + <th colspan="40">线路调度日报</th>
86 </tr> 52 </tr>
87 <tr> 53 <tr>
88 -  
89 -  
90 - <th colspan="3">职号/接班时间</th>  
91 - <th colspan="3">职号/接班时间</th>  
92 - <th rowspan="2">到达</th>  
93 - <th rowspan="2">早/迟</th>  
94 - <th rowspan="2">开出</th>  
95 -  
96 - <th rowspan="2">到达</th>  
97 - <th rowspan="2">早/迟</th>  
98 - <th rowspan="2">开出</th>  
99 -  
100 - <th rowspan="2">到达</th>  
101 - <th rowspan="2">早/迟</th>  
102 - <th rowspan="2">开出</th>  
103 -  
104 - <th rowspan="2">到达</th>  
105 - <th rowspan="2">早/迟</th>  
106 - <th rowspan="2">开出</th>  
107 -  
108 - <th rowspan="2">到达</th>  
109 - <th rowspan="2">早/迟</th>  
110 - <th rowspan="2">开出</th>  
111 -  
112 - <th rowspan="2">到达</th>  
113 - <th rowspan="2">早/迟</th>  
114 - <th rowspan="2">开出</th>  
115 -  
116 - <th rowspan="2">到达</th>  
117 - <th rowspan="2">早/迟</th>  
118 - <th rowspan="2">开出</th>  
119 -  
120 - <th rowspan="2">到达</th>  
121 - <th rowspan="2">早/迟</th>  
122 - <th rowspan="2">开出</th>  
123 -  
124 - <th rowspan="2">到达</th>  
125 - <th rowspan="2">早/迟</th>  
126 - <th rowspan="2">开出</th>  
127 -  
128 - <th rowspan="2">到达</th>  
129 - <th rowspan="2">早/迟</th>  
130 - <th rowspan="2">开出</th>  
131 -  
132 - <th rowspan="2">到达</th>  
133 - <th rowspan="2">早/迟</th>  
134 - <th rowspan="2">开出</th>  
135 -  
136 - <th rowspan="2">到达</th>  
137 - <th rowspan="2">早/迟</th>  
138 - <th rowspan="2">开出</th>  
139 -  
140 - <th rowspan="2">到达</th>  
141 - <th rowspan="2">早/迟</th>  
142 - <th rowspan="2">开出</th>  
143 -  
144 - <th rowspan="2">到达</th>  
145 - <th rowspan="2">早/迟</th>  
146 - <th rowspan="2">开出</th>  
147 -  
148 - <th rowspan="2">到达</th>  
149 - <th rowspan="2">早/迟</th>  
150 - <th rowspan="2">开出</th>  
151 -  
152 - <th rowspan="2">到达</th>  
153 - <th rowspan="2">早/迟</th>  
154 - <th rowspan="2">开出</th>  
155 -  
156 - <th rowspan="2">到达</th>  
157 - <th rowspan="2">早/迟</th>  
158 - <th rowspan="2">开出</th>  
159 -  
160 - <th rowspan="2">到达</th>  
161 - <th rowspan="2">早/迟</th>  
162 - <th rowspan="2">开出</th>  
163 -  
164 - <th rowspan="2">到达</th>  
165 - <th rowspan="2">早/迟</th>  
166 - <th rowspan="2">开出</th>  
167 -  
168 - <th rowspan="2">到达</th>  
169 - <th rowspan="2">早/迟</th>  
170 - <th rowspan="2">开出</th>  
171 - 54 + <td rowspan="3">路线别</td>
  55 + <td colspan="16">全日营运里程(公里)</td>
  56 + <td colspan="15">全日营运班次</td>
  57 + <td colspan="9">大间隔情况</td>
172 </tr> 58 </tr>
173 <tr> 59 <tr>
174 - <th>出场</th>  
175 - <th>调换</th>  
176 - <th>1</th>  
177 - <th>2</th>  
178 - <th>3</th>  
179 - <th>1</th>  
180 - <th>2</th>  
181 - <th>3</th> 60 + <td rowspan="2">计划</td>
  61 + <td rowspan="2">实驶</td>
  62 + <td rowspan="2">少驶公里</td>
  63 + <td rowspan="2">少驶班次</td>
  64 + <td colspan="11">少驶原因(公里)</td>
  65 + <td rowspan="2">临加公里</td>
  66 + <td colspan="3">计划班次</td>
  67 + <td colspan="3">实际班次</td>
  68 + <td colspan="3">临加班次</td>
  69 + <td colspan="3">放站班次</td>
  70 + <td colspan="3">调头班次</td>
  71 + <td colspan="3">发生次数</td>
  72 + <td rowspan="2">最大间隔时间(分)</td>
  73 + <td colspan="5" rowspan="2">原因</td>
182 </tr> 74 </tr>
183 - </thead>  
184 - <tbody >  
185 - <tr >  
186 - <td></td>  
187 - <td>  
188 -  
189 - </td>  
190 - <td>  
191 -  
192 - </td>  
193 - <td>  
194 -  
195 - </td>  
196 - <td>  
197 -  
198 - </td>  
199 - <td >  
200 -  
201 - </td>  
202 - <td></td>  
203 - <td></td>  
204 - <td></td>  
205 - <td></td>  
206 - <td></td>  
207 - <td></td>  
208 - <td></td>  
209 - <td></td>  
210 - <td></td>  
211 - <td></td>  
212 - <td></td>  
213 - <td></td>  
214 - <td></td>  
215 - <td></td>  
216 - <td></td>  
217 - <td></td>  
218 - <td></td>  
219 - <td></td>  
220 - <td></td>  
221 - <td></td>  
222 - <td></td>  
223 - <td></td>  
224 - <td></td>  
225 - <td></td>  
226 - <td></td>  
227 - <td></td>  
228 - <td></td>  
229 - <td></td>  
230 - <td></td>  
231 - <td></td>  
232 - <td></td>  
233 - <td></td>  
234 - <td></td>  
235 - <td></td>  
236 - <td></td>  
237 - <td></td>  
238 - <td></td>  
239 - <td></td>  
240 - <td></td>  
241 - <td></td>  
242 - <td></td>  
243 - <td></td>  
244 - <td></td>  
245 - <td></td>  
246 - <td></td>  
247 - <td></td>  
248 - <td></td>  
249 - <td></td>  
250 - <td></td>  
251 - <td></td>  
252 - <td></td>  
253 - <td></td>  
254 - <td></td>  
255 - <td></td>  
256 - <td></td>  
257 - <td></td>  
258 - <td></td>  
259 - <td></td>  
260 - <td></td>  
261 - <td></td>  
262 - <td></td>  
263 - <td></td>  
264 - <td></td>  
265 - <td></td>  
266 - <td></td>  
267 - <td></td> 75 + <tr>
  76 + <td>路阻</td>
  77 + <td>吊慢</td>
  78 + <td>故障</td>
  79 + <td>纠纷</td>
  80 + <td>肇事</td>
  81 + <td>缺人</td>
  82 + <td>缺车</td>
  83 + <td>客稀</td>
  84 + <td>气候</td>
  85 + <td>援外</td>
  86 + <td>其他</td>
  87 + <td>全日</td>
  88 + <td>早高峰</td>
  89 + <td>晚高峰</td>
  90 + <td>全日</td>
  91 + <td>早高峰</td>
  92 + <td>晚高峰</td>
  93 + <td>全日</td>
  94 + <td>早高峰</td>
  95 + <td>晚高峰</td>
  96 + <td><c>全日</c></td>
  97 + <td>早高峰</td>
  98 + <td>晚高峰</td>
  99 + <td><c>全日</c></td>
  100 + <td>早高峰</td>
  101 + <td>晚高峰</td>
  102 + <td><c>全日</c></td>
  103 + <td>早高峰</td>
  104 + <td>晚高峰</td>
268 </tr> 105 </tr>
269 - 106 + </thead>
  107 +
  108 + <tbody class="scheduleDaily_1">
  109 +
  110 + </tbody>
  111 + <tr>
  112 + <td colspan="40">&nbsp;</td>
  113 + </tr>
  114 + <!-- <tr>
  115 + <td colspan="40">合计</td>
  116 + </tr>
  117 + <tr>
  118 + <td>售票</td>
  119 + <td colspan="2">1元</td>
  120 + <td colspan="2">2元</td>
  121 + <td colspan="2">3元</td>
  122 + <td colspan="2">4元</td>
  123 + <td colspan="2">5元</td>
  124 + <td colspan="2">6元</td>
  125 + <td colspan="2">7元</td>
  126 + <td colspan="2">8元</td>
  127 + <td colspan="2">9元</td>
  128 + <td colspan="2">10元</td>
  129 + <td colspan="2">&nbsp;</td>
  130 + <td colspan="2">合计张数</td>
  131 + <td colspan="2">&nbsp;</td>
  132 + <td colspan="2">预售票</td>
  133 + <td colspan="2">1元</td>
  134 + <td colspan="2">1.5元</td>
  135 + <td colspan="2">合计张数</td>
  136 + <td colspan="5">&nbsp;</td>
  137 + </tr>
  138 + <tr>
  139 + <td>张数</td>
  140 + <td colspan="2">&nbsp;</td>
  141 + <td colspan="2">&nbsp;</td>
  142 + <td colspan="2">&nbsp;</td>
  143 + <td colspan="2">&nbsp;</td>
  144 + <td colspan="2">&nbsp;</td>
  145 + <td colspan="2">&nbsp;</td>
  146 + <td colspan="2">&nbsp;</td>
  147 + <td colspan="2">&nbsp;</td>
  148 + <td colspan="2">&nbsp;</td>
  149 + <td colspan="2">&nbsp;</td>
  150 + <td colspan="2">&nbsp;</td>
  151 + <td colspan="2">合计金额</td>
  152 + <td colspan="2">&nbsp;</td>
  153 + <td colspan="2">张数</td>
  154 + <td colspan="2">&nbsp;</td>
  155 + <td colspan="2">&nbsp;</td>
  156 + <td colspan="2">合计金额</td>
  157 + <td colspan="5">&nbsp;</td>
  158 + </tr>
  159 + <tr>
  160 + <td colspan="40">&nbsp;</td>
  161 + </tr> -->
  162 + <tr>
  163 + <td colspan="2">路牌</td>
  164 + <td colspan="2">车号</td>
  165 + <td>司早</td>
  166 + <td>售早</td>
  167 + <td>司晚</td>
  168 + <td>售晚</td>
  169 + <td colspan="2">路牌</td>
  170 + <td colspan="2">车号</td>
  171 + <td>司早</td>
  172 + <td>售早</td>
  173 + <td>司晚</td>
  174 + <td>售晚</td>
  175 + <td colspan="2">路牌</td>
  176 + <td colspan="2">车号</td>
  177 + <td>司早</td>
  178 + <td>售早</td>
  179 + <td>司晚</td>
  180 + <td>售晚</td>
  181 + <td colspan="2">路牌</td>
  182 + <td colspan="2">车号</td>
  183 + <td>司早</td>
  184 + <td>售早</td>
  185 + <td>司晚</td>
  186 + <td>售晚</td>
  187 + <td colspan="2">路牌</td>
  188 + <td colspan="2">车号</td>
  189 + <td>司早</td>
  190 + <td>售早</td>
  191 + <td>司晚</td>
  192 + <td>售晚</td>
  193 + </tr>
  194 + <tbody class="scheduleDaily_2">
  195 +
  196 + </tbody>
  197 + <tr>
  198 + <td colspan="40">&nbsp;</td>
  199 + </tr>
  200 + <tr>
  201 + <td rowspan="2">路牌</td>
  202 + <td colspan="2" rowspan="2">起点站</td>
  203 + <td colspan="4">到达时间</td>
  204 + <td colspan="4">发车时间</td>
  205 + <td colspan="2" rowspan="2">备注</td>
  206 + <td rowspan="2">路牌</td>
  207 + <td colspan="2" rowspan="2">起点站</td>
  208 + <td colspan="4">到达时间</td>
  209 + <td colspan="4">发车时间</td>
  210 + <td colspan="2" rowspan="2">备注</td>
  211 + <td rowspan="2">路牌</td>
  212 + <td colspan="2" rowspan="2">起点站</td>
  213 + <td colspan="4">到达时间</td>
  214 + <td colspan="4">发车时间</td>
  215 + <td colspan="2" rowspan="2">备注</td>
  216 + <td>&nbsp;</td>
  217 + </tr>
  218 + <tr>
  219 + <td>应到</td>
  220 + <td>实到</td>
  221 + <td>快</td>
  222 + <td>慢</td>
  223 + <td>应发</td>
  224 + <td>实发</td>
  225 + <td>快</td>
  226 + <td>慢</td>
  227 + <td>应到</td>
  228 + <td>实到</td>
  229 + <td>快</td>
  230 + <td>慢</td>
  231 + <td>应发</td>
  232 + <td>实发</td>
  233 + <td>快</td>
  234 + <td>慢</td>
  235 + <td>应到</td>
  236 + <td>实到</td>
  237 + <td>快</td>
  238 + <td>慢</td>
  239 + <td>应发</td>
  240 + <td>实发</td>
  241 + <td>快</td>
  242 + <td>慢</td>
  243 + <td>&nbsp;</td>
  244 + </tr>
  245 + <tbody class="scheduleDaily_3">
  246 +
270 </tbody> 247 </tbody>
271 </table> 248 </table>
272 - <div style="text-align: right;">  
273 - <ul id="pagination" class="pagination"></ul>  
274 - </div>  
275 </div> 249 </div>
276 </div> 250 </div>
277 </div> 251 </div>
@@ -290,104 +264,218 @@ @@ -290,104 +264,218 @@
290 locale : 'zh-cn' 264 locale : 'zh-cn'
291 }); 265 });
292 266
293 - var d = new Date();  
294 - var year = d.getFullYear();  
295 - var month = d.getMonth() + 1;  
296 - var day = d.getDate();  
297 - if(month < 10)  
298 - month = "0" + month;  
299 - if(day < 10)  
300 - day = "0" + day;  
301 - $("#date").val(year + "-" + month + "-" + day);  
302 - 267 +
  268 + $("#ddrbBody").height($(window).height()-300);
303 $.get('/basic/lineCode2Name',function(result){ 269 $.get('/basic/lineCode2Name',function(result){
304 var data=[]; 270 var data=[];
305 271
306 - data.push({id: " ", text: "全部线路"});  
307 for(var code in result){ 272 for(var code in result){
308 data.push({id: code, text: result[code]}); 273 data.push({id: code, text: result[code]});
309 } 274 }
310 initPinYinSelect2('#line',data,''); 275 initPinYinSelect2('#line',data,'');
  276 +
311 }) 277 })
312 278
313 - var obj = [];  
314 - $.get('/user/companyData', function(result){  
315 - obj = result;  
316 - var options = '';  
317 - for(var i = 0; i < obj.length; i++){  
318 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
319 - }  
320 - if(obj.length == 1){  
321 - $('#company1').hide();  
322 - if(obj[0].children.length == 1)  
323 - $('#subCompany1').hide();  
324 - }  
325 - $('#company').html(options);  
326 - updateCompany();  
327 - });  
328 - $("#company").on("change",updateCompany);  
329 - function updateCompany(){  
330 - var company = $('#company').val();  
331 - var options = '';  
332 - for(var i = 0; i < obj.length; i++){  
333 - if(obj[i].companyCode == company){  
334 - var children = obj[i].children;  
335 - for(var j = 0; j < children.length; j++){  
336 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
337 - }  
338 - }  
339 - }  
340 - $('#subCompany').html(options);  
341 - } 279 + $('#export').attr('disabled', "true");
342 280
  281 + var line = $("#line").val();
  282 + var xlName = $("#select2-line-container").html();
  283 + var date = $("#date").val();
343 284
  285 + function getTime(list){
  286 + $.each(list, function(i, obj) {
  287 + if(obj.zdsj != null && obj.zdsjActual != null ){
  288 + var zdsjActual = (obj.zdsjActual).split(":");
  289 + var zdsj = (obj.zdsj).split(":");
  290 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  291 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  292 + }
  293 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  294 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  295 + }
  296 + }
  297 +
  298 + if(obj.fcsj != null && obj.fcsjActual != null ){
  299 + var fcsjActual = (obj.fcsjActual).split(":");
  300 + var fcsj = (obj.fcsj).split(":");
  301 + if(fcsjActual[0]*60+Number(fcsjActual[1]) > fcsj[0]*60+Number(fcsj[1])){
  302 + obj["slow0"] = (fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1]));
  303 + }
  304 + else if(fcsjActual[0]*60+Number(fcsjActual[1]) < fcsj[0]*60+Number(fcsj[1])){
  305 + obj["fast0"] = (fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1]));
  306 + }
  307 + }
  308 + });
  309 + }
344 //查询 310 //查询
345 $("#query").on('click',function(){ 311 $("#query").on('click',function(){
346 - var line = $("#line").val();  
347 - var date = $("#date").val();  
348 - $get('/realSchedule/scheduleDailyQp',{line:line,date:date},function(result){  
349 - var mycars = new Array(20);  
350 - var scheduleDaily_qp = template('scheduleDaily_qp',{list:result,lists:mycars});  
351 - $('#forms tbody').html(scheduleDaily_qp); 312 + line = $("#line").val();
  313 + xlName = $("#select2-line-container").html();
  314 + date = $("#date").val();
  315 + $("#rqxs").html(date);
  316 + if(date == null || date.length == 0){
  317 + layer.msg("请选择时间");
  318 + return;
  319 + }
  320 + $("c").html("全日");
  321 + $("#export").removeAttr("disabled");
  322 + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
  323 + var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
  324 + $('#forms .scheduleDaily_1').html(scheduleDaily_1);
352 }); 325 });
  326 + $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){
  327 + console.log(result);
  328 + var scheduleDaily_2 = template('scheduleDaily_2',{list:result});
  329 + $('#forms .scheduleDaily_2').html(scheduleDaily_2);
  330 + });
  331 + $.get('/realSchedule/realScheduleListQp',{line:line,date:date,type:"query"},function(result){
  332 + getTime(result);
  333 + var scheduleDaily_3 = template('scheduleDaily_3',{list:result});
  334 + $('#forms .scheduleDaily_3').html(scheduleDaily_3);
  335 + });
  336 +
  337 + });
  338 +
  339 + //按月查询
  340 + $("#month").on('click',function(){
  341 + line = $("#line").val();
  342 + xlName = $("#select2-line-container").html();
  343 + date = $("#date").val();
  344 + if(date == null || date.length == 0){
  345 + layer.msg("请选择时间");
  346 + return;
  347 + }
  348 + date = date.substring(0, 7);
  349 + $("c").html("全月");
  350 + $("#export").removeAttr("disabled");
  351 + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
  352 + var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
  353 + $('#forms .scheduleDaily_1').html(scheduleDaily_1);
  354 + });
  355 + $('#forms .scheduleDaily_2').html("");
  356 + $('#forms .scheduleDaily_3').html("");
  357 +
353 }); 358 });
354 359
355 $("#export").on("click",function(){ 360 $("#export").on("click",function(){
356 - $get('/pcpc/workDaily',{line:line,date:date,type:'export'},function(result){  
357 - window.open("/downloadFile/download?fileName=营运服务日报表"+moment(date).format("YYYYMMDD")); 361 + var params = {};
  362 + if(date == null || date.length == 0){
  363 + layer.msg("请选择时间");
  364 + return;
  365 + }
  366 + params['line'] = line;
  367 + params['date'] = date;
  368 + params['xlName'] = xlName;
  369 + params['type'] = "export";
  370 + params['state'] = '2';
  371 + $get('/realSchedule/scheduleDailyExport', params, function(result){
  372 + if(date.length == 10)
  373 + window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMMDD"));
  374 + else
  375 + window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMM"));
358 }); 376 });
359 }); 377 });
360 378
361 -  
362 }); 379 });
363 -  
364 </script> 380 </script>
365 -<script type="text/html" id="scheduleDaily_qp"> 381 +<script type="text/html" id="scheduleDaily_1">
366 {{each list as obj i}} 382 {{each list as obj i}}
367 <tr> 383 <tr>
368 - <td>{{obj.lp}}</td>  
369 - <td>{{obj.cccl}}</td>  
370 - <td>{{obj.thclzbh}}</td>  
371 - <td>&nbsp;</td>  
372 - <td>{{obj.jjb1}}</td>  
373 - <td>{{obj.jjb2}}</td>  
374 - <td>{{obj.jjb3}}</td>  
375 - <td>{{obj.sjb1}}</td>  
376 - <td>{{obj.sjb2}}</td>  
377 - <td>{{obj.sjb3}}</td>  
378 - <td>{{obj.lp}}</td>  
379 - <td>&nbsp;</td>  
380 - {{each lists as o j}}  
381 - <td>{{obj['dd'+(j+1)]}}</td>  
382 - <td>{{obj['cz'+(j+1)]}}</td>  
383 - <td>{{obj['kc'+(j+1)]}}</td>  
384 - {{/each}}  
385 - 384 + <td>{{obj.xlName}}</td>
  385 + <td>{{obj.jhlc}}</td>
  386 + <td>{{obj.sjgl}}</td>
  387 + <td>{{obj.ssgl}}</td>
  388 + <td>{{obj.ssbc}}</td>
  389 + <td>{{obj.ssgl_lz}}</td>
  390 + <td>{{obj.ssgl_dm}}</td>
  391 + <td>{{obj.ssgl_gz}}</td>
  392 + <td>{{obj.ssgl_jf}}</td>
  393 + <td>{{obj.ssgl_zs}}</td>
  394 + <td>{{obj.ssgl_qr}}</td>
  395 + <td>{{obj.ssgl_qc}}</td>
  396 + <td>{{obj.ssgl_kx}}</td>
  397 + <td>{{obj.ssgl_qh}}</td>
  398 + <td>{{obj.ssgl_yw}}</td>
  399 + <td>{{obj.ssgl_other}}</td>
  400 + <td>{{obj.ljgl}}</td>
  401 + <td>{{obj.jhbc}}</td>
  402 + <td>{{obj.jhbc_m}}</td>
  403 + <td>{{obj.jhbc_a}}</td>
  404 + <td>{{obj.sjbc}}</td>
  405 + <td>{{obj.sjbc_m}}</td>
  406 + <td>{{obj.sjbc_a}}</td>
  407 + <td>{{obj.ljbc}}</td>
  408 + <td>{{obj.ljbc_m}}</td>
  409 + <td>{{obj.ljbc_a}}</td>
  410 + <td>{{obj.fzbc}}</td>
  411 + <td>{{obj.fzbc_m}}</td>
  412 + <td>{{obj.fzbc_a}}</td>
  413 + <td>{{obj.dtbc}}</td>
  414 + <td>{{obj.dtbc_m}}</td>
  415 + <td>{{obj.dtbc_a}}</td>
  416 + <td>{{obj.djg}}</td>
  417 + <td>{{obj.djg_m}}</td>
  418 + <td>{{obj.djg_a}}</td>
  419 + <td>{{obj.djg_time}}</td>
  420 + <td colspan="5">&nbsp;</td>
  421 + </tr>
  422 + {{/each}}
  423 + {{if list.length == 0}}
  424 + <tr>
  425 + <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>
  426 + </tr>
  427 + {{/if}}
  428 +</script>
  429 +<script type="text/html" id="scheduleDaily_2">
  430 + {{each list as obj i}}
  431 + {{if i%5 == 0}}
  432 + <tr>
  433 + {{/if}}
  434 + <td colspan="2">{{obj[3]}}</td>
  435 + <td colspan="2">{{obj[2]}}</td>
  436 + <td>{{obj[1]}}/{{obj[4]}}</td>
  437 + <td>{{if obj[5] !=null}}
  438 + {{obj[5]}}/
  439 + {{obj[6]}}
386 440
  441 + {{/if}}
  442 + </td>
  443 + <td>&nbsp;</td>
  444 + <td>&nbsp;</td>
  445 + {{if (i+1)%5 == 0}}
  446 + </tr>
  447 + {{/if}}
387 {{/each}} 448 {{/each}}
388 {{if list.length == 0}} 449 {{if list.length == 0}}
389 <tr> 450 <tr>
390 - <td colspan="17"><h6 class="muted">没有找到相关数据</h6></td> 451 + <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>
391 </tr> 452 </tr>
392 {{/if}} 453 {{/if}}
393 </script> 454 </script>
  455 +<script type="text/html" id="scheduleDaily_3">
  456 + {{each list as obj i}}
  457 + {{if i%3 == 0}}
  458 + <tr>
  459 + {{/if}}
  460 + <td>{{obj.lpName}}</td>
  461 + <td colspan="2">{{obj.qdzName}}</td>
  462 + <td>{{obj.zdsj}}</td>
  463 + <td>{{obj.zdsjActual}}</td>
  464 + <td>{{obj.fast}}</td>
  465 + <td>{{obj.slow}}</td>
  466 + <td>{{obj.fcsj}}</td>
  467 + <td>{{obj.fcsjActual}}</td>
  468 + <td>{{obj.fast0}}</td>
  469 + <td>{{obj.slow0}}</td>
  470 + <td colspan="2">{{obj.remarks}}</td>
  471 + {{if (i+1)%3 == 0}}
  472 + <td>&nbsp;</td>
  473 + </tr>
  474 + {{/if}}
  475 + {{/each}}
  476 + {{if list.length == 0}}
  477 + <tr>
  478 + <td colspan="40"><h6 class="muted">没有找到相关数据</h6></td>
  479 + </tr>
  480 + {{/if}}
  481 +</script>
394 \ No newline at end of file 482 \ No newline at end of file
src/main/resources/static/pages/forms/statement/scheduleDailyQp2.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>调度工作日报表</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form id="history" class="form-inline" action="">
  30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 10px;">
  39 + <span class="item-label" style="width: 80px;">线路: </span>
  40 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  41 + </div>
  42 + <div style="display: inline-block;margin-left: 10px;">
  43 + <span class="item-label" style="width: 80px;">时间: </span>
  44 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  45 + </div>
  46 + <div class="form-group">
  47 + <input class="btn btn-default" type="button" id="query" value="筛选"/>
  48 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  49 + </div>
  50 + </form>
  51 + </div>
  52 + <div class="portlet-body" >
  53 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 506px;height: 400px">
  54 + <table class="table table-bordered table-hover table-checkable" id="forms">
  55 + <thead >
  56 + <tr >
  57 + <th style="text-align:center;vertical-align:middle;" rowspan="3">路牌</th>
  58 + <th style="text-align:center;vertical-align:middle;"
  59 + rowspan="2" colspan="2">车号</th>
  60 + <th rowspan="3">班别</th>
  61 + <th colspan="3" style="text-align:center;vertical-align:middle;">驾驶员</th>
  62 + <th colspan="3" style="text-align:center;vertical-align:middle;">售票员</th>
  63 + <th rowspan="3" style="text-align:center;vertical-align:middle;">路牌</th>
  64 + <th rowspan="4" style="text-align:center;vertical-align:middle;">记录项目</th>
  65 + <th colspan="3" style="text-align:center;vertical-align:middle;">1</th>
  66 + <th colspan="3" style="text-align:center;vertical-align:middle;">2</th>
  67 + <th colspan="3" style="text-align:center;vertical-align:middle;">3</th>
  68 + <th colspan="3" style="text-align:center;vertical-align:middle;">4</th>
  69 + <th colspan="3" style="text-align:center;vertical-align:middle;">5</th>
  70 + <th colspan="3" style="text-align:center;vertical-align:middle;">6</th>
  71 + <th colspan="3" style="text-align:center;vertical-align:middle;">7</th>
  72 + <th colspan="3" style="text-align:center;vertical-align:middle;">8</th>
  73 + <th colspan="3" style="text-align:center;vertical-align:middle;">9</th>
  74 + <th colspan="3" style="text-align:center;vertical-align:middle;">10</th>
  75 + <th colspan="3" style="text-align:center;vertical-align:middle;">11</th>
  76 + <th colspan="3" style="text-align:center;vertical-align:middle;">12</th>
  77 + <th colspan="3" style="text-align:center;vertical-align:middle;">13</th>
  78 + <th colspan="3" style="text-align:center;vertical-align:middle;">14</th>
  79 + <th colspan="3" style="text-align:center;vertical-align:middle;">15</th>
  80 + <th colspan="3" style="text-align:center;vertical-align:middle;">16</th>
  81 + <th colspan="3" style="text-align:center;vertical-align:middle;">17</th>
  82 + <th colspan="3" style="text-align:center;vertical-align:middle;">18</th>
  83 + <th colspan="3" style="text-align:center;vertical-align:middle;">19</th>
  84 + <th colspan="3" style="text-align:center;vertical-align:middle;">20</th>
  85 +
  86 + </tr>
  87 + <tr>
  88 +
  89 +
  90 + <th colspan="3">职号/接班时间</th>
  91 + <th colspan="3">职号/接班时间</th>
  92 + <th rowspan="2">到达</th>
  93 + <th rowspan="2">早/迟</th>
  94 + <th rowspan="2">开出</th>
  95 +
  96 + <th rowspan="2">到达</th>
  97 + <th rowspan="2">早/迟</th>
  98 + <th rowspan="2">开出</th>
  99 +
  100 + <th rowspan="2">到达</th>
  101 + <th rowspan="2">早/迟</th>
  102 + <th rowspan="2">开出</th>
  103 +
  104 + <th rowspan="2">到达</th>
  105 + <th rowspan="2">早/迟</th>
  106 + <th rowspan="2">开出</th>
  107 +
  108 + <th rowspan="2">到达</th>
  109 + <th rowspan="2">早/迟</th>
  110 + <th rowspan="2">开出</th>
  111 +
  112 + <th rowspan="2">到达</th>
  113 + <th rowspan="2">早/迟</th>
  114 + <th rowspan="2">开出</th>
  115 +
  116 + <th rowspan="2">到达</th>
  117 + <th rowspan="2">早/迟</th>
  118 + <th rowspan="2">开出</th>
  119 +
  120 + <th rowspan="2">到达</th>
  121 + <th rowspan="2">早/迟</th>
  122 + <th rowspan="2">开出</th>
  123 +
  124 + <th rowspan="2">到达</th>
  125 + <th rowspan="2">早/迟</th>
  126 + <th rowspan="2">开出</th>
  127 +
  128 + <th rowspan="2">到达</th>
  129 + <th rowspan="2">早/迟</th>
  130 + <th rowspan="2">开出</th>
  131 +
  132 + <th rowspan="2">到达</th>
  133 + <th rowspan="2">早/迟</th>
  134 + <th rowspan="2">开出</th>
  135 +
  136 + <th rowspan="2">到达</th>
  137 + <th rowspan="2">早/迟</th>
  138 + <th rowspan="2">开出</th>
  139 +
  140 + <th rowspan="2">到达</th>
  141 + <th rowspan="2">早/迟</th>
  142 + <th rowspan="2">开出</th>
  143 +
  144 + <th rowspan="2">到达</th>
  145 + <th rowspan="2">早/迟</th>
  146 + <th rowspan="2">开出</th>
  147 +
  148 + <th rowspan="2">到达</th>
  149 + <th rowspan="2">早/迟</th>
  150 + <th rowspan="2">开出</th>
  151 +
  152 + <th rowspan="2">到达</th>
  153 + <th rowspan="2">早/迟</th>
  154 + <th rowspan="2">开出</th>
  155 +
  156 + <th rowspan="2">到达</th>
  157 + <th rowspan="2">早/迟</th>
  158 + <th rowspan="2">开出</th>
  159 +
  160 + <th rowspan="2">到达</th>
  161 + <th rowspan="2">早/迟</th>
  162 + <th rowspan="2">开出</th>
  163 +
  164 + <th rowspan="2">到达</th>
  165 + <th rowspan="2">早/迟</th>
  166 + <th rowspan="2">开出</th>
  167 +
  168 + <th rowspan="2">到达</th>
  169 + <th rowspan="2">早/迟</th>
  170 + <th rowspan="2">开出</th>
  171 +
  172 + </tr>
  173 + <tr>
  174 + <th>出场</th>
  175 + <th>调换</th>
  176 + <th>1</th>
  177 + <th>2</th>
  178 + <th>3</th>
  179 + <th>1</th>
  180 + <th>2</th>
  181 + <th>3</th>
  182 + </tr>
  183 + </thead>
  184 + <tbody >
  185 + <tr >
  186 + <td></td>
  187 + <td>
  188 +
  189 + </td>
  190 + <td>
  191 +
  192 + </td>
  193 + <td>
  194 +
  195 + </td>
  196 + <td>
  197 +
  198 + </td>
  199 + <td >
  200 +
  201 + </td>
  202 + <td></td>
  203 + <td></td>
  204 + <td></td>
  205 + <td></td>
  206 + <td></td>
  207 + <td></td>
  208 + <td></td>
  209 + <td></td>
  210 + <td></td>
  211 + <td></td>
  212 + <td></td>
  213 + <td></td>
  214 + <td></td>
  215 + <td></td>
  216 + <td></td>
  217 + <td></td>
  218 + <td></td>
  219 + <td></td>
  220 + <td></td>
  221 + <td></td>
  222 + <td></td>
  223 + <td></td>
  224 + <td></td>
  225 + <td></td>
  226 + <td></td>
  227 + <td></td>
  228 + <td></td>
  229 + <td></td>
  230 + <td></td>
  231 + <td></td>
  232 + <td></td>
  233 + <td></td>
  234 + <td></td>
  235 + <td></td>
  236 + <td></td>
  237 + <td></td>
  238 + <td></td>
  239 + <td></td>
  240 + <td></td>
  241 + <td></td>
  242 + <td></td>
  243 + <td></td>
  244 + <td></td>
  245 + <td></td>
  246 + <td></td>
  247 + <td></td>
  248 + <td></td>
  249 + <td></td>
  250 + <td></td>
  251 + <td></td>
  252 + <td></td>
  253 + <td></td>
  254 + <td></td>
  255 + <td></td>
  256 + <td></td>
  257 + <td></td>
  258 + <td></td>
  259 + <td></td>
  260 + <td></td>
  261 + <td></td>
  262 + <td></td>
  263 + <td></td>
  264 + <td></td>
  265 + <td></td>
  266 + <td></td>
  267 + <td></td>
  268 + </tr>
  269 +
  270 + </tbody>
  271 + </table>
  272 + <div style="text-align: right;">
  273 + <ul id="pagination" class="pagination"></ul>
  274 + </div>
  275 + </div>
  276 + </div>
  277 + </div>
  278 + </div>
  279 +</div>
  280 +
  281 +<script>
  282 + $(function(){
  283 +
  284 + // 关闭左侧栏
  285 + if (!$('body').hasClass('page-sidebar-closed'))
  286 + $('.menu-toggler.sidebar-toggler').click();
  287 +
  288 + $("#date").datetimepicker({
  289 + format : 'YYYY-MM-DD',
  290 + locale : 'zh-cn'
  291 + });
  292 +
  293 + var d = new Date();
  294 + var year = d.getFullYear();
  295 + var month = d.getMonth() + 1;
  296 + var day = d.getDate();
  297 + if(month < 10)
  298 + month = "0" + month;
  299 + if(day < 10)
  300 + day = "0" + day;
  301 + $("#date").val(year + "-" + month + "-" + day);
  302 +
  303 + $.get('/basic/lineCode2Name',function(result){
  304 + var data=[];
  305 +
  306 + data.push({id: " ", text: "全部线路"});
  307 + for(var code in result){
  308 + data.push({id: code, text: result[code]});
  309 + }
  310 + initPinYinSelect2('#line',data,'');
  311 + })
  312 +
  313 + var obj = [];
  314 + $.get('/user/companyData', function(result){
  315 + obj = result;
  316 + var options = '';
  317 + for(var i = 0; i < obj.length; i++){
  318 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  319 + }
  320 + if(obj.length == 1){
  321 + $('#company1').hide();
  322 + if(obj[0].children.length == 1)
  323 + $('#subCompany1').hide();
  324 + }
  325 + $('#company').html(options);
  326 + updateCompany();
  327 + });
  328 + $("#company").on("change",updateCompany);
  329 + function updateCompany(){
  330 + var company = $('#company').val();
  331 + var options = '';
  332 + for(var i = 0; i < obj.length; i++){
  333 + if(obj[i].companyCode == company){
  334 + var children = obj[i].children;
  335 + for(var j = 0; j < children.length; j++){
  336 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  337 + }
  338 + }
  339 + }
  340 + $('#subCompany').html(options);
  341 + }
  342 +
  343 +
  344 + //查询
  345 + $("#query").on('click',function(){
  346 + var line = $("#line").val();
  347 + var date = $("#date").val();
  348 + $get('/realSchedule/scheduleDailyQp',{line:line,date:date},function(result){
  349 + var mycars = new Array(20);
  350 + var scheduleDaily_qp = template('scheduleDaily_qp',{list:result,lists:mycars});
  351 + $('#forms tbody').html(scheduleDaily_qp);
  352 + });
  353 + });
  354 +
  355 + $("#export").on("click",function(){
  356 + $get('/pcpc/workDaily',{line:line,date:date,type:'export'},function(result){
  357 + window.open("/downloadFile/download?fileName=营运服务日报表"+moment(date).format("YYYYMMDD"));
  358 + });
  359 + });
  360 +
  361 +
  362 + });
  363 +
  364 +</script>
  365 +<script type="text/html" id="scheduleDaily_qp">
  366 + {{each list as obj i}}
  367 + <tr>
  368 + <td>{{obj.lp}}</td>
  369 + <td>{{obj.cccl}}</td>
  370 + <td>{{obj.thclzbh}}</td>
  371 + <td>&nbsp;</td>
  372 + <td>{{obj.jjb1}}</td>
  373 + <td>{{obj.jjb2}}</td>
  374 + <td>{{obj.jjb3}}</td>
  375 + <td>{{obj.sjb1}}</td>
  376 + <td>{{obj.sjb2}}</td>
  377 + <td>{{obj.sjb3}}</td>
  378 + <td>{{obj.lp}}</td>
  379 + <td>&nbsp;</td>
  380 + {{each lists as o j}}
  381 + <td>{{obj['dd'+(j+1)]}}</td>
  382 + <td>{{obj['cz'+(j+1)]}}</td>
  383 + <td>{{obj['kc'+(j+1)]}}</td>
  384 + {{/each}}
  385 +
  386 +
  387 + {{/each}}
  388 + {{if list.length == 0}}
  389 + <tr>
  390 + <td colspan="17"><h6 class="muted">没有找到相关数据</h6></td>
  391 + </tr>
  392 + {{/if}}
  393 +</script>