Commit 289d761832d1dbf5fcc2a57d4d15f77ce59cda05

Authored by 娄高锋
1 parent 2283456a

LGF 导出

src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
... ... @@ -313,6 +313,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
313 313 // TODO Auto-generated catch block
314 314 e.printStackTrace();
315 315 }
  316 + String companyName = "", subCompanyName = "";
  317 +
316 318 for(String key : keyMap.keySet()){
317 319 Map<String, Object> tempMap = new HashMap<String, Object>();
318 320 Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>();
... ... @@ -323,6 +325,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
323 325 int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0;
324 326 for(ScheduleRealInfo schedule : keyMap.get(key)){
325 327 // schedule.setFcsjAll(schedule.getFcsj());
  328 + if(companyName.length() == 0 && schedule.getGsName() != null)
  329 + companyName = schedule.getGsName();
  330 + if(subCompanyName.length() == 0 && schedule.getFgsName() != null)
  331 + subCompanyName = schedule.getFgsName();
326 332  
327 333 //早晚高峰时段执行率
328 334 if(schedule.getFcsjT() >= zgfBegin && schedule.getFcsjT() <= zgfEnd){
... ... @@ -424,6 +430,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
424 430  
425 431 }
426 432  
  433 + tempMap.put("company", companyName);
  434 + tempMap.put("subCompany", subCompanyName);
427 435 tempMap.put("date", date);
428 436 tempMap.put("line", key);
429 437 tempMap.put("jhbc", jhbc);
... ... @@ -509,6 +517,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
509 517 schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
510 518 schedule.setXlName(rs.getString("xl_name"));
511 519 schedule.setBcType(rs.getString("bc_type"));
  520 + schedule.setGsName(rs.getString("gs_name"));
  521 + schedule.setFgsName(rs.getString("fgs_name"));
512 522 schedule.setBcs(rs.getInt("bcs"));
513 523 schedule.setFcno(rs.getInt("fcno"));
514 524 schedule.setFcsj(rs.getString("fcsj"));
... ... @@ -588,6 +598,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
588 598 }
589 599 }
590 600 }
  601 + String companyName = "", subCompanyName = "";
