Commit f353ea27da0b8d6b6c3fbfc020817f47df0a665c

Authored by 廖磊
2 parents f393f13c 4453aa59

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
... ... @@ -358,6 +358,8 @@ public class InOutStationSignalHandle extends SignalHandle{
358 358 //通知客户端
359 359 sendUtils.sendZdsj(sch, lpNext, doneSum);
360 360 logger.info("车辆:" + sch.getClZbh() + " 班次:" + sch.getDfsj() + "到终点, 时间:" + sch.getZdsjActual());
  361 + //清除车辆误点调整监听
  362 + LateAdjustHandle.remove(sch.getClZbh());
361 363 //准备执行下一个班次
362 364 if (next != null) {
363 365 //将gps转换为下一个班次走向的站内信号
... ...
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
... ... @@ -117,6 +117,7 @@ public class LateAdjustHandle implements ApplicationContextAware{
117 117 sch.setLateMinute(0);
118 118 sch.setDfAuto(false);
119 119  
  120 + lateSchMap.remove(nbbm);
120 121 logger.info("移除误点调整 nbbm -" + nbbm);
121 122 }
122 123 }
... ... @@ -141,7 +142,7 @@ public class LateAdjustHandle implements ApplicationContextAware{
141 142 //自动调整待发 到达时间 + 停靠时间
142 143 long dt = Arith.addLong(gps.getTimestamp(), (sch.getLateMinute() * 60 * 1000));
143 144  
144   - //超过2小时最大阈值,放弃
  145 + //超过2小时最大阈值,放弃 -临时代码,待删除
145 146 if(Math.abs(dt - sch.getDfsjT()) > 1000 * 60 * 60 * 2){
146 147 logger.info(sch.getClZbh() + " 超过误点调整阈值,放弃");
147 148 }
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -1645,73 +1645,79 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1645 1645 }
1646 1646 for(String key : keyMap.keySet()){
1647 1647 Map<String, Object> tempMap = new HashMap<String, Object>();
1648   - int jhbc = 0;
1649   - int sjbc = 0;
1650   - int jhlc = 0;
1651   - int sjlc = 0;
1652   - int lzbc = 0, lzlc = 0, dmbc = 0, dmlc = 0,
1653   - gzbc = 0, gzlc = 0, jfbc = 0, jflc = 0,
1654   - zsbc = 0, zslc = 0, qrbc = 0, qrlc = 0,
1655   - qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0,
1656   - qhbc = 0, qhlc = 0, wybc = 0, wylc = 0;
1657   - int qtbc = 0, qtlc = 0;
  1648 + int jhbc = 0, sjbc = 0,
  1649 + lzbc = 0, dmbc = 0,
  1650 + gzbc = 0, jfbc = 0, zsbc = 0,
  1651 + qrbc = 0, qcbc = 0, kxbc = 0,
  1652 + qhbc = 0, wybc = 0, qtbc = 0;
  1653 + BigDecimal jhlc = new BigDecimal("0"), sjlc = new BigDecimal("0"),
  1654 + lzlc = new BigDecimal("0"), dmlc = new BigDecimal("0"),
  1655 + gzlc = new BigDecimal("0"), jflc = new BigDecimal("0"),
  1656 + zslc = new BigDecimal("0"), qrlc = new BigDecimal("0"),
  1657 + qclc = new BigDecimal("0"), kxlc = new BigDecimal("0"),
  1658 + qhlc = new BigDecimal("0"), wylc = new BigDecimal("0"),
  1659 + qtlc = new BigDecimal("0");
1658 1660 String companyName = "", subCompanyName = "";
1659 1661 for(ScheduleRealInfo schedule : keyMap.get(key)){
1660 1662 if(schedule.getGsName() != null && companyName.length() == 0)
1661 1663 companyName = schedule.getGsName();
1662 1664 if(schedule.getFgsName() != null && subCompanyName.length() == 0)
1663 1665 subCompanyName = schedule.getFgsName();
1664   - double lc = 0d;
  1666 + BigDecimal lc = new BigDecimal("0");
1665 1667 if(schedule.getJhlcOrig() != null && schedule.getJhlcOrig() > 0.1d){
1666   - lc = schedule.getJhlcOrig();
  1668 + lc = new BigDecimal("0"+schedule.getJhlcOrig());
1667 1669 } else {
1668   - lc = schedule.getJhlc();
  1670 + lc = new BigDecimal("0"+schedule.getJhlc());
1669 1671 }
1670 1672  
1671 1673 if(!schedule.isSflj()){
1672 1674 jhbc++;
1673   - jhlc += lc;
  1675 + jhlc = jhlc.add(lc);
1674 1676 }
1675 1677 if(schedule.getStatus() != -1){
1676 1678 sjbc++;
1677   - sjlc += lc;
  1679 + sjlc = sjlc.add(lc);
1678 1680 } else if(schedule.getStatus() == -1){
1679 1681 if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("路阻") != -1){
1680 1682 lzbc++;
1681   - lzlc += lc;
  1683 + lzlc = lzlc.add(lc);
1682 1684 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("吊慢") != -1){
1683 1685 dmbc++;
1684   - dmlc += lc;
  1686 + dmlc = dmlc.add(lc);
1685 1687 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("故障") != -1){
1686 1688 gzbc++;
1687   - gzlc += lc;
  1689 + gzlc = gzlc.add(lc);
1688 1690 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("纠纷") != -1){
1689 1691 jfbc++;
1690   - jflc += lc;
  1692 + jflc = jflc.add(lc);
1691 1693 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("肇事") != -1){
1692 1694 zsbc++;
1693   - zslc += lc;
  1695 + zslc = zslc.add(lc);
1694 1696 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("缺人") != -1){
1695 1697 qrbc++;
1696   - qrlc += lc;
  1698 + qrlc = qrlc.add(lc);
1697 1699 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("缺车") != -1){
1698 1700 qcbc++;
1699   - qclc += lc;
  1701 + qclc = qclc.add(lc);
1700 1702 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("客稀") != -1){
1701 1703 kxbc++;
1702   - kxlc += lc;
  1704 + kxlc = kxlc.add(lc);
1703 1705 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("气候") != -1){
1704 1706 qhbc++;
1705   - qhlc += lc;
  1707 + qhlc = qhlc.add(lc);
1706 1708 }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("外援") != -1){
1707 1709 wybc++;
1708   - wylc += lc;
  1710 + wylc = wylc.add(lc);
1709 1711 } else {
1710 1712 qtbc++;
1711   - qtlc += lc;
  1713 + qtlc = qtlc.add(lc);
1712 1714 }
1713 1715 }
1714 1716 }
  1717 + boolean flag = true;
  1718 + if(jhlc.toString().equals("0")){
  1719 + flag = false;
  1720 + }
