Commit a7da449c841c1e3d1db67cf46df9cc23e52b4c7d
1 parent
d2634043
班次准点率修改
Showing
5 changed files
with
322 additions
and
12 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -3090,7 +3090,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3090 | 3090 | if(cts != null && cts.size() > 0){ |
| 3091 | 3091 | listS.add(scheduleRealInfo); |
| 3092 | 3092 | }else{ |
| 3093 | - if(scheduleRealInfo.getZdsjActual()!=null){ | |
| 3093 | + if(scheduleRealInfo.getZdsjActual()!=null && scheduleRealInfo.getFcsjActual()!=null){ | |
| 3094 | 3094 | listS.add(scheduleRealInfo); |
| 3095 | 3095 | } |
| 3096 | 3096 | } | ... | ... |
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java
| ... | ... | @@ -200,7 +200,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements |
| 200 | 200 | } |
| 201 | 201 | r.setFcsjT(fscjT); |
| 202 | 202 | Sheet sheet=new Sheet(); |
| 203 | - if (s.getFcsjActual() != null) { | |
| 203 | + if (s.getFcsjActual() != null && !s.isDestroy()) { | |
| 204 | 204 | Long fcsjAcual = 0L; |
| 205 | 205 | try { |
| 206 | 206 | fcsjAcual = sdf.parse(r.getRealExecDate() + " " + r.getFcsjActual()).getTime(); |
| ... | ... | @@ -558,7 +558,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements |
| 558 | 558 | String endDate=map.get("endDate").toString(); |
| 559 | 559 | String sql="select * from bsth_c_sheet where date BETWEEN '"+date+"' and '"+endDate+"'"; |
| 560 | 560 | if(line.trim().equals("")){ |
| 561 | - sql +=" and gs like '%"+gs+"%' and fgs like '%"+fgs+"%'"; | |
| 561 | + sql +=" and gs = '"+gs+"' and fgs = '"+fgs+"'"; | |
| 562 | 562 | }else{ |
| 563 | 563 | sql +=" and line ='"+line+"'"; |
| 564 | 564 | } |
| ... | ... | @@ -581,9 +581,9 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements |
| 581 | 581 | } |
| 582 | 582 | }); |
| 583 | 583 | |
| 584 | - String sqlByLine="select line from bsth_c_sheet where date='"+date+"'"; | |
| 584 | + String sqlByLine="select line from bsth_c_sheet where date BETWEEN '"+date+"' and '"+endDate+"'"; | |
| 585 | 585 | if(line.trim().equals("")){ |
| 586 | - sqlByLine +=" and gs like '%"+gs+"%' and fgs like '%"+fgs+"%'"; | |
| 586 | + sqlByLine +=" and gs = '"+gs+"' and fgs like '"+fgs+"'"; | |
| 587 | 587 | }else{ |
| 588 | 588 | sqlByLine +=" and line ='"+line+"'"; |
| 589 | 589 | } | ... | ... |
src/main/resources/static/pages/forms/statement/daily.html
| ... | ... | @@ -247,15 +247,15 @@ |
| 247 | 247 | var total_yh = 0,total_bc = 0; |
| 248 | 248 | |
| 249 | 249 | $.each(result, function(i, obj) { |
| 250 | - total_zgl +=Number(obj.zlc); | |
| 251 | - total_ks +=Number(obj.jzl1); | |
| 252 | - total_yh += Number(obj.yh); | |
| 250 | + total_zgl +=Number(obj.zlc*10000); | |
| 251 | + total_ks +=Number(obj.jzl1*10000); | |
| 252 | + total_yh += Number(obj.yh*10000); | |
| 253 | 253 | total_bc += Number(obj.bc); |
| 254 | 254 | |
| 255 | 255 | }); |
| 256 | - $("#total_zgl").text(total_zgl.toFixed(2)); | |
| 257 | - $("#total_ks").text(total_ks.toFixed(2)); | |
| 258 | - $("#total_yh").text(total_yh.toFixed(2)); | |
| 256 | + $("#total_zgl").text((total_zgl/10000).toFixed(3)); | |
| 257 | + $("#total_ks").text((total_ks/10000).toFixed(3)); | |
| 258 | + $("#total_yh").text((total_yh/10000).toFixed(2)); | |
| 259 | 259 | $("#total_bc").text(total_bc.toFixed(0)); |
| 260 | 260 | |
| 261 | 261 | var temp = {}; | ... | ... |
src/main/resources/static/pages/mforms/singledatas/singledatas.html
0 → 100644
| 1 | +<style type="text/css"> | |
| 2 | + .table-bordered { | |
| 3 | + border: 1px solid; } | |
| 4 | + .table-bordered > thead > tr > th, | |
| 5 | + .table-bordered > thead > tr > td, | |
| 6 | + .table-bordered > tbody > tr > th, | |
| 7 | + .table-bordered > tbody > tr > td, | |
| 8 | + .table-bordered > tfoot > tr > th, | |
| 9 | + .table-bordered > tfoot > tr > td { | |
| 10 | + border: 1px solid; } | |
| 11 | + .table-bordered > thead > tr > th, | |
| 12 | + .table-bordered > thead > tr > td { | |
| 13 | + border-bottom-width: 2px; | |
| 14 | + text-align: center; } | |
| 15 | + | |
| 16 | + .table > tbody + tbody { | |
| 17 | + border-top: 1px solid; } | |
| 18 | +</style> | |
| 19 | + | |
| 20 | +<div class="page-head"> | |
| 21 | + <div class="page-title"> | |
| 22 | + <h1>路单数据</h1> | |
| 23 | + </div> | |
| 24 | +</div> | |
| 25 | + | |
| 26 | +<div class="row"> | |
| 27 | + <div class="col-md-12"> | |
| 28 | + <div class="portlet light porttlet-fit bordered"> | |
| 29 | + <div class="portlet-title"> | |
| 30 | + <form class="form-inline" action=""> | |
| 31 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_sing"> | |
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | |
| 33 | + <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select> | |
| 34 | + </div> | |
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_sing"> | |
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | |
| 37 | + <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select> | |
| 38 | + </div> | |
| 39 | + <div style="display: inline-block;"> | |
| 40 | + <span class="item-label" style="width: 80px;"> 线路: </span> | |
| 41 | + <select class="form-control" name="line" id="line" style="width: 140px;"></select> | |
| 42 | + </div> | |
| 43 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 44 | + <span class="item-label" style="width: 140px;">时间: </span> | |
| 45 | + <input class="form-control" type="text" id="startDate" style="width: 140px;"/> | |
| 46 | + </div> | |
| 47 | + | |
| 48 | + <div style="display: inline-block;margin-left: 15px"> | |
| 49 | + <span class="item-label" style="width: 150px;">统计: </span> | |
| 50 | + <select class="form-control" name="tjtype" id="tjtype" style="width: 140px;"> | |
| 51 | + <option value="jsy">驾驶员</option> | |
| 52 | + <option value="spy">售票员</option> | |
| 53 | + | |
| 54 | + </select> | |
| 55 | + | |
| 56 | + </div> | |
| 57 | + <div class="form-group"> | |
| 58 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | |
| 59 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 60 | + </div> | |
| 61 | + </form> | |
| 62 | + </div> | |
| 63 | + <div class="portlet-body"> | |
| 64 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | |
| 65 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 66 | + <thead> | |
| 67 | + <tr> | |
| 68 | + <th>序号</th> | |
| 69 | + <th>日期</th> | |
| 70 | + <th>所属公司</th> | |
| 71 | + <th>线路</th> | |
| 72 | + <th>车号</th> | |
| 73 | + <th>司机职号</th> | |
| 74 | + <th>司机姓名</th> | |
| 75 | + <th>售票员职号</th> | |
| 76 | + <th>售票员姓名</th> | |
| 77 | + <th>行驶里程(包括空放)</th> | |
| 78 | + <th>空驶里程</th> | |
| 79 | + <th>耗油量</th> | |
| 80 | + <th>加注量</th> | |
| 81 | + <th>非营业用油</th> | |
| 82 | + <th>计划公里</th> | |
| 83 | + </tr> | |
| 84 | + </thead> | |
| 85 | + <tbody> | |
| 86 | + | |
| 87 | + </tbody> | |
| 88 | + </table> | |
| 89 | + </div> | |
| 90 | + </div> | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | +</div> | |
| 94 | + | |
| 95 | +<script type="text/javascript" src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script> | |
| 96 | + | |
| 97 | +<script> | |
| 98 | + $(function(){ | |
| 99 | + // 关闭左侧栏 | |
| 100 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 101 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 102 | + | |
| 103 | + $("#startDate,#endDate").datetimepicker({ | |
| 104 | + format : 'YYYY-MM-DD', | |
| 105 | + locale : 'zh-cn' | |
| 106 | + }); | |
| 107 | + | |
| 108 | + var fage=false; | |
| 109 | + var xlList; | |
| 110 | + var obj = []; | |
| 111 | + | |
| 112 | + $.get('/report/lineList',function(result){ | |
| 113 | + xlList=result; | |
| 114 | + $.get('/user/companyData', function(result){ | |
| 115 | + obj = result; | |
| 116 | + var options = ''; | |
| 117 | + for(var i = 0; i < obj.length; i++){ | |
| 118 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | |
| 119 | + } | |
| 120 | + | |
| 121 | + if(obj.length ==0){ | |
| 122 | + $("#gsdmDiv_sing").css('display','none'); | |
| 123 | + }else if(obj.length ==1){ | |
| 124 | + $("#gsdmDiv_sing").css('display','none'); | |
| 125 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | |
| 126 | + $('#fgsdmDiv_sing').css('display','none'); | |
| 127 | + } | |
| 128 | + $('#gsdmSing').html(options); | |
| 129 | + updateCompany(); | |
| 130 | + }); | |
| 131 | + }) | |
| 132 | + $("#gsdmSing").on("change",updateCompany); | |
| 133 | + function updateCompany(){ | |
| 134 | + var company = $('#gsdmSing').val(); | |
| 135 | + var options = ''; | |
| 136 | + for(var i = 0; i < obj.length; i++){ | |
| 137 | + if(obj[i].companyCode == company){ | |
| 138 | + var children = obj[i].children; | |
| 139 | + for(var j = 0; j < children.length; j++){ | |
| 140 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | |
| 141 | + } | |
| 142 | + } | |
| 143 | + } | |
| 144 | + $('#fgsdmSing').html(options); | |
| 145 | + } | |
| 146 | + | |
| 147 | + var tempData = {}; | |
| 148 | + $.get('/report/lineList',function(xlList){ | |
| 149 | + var data = []; | |
| 150 | + data.push({id: " ", text: "全部线路"}); | |
| 151 | + $.get('/user/companyData', function(result){ | |
| 152 | + for(var i = 0; i < result.length; i++){ | |
| 153 | + var companyCode = result[i].companyCode; | |
| 154 | + var children = result[i].children; | |
| 155 | + for(var j = 0; j < children.length; j++){ | |
| 156 | + var code = children[j].code; | |
| 157 | + for(var k=0;k < xlList.length;k++ ){ | |
| 158 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | |
| 159 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | |
| 160 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | |
| 161 | + } | |
| 162 | + } | |
| 163 | + } | |
| 164 | + } | |
| 165 | + initPinYinSelect2('#line',data,''); | |
| 166 | + | |
| 167 | + }); | |
| 168 | + }); | |
| 169 | + | |
| 170 | + $("#line").on("change", function(){ | |
| 171 | + if($("#line").val() == " "){ | |
| 172 | + $("#gsdmSing").attr("disabled", false); | |
| 173 | + $("#fgsdmSing").attr("disabled", false); | |
| 174 | + } else { | |
| 175 | + var temp = tempData[$("#line").val()].split(":"); | |
| 176 | + $("#gsdmSing").val(temp[0]); | |
| 177 | + updateCompany(); | |
| 178 | + $("#fgsdmSing").val(temp[1]); | |
| 179 | + $("#gsdmSing").attr("disabled", true); | |
| 180 | + $("#fgsdmSing").attr("disabled", true); | |
| 181 | + } | |
| 182 | + }); | |
| 183 | + | |
| 184 | + | |
| 185 | + $("#query").on("click",function(){ | |
| 186 | + if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ | |
| 187 | + layer.msg("请选择时间!"); | |
| 188 | + return; | |
| 189 | + } | |
| 190 | + var line = $("#line").val(); | |
| 191 | + var startDate = $("#startDate").val(); | |
| 192 | + var lpName = $("#lpName").val(); | |
| 193 | + var gsdmSing = $("#gsdmSing").val(); | |
| 194 | + var fgsdmSing = $("#fgsdmSing").val(); | |
| 195 | + var tjtype=$("#tjtype").val(); | |
| 196 | + var params = {}; | |
| 197 | + var i = layer.load(2); | |
| 198 | + if(tjtype=='jsy'){ | |
| 199 | + $get("/mcy_forms/singledata",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | |
| 200 | + layer.close(i); | |
| 201 | + var singledata = template('singledata',{list:result}); | |
| 202 | + // 把渲染好的模版html文本追加到表格中 | |
| 203 | + $('#forms tbody').html(singledata); | |
| 204 | + | |
| 205 | + }); | |
| 206 | + }else{ | |
| 207 | + $get("/mcy_forms/singledata",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | |
| 208 | + | |
| 209 | + layer.close(i); | |
| 210 | + | |
| 211 | + var singledata = template('singledata2',{list:result}); | |
| 212 | + // 把渲染好的模版html文本追加到表格中 | |
| 213 | + $('#forms tbody').html(singledata); | |
| 214 | + | |
| 215 | + }); | |
| 216 | + } | |
| 217 | + | |
| 218 | + }); | |
| 219 | + | |
| 220 | + $("#export").on("click",function(){ | |
| 221 | + var line = $("#line").val(); | |
| 222 | + var startDate = $("#startDate").val(); | |
| 223 | + var endDate = $("#endDate").val(); | |
| 224 | + var lpName = $("#lpName").val(); | |
| 225 | + var gsdmSing = $("#gsdmSing").val(); | |
| 226 | + var fgsdmSing = $("#fgsdmSing").val(); | |
| 227 | + var tjtype=$("#tjtype").val(); | |
| 228 | + if(tjtype=='jsy'){ | |
| 229 | + $get('/mcy_export/singledataExport',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ | |
| 230 | + window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); | |
| 231 | + }); | |
| 232 | + }else{ | |
| 233 | + $("#forms").table2excel({ | |
| 234 | + // 不被导出的表格行的CSS class类 | |
| 235 | + exclude: ".noExl", | |
| 236 | + // 导出的Excel文档的名称,(没看到作用) | |
| 237 | + name: "Excel Document Name.xlsx", | |
| 238 | + // Excel文件的名称 | |
| 239 | + filename: "路单数据"+startDate | |
| 240 | + }); | |
| 241 | + } | |
| 242 | + | |
| 243 | + }); | |
| 244 | + }); | |
| 245 | +</script> | |
| 246 | +<script type="text/html" id="singledata"> | |
| 247 | + {{each list as obj i}} | |
| 248 | + <tr> | |
| 249 | + <td>{{i+1}}</td> | |
| 250 | + <td>{{obj.rQ}}</td> | |
| 251 | + <td>{{obj.gS}}</td> | |
| 252 | + <td>{{obj.xlmc}}</td> | |
| 253 | + <td>{{obj.clzbh}}</td> | |
| 254 | + <td>{{obj.jsy}}</td> | |
| 255 | + <td>{{obj.jName}}</td> | |
| 256 | + <td>{{obj.sgh}}</td> | |
| 257 | + <td>{{obj.sName}}</td> | |
| 258 | + <td>{{obj.jhlc}}</td> | |
| 259 | + <td>{{obj.emptMileage}}</td> | |
| 260 | + <td>{{obj.hyl}}</td> | |
| 261 | + <td>{{obj.jzl}}</td> | |
| 262 | + <td>{{obj.unyyyl}}</td> | |
| 263 | + <td>{{obj.jhjl}}</td> | |
| 264 | + </tr> | |
| 265 | + {{/each}} | |
| 266 | + {{if list.length == 0}} | |
| 267 | + <tr> | |
| 268 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | |
| 269 | + </tr> | |
| 270 | + {{/if}} | |
| 271 | +</script> | |
| 272 | +<script type="text/html" id="singledata2"> | |
| 273 | + {{each list as obj i}} | |
| 274 | + <tr> | |
| 275 | + <td>{{i+1}}</td> | |
| 276 | + <td>{{obj.rQ}}</td> | |
| 277 | + <td>{{obj.gS}}</td> | |
| 278 | + <td>{{obj.xL}}</td> | |
| 279 | + <td>{{obj.clzbh}}</td> | |
| 280 | + <td></td> | |
| 281 | + <td></td> | |
| 282 | + <td>{{obj.sgh}}</td> | |
| 283 | + <td>{{obj.sName}}</td> | |
| 284 | + <td>{{obj.jhlc}}</td> | |
| 285 | + <td>{{obj.emptMileage}}</td> | |
| 286 | + <td></td> | |
| 287 | + <td></td> | |
| 288 | + <td></td> | |
| 289 | + <td>{{obj.jhjl}}</td> | |
| 290 | + </tr> | |
| 291 | + {{/each}} | |
| 292 | + {{if list.length == 0}} | |
| 293 | + <tr> | |
| 294 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | |
| 295 | + </tr> | |
| 296 | + {{/if}} | |
| 297 | +</script> | ... | ... |
src/main/resources/static/pages/report/sheet/sheetList.html
| ... | ... | @@ -101,7 +101,7 @@ |
| 101 | 101 | </div> |
| 102 | 102 | </div> |
| 103 | 103 | </div> |
| 104 | - | |
| 104 | +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script> | |
| 105 | 105 | <script> |
| 106 | 106 | $(function(){ |
| 107 | 107 | // 关闭左侧栏 |
| ... | ... | @@ -256,6 +256,19 @@ |
| 256 | 256 | }); |
| 257 | 257 | }); |
| 258 | 258 | } |
| 259 | + $("#export").on("click",function(){ | |
| 260 | + var date = $("#date").val(); | |
| 261 | + var endDate = $("#endDate").val(); | |
| 262 | + $("#forms").table2excel({ | |
| 263 | + // 不被导出的表格行的CSS class类 | |
| 264 | + exclude: ".noExl", | |
| 265 | + // 导出的Excel文档的名称,(没看到作用) | |
| 266 | + name: "Excel Document Name.xlsx", | |
| 267 | + // Excel文件的名称 | |
| 268 | + filename: date+"-"+endDate+"班次准点率" | |
| 269 | + }); | |
| 270 | + }) | |
| 271 | + | |
| 259 | 272 | }); |
| 260 | 273 | </script> |
| 261 | 274 | <script type="text/html" id="sheetList"> | ... | ... |