Commit 8779dbb91cd1ac69978db9bb83219621b866c6b0

Authored by 娄高锋
1 parent 45621ce9

时刻表分析 添加班次类型选项

src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
... ... @@ -516,6 +516,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
516 516 String endDate = map.get("endDate").toString();
517 517 String model = map.get("model").toString();
518 518 String type = map.get("type").toString();
  519 + String bcType = map.get("bcType").toString();
519 520  
520 521 if(startDate.length() == 0){
521 522 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
... ... @@ -533,7 +534,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
533 534 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";
534 535 // }
535 536 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
536   -
  537 + if(Integer.valueOf(bcType) == 1){
  538 + sql += " and bc_type != 'region'";
  539 + } else if(Integer.valueOf(bcType) == 2){
  540 + sql += " and bc_type = 'region'";
  541 + }
537 542 list = jdbcTemplate.query(sql,
538 543 new RowMapper<ScheduleRealInfo>(){
539 544 @Override
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -7,7 +7,8 @@
7 7 .table-bordered > tbody > tr > td,
8 8 .table-bordered > tfoot > tr > th,
9 9 .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
  10 + border: 1px solid;
  11 + text-align: center; }
11 12 .table-bordered > thead > tr > th,
12 13 .table-bordered > thead > tr > td {
13 14 border-bottom-width: 2px; }
... ... @@ -39,6 +40,14 @@
39 40 <span class="item-label" style="width: 80px;">线路: </span>
40 41 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 42 </div>
  43 + <div style="display: inline-block;margin-left: 10px;">
  44 + <span class="item-label" style="width: 80px;">班次类型: </span>
  45 + <select class="form-control" name="line" id="bcType" style="width: 160px;">
  46 + <option value="0">全部班次</option>
  47 + <option value="1">全程</option>
  48 + <option value="2">区间</option>
  49 + </select>
  50 + </div>
42 51 <div style="margin-top: 10px"></div>
43 52 <div style="display: inline-block;margin-left: 10px;">
44 53 <span class="item-label" style="width: 80px;">开始时间: </span>
... ... @@ -54,7 +63,7 @@
54 63 <option value="">请选择...</option>
55 64 </select>
56 65 </div>
57   - <div class="form-group">
  66 + <div class="form-group" style="margin-left: 10px">
58 67 <input class="btn btn-default" type="button" id="query" value="筛选"/>
59 68 <input class="btn btn-default" type="button" id="export" value="导出"/>
60 69 </div>
... ... @@ -202,6 +211,7 @@
202 211 var startDate = $("#startDate").val();
203 212 var endDate = $("#endDate").val();
204 213 var model = $("#model").val();
  214 + var bcType = $('#bcType').val();
205 215 var company = $("#company").val();
206 216 var subCompany = $("#subCompany").val();
207 217 function jsDoQuery(pagination){
... ... @@ -218,6 +228,7 @@
218 228 startDate = $("#startDate").val();
219 229 endDate = $("#endDate").val();
220 230 model = $("#model").val();
  231 + bcType = $("#bcType").val();
221 232 company = $("#company").val();
222 233 subCompany = $("#subCompany").val();
223 234 params['page'] = page;
... ... @@ -225,6 +236,7 @@
225 236 params['startDate'] = startDate;
226 237 params['endDate'] = endDate;
227 238 params['model'] = model;
  239 + params['bcType'] = bcType;
228 240 params['company'] = company;
229 241 params['subCompany'] = subCompany;
230 242 params['type'] = "query";
... ... @@ -274,12 +286,7 @@
274 286 line = "";
275 287 updateModel();
276 288 });
277   - $('#startDate').on("blur", function(){
278   - startDate = $("#startDate").val();
279   - endDate = $("#endDate").val();
280   - updateModel();
281   - });
282   - $('#endDate').on("blur", function(){
  289 + $('#startDate, #endDate').on("blur", function(){
283 290 startDate = $("#startDate").val();
284 291 endDate = $("#endDate").val();
285 292 updateModel();
... ...