Commit 4cc73d531320646e343dc19a72b03647033409e3

Authored by yiming
1 parent 7955776c

工作汇总,时间筛选改为时间段筛选。

src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -1716,10 +1716,11 @@ public class ReportServiceImpl implements ReportService{
1716 1716 lblxSet.add(s);
1717 1717 }
1718 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 1721 map.put("bcType", "normal");
1721 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 1724 for (int i = 0; i < sList.size(); i++) {
1724 1725 ScheduleRealInfo scheduleRealInfo = sList.get(i);
1725 1726 if (!(scheduleRealInfo.getBcType().equals("in")
... ... @@ -1859,10 +1860,11 @@ public class ReportServiceImpl implements ReportService{
1859 1860 public List<Map<String, Object>> jobLjqk(Map<String, Object> map) {
1860 1861 // TODO Auto-generated method stub
1861 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 1865 map.put("bcType", "normal");
1864 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 1868 for (int i = 0; i < sList.size(); i++) {
1867 1869 ScheduleRealInfo scheduleRealInfo=sList.get(i);
1868 1870 if (!(scheduleRealInfo.getBcType().equals("in")
... ... @@ -1935,12 +1937,10 @@ public class ReportServiceImpl implements ReportService{
1935 1937 if(map.get("line")!=null){
1936 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 1944 List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
1945 1945 for (int i = 0; i < sList.size(); i++) {
1946 1946 ScheduleRealInfo s=sList.get(i);
... ...
src/main/resources/static/pages/forms/statement/jobSummary.html
... ... @@ -40,10 +40,18 @@
40 40 <span class="item-label" style="width: 80px; margin-left: 33px;">线路: </span>
41 41 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
42 42 </div>
43   - <div style="display: inline-block;margin-left: 24px;">
  43 + <!--<div style="display: inline-block;margin-left: 24px;">
44 44 <span class="item-label" style="width: 80px;">&nbsp;时间: </span>
45 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 55 <div class="form-group">
48 56 <input class="btn btn-default" type="button" id="query" value="查询"/>
49 57 <input class="btn btn-default" type="button" id="export" value="导出"/>
... ... @@ -112,7 +120,7 @@
112 120 </tbody>
113 121 <tr><td colspan="10">&nbsp;</td></tr>
114 122 <tr>
115   - <td colspan="10">当日汇总</td>
  123 + <td colspan="10">汇总</td>
116 124 </tr>
117 125 <tr>
118 126 <td colspan="2">内容</td>
... ... @@ -142,6 +150,11 @@
142 150 format : 'YYYY-MM-DD',
143 151 locale : 'zh-cn'
144 152 });
  153 +
  154 + $("#date2").datetimepicker({
  155 + format : 'YYYY-MM-DD',
  156 + locale : 'zh-cn'
  157 + });
145 158  
146 159 var xlList;
147 160 var obj = [];
... ... @@ -246,16 +259,21 @@
246 259 var line=$("#line").val();
247 260 var lineName=$(".select2-selection__rendered").html();
248 261 var date =$("#date").val();
  262 + var date2 =$("#date2").val();
249 263 $("#export").removeAttr("disabled");
250 264 if(line=="" || line==null){
251 265 layer.msg('请选择线路.');
252   - }else if(date==""||date==null){
  266 + }else if(date==""||date==null||date2==""||date2==null){
253 267 layer.msg('请选择日期.');
254 268 }else{
255 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 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 277 console.log(result);
260 278 var list_lbqk = template('list_lbqk',{list:result});
261 279 // 把渲染好的模版html文本追加到表格中
... ... @@ -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 290 var list_ljqk = template('list_ljqk',{list:result});
273 291 // 把渲染好的模版html文本追加到表格中
274 292 $('#forms .list_ljqk').html(list_ljqk);
275 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 298 $("#ljbcs").html(result.ljbc);
281 299 $("#ljgls").html(result.ljgl)
... ...