1715 1721 tempMap.put("date", Date);
1716 1722 tempMap.put("company", companyName);
1717 1723 tempMap.put("subCompany", subCompanyName);
... ... @@ -1720,42 +1726,43 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1720 1726 tempMap.put("jhbc", jhbc);
1721 1727 tempMap.put("sjbc", sjbc);
1722 1728 tempMap.put("bcbfb", df.format(jhbc>0?(double)sjbc/jhbc*100:0)+"%");
1723   - tempMap.put("jhlc", jhlc);
1724   - tempMap.put("sjlc", sjlc);
1725   - tempMap.put("lcbfb", df.format(jhlc>0?(double)sjlc/jhlc*100:0)+"%");
  1729 + tempMap.put("jhlc", jhlc.doubleValue());
  1730 + tempMap.put("sjlc", sjlc.doubleValue());
  1731 +// tempMap.put("lcbfb", df.format(flag?(double)sjlc/jhlc*100:0)+"%");
  1732 + tempMap.put("lcbfb", df.format(flag?sjlc.divide(jhlc, 4, BigDecimal.ROUND_HALF_UP).doubleValue()*100:0)+"%");
1726 1733 tempMap.put("lzbc", lzbc);
1727   - tempMap.put("lzlc", lzlc);
1728   - tempMap.put("lzbfb", df.format(jhlc>0?(double)lzbc/jhbc*100:0)+"%");
  1734 + tempMap.put("lzlc", lzlc.doubleValue());
  1735 + tempMap.put("lzbfb", df.format(flag?(double)lzbc/jhbc*100:0)+"%");
1729 1736 tempMap.put("dmbc", dmbc);
1730   - tempMap.put("dmlc", dmlc);
1731   - tempMap.put("dmbfb", df.format(jhlc>0?(double)dmbc/jhbc*100:0)+"%");
  1737 + tempMap.put("dmlc", dmlc.doubleValue());
  1738 + tempMap.put("dmbfb", df.format(flag?(double)dmbc/jhbc*100:0)+"%");
