Commit b900c84ab7ce1c33635e620bc1493471545403d7
1 parent
21dfa3a7
调度日报加日期
统计日报 标记 公式公里 和 计算机实驶 不一致的线路 统计日报 做一下排序,按线路名称排
Showing
4 changed files
with
46 additions
and
7 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -60,6 +60,9 @@ import com.bsth.service.schedule.SchedulePlanInfoService; | @@ -60,6 +60,9 @@ import com.bsth.service.schedule.SchedulePlanInfoService; | ||
| 60 | import com.bsth.service.sys.DutyEmployeeService; | 60 | import com.bsth.service.sys.DutyEmployeeService; |
| 61 | import com.bsth.util.*; | 61 | import com.bsth.util.*; |
| 62 | import com.bsth.websocket.handler.SendUtils; | 62 | import com.bsth.websocket.handler.SendUtils; |
| 63 | +import com.github.stuxuhai.jpinyin.PinyinException; | ||
| 64 | +import com.github.stuxuhai.jpinyin.PinyinFormat; | ||
| 65 | +import com.github.stuxuhai.jpinyin.PinyinHelper; | ||
| 63 | import com.google.common.base.Splitter; | 66 | import com.google.common.base.Splitter; |
| 64 | import com.google.common.collect.Lists; | 67 | import com.google.common.collect.Lists; |
| 65 | import org.apache.commons.lang3.StringEscapeUtils; | 68 | import org.apache.commons.lang3.StringEscapeUtils; |
| @@ -2464,6 +2467,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2464,6 +2467,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2464 | Map<String, Object> map = new HashMap<String, Object>(); | 2467 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2465 | if(list.size()>0){ | 2468 | if(list.size()>0){ |
| 2466 | map.put("xlName", list.get(0).getXlName()); | 2469 | map.put("xlName", list.get(0).getXlName()); |
| 2470 | + try { | ||
| 2471 | + map.put("xlNamePy", PinyinHelper.convertToPinyinString(list.get(0).getXlName(), "" , PinyinFormat.WITHOUT_TONE)); | ||
| 2472 | + } catch (PinyinException e) { | ||
| 2473 | + // TODO Auto-generated catch block | ||
| 2474 | + e.printStackTrace(); | ||
| 2475 | + } | ||
| 2467 | double jhyygl=culateService.culateJhgl(list);//计划营运公里 | 2476 | double jhyygl=culateService.culateJhgl(list);//计划营运公里 |
| 2468 | double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) | 2477 | double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) |
| 2469 | map.put("jhlc", jhyygl); | 2478 | map.put("jhlc", jhyygl); |
| @@ -2480,8 +2489,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2480,8 +2489,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2480 | map.put("sjzgl", Arith.add(zyygl, zksgl)); | 2489 | map.put("sjzgl", Arith.add(zyygl, zksgl)); |
| 2481 | map.put("sjgl",zyygl); | 2490 | map.put("sjgl",zyygl); |
| 2482 | map.put("sjksgl", zksgl); | 2491 | map.put("sjksgl", zksgl); |
| 2483 | - | ||
| 2484 | - map.put("ssgl", culateService.culateLbgl(list)); | 2492 | + double ssgl= culateService.culateLbgl(list); |
| 2493 | + map.put("ssgl", ssgl); | ||
| 2494 | + | ||
| 2495 | + //计划+临加-少驶=实驶 | ||
| 2496 | + double jl=Arith.add(jhyygl, ljgl); | ||
| 2497 | + if(Arith.sub(jl, ssgl)==sjyygl){ | ||
| 2498 | + map.put("zt", 0); | ||
| 2499 | + }else{ | ||
| 2500 | + map.put("zt", 1); | ||
| 2501 | + } | ||
| 2502 | + | ||
| 2485 | map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); | 2503 | map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); |
| 2486 | map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); | 2504 | map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); |
| 2487 | map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); | 2505 | map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); |
| @@ -2568,7 +2586,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2568,7 +2586,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2568 | } | 2586 | } |
| 2569 | } | 2587 | } |
| 2570 | } | 2588 | } |
| 2571 | - | 2589 | + |
| 2590 | + Collections.sort(lMap,new AccountXlbm()); | ||
| 2572 | Map<String, Object> map = new HashMap<String, Object>(); | 2591 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2573 | map.put("xlName", "合计"); | 2592 | map.put("xlName", "合计"); |
| 2574 | double jhyygl=culateService.culateJhgl(list);//计划营运公里 | 2593 | double jhyygl=culateService.culateJhgl(list);//计划营运公里 |
| @@ -2587,7 +2606,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2587,7 +2606,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2587 | map.put("sjzgl", Arith.add(zyygl, zksgl)); | 2606 | map.put("sjzgl", Arith.add(zyygl, zksgl)); |
| 2588 | map.put("sjgl",zyygl); | 2607 | map.put("sjgl",zyygl); |
| 2589 | map.put("sjksgl", zksgl); | 2608 | map.put("sjksgl", zksgl); |
| 2590 | - map.put("ssgl", culateService.culateLbgl(list)); | 2609 | + |
| 2610 | + double ssgl= culateService.culateLbgl(list); | ||
| 2611 | + map.put("ssgl", ssgl); | ||
| 2612 | + //计划+临加-少驶=实驶 | ||
| 2613 | + double jl=Arith.add(jhyygl, ljgl); | ||
| 2614 | + if(Arith.sub(jl, ssgl)==sjyygl){ | ||
| 2615 | + map.put("zt", 0); | ||
| 2616 | + }else{ | ||
| 2617 | + map.put("zt", 1); | ||
| 2618 | + } | ||
| 2591 | map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); | 2619 | map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); |
| 2592 | map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); | 2620 | map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); |
| 2593 | map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); | 2621 | map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); |
| @@ -4942,3 +4970,14 @@ class AccountMap2 implements Comparator<Map<String, Object>>{ | @@ -4942,3 +4970,14 @@ class AccountMap2 implements Comparator<Map<String, Object>>{ | ||
| 4942 | return o2.get("clZbh").toString().compareTo(o1.get("clZbh").toString()); | 4970 | return o2.get("clZbh").toString().compareTo(o1.get("clZbh").toString()); |
| 4943 | } | 4971 | } |
| 4944 | } | 4972 | } |
| 4973 | + | ||
| 4974 | +class AccountXlbm implements Comparator<Map<String, Object>>{ | ||
| 4975 | + @Override | ||
| 4976 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | ||
| 4977 | + // TODO Auto-generated method stub | ||
| 4978 | +// PinyinHelper.convertToPinyinString(ppy.getName(), | ||
| 4979 | +// "" , PinyinFormat.WITHOUT_TONE) | ||
| 4980 | + return o1.get("xlNamePy").toString().compareTo( | ||
| 4981 | + o2.get("xlNamePy").toString()); | ||
| 4982 | + } | ||
| 4983 | +} |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -882,7 +882,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -882,7 +882,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 882 | else if(isInOut(sch)) | 882 | else if(isInOut(sch)) |
| 883 | continue; | 883 | continue; |
| 884 | //主任务烂班 | 884 | //主任务烂班 |
| 885 | - else if(sch.getStatus() == -1){ | 885 | + else if(sch.getStatus() == -1 && !sch.isCcService()){ |
| 886 | if(sch.getAdjustExps().equals(item) || | 886 | if(sch.getAdjustExps().equals(item) || |
| 887 | (StringUtils.isEmpty(sch.getAdjustExps()) && item.equals("其他"))){ | 887 | (StringUtils.isEmpty(sch.getAdjustExps()) && item.equals("其他"))){ |
| 888 | sum = Arith.add(sum, sch.getJhlcOrig()); | 888 | sum = Arith.add(sum, sch.getJhlcOrig()); |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -427,7 +427,7 @@ | @@ -427,7 +427,7 @@ | ||
| 427 | layer.msg("请选择时间"); | 427 | layer.msg("请选择时间"); |
| 428 | return; | 428 | return; |
| 429 | } | 429 | } |
| 430 | - $("#xlmc").html(xlName); | 430 | + $("#xlmc").html(xlName+" "+date+" "); |
| 431 | // $("#ddrbBody").height($(window).height()-300); | 431 | // $("#ddrbBody").height($(window).height()-300); |
| 432 | $("c").html("全日"); | 432 | $("c").html("全日"); |
| 433 | $("#export").removeAttr("disabled"); | 433 | $("#export").removeAttr("disabled"); |
src/main/resources/static/pages/forms/statement/statisticsDaily.html
| @@ -316,7 +316,7 @@ | @@ -316,7 +316,7 @@ | ||
| 316 | </script> | 316 | </script> |
| 317 | <script type="text/html" id="statisticsDaily"> | 317 | <script type="text/html" id="statisticsDaily"> |
| 318 | {{each list as obj i}} | 318 | {{each list as obj i}} |
| 319 | - <tr> | 319 | + <tr {{if obj.zt==1}}style='color: red'{{/if}}> |
| 320 | <td>{{obj.xlName}}</td> | 320 | <td>{{obj.xlName}}</td> |
| 321 | <td>{{obj.jhzlc}}</td> | 321 | <td>{{obj.jhzlc}}</td> |
| 322 | <td>{{obj.jhlc}}</td> | 322 | <td>{{obj.jhlc}}</td> |