Commit 4cc73d531320646e343dc19a72b03647033409e3
1 parent
7955776c
工作汇总,时间筛选改为时间段筛选。
Showing
2 changed files
with
35 additions
and
17 deletions
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -1716,10 +1716,11 @@ public class ReportServiceImpl implements ReportService{ | @@ -1716,10 +1716,11 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1716 | lblxSet.add(s); | 1716 | lblxSet.add(s); |
| 1717 | } | 1717 | } |
| 1718 | String line=map.get("line").toString(); | 1718 | String line=map.get("line").toString(); |
| 1719 | - String date=map.get("date").toString(); | 1719 | + String dateS=map.get("date").toString(); |
| 1720 | + String dateE=map.get("date2").toString(); | ||
| 1720 | map.put("bcType", "normal"); | 1721 | map.put("bcType", "normal"); |
| 1721 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); | 1722 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); |
| 1722 | - List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); | 1723 | + List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateStartEndAndLineTjrb(line, dateS,dateE); |
| 1723 | for (int i = 0; i < sList.size(); i++) { | 1724 | for (int i = 0; i < sList.size(); i++) { |
| 1724 | ScheduleRealInfo scheduleRealInfo = sList.get(i); | 1725 | ScheduleRealInfo scheduleRealInfo = sList.get(i); |
| 1725 | if (!(scheduleRealInfo.getBcType().equals("in") | 1726 | if (!(scheduleRealInfo.getBcType().equals("in") |
| @@ -1859,10 +1860,11 @@ public class ReportServiceImpl implements ReportService{ | @@ -1859,10 +1860,11 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1859 | public List<Map<String, Object>> jobLjqk(Map<String, Object> map) { | 1860 | public List<Map<String, Object>> jobLjqk(Map<String, Object> map) { |
| 1860 | // TODO Auto-generated method stub | 1861 | // TODO Auto-generated method stub |
| 1861 | String line=map.get("line").toString(); | 1862 | String line=map.get("line").toString(); |
| 1862 | - String date=map.get("date").toString(); | 1863 | + String dateS=map.get("date").toString(); |
| 1864 | + String dateE=map.get("date2").toString(); | ||
| 1863 | map.put("bcType", "normal"); | 1865 | map.put("bcType", "normal"); |
| 1864 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); | 1866 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); |
| 1865 | - List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); | 1867 | + List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateStartEndAndLineTjrb(line, dateS, dateE); |
| 1866 | for (int i = 0; i < sList.size(); i++) { | 1868 | for (int i = 0; i < sList.size(); i++) { |
| 1867 | ScheduleRealInfo scheduleRealInfo=sList.get(i); | 1869 | ScheduleRealInfo scheduleRealInfo=sList.get(i); |
| 1868 | if (!(scheduleRealInfo.getBcType().equals("in") | 1870 | if (!(scheduleRealInfo.getBcType().equals("in") |
| @@ -1935,12 +1937,10 @@ public class ReportServiceImpl implements ReportService{ | @@ -1935,12 +1937,10 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1935 | if(map.get("line")!=null){ | 1937 | if(map.get("line")!=null){ |
| 1936 | line=map.get("line").toString(); | 1938 | line=map.get("line").toString(); |
| 1937 | } | 1939 | } |
| 1938 | - String date=""; | ||
| 1939 | - if(map.get("date")!=null){ | ||
| 1940 | - date=map.get("date").toString(); | ||
| 1941 | - } | 1940 | + String dateS=map.get("date").toString(); |
| 1941 | + String dateE=map.get("date2").toString(); | ||
| 1942 | 1942 | ||
| 1943 | - List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); | 1943 | + List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateStartEndAndLineTjrb(line, dateS, dateE); |
| 1944 | List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>(); | 1944 | List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>(); |
| 1945 | for (int i = 0; i < sList.size(); i++) { | 1945 | for (int i = 0; i < sList.size(); i++) { |
| 1946 | ScheduleRealInfo s=sList.get(i); | 1946 | ScheduleRealInfo s=sList.get(i); |
src/main/resources/static/pages/forms/statement/jobSummary.html
| @@ -40,10 +40,18 @@ | @@ -40,10 +40,18 @@ | ||
| 40 | <span class="item-label" style="width: 80px; margin-left: 33px;">线路: </span> | 40 | <span class="item-label" style="width: 80px; margin-left: 33px;">线路: </span> |
| 41 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 42 | </div> | 42 | </div> |
| 43 | - <div style="display: inline-block;margin-left: 24px;"> | 43 | + <!--<div style="display: inline-block;margin-left: 24px;"> |
| 44 | <span class="item-label" style="width: 80px;"> 时间: </span> | 44 | <span class="item-label" style="width: 80px;"> 时间: </span> |
| 45 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 45 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 46 | - </div> | 46 | + </div>--> |
| 47 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 48 | + <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 49 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 50 | + </div> | ||
| 51 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 52 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 53 | + <input class="form-control" type="text" id="date2" style="width: 180px;"/> | ||
| 54 | + </div> | ||
| 47 | <div class="form-group"> | 55 | <div class="form-group"> |
| 48 | <input class="btn btn-default" type="button" id="query" value="查询"/> | 56 | <input class="btn btn-default" type="button" id="query" value="查询"/> |
| 49 | <input class="btn btn-default" type="button" id="export" value="导出"/> | 57 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| @@ -112,7 +120,7 @@ | @@ -112,7 +120,7 @@ | ||
| 112 | </tbody> | 120 | </tbody> |
| 113 | <tr><td colspan="10"> </td></tr> | 121 | <tr><td colspan="10"> </td></tr> |
| 114 | <tr> | 122 | <tr> |
| 115 | - <td colspan="10">当日汇总</td> | 123 | + <td colspan="10">汇总</td> |
| 116 | </tr> | 124 | </tr> |
| 117 | <tr> | 125 | <tr> |
| 118 | <td colspan="2">内容</td> | 126 | <td colspan="2">内容</td> |
| @@ -142,6 +150,11 @@ | @@ -142,6 +150,11 @@ | ||
| 142 | format : 'YYYY-MM-DD', | 150 | format : 'YYYY-MM-DD', |
| 143 | locale : 'zh-cn' | 151 | locale : 'zh-cn' |
| 144 | }); | 152 | }); |
| 153 | + | ||
| 154 | + $("#date2").datetimepicker({ | ||
| 155 | + format : 'YYYY-MM-DD', | ||
| 156 | + locale : 'zh-cn' | ||
| 157 | + }); | ||
| 145 | 158 | ||
| 146 | var xlList; | 159 | var xlList; |
| 147 | var obj = []; | 160 | var obj = []; |
| @@ -246,16 +259,21 @@ | @@ -246,16 +259,21 @@ | ||
| 246 | var line=$("#line").val(); | 259 | var line=$("#line").val(); |
| 247 | var lineName=$(".select2-selection__rendered").html(); | 260 | var lineName=$(".select2-selection__rendered").html(); |
| 248 | var date =$("#date").val(); | 261 | var date =$("#date").val(); |
| 262 | + var date2 =$("#date2").val(); | ||
| 249 | $("#export").removeAttr("disabled"); | 263 | $("#export").removeAttr("disabled"); |
| 250 | if(line=="" || line==null){ | 264 | if(line=="" || line==null){ |
| 251 | layer.msg('请选择线路.'); | 265 | layer.msg('请选择线路.'); |
| 252 | - }else if(date==""||date==null){ | 266 | + }else if(date==""||date==null||date2==""||date2==null){ |
| 253 | layer.msg('请选择日期.'); | 267 | layer.msg('请选择日期.'); |
| 254 | }else{ | 268 | }else{ |
| 255 | $("#xlid").html(lineName); | 269 | $("#xlid").html(lineName); |
| 256 | - $("#dateid").html(date); | 270 | + if(date==date2){ |
| 271 | + $("#dateid").html(date); | ||
| 272 | + }else { | ||
| 273 | + $("#dateid").html(date+"~"+date2); | ||
| 274 | + } | ||
| 257 | var i = layer.load(2); | 275 | var i = layer.load(2); |
| 258 | - $get('/report/jobFwqk',{line:line,date:date},function(result){ | 276 | + $get('/report/jobFwqk',{line:line,date:date,date2:date2},function(result){ |
| 259 | console.log(result); | 277 | console.log(result); |
| 260 | var list_lbqk = template('list_lbqk',{list:result}); | 278 | var list_lbqk = template('list_lbqk',{list:result}); |
| 261 | // 把渲染好的模版html文本追加到表格中 | 279 | // 把渲染好的模版html文本追加到表格中 |
| @@ -268,14 +286,14 @@ | @@ -268,14 +286,14 @@ | ||
| 268 | 286 | ||
| 269 | }) | 287 | }) |
| 270 | 288 | ||
| 271 | - $get('/report/jobLjqk',{line:line,date:date},function(result){ | 289 | + $get('/report/jobLjqk',{line:line,date:date,date2:date2},function(result){ |
| 272 | var list_ljqk = template('list_ljqk',{list:result}); | 290 | var list_ljqk = template('list_ljqk',{list:result}); |
| 273 | // 把渲染好的模版html文本追加到表格中 | 291 | // 把渲染好的模版html文本追加到表格中 |
| 274 | $('#forms .list_ljqk').html(list_ljqk); | 292 | $('#forms .list_ljqk').html(list_ljqk); |
| 275 | layer.close(i); | 293 | layer.close(i); |
| 276 | }) | 294 | }) |
| 277 | 295 | ||
| 278 | - $get('/report/jobHzxx',{line:line,date:date},function(result){ | 296 | + $get('/report/jobHzxx',{line:line,date:date,date2:date2},function(result){ |
| 279 | //临加 | 297 | //临加 |
| 280 | $("#ljbcs").html(result.ljbc); | 298 | $("#ljbcs").html(result.ljbc); |
| 281 | $("#ljgls").html(result.ljgl) | 299 | $("#ljgls").html(result.ljgl) |