1732 1739 tempMap.put("gzbc", gzbc);
1733   - tempMap.put("gzlc", gzlc);
1734   - tempMap.put("gzbfb", df.format(jhlc>0?(double)gzbc/jhbc*100:0)+"%");
  1740 + tempMap.put("gzlc", gzlc.doubleValue());
  1741 + tempMap.put("gzbfb", df.format(flag?(double)gzbc/jhbc*100:0)+"%");
1735 1742 tempMap.put("jfbc", jfbc);
1736   - tempMap.put("jflc", jflc);
1737   - tempMap.put("jfbfb", df.format(jhlc>0?(double)jfbc/jhbc*100:0)+"%");
  1743 + tempMap.put("jflc", jflc.doubleValue());
  1744 + tempMap.put("jfbfb", df.format(flag?(double)jfbc/jhbc*100:0)+"%");
1738 1745 tempMap.put("zsbc", zsbc);
1739   - tempMap.put("zslc", zslc);
1740   - tempMap.put("zsbfb", df.format(jhlc>0?(double)zsbc/jhbc*100:0)+"%");
  1746 + tempMap.put("zslc", zslc.doubleValue());
  1747 + tempMap.put("zsbfb", df.format(flag?(double)zsbc/jhbc*100:0)+"%");
1741 1748 tempMap.put("qrbc", qrbc);
1742   - tempMap.put("qrlc", qrlc);
1743   - tempMap.put("qrbfb", df.format(jhlc>0?(double)qrbc/jhbc*100:0)+"%");
  1749 + tempMap.put("qrlc", qrlc.doubleValue());
  1750 + tempMap.put("qrbfb", df.format(flag?(double)qrbc/jhbc*100:0)+"%");
1744 1751 tempMap.put("qcbc", qcbc);
1745   - tempMap.put("qclc", qclc);
1746   - tempMap.put("qcbfb", df.format(jhlc>0?(double)qcbc/jhbc*100:0)+"%");
  1752 + tempMap.put("qclc", qclc.doubleValue());
  1753 + tempMap.put("qcbfb", df.format(flag?(double)qcbc/jhbc*100:0)+"%");
1747 1754 tempMap.put("kxbc", kxbc);
1748   - tempMap.put("kxlc", kxlc);
1749   - tempMap.put("kxbfb", df.format(jhlc>0?(double)kxbc/jhbc*100:0)+"%");
  1755 + tempMap.put("kxlc", kxlc.doubleValue());
  1756 + tempMap.put("kxbfb", df.format(flag?(double)kxbc/jhbc*100:0)+"%");
1750 1757 tempMap.put("qhbc", qhbc);
1751   - tempMap.put("qhlc", qhlc);
1752   - tempMap.put("qhbfb", df.format(jhlc>0?(double)qhbc/jhbc*100:0)+"%");
  1758 + tempMap.put("qhlc", qhlc.doubleValue());
  1759 + tempMap.put("qhbfb", df.format(flag?(double)qhbc/jhbc*100:0)+"%");
1753 1760 tempMap.put("wybc", wybc);
1754   - tempMap.put("wylc", wylc);
1755   - tempMap.put("wybfb", df.format(jhlc>0?(double)wybc/jhbc*100:0)+"%");
  1761 + tempMap.put("wylc", wylc.doubleValue());
  1762 + tempMap.put("wybfb", df.format(flag?(double)wybc/jhbc*100:0)+"%");
1756 1763 tempMap.put("qtbc", qtbc);
1757   - tempMap.put("qtlc", qtlc);
1758   - tempMap.put("qtbfb", df.format(jhlc>0?(double)qtbc/jhbc*100:0)+"%");
  1764 + tempMap.put("qtlc", qtlc.doubleValue());
  1765 + tempMap.put("qtbfb", df.format(flag?(double)qtbc/jhbc*100:0)+"%");
1759 1766  
1760 1767 resList.add(tempMap);
1761 1768 }
... ... @@ -1777,6 +1784,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1777 1784 e.printStackTrace();
1778 1785 }
1779 1786 }
  1787 + System.out.println(map);
