Commit d2d36a99afea713ec76fa61e999187f26a118e2f

Authored by 娄高锋
1 parent 41caf929

大间隔统计表添加备注,注明当天线路的平均间隔和大间隔标准

src/main/java/com/bsth/entity/calc/CalcInterval.java
... ... @@ -33,8 +33,10 @@ public class CalcInterval {
33 33 private String xlName;
34 34 /*大间隔等级*/
35 35 private String level;
36   - /*等级具体时间*/
37   - private Double levelTime;
  36 + /*等级具体时间(高峰)*/
  37 + private double levelTime;
  38 + /*等级具体时间(低谷)*/
  39 + private double levelTime2;
38 40 /*全日大间隔次数*/
39 41 private Integer djgAll;
40 42 /*高峰大间隔次数*/
... ... @@ -45,14 +47,22 @@ public class CalcInterval {
45 47 private Integer djgWgf;
46 48 /*低谷大间隔次数*/
47 49 private Integer djgDg;
  50 + /*班次数*/
  51 + private Integer bcs;
48 52 /*最大间隔时间*/
49 53 private Integer djgTime;
50   - /*全日班次数*/
51   - private Integer bcs;
52 54 /*数据创建时间*/
53 55 private Date createtime;
54 56 /*数据修改时间*/
55 57 private Date updatetime;
  58 + /*高峰大间隔标准*/
  59 + private Integer gfMax;
  60 + /*低谷大间隔标准*/
  61 + private Integer dgMax;
  62 + /*夜班大间隔标准*/
  63 + private Integer ybMax;
  64 + /*是否营运线路 */
  65 + private boolean sfyy;
56 66  
57 67 /*公司名字*/
58 68 @Transient
... ... @@ -60,6 +70,7 @@ public class CalcInterval {
60 70 /*分公司名字*/
61 71 @Transient
62 72 private String fgsname;
  73 +
63 74 public Long getId() {
64 75 return id;
65 76 }
... ... @@ -102,10 +113,10 @@ public class CalcInterval {
102 113 public void setLevel(String level) {
103 114 this.level = level;
104 115 }
105   - public Double getLevelTime() {
  116 + public double getLevelTime() {
106 117 return levelTime;
107 118 }
108   - public void setLevelTime(Double levelTime) {
  119 + public void setLevelTime(double levelTime) {
109 120 this.levelTime = levelTime;
110 121 }
111 122 public Integer getDjgAll() {
... ... @@ -139,18 +150,18 @@ public class CalcInterval {
139 150 public void setDjgDg(Integer djgDg) {
140 151 this.djgDg = djgDg;
141 152 }
142   - public Integer getDjgTime() {
143   - return djgTime;
144   - }
145   - public void setDjgTime(Integer djgTime) {
146   - this.djgTime = djgTime;
147   - }
148 153 public Integer getBcs() {
149 154 return bcs;
150 155 }
151 156 public void setBcs(Integer bcs) {
152 157 this.bcs = bcs;
153 158 }
  159 + public Integer getDjgTime() {
  160 + return djgTime;
  161 + }
  162 + public void setDjgTime(Integer djgTime) {
  163 + this.djgTime = djgTime;
  164 + }
154 165 public Date getCreatetime() {
155 166 return createtime;
156 167 }
... ... @@ -163,6 +174,36 @@ public class CalcInterval {
163 174 public void setUpdatetime(Date updatetime) {
164 175 this.updatetime = updatetime;
165 176 }
  177 + public double getLevelTime2() {
  178 + return levelTime2;
  179 + }
  180 + public void setLevelTime2(double levelTime2) {
  181 + this.levelTime2 = levelTime2;
  182 + }
  183 + public Integer getGfMax() {
  184 + return gfMax;
  185 + }
  186 + public void setGfMax(Integer gfMax) {
  187 + this.gfMax = gfMax;
  188 + }
  189 + public Integer getDgMax() {
  190 + return dgMax;
  191 + }
  192 + public void setDgMax(Integer dgMax) {
  193 + this.dgMax = dgMax;
  194 + }
  195 + public Integer getYbMax() {
  196 + return ybMax;
  197 + }
  198 + public void setYbMax(Integer ybMax) {
  199 + this.ybMax = ybMax;
  200 + }
  201 + public boolean isSfyy() {
  202 + return sfyy;
  203 + }
  204 + public void setSfyy(boolean sfyy) {
  205 + this.sfyy = sfyy;
  206 + }
166 207 public String getGsname() {
167 208 return BasicData.businessCodeNameMap.get(this.gsbm);
168 209 }
... ... @@ -176,5 +217,4 @@ public class CalcInterval {
176 217 this.fgsname = fgsname;
177 218 }
178 219  
179   -
180 220 }
... ...
src/main/java/com/bsth/service/calc/impl/CalcIntervalServiceImpl.java
... ... @@ -155,7 +155,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege
155 155 // + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
156 156 // + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level <> 'D' ";
157 157 String sql="select gsbm,fgsbm,xl_bm,xl_name,SUM(bcs) as bcs,MAX(id) as id,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,"
158   - + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime,substr(level,1,1) level "
  158 + + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime,substr(level,1,1) level, sfyy "
159 159 + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level like '%"+level+"%' "
160 160 + "and level is not null and level <> '' ";
161 161 if(line.equals("")){
... ... @@ -210,24 +210,24 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
210 210 } else {
211 211 m.put("level", rs.getString("level"));
212 212 }
  213 + m.put("sfyy", rs.getString("sfyy")!=null?rs.getString("sfyy"):"");
213 214 return m;
214 215 }
215 216 });
216 217 }
217 218  
218 219 //根据线路类型确定是否营运
219   - Map<String, Boolean> lineMap=lineService.lineNature();
220 220 List<Map<String, Object>> listAll=new ArrayList<Map<String, Object>>();
221 221 for (int i = 0; i < list.size(); i++) {
222 222 Map<String, Object> m=list.get(i);
223 223 if (nature.equals("0")) {
224 224 listAll.add(m);
225 225 }else if(nature.equals("1")){
226   - if(lineMap.get(m.get("xlBm").toString())){
  226 + if(m.get("sfyy")!=null && "1".equals(m.get("sfyy").toString())){
227 227 listAll.add(m);
228 228 }
229 229 }else{
230   - if(!lineMap.get(m.get("xlBm").toString())){
  230 + if(m.get("sfyy")==null || !("1".equals(m.get("sfyy").toString()))){
231 231 listAll.add(m);
232 232 }
233 233 }
... ... @@ -350,6 +350,25 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
350 350 }
351 351 m.put("bcs", t.getBcs());
352 352 m.put("djgTime", t.getDjgTime());
  353 +
  354 + String remark1 = "", remark2 = "";
  355 + if(t.getLevelTime() >= 0){
  356 + remark1 += "高峰平均"+t.getLevelTime()+"分;";
  357 + }
  358 + if(t.getLevelTime2() >= 0){
  359 + remark1 += "低谷平均"+t.getLevelTime2()+"分;\n";
  360 + }
  361 + if(t.getGfMax() > 0){
  362 + remark2 += "高峰标准"+t.getGfMax()+"分;";
  363 + }
  364 + if(t.getDgMax() > 0){
  365 + remark2 += "低谷标准"+t.getDgMax()+"分;";
  366 + }
  367 + if(t.getYbMax() > 0){
  368 + remark2 += "夜班标准"+t.getYbMax()+"分;";
  369 + }
  370 + m.put("remark1", remark1);
  371 + m.put("remark2", remark2);
353 372 tempList.add(m);
354 373 }
355 374 }
... ... @@ -799,7 +818,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
799 818  
800 819 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
801 820  
802   - String sql="select d.*, i.gsbm, i.fgsbm from bsth_c_calc_interval_detail d "
  821 + String sql="select d.*, i.gsbm, i.fgsbm, i.sfyy from bsth_c_calc_interval_detail d "
803 822 + " left join bsth_c_calc_interval i "
804 823 + " on d.date = i.date and d.line_code = i.xl_bm "
805 824 + " and d.level = i.level "
... ... @@ -826,6 +845,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
826 845 m.put("subTime", rs.getString("sub_time"));
827 846 m.put("date", rs.getString("date"));
828 847 m.put("station", rs.getString("station"));
  848 + m.put("sfyy", rs.getString("sfyy")!=null?rs.getString("sfyy"):"");
829 849  
830 850 return m;
831 851 }
... ... @@ -863,11 +883,11 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
863 883 if (nature.equals("0")) {
864 884 list.add(m);
865 885 }else if(nature.equals("1")){
866   - if(lineMap.get(m.get("xlBm").toString())){
  886 + if(m.get("sfyy")!=null && "1".equals(m.get("sfyy").toString())){
867 887 list.add(m);
868 888 }
869 889 }else{
870   - if(!lineMap.get(m.get("xlBm").toString())){
  890 + if(m.get("sfyy")==null || !("1".equals(m.get("sfyy").toString()))){
871 891 list.add(m);
872 892 }
873 893 }
... ... @@ -924,7 +944,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
924 944  
925 945 List<Map<String, Object>> listAll=new ArrayList<Map<String, Object>>();
926 946  
927   - String sql="select gsbm,fgsbm,xl_bm,xl_name,level,djg_all,bcs"
  947 + String sql="select gsbm,fgsbm,xl_bm,xl_name,level,djg_all,bcs,sfyy"
928 948 + " from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"'"
929 949 + " and level is not null and level <> '' ";
930 950 if(gs.length() > 0){
... ... @@ -954,22 +974,22 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl&lt;CalcInterval,Intege
954 974 m.put("level", rs.getString("level"));
955 975 m.put("djgAll", rs.getInt("djg_all"));
956 976 m.put("bcs", rs.getInt("bcs"));
  977 + m.put("sfyy", rs.getInt("sfyy"));
957 978 return m;
958 979 }
959 980 });
960 981  
961 982 //根据线路类型确定是否营运
962   - Map<String, Boolean> lineMap=lineService.lineNature();
963 983 for (int i = 0; i < list.size(); i++) {
964 984 Map<String, Object> m=list.get(i);
965 985 if (nature.equals("0")) {
966 986 countList.add(m);
967 987 }else if(nature.equals("1")){
968   - if(lineMap.get(m.get("xlBm").toString())){
  988 + if(m.get("sfyy")!=null && "1".equals(m.get("sfyy").toString())){
969 989 countList.add(m);
970 990 }
971 991 }else{
972   - if(!lineMap.get(m.get("xlBm").toString())){
  992 + if(m.get("sfyy")==null || !("1".equals(m.get("sfyy").toString()))){
973 993 countList.add(m);
974 994 }
975 995 }
... ...
src/main/resources/static/pages/report/sheet/intervalCount.html
... ... @@ -83,6 +83,7 @@
83 83 <input class="btn btn-default" type="button" id="query" value="查询" style="margin-left: 2px;"/>
84 84 <input class="btn btn-default" type="button" id="export" value="导出" title="导出查询的大间隔情况"/>
85 85 <input class="btn btn-default" type="button" id="export2" value="导出全部详情" title="导出查询的全部线路的大间隔详细"/>
  86 +<!-- <input class="btn btn-default" type="button" id="view" value="查看大间隔标准"/> -->
86 87 </div>
87 88 </form>
88 89 </div>
... ... @@ -359,11 +360,15 @@
359 360 function openIntervalList(){
360 361 var id = $(this).data('id');
361 362  
362   - id += ","+$(this).data('date')+",1";
  363 + id += ","+$(this).data('date');
  364 +
  365 + id += ","+$(this).data('remark1');
  366 +
  367 + id += ","+$(this).data('remark2');
363 368 $.get('/pages/report/sheet/intervalList.html', function (content) {
364 369 layer.open({
365 370 type: 1,
366   - area: ['800px', '600px'],
  371 + area: ['880px', '600px'],
367 372 content: content,
368 373 title: '线路准点率详细',
369 374 shift: 5,
... ... @@ -573,7 +578,7 @@
573 578  
574 579 <script type="text/html" id="intervalList_1">
575 580 {{each list as obj i}}
576   - <tr>
  581 + <tr title="{{obj.remark1+obj.remark2}}">
577 582 <td>{{obj.gs}}</td>
578 583 <td>{{obj.fgs}}</td>
579 584 <td>{{obj.date}}</td>
... ... @@ -589,7 +594,8 @@
589 594 <td>{{obj.djgTime}}</td>
590 595 <td>
591 596 <button type="button" class="btn btn-sm blue btn-intervalList_1"
592   - data-id="{{obj.xlBm}}" data-date="{{obj.date}}">详细</button>
  597 + data-id="{{obj.xlBm}}" data-date="{{obj.date}}"
  598 + data-remark1="{{obj.remark1}}" data-remark2="{{obj.remark2}}">详细</button>
593 599 </td>
594 600 </tr>
595 601 {{/each}}
... ...
src/main/resources/static/pages/report/sheet/intervalList.html
... ... @@ -27,6 +27,7 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-body">
29 29 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px">
  30 + <div id="remark"></div>
30 31 <table class="table table-bordered table-hover table-checkable" id="forms_2">
31 32 <thead>
32 33 <tr>
... ... @@ -42,7 +43,7 @@
42 43 <td>间隔时间</td>
43 44 </tr>
44 45 </thead>
45   -
  46 +
46 47 <tbody>
47 48  
48 49 </tbody>
... ... @@ -62,6 +63,7 @@
62 63 $("#calcIntervalList").on('init', function (e, id) {
63 64 no=id.split(",")[0];
64 65 dates = id.split(",")[1];
  66 + $("#remark").html(id.split(",")[2] + "<br/>" + id.split(",")[3]);
65 67 var i = layer.load(2);
66 68 $get('/calcInterval/interval',{line:no,date:dates,status:"detail",type:'query'},function(result){
67 69 layer.close(i);
... ... @@ -75,7 +77,7 @@
75 77 window.open("/downloadFile/download?fileName="+dates+"大间隔详细");
76 78 layer.close(i);
77 79 });
78   - });
  80 + });
79 81  
80 82  
81 83 });
... ...