591 602 for(String key : keyMap.keySet()){
592 603 Map<String, Object> tempMap = new HashMap<String, Object>();
593 604 List<Integer> fcsj = new ArrayList<Integer>();
... ... @@ -595,6 +606,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
595 606 int jhbc = 0;
596 607 int sjbc = 0;
597 608 for(ScheduleRealInfo schedule : keyMap.get(key)){
  609 + if(companyName.length() == 0 && schedule.getGsName() != null)
  610 + companyName = schedule.getGsName();
  611 + if(subCompanyName.length() == 0 && schedule.getFgsName() != null)
  612 + subCompanyName = schedule.getFgsName();
  613 +
598 614 tempMap.put("date", schedule.getScheduleDateStr());
599 615 tempMap.put("bcsj", schedule.getBcsj());
600 616 if(schedule.getFcsjActual() != null){
... ... @@ -654,6 +670,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
654 670 tempMap.put("zmys", "/");
655 671 tempMap.put("pjys", "/");
656 672 }
  673 + tempMap.put("company", companyName);
  674 + tempMap.put("subCompany", subCompanyName);
657 675 String[] split = key.split("/");
658 676 tempMap.put("line", split[0]);
659 677 tempMap.put("qdz", split[1]);
... ...
src/main/resources/static/pages/forms/mould/peoCarPlan.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/scheduleAnaly.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/workDaily.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
... ... @@ -97,6 +97,7 @@
97 97  
98 98 <script>
99 99 $(function(){
  100 + $('#export').attr('disabled', "true");
100 101  
101 102 // 关闭左侧栏
102 103 if (!$('body').hasClass('page-sidebar-closed'))
... ... @@ -186,11 +187,22 @@
186 187 // 把渲染好的模版html文本追加到表格中
187 188 $('#forms tbody').html(tbodyHtml);
188 189  
  190 + if(result.length == 0)
  191 + $("#export").attr('disabled',"true");
  192 + else
  193 + $("#export").removeAttr("disabled");
189 194 });
190 195 }
191 196  
192 197 $("#export").on("click",function(){
193   - $get('/pcpc/firstAndLastBus',{line:line,date:date,type:'export'},function(result){
  198 + var params = {};
  199 + params['company'] = company;
  200 + params['subCompany'] = subCompany;
  201 + params['line'] = line;
  202 + params['line'] = line;
  203 + params['date'] = date;
  204 + params['type'] = "export";
  205 + $get('/pcpc/firstAndLastBus', params, function(result){
194 206 window.open("/downloadFile/download?fileName=线路首末班"+moment(date).format("YYYYMMDD"));
195 207 });
196 208 });
... ...
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
... ... @@ -80,6 +80,7 @@
80 80  
81 81 <script>
82 82 $(function(){
  83 + $('#export').attr('disabled', "true");
83 84  
84 85 // 关闭左侧栏
85 86 if (!$('body').hasClass('page-sidebar-closed'))
... ... @@ -168,11 +169,21 @@
168 169 // 把渲染好的模版html文本追加到表格中
169 170 $('#forms tbody').html(tbodyHtml);
170 171  
  172 + if(result.length == 0)
  173 + $("#export").attr('disabled',"true");
  174 + else
  175 + $("#export").removeAttr("disabled");
171 176 });
172 177 }
173 178  
174 179 $("#export").on("click",function(){
175   - $get('/pcpc/queryPeopleCar',{line:line,date:date,type:'export'},function(result){
  180 + var params = {};
  181 + params['company'] = company;
  182 + params['subCompany'] = subCompany;
  183 + params['line'] = line;
  184 + params['date'] = date;
  185 + params['type'] = "export";
  186 + $get('/pcpc/queryPeopleCar', params, function(result){
176 187 window.open("/downloadFile/download?fileName=计划车辆班次人员"+moment(date).format("YYYYMMDD"));
177 188 });
178 189 });
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -65,18 +65,21 @@
65 65 <table class="table table-bordered table-hover table-checkable" id="forms">
66 66 <thead>
67 67 <tr class="hidden">
68   - <th width="10%">线路</th>
69   - <th width="10%">起点站名</th>
70   - <th width="8%">计发时间</th>
71   - <th width="8%">计划运送时间(分)</th>
72   - <th width="8%">计划完成次数</th>
73   - <th width="8%">完成次数</th>
74   - <th width="8%">最早发车时间</th>
75   - <th width="8%">最晚发车时间</th>
76   - <th width="8%">平均发车时间</th>
77   - <th width="8%">最慢运送时间(分)</th>
78   - <th width="8%">最快运送时间(分)</th>
79   - <th width="8%">平均运送时间(分)</th>
  68 + <th style="display: none;"></th>
  69 + <th width="8%">公司</th>
  70 + <th width="8%">分公司</th>
  71 + <th width="8%">线路</th>
  72 + <th width="8%">起点站名</th>
  73 + <th width="6%">计发时间</th>
  74 + <th width="6%">计划运送时间(分)</th>
  75 + <th width="6%">计划完成次数</th>
  76 + <th width="6%">完成次数</th>
  77 + <th width="6%">最早发车时间</th>
  78 + <th width="6%">最晚发车时间</th>
  79 + <th width="6%">平均发车时间</th>
  80 + <th width="6%">最慢运送时间(分)</th>
  81 + <th width="6%">最快运送时间(分)</th>
  82 + <th width="6%">平均运送时间(分)</th>
80 83 </tr>
81 84 </thead>
82 85 <tbody>
... ... @@ -95,6 +98,7 @@
95 98 <script>
96 99 $(function(){
97 100 var page = 0, initPagination;
  101 + $('#export').attr('disabled', "true");
98 102  
99 103 // 关闭左侧栏
100 104 if (!$('body').hasClass('page-sidebar-closed'))
... ... @@ -200,6 +204,11 @@
200 204 // 把渲染好的模版html文本追加到表格中
201 205 $('#forms tbody').html(tbodyHtml);
202 206  
  207 + if(result.dataList.length == 0)
  208 + $("#export").attr('disabled',"true");
  209 + else
  210 + $("#export").removeAttr("disabled");
  211 +
203 212 if(pagination && result.dataList.length > 0){
204 213 //重新分页
205 214 initPagination = true;
... ... @@ -213,7 +222,16 @@
213 222 }
214 223  
215 224 $("#export").on("click",function(){
216   - $get('/pcpc/scheduleAnaly',{page:'',line:line,startDate:startDate,endDate:endDate,model:model,type:'export'},function(result){
  225 + var params = {};
  226 + params['page'] = page;
  227 + params['line'] = line;
  228 + params['startDate'] = startDate;
  229 + params['endDate'] = endDate;
  230 + params['model'] = model;
  231 + params['company'] = company;
  232 + params['subCompany'] = subCompany;
  233 + params['type'] = "export";
  234 + $get('/pcpc/scheduleAnaly', params, function(result){
217 235 window.open("/downloadFile/download?fileName=时刻表分析"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD"));
218 236 });
219 237 });
... ... @@ -289,6 +307,9 @@
289 307 <script type="text/html" id="list_scheduleAnaly">
290 308 {{each list as obj i}}
291 309 <tr>
  310 + <th style="display: none;"></th>
  311 + <td>{{obj.company}}</td>
  312 + <td>{{obj.subCompany}}</td>
292 313 <td>{{obj.line}}</td>
293 314 <td>{{obj.qdz}}</td>
294 315 <td>{{obj.jhfc}}</td>
... ... @@ -305,7 +326,7 @@
305 326 {{/each}}
306 327 {{if list.length == 0}}
307 328 <tr>
308   - <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td>
  329 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
309 330 </tr>
310 331 {{/if}}
311 332 </script>
312 333 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/workDaily.html
... ... @@ -55,11 +55,13 @@
55 55 <thead>
56 56 <tr class="hidden">
57 57 <th width="80px">日期</th>
58   - <th width="100px">线路</th>
  58 + <th>公司</th>
  59 + <th>分公司</th>
  60 + <th>线路</th>
59 61 <th>计划班次</th>
60 62 <th>待发调整</th>
61   - <th>待发调整比率</th>
62   - <th>出场率</th>
  63 + <th width="60px">待发调整比率</th>
  64 + <th width="60px">出场率</th>
63 65 <th width="46px">上行发快</th>
64 66 <th width="46px">上行到快</th>
65 67 <th width="46px">下行发快</th>
... ... @@ -68,9 +70,9 @@
68 70 <th width="46px">上行到慢</th>
69 71 <th width="46px">下行发慢</th>
70 72 <th width="46px">下行到慢</th>
71   - <th>误点总数(快/慢)</th>
72   - <th>首末班准点率</th>
73   - <th>高峰班次执行率(早/晚)</th>
  73 + <th width="75px">误点总数(快/慢)</th>
  74 + <th width="100px">首末班准点率</th>
  75 + <th width="100px">高峰班次执行率(早/晚)</th>
74 76 </tr>
75 77 </thead>
76 78 <tbody>
... ... @@ -88,6 +90,7 @@
88 90  
89 91 <script>
90 92 $(function(){
  93 + $('#export').attr('disabled', "true");
91 94  
92 95 // 关闭左侧栏
93 96 if (!$('body').hasClass('page-sidebar-closed'))
... ... @@ -176,11 +179,21 @@
176 179 // 把渲染好的模版html文本追加到表格中
177 180 $('#forms tbody').html(tbodyHtml);
178 181  
  182 + if(result.length == 0)
  183 + $("#export").attr('disabled',"true");
  184 + else
  185 + $("#export").removeAttr("disabled");
179 186 });
180 187 }
181 188  
182 189 $("#export").on("click",function(){
183   - $get('/pcpc/workDaily',{line:line,date:date,type:'export'},function(result){
  190 + var params = {};
  191 + params['line'] = line;
  192 + params['date'] = date;
  193 + params['type'] = "export";
  194 + params['company'] = company;
  195 + params['subCompany'] = subCompany;
  196 + $get('/pcpc/workDaily', params, function(result){
184 197 window.open("/downloadFile/download?fileName=营运服务日报表"+moment(date).format("YYYYMMDD"));
185 198 });
186 199 });
... ... @@ -193,6 +206,8 @@
193 206 {{each list as obj i}}
194 207 <tr>
195 208 <td>{{obj.date}}</td>
  209 + <td>{{obj.company}}</td>
  210 + <td>{{obj.subCompany}}</td>
196 211 <td>{{obj.line}}</td>
197 212 <td>{{obj.jhbc}}</td>
198 213 <td>{{obj.dftz}}</td>
... ... @@ -213,7 +228,7 @@
213 228 {{/each}}
214 229 {{if list.length == 0}}
215 230 <tr>
216   - <td colspan="17"><h6 class="muted">没有找到相关数据</h6></td>
  231 + <td colspan="19"><h6 class="muted">没有找到相关数据</h6></td>
217 232 </tr>
218 233 {{/if}}
219 234 </script>
220 235 \ No newline at end of file
... ...