1780 1788  
1781 1789 return resList;
1782 1790 }
... ...
src/main/resources/static/pages/summary/fast_and_slow/data.html 0 → 100644
  1 +<div class="ct_data_body_wrap">
  2 + <div class="uk-card uk-card-default uk-card-body ct_rq_left">
  3 + <ul uk-scrollspy-nav="closest: li; scroll: true; offset: 100"
  4 + class="uk-nav uk-nav-default tm-nav uk-nav-parent-icon">
  5 + <li class="uk-active"><a href="#table_20171010">2017-10-10</a></li>
  6 + <li><a href="#table_20171011">2017-10-11</a></li>
  7 + <li><a href="#table_20171012">2017-10-12</a></li>
  8 + <li><a href="#table_20171013">2017-10-13</a></li>
  9 + <li><a href="#table_20171014">2017-10-14</a></li>
  10 + <li><a href="#table_20171015">2017-10-15</a></li>
  11 + <li><a href="#table_20171016">2017-10-16</a></li>
  12 + </ul>
  13 + </div>
  14 +
  15 + <div class="uk-card uk-card-default uk-card-body ct_right_tables">
  16 + <div id="table_20171010">
  17 + <table>
  18 +
  19 + </table>
  20 + </div>
  21 + </div>
  22 +
  23 + <script>
  24 + (function () {
  25 + var wrap = '.ct_data_body_wrap';
  26 +
  27 + $(wrap).on('init', function (e, data) {
  28 + e.stopPropagation();
  29 + console.log('data init');
  30 +
  31 + });
  32 + })();
  33 + </script>
  34 +</div>
0 35 \ No newline at end of file
... ...
src/main/resources/static/pages/summary/fast_and_slow/f_a_s_wrap.html 0 → 100644
  1 +<!-- 快慢误点统计 -->
  2 +<iframe src="/pages/summary/fast_and_slow/main.html?origin=real_control_iframe" frameborder="0" style="height: 100%;width: 100%;"></iframe>
0 3 \ No newline at end of file
... ...
src/main/resources/static/pages/summary/fast_and_slow/main.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh-cn">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>
  7 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />
  8 + <!-- flatpickr -->
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
  10 + <style>
  11 + html,body{
  12 + height: 100%;
  13 + }
  14 + .ct_page{
  15 + padding: 25px 15px;
  16 + height: 100%;
  17 + height: calc(100% - 50px);
  18 + }
  19 +
  20 + .ct_cont{
  21 + height: calc(100% - 35px);
  22 + }
  23 +
  24 + .ct_cont>div>div.uk-card{
  25 + height: 99%;
  26 + }
  27 +
  28 + .loading{
  29 + height: 100%;
  30 + text-align: center;
  31 + }
  32 + .loading .uk-spinner{
  33 + margin-top: 200px;
  34 + }
  35 + .loading circle{
  36 + stroke: red;
  37 + }
  38 +
  39 + .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
  40 + opacity: 0.6 !important;
  41 + padding: 0 !important;
  42 + }
  43 +
  44 + .ct_search_form_wrap{
  45 + border-bottom: 1px solid #e5e5e5;
  46 + padding: 10px 0 25px 10px;
  47 + }
  48 + .ct_search_form_wrap .ct_field{
  49 + display: inline-block;
  50 + margin: 0 5px;
  51 + }
  52 +
  53 + .ct_search_form_wrap .ct_field label{
  54 + font-size: 14px;
  55 + }
  56 +
  57 + .ct_search_form_wrap .ct_field input[type=text]{
  58 + width: 110px;
  59 + }
  60 +
  61 + .ct_search_form_wrap .ct_field select{
  62 + width: auto;
  63 + min-width: 100px;
  64 + }
  65 +
  66 + .ct_search_form_wrap .uk-button{
  67 + padding: 0 14px;
  68 + }
  69 +
  70 + .ct_search_form_wrap .uk-button i{
  71 + vertical-align: middle;
  72 + margin-top: -2px;
  73 + margin-right: 7px;
  74 + }
  75 +
  76 + .ct_field.ct_field_bottom{
  77 + vertical-align: bottom;
  78 + font-size: 12px;
  79 + margin-left: 0;
  80 + }
  81 +
  82 + .ct_cont_body{
  83 + height: calc(100% - 88px);
  84 + width: 100%;
  85 + padding-top: 12px;
  86 + }
  87 +
  88 + .ct_data_body_wrap{
  89 + height: 100%;
  90 + width: 100%;
  91 + }
  92 +
  93 + .ct_rq_left{
  94 + width: 200px;
  95 + display: inline-block;
  96 + vertical-align: top;
  97 + height: 99%;
  98 + height: calc(100% - 5px);
  99 + }
  100 +
  101 + .ct_right_tables{
  102 + width: calc(100% - 220px);
  103 + display: inline-block;
  104 + margin-left: 12px;
  105 + height: 99%;
  106 + height: calc(100% - 5px);
  107 + }
  108 +
  109 + .tm-nav>li a{
  110 + position: relative;
  111 + font-size: 15px;
  112 + }
  113 + .tm-nav>li.uk-active>a:before {
  114 + content: "";
  115 + position: absolute;
  116 + width: 15px;
  117 + border-top: 1px solid #1e87f0;
  118 + z-index: 9;
  119 + right: 60px;
  120 + top: 15px;
  121 + }
  122 + .uk-nav-default>li.uk-active>a {
  123 + color: #222;
  124 + }
  125 + </style>
  126 +</head>
  127 +
  128 +<body>
  129 +<div class="loading">
  130 + <div uk-spinner></div>
  131 +</div>
  132 +<div class="ct_page" style="display: none;">
  133 + <h3 class="uk-heading-line uk-heading-bullet"><span>快慢误点统计</span></h3>
  134 + <div class="ct_cont" >
  135 + <div class="ct_search_form_wrap">
  136 + <form>
  137 + <div class="ct_field">
  138 + <label>公司:
  139 + <select class="uk-select" name="companyId_eq">
  140 + </select>
  141 + </label>
  142 + </div>
  143 + <div class="ct_field">
  144 + <label>分公司:
  145 + <select class="uk-select" name="subCompanyId_eq">
  146 + </select>
  147 + </label>
  148 + </div>
  149 + <div class="ct_field">
  150 + <label>线路:
  151 + <select class="uk-select" name="lineCode_eq">
  152 + </select>
  153 + </label>
  154 + </div>
  155 + <div class="ct_field">
  156 + <label>日期范围:
  157 + <input class="uk-input" name="rq" style="width: 200px;">
  158 + </label>
  159 + </div>
  160 + <div class="ct_field">
  161 + <label><input class="uk-radio" type="radio" name="type" checked> 全部</label>&nbsp;
  162 + <label><input class="uk-radio" type="radio" name="type"> 快误</label>&nbsp;
  163 + <label><input class="uk-radio" type="radio" name="type"> 慢误</label>
  164 + </div>
  165 + <div class="ct_field">
  166 + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
  167 + </div>
  168 + <div class="ct_field ct_field_bottom">
  169 + <button class="uk-button uk-button-text" style="padding: 0 5px;">导出数据</button>
  170 + </div>
  171 + <div class="ct_field ct_field_bottom">
  172 + <span uk-icon="icon: question" title="统计 “正常”、“区间”、“放站” 班次" uk-tooltip="pos: bottom"></span>
  173 + </div>
  174 + </form>
  175 + </div>
  176 +
  177 + <div class="ct_cont_body">
  178 + </div>
  179 + </div>
  180 +</div>
  181 +
  182 +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  183 +<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
  184 +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
  185 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
  186 +<!-- EventProxy -->
  187 +<script src="/assets/js/eventproxy.js"></script>
  188 +<!-- art-template 模版引擎 -->
  189 +<script src="/assets/plugins/template.js"></script>
  190 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  191 +<!-- jquery.serializejson JSON序列化插件 -->
  192 +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
  193 +<!-- flatpickr -->
  194 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
  195 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
  196 +<script>
  197 +
  198 +(function () {
  199 + //var data_dom;
  200 + var f = $('form', '');
  201 + var ep = EventProxy.create('query_comps', 'query_lines', function () {
  202 + $('[name=companyId_eq]', f).trigger('change');//公司change
  203 + //query();
  204 +
  205 + $('.loading').remove();
  206 + $('.ct_page').show();
  207 + });
  208 +
  209 + $.get('/pages/summary/fast_and_slow/data.html', function (rs) {
  210 + $('.ct_cont_body').html(rs);
  211 + });
  212 +
  213 + //点击搜索按钮
  214 + $('.search', f).on('click', function () {
  215 + $('.ct_data_body_wrap').trigger('init');
  216 + });
  217 +
  218 + //日期选择框
  219 + var fs='YYYY-MM-DD'
  220 + , ets=moment().format(fs)
  221 + , sts=moment().subtract(7, 'days').format(fs);
  222 + flatpickr('.ct_search_form_wrap [name=rq]', {
  223 + mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
  224 + });
  225 + var comps;
  226 + //构建公司级联下拉框
  227 + $.get('/user/companyData', function (rs) {
  228 + comps = rs;
  229 + var opts = '';
  230 + for(var i=0,obj;obj=comps[i++];){
  231 + opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';
  232 + }
  233 + $('[name=companyId_eq]', f).html(opts);
  234 + ep.emit('query_comps');
  235 + });
  236 + var lineMapps;
  237 + //加载线路信息
  238 + $.get('/line/all', {'destroy_eq': 0}, function (rs) {
  239 + rs.sort(function (a, b) {
  240 + return a.name.localeCompare(b.name);
  241 + });
  242 + lineMapps={};
  243 + var k;
  244 + $.each(rs, function () {
  245 + k = this.company+'_'+this.brancheCompany;
  246 + if(!lineMapps[k])
  247 + lineMapps[k]=[];
  248 + lineMapps[k].push(this);
  249 + });
  250 +
  251 + ep.emit('query_lines');
  252 + });
  253 +
  254 + $('[name=companyId_eq]', f).on('change', function () {
  255 + var code = $(this).val(), subs=[];
  256 + $.each(comps, function () {
  257 + if(this.companyCode==code)
  258 + subs=this.children;
  259 + });
  260 +
  261 + var opts='';
  262 + $.each(subs, function () {
  263 + opts += '<option value="'+this.code+'">'+this.name+'</option>';
  264 + });
  265 + $('[name=subCompanyId_eq]', f).html(opts).trigger('change');
  266 + });
  267 +
  268 + $('[name=subCompanyId_eq]', f).on('change', function () {
  269 + var k = $('[name=companyId_eq]', f).val() + '_' + $(this).val();
  270 + var array = lineMapps[k];
  271 + var opts = '';
  272 + if(array){
  273 + $.each(array, function () {
  274 + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
  275 + });
  276 + }
  277 + $('[name=lineCode_eq]', f).html(opts);
  278 + });
  279 +})();
  280 +</script>
  281 +</body>
  282 +</html>
