Commit 98ab237b04fffd98699a114bcd4cfc869fe992c9
1 parent
5dab9b2a
报表修改
Showing
5 changed files
with
128 additions
and
85 deletions
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| ... | ... | @@ -106,8 +106,6 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS |
| 106 | 106 | List<Cdl> cdyList=cdlRepository.obtainCdl(); |
| 107 | 107 | //从排班表中计算出行驶的总里程 |
| 108 | 108 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","",""); |
| 109 | - List<Ylb> addList=new ArrayList<Ylb>(); | |
| 110 | - List<Ylb> updateList=new ArrayList<Ylb>(); | |
| 111 | 109 | for(int x=0;x<listpb.size();x++){ |
| 112 | 110 | String type="add"; |
| 113 | 111 | boolean sfdc=false; | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -494,14 +494,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 494 | 494 | String px = type; |
| 495 | 495 | if (state.equals("lpName")) { |
| 496 | 496 | state = state + "+1"; |
| 497 | - type = "asc"; | |
| 497 | + type = "ASC"; | |
| 498 | 498 | } |
| 499 | 499 | String sqlPlan = "select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh," |
| 500 | - + " s.lp_Name as lpName,s.j_Name as jName" | |
| 500 | + + " s.lp_Name as lpName,s.j_Name as jName,min(s.schedule_date_str) as dateStr ,min(s.fcsj) as fcsj" | |
| 501 | 501 | + " from bsth_c_s_sp_info_real s " |
| 502 | 502 | + " where s.xl_Bm = '" + line + "' and DATE_FORMAT(s.schedule_Date,'%Y-%m-%d') ='" + date + "' " |
| 503 | 503 | + " GROUP BY s.j_Gh,s.cl_Zbh,s.lp_Name ,s.j_Name" |
| 504 | - + " order by (" + state + ") " + type; | |
| 504 | + + " order by (" + state + "),schedule_date_str,fcsj " + type; | |
| 505 | 505 | List<ScheduleRealInfo> list = jdbcTemplate.query(sqlPlan, |
| 506 | 506 | new RowMapper<ScheduleRealInfo>() { |
| 507 | 507 | @Override |
| ... | ... | @@ -518,29 +518,41 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 518 | 518 | if (lpname.equals("lpName")) { |
| 519 | 519 | List<ScheduleRealInfo> listNew = new ArrayList<ScheduleRealInfo>(); |
| 520 | 520 | Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); |
| 521 | - if (px.equals("desc")) { | |
| 521 | +// if (px.equals("desc")) { | |
| 522 | 522 | int zt = 0; |
| 523 | - for (int l = 0; l < 3; l++) { | |
| 523 | + for (int l = 0; l < 2; l++) { | |
| 524 | 524 | for (int i = 0; i < list.size(); i++) { |
| 525 | 525 | ScheduleRealInfo t = list.get(i); |
| 526 | 526 | if (t.getLpName().indexOf("+") != -1) { |
| 527 | 527 | if (zt == 0) { |
| 528 | 528 | listNew.add(t); |
| 529 | 529 | } |
| 530 | - | |
| 531 | 530 | } else if (pattern.matcher(t.getLpName()).matches()) { |
| 532 | 531 | if (zt == 1) { |
| 533 | 532 | listNew.add(t); |
| 534 | 533 | } |
| 535 | 534 | } else { |
| 536 | - if (zt == 2) { | |
| 537 | - listNew.add(t); | |
| 538 | - } | |
| 535 | +// if (zt == 2) { | |
| 536 | +// listNew.add(t); | |
| 537 | +// } | |
| 538 | + continue; | |
| 539 | 539 | } |
| 540 | 540 | } |
| 541 | 541 | zt++; |
| 542 | 542 | } |
| 543 | - } else { | |
| 543 | + | |
| 544 | + Collections.sort(list, new ComparableLp()); | |
| 545 | + for (int i = 0; i < list.size(); i++) { | |
| 546 | + ScheduleRealInfo t = list.get(i); | |
| 547 | + if (t.getLpName().indexOf("+") != -1) { | |
| 548 | + continue; | |
| 549 | + } else if (pattern.matcher(t.getLpName()).matches()) { | |
| 550 | + continue; | |
| 551 | + } else { | |
| 552 | + listNew.add(t); | |
| 553 | + } | |
| 554 | + } | |
| 555 | + /*} else { | |
| 544 | 556 | int zt = 0; |
| 545 | 557 | for (int l = 0; l < 3; l++) { |
| 546 | 558 | for (int i = 0; i < list.size(); i++) { |
| ... | ... | @@ -563,7 +575,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 563 | 575 | zt++; |
| 564 | 576 | } |
| 565 | 577 | |
| 566 | - } | |
| 578 | + }*/ | |
| 567 | 579 | return listNew; |
| 568 | 580 | } else { |
| 569 | 581 | return list; |
| ... | ... | @@ -3712,7 +3724,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3712 | 3724 | tempMap.put("zdsjk" + size, ""); |
| 3713 | 3725 | tempMap.put("zdsjm" + size, ""); |
| 3714 | 3726 | tempMap.put("fcsj" + size, schedule.getFcsj()); |
| 3715 | - tempMap.put("fcsjActual" + size, schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""); | |
| 3727 | + String fcsjActural=schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""; | |
| 3728 | + String bcType=schedule.getBcType()!=null?schedule.getBcType():""; | |
| 3729 | + if(bcType.equals("in")){ | |
| 3730 | + fcsjActural=fcsjActural+"(进)"; | |
| 3731 | + } | |
| 3732 | + if(bcType.equals("out")){ | |
| 3733 | + fcsjActural=fcsjActural+"(出)"; | |
| 3734 | + } | |
| 3735 | + tempMap.put("fcsjActual" + size, fcsjActural); | |
| 3716 | 3736 | tempMap.put("fcsjk" + size, ""); |
| 3717 | 3737 | tempMap.put("fcsjm" + size, ""); |
| 3718 | 3738 | tempMap.put("remarks" + size, schedule.getRemarks() != null ? schedule.getRemarks() : ""); | ... | ... |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| ... | ... | @@ -364,7 +364,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 364 | 364 | time=scheduleRealInfo.getFcsj(); |
| 365 | 365 | } |
| 366 | 366 | if(!time.equals("")){ |
| 367 | - String[] fcsjStr = scheduleRealInfo.getFcsj().split(":"); | |
| 367 | + String[] fcsjStr = time.split(":"); | |
| 368 | 368 | long fcsj= Long.parseLong(fcsjStr[0])*60+Long.parseLong(fcsjStr[1]); |
| 369 | 369 | if(childTaskPlans.isEmpty()){ |
| 370 | 370 | if(scheduleRealInfo.getStatus()!=-1){ | ... | ... |
src/main/java/com/bsth/util/ComparableLp.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import java.util.Comparator; | |
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 5 | + | |
| 6 | +public class ComparableLp implements Comparator<ScheduleRealInfo>{ | |
| 7 | + | |
| 8 | + @Override | |
| 9 | + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) { | |
| 10 | + // TODO Auto-generated method stub | |
| 11 | + return o1.getLpName().compareTo(o2.getLpName()); | |
| 12 | + } | |
| 13 | + | |
| 14 | +} | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -14,6 +14,17 @@ |
| 14 | 14 | |
| 15 | 15 | .table > tbody + tbody { |
| 16 | 16 | border-top: 1px solid; } |
| 17 | + | |
| 18 | + #forms > thead > tr> td >span{ | |
| 19 | + | |
| 20 | + width: 5px; | |
| 21 | +word-wrap: break-word; | |
| 22 | +letter-spacing: 20px; | |
| 23 | + } | |
| 24 | + | |
| 25 | + #forms tr> td >label{ | |
| 26 | + word-break: keep-all;white-space:nowrap; | |
| 27 | + } | |
| 17 | 28 | </style> |
| 18 | 29 | |
| 19 | 30 | <div class="page-head"> |
| ... | ... | @@ -60,18 +71,18 @@ |
| 60 | 71 | <th colspan="40">线路调度日报</th> |
| 61 | 72 | </tr> |
| 62 | 73 | <tr> |
| 63 | - <td rowspan="3">路线名</td> | |
| 74 | + <td rowspan="3"><span >路线名</span></td> | |
| 64 | 75 | <td colspan="16"><c>全日</c>营运里程(公里)</td> |
| 65 | 76 | <td colspan="15"><c>全日</c>营运班次</td> |
| 66 | 77 | <td colspan="9">大间隔情况</td> |
| 67 | 78 | </tr> |
| 68 | 79 | <tr> |
| 69 | - <td rowspan="2">计划</td> | |
| 70 | - <td rowspan="2">实驶</td> | |
| 71 | - <td rowspan="2">少驶公里</td> | |
| 72 | - <td rowspan="2">少驶班次</td> | |
| 80 | + <td rowspan="2"><span >计划</span></td> | |
| 81 | + <td rowspan="2"><span >实驶</span></td> | |
| 82 | + <td rowspan="2"><span>少驶公里</span></td> | |
| 83 | + <td rowspan="2"><span>少驶班次</span></td> | |
| 73 | 84 | <td colspan="11">少驶原因(公里)</td> |
| 74 | - <td rowspan="2">临加公里</td> | |
| 85 | + <td rowspan="2"><span >临加公里</span></td> | |
| 75 | 86 | <td colspan="3">计划班次</td> |
| 76 | 87 | <td colspan="3">实际班次</td> |
| 77 | 88 | <td colspan="3">临加班次</td> |
| ... | ... | @@ -82,35 +93,35 @@ |
| 82 | 93 | <td colspan="5" rowspan="2">原因</td> |
| 83 | 94 | </tr> |
| 84 | 95 | <tr> |
| 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> | |
| 105 | - <td><c>全日</c></td> | |
| 106 | - <td>早高峰</td> | |
| 107 | - <td>晚高峰</td> | |
| 108 | - <td><c>全日</c></td> | |
| 109 | - <td>早高峰</td> | |
| 110 | - <td>晚高峰</td> | |
| 111 | - <td><c>全日</c></td> | |
| 112 | - <td>早高峰</td> | |
| 113 | - <td>晚高峰</td> | |
| 96 | + <td><span >路阻</span></td> | |
| 97 | + <td><span>吊慢</span></td> | |
| 98 | + <td><span >故障</span></td> | |
| 99 | + <td><span >纠纷</span></td> | |
| 100 | + <td><span >肇事</span></td> | |
| 101 | + <td><span>缺人</span></td> | |
| 102 | + <td><span>缺车</span></td> | |
| 103 | + <td><span >客稀</span></td> | |
| 104 | + <td><span>气候</span></td> | |
| 105 | + <td><span>援外</span></td> | |
| 106 | + <td><span>其他</span></td> | |
| 107 | + <td><span ><c>全日</c></span></td> | |
| 108 | + <td><span >早高峰</span></td> | |
| 109 | + <td><span>晚高峰</span></td> | |
| 110 | + <td><span><c>全日</c></span></td> | |
| 111 | + <td><span>早高峰</span></td> | |
| 112 | + <td><span>晚高峰</span></td> | |
| 113 | + <td><span><c>全日</c></span></td> | |
| 114 | + <td><span>早高峰</span></td> | |
| 115 | + <td><span>晚高峰</span></td> | |
| 116 | + <td><span><c>全日</c></span></td> | |
| 117 | + <td><span>早高峰</span></td> | |
| 118 | + <td><span>晚高峰</span></td> | |
| 119 | + <td><span><c>全日</c></span></td> | |
| 120 | + <td><span>早高峰</span></td> | |
| 121 | + <td><span>晚高峰</span></td> | |
| 122 | + <td><span><c>全日</c></span></td> | |
| 123 | + <td><span>早高峰</span></td> | |
| 124 | + <td><span>晚高峰</span></td> | |
| 114 | 125 | </tr> |
| 115 | 126 | </thead> |
| 116 | 127 | |
| ... | ... | @@ -169,36 +180,36 @@ |
| 169 | 180 | <td colspan="40"> </td> |
| 170 | 181 | </tr> --> |
| 171 | 182 | <tr> |
| 172 | - <td colspan="2">路牌</td> | |
| 173 | - <td colspan="2">车号</td> | |
| 174 | - <td>司早</td> | |
| 175 | - <td>售早</td> | |
| 176 | - <td>司晚</td> | |
| 177 | - <td>售晚</td> | |
| 178 | - <td colspan="2">路牌</td> | |
| 179 | - <td colspan="2">车号</td> | |
| 180 | - <td>司早</td> | |
| 181 | - <td>售早</td> | |
| 182 | - <td>司晚</td> | |
| 183 | - <td>售晚</td> | |
| 184 | - <td colspan="2">路牌</td> | |
| 185 | - <td colspan="2">车号</td> | |
| 186 | - <td>司早</td> | |
| 187 | - <td>售早</td> | |
| 188 | - <td>司晚</td> | |
| 189 | - <td>售晚</td> | |
| 190 | - <td colspan="2">路牌</td> | |
| 191 | - <td colspan="2">车号</td> | |
| 192 | - <td>司早</td> | |
| 193 | - <td>售早</td> | |
| 194 | - <td>司晚</td> | |
| 195 | - <td>售晚</td> | |
| 196 | - <td colspan="2">路牌</td> | |
| 197 | - <td colspan="2">车号</td> | |
| 198 | - <td>司早</td> | |
| 199 | - <td>售早</td> | |
| 200 | - <td>司晚</td> | |
| 201 | - <td>售晚</td> | |
| 183 | + <td colspan="2"><label>路牌</label></td> | |
| 184 | + <td colspan="2"><label>车号</label></td> | |
| 185 | + <td> <label>司早</label></td> | |
| 186 | + <td><label>售早</label></td> | |
| 187 | + <td><label>司晚</label></td> | |
| 188 | + <td><label>售晚</label></td> | |
| 189 | + <td colspan="2"><label>路牌</label></td> | |
| 190 | + <td colspan="2"><label>车号</label></td> | |
| 191 | + <td><label>司早</label></td> | |
| 192 | + <td><label>售早</label></td> | |
| 193 | + <td><label>司晚</label></td> | |
| 194 | + <td><label>售晚</label></td> | |
| 195 | + <td colspan="2"><label>路牌</label></td> | |
| 196 | + <td colspan="2"><label>车号</label></td> | |
| 197 | + <td><label>司早</label></td> | |
| 198 | + <td><label>售早</label></td> | |
| 199 | + <td><label>司晚</label></td> | |
| 200 | + <td><label>售晚</label></td> | |
| 201 | + <td colspan="2"><label>路牌</label></td> | |
| 202 | + <td colspan="2"><label>车号</label></td> | |
| 203 | + <td><label>司早</label></td> | |
| 204 | + <td><label>售早</label></td> | |
| 205 | + <td><label>司晚</label></td> | |
| 206 | + <td><label>售晚</label></td> | |
| 207 | + <td colspan="2"><label>路牌</label></td> | |
| 208 | + <td colspan="2"><label>车号</label></td> | |
| 209 | + <td><label>司早</label></td> | |
| 210 | + <td><label>售早</label></td> | |
| 211 | + <td><label>司晚</label></td> | |
| 212 | + <td><label>售晚</label></td> | |
| 202 | 213 | </tr> |
| 203 | 214 | <tbody class="scheduleDaily_2"> |
| 204 | 215 | |
| ... | ... | @@ -208,17 +219,17 @@ |
| 208 | 219 | </tr> |
| 209 | 220 | <tr> |
| 210 | 221 | <td rowspan="2">路牌</td> |
| 211 | - <td colspan="2" rowspan="2">起点站</td> | |
| 222 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> | |
| 212 | 223 | <td colspan="4">到达时间</td> |
| 213 | 224 | <td colspan="4">发车时间</td> |
| 214 | 225 | <td colspan="2" rowspan="2">备注</td> |
| 215 | 226 | <td rowspan="2">路牌</td> |
| 216 | - <td colspan="2" rowspan="2">起点站</td> | |
| 227 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> | |
| 217 | 228 | <td colspan="4">到达时间</td> |
| 218 | 229 | <td colspan="4">发车时间</td> |
| 219 | 230 | <td colspan="2" rowspan="2">备注</td> |
| 220 | 231 | <td rowspan="2">路牌</td> |
| 221 | - <td colspan="2" rowspan="2">起点站</td> | |
| 232 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> | |
| 222 | 233 | <td colspan="4">到达时间</td> |
| 223 | 234 | <td colspan="4">发车时间</td> |
| 224 | 235 | <td colspan="2" rowspan="2">备注</td> |
| ... | ... | @@ -456,7 +467,7 @@ |
| 456 | 467 | </script> |
| 457 | 468 | <script type="text/html" id="scheduleDaily_1"> |
| 458 | 469 | {{each list as obj i}} |
| 459 | - <tr> | |
| 470 | + <tr > | |
| 460 | 471 | <td>{{obj.xlName}}</td> |
| 461 | 472 | <td>{{obj.jhlc}}</td> |
| 462 | 473 | <td>{{obj.sjgl}}</td> |
| ... | ... | @@ -534,7 +545,7 @@ |
| 534 | 545 | <tr> |
| 535 | 546 | {{/if}} |
| 536 | 547 | <td>{{obj.lpName}}</td> |
| 537 | - <td colspan="2">{{obj.qdzName}}</td> | |
| 548 | + <td colspan="2" style="word-break: keep-all;white-space:nowrap;">{{obj.qdzName}}</td> | |
| 538 | 549 | <td>{{obj.zdsj}}</td> |
| 539 | 550 | <td>{{obj.zdsjActual}}</td> |
| 540 | 551 | <td>{{obj.fast}}</td> | ... | ... |