0 283 \ No newline at end of file
... ...
src/main/resources/static/pages/summary/work_hours/list.html
... ... @@ -18,7 +18,7 @@
18 18 }
19 19  
20 20 .ct_cont{
21   - height: calc(100% - 41px);
  21 + height: calc(100% - 35px);
22 22 }
23 23  
24 24 .ct_cont>div>div.uk-card{
... ... @@ -122,7 +122,7 @@
122 122 <div uk-spinner></div>
123 123 </div>
124 124 <div class="ct_page" style="display: none;">
125   - <h2 class="uk-heading-line uk-heading-bullet"><span>工时统计</span></h2>
  125 + <h3 class="uk-heading-line uk-heading-bullet"><span>工时统计</span></h3>
126 126 <div class="ct_cont" >
127 127 <div class="ct_search_form_wrap">
128 128 <form>
... ... @@ -141,7 +141,6 @@
141 141 <div class="ct_field">
142 142 <label>线路:
143 143 <select class="uk-select" name="lineCode_eq">
144   - <option value="81101">航头4路</option>
145 144 </select>
146 145 </label>
147 146 </div>
... ... @@ -264,7 +263,7 @@
264 263  
265 264 //日期选择器
266 265 $('[name=rq_eq]', f).val('2017-10-10');
267   - flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-10-10', minDate: '2017-07-01'});
  266 + flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-10-16', minDate: '2017-07-01'});
268 267  
269 268 var comps;
270 269 //构建公司级联下拉框
... ...
src/main/resources/static/real_control_v2/js/utils/dispatch_pattern.js
1 1 /** 调度模式 */
2 2  
  3 +//主调和监控模式
  4 +var operationMode = window.localStorage.getItem('operationMode');
3 5 var gb_dp_initHttpIntercept = function () {
4   - //主调和监控模式
5   - var operationMode = window.localStorage.getItem('operationMode');
6 6 $(document).off('ajaxSend', interceptPOST);
7 7 $('body>.north').removeClass('monitor main');
8 8 if (operationMode == 0) {
... ...