Commit d531ff0f66be829f9039ebe58c329bd618b52df8
1 parent
69d4f740
修正报表添加时间区间查询
Showing
6 changed files
with
27 additions
and
16 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| ... | ... | @@ -319,8 +319,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 319 | 319 | |
| 320 | 320 | @RequestMapping(value = "/correctForm") |
| 321 | 321 | public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, |
| 322 | + @RequestParam String endDate, | |
| 322 | 323 | @RequestParam String lpName, @RequestParam String code, @RequestParam String type) { |
| 323 | - return scheduleRealInfoService.correctForm(line, date, lpName, code, type); | |
| 324 | + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type); | |
| 324 | 325 | } |
| 325 | 326 | /** |
| 326 | 327 | * @Title queryListWaybill | ... | ... |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| ... | ... | @@ -105,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L |
| 105 | 105 | List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px); |
| 106 | 106 | |
| 107 | 107 | |
| 108 | - List<SchEditInfoDto> correctForm(String line,String date,String lpName,String code, String type); | |
| 108 | + List<SchEditInfoDto> correctForm(String line,String date,String endDate,String lpName,String code, String type); | |
| 109 | 109 | |
| 110 | 110 | List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line); |
| 111 | 111 | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1965,7 +1965,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1965 | 1965 | }*/ |
| 1966 | 1966 | |
| 1967 | 1967 | @Override |
| 1968 | - public List<SchEditInfoDto> correctForm(String line,String date, | |
| 1968 | + public List<SchEditInfoDto> correctForm(String line,String date,String endDate, | |
| 1969 | 1969 | String lpName,String code, String type) { |
| 1970 | 1970 | |
| 1971 | 1971 | // var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', |
| ... | ... | @@ -1991,12 +1991,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1991 | 1991 | String sql = "select t1.*, " |
| 1992 | 1992 | + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name," |
| 1993 | 1993 | + "t2.xl_dir,t2.real_exec_date from (select * from " |
| 1994 | - + "logger_sch_modify where rq=? and line_code=? )" | |
| 1994 | + + "logger_sch_modify where rq BETWEEN ? and ? and line_code=? )" | |
| 1995 | 1995 | + " t1 INNER JOIN bsth_c_s_sp_info_real t2 on " |
| 1996 | 1996 | + "t1.sch_id=t2.id where 1=1 " + cont; |
| 1997 | 1997 | |
| 1998 | 1998 | List<SchEditInfoDto> list = jdbcTemplate.query(sql, |
| 1999 | - new BeanPropertyRowMapper(SchEditInfoDto.class),date, line); | |
| 1999 | + new BeanPropertyRowMapper(SchEditInfoDto.class),date,endDate, line); | |
| 2000 | 2000 | List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>(); |
| 2001 | 2001 | for (int i = 0; i < list.size(); i++) { |
| 2002 | 2002 | SchEditInfoDto t=list.get(i); |
| ... | ... | @@ -2030,6 +2030,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2030 | 2030 | for (SchEditInfoDto d : lists) { |
| 2031 | 2031 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 2032 | 2032 | tempMap.put("lpName", d.getLpName()); |
| 2033 | + tempMap.put("rq", d.getRq()); | |
| 2033 | 2034 | tempMap.put("clZbh", d.getClZbh()); |
| 2034 | 2035 | tempMap.put("jName", d.getjName()+"/"+d.getjGh()); |
| 2035 | 2036 | tempMap.put("fcsj", d.getFcsj()); | ... | ... |
src/main/resources/static/pages/forms/mould/correctForm.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/correctForm.html
| ... | ... | @@ -32,13 +32,13 @@ |
| 32 | 32 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> |
| 33 | 33 | </div> |
| 34 | 34 | <div style="display: inline-block;margin-left: 15px;"> |
| 35 | - <span class="item-label" style="width: 80px;">时间: </span> | |
| 35 | + <span class="item-label" style="width: 80px;">开始时间: </span> | |
| 36 | 36 | <input class="form-control" type="text" id="date" style="width: 120px;"/> |
| 37 | 37 | </div> |
| 38 | -<!-- <div style="display: inline-block;margin-left: 15px;"> --> | |
| 39 | -<!-- <span class="item-label" style="width: 80px;">结束时间: </span> --> | |
| 40 | -<!-- <input class="form-control" type="text" id="endDate" style="width: 120px;"/> --> | |
| 41 | -<!-- </div> --> | |
| 38 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 39 | + <span class="item-label" style="width: 80px;">结束时间: </span> | |
| 40 | + <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | |
| 41 | + </div> | |
| 42 | 42 | <div style="display: inline-block;margin-left: 15px"> |
| 43 | 43 | <span class="item-label" style="width: 140px;">路牌: </span> |
| 44 | 44 | <select class="form-control" name="lpName" id="lpName" style="width: 136px;"></select> |
| ... | ... | @@ -59,10 +59,11 @@ |
| 59 | 59 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 60 | 60 | <thead> |
| 61 | 61 | <tr> |
| 62 | - <th colspan="6">营运车辆修正统计表</th> | |
| 62 | + <th colspan="7">营运车辆修正统计表</th> | |
| 63 | 63 | </tr> |
| 64 | 64 | <tr> |
| 65 | 65 | <td>编号</td> |
| 66 | + <td>日期</td> | |
| 66 | 67 | <td>路牌</td> |
| 67 | 68 | <td>车号</td> |
| 68 | 69 | <td>司机</td> |
| ... | ... | @@ -96,6 +97,10 @@ |
| 96 | 97 | format : 'YYYY-MM-DD', |
| 97 | 98 | locale : 'zh-cn' |
| 98 | 99 | }); |
| 100 | + $("#endDate").datetimepicker({ | |
| 101 | + format : 'YYYY-MM-DD', | |
| 102 | + locale : 'zh-cn' | |
| 103 | + }); | |
| 99 | 104 | var d = new Date(); |
| 100 | 105 | var year = d.getFullYear(); |
| 101 | 106 | var month = d.getMonth() + 1; |
| ... | ... | @@ -105,6 +110,7 @@ |
| 105 | 110 | if(day < 10) |
| 106 | 111 | day = "0" + day; |
| 107 | 112 | $("#date").val(year + "-" + month + "-" + day); |
| 113 | + $("#endDate").val(year + "-" + month + "-" + day); | |
| 108 | 114 | |
| 109 | 115 | $.get('/basic/lineCode2Name',function(result){ |
| 110 | 116 | var data=[]; |
| ... | ... | @@ -197,16 +203,18 @@ |
| 197 | 203 | }); |
| 198 | 204 | |
| 199 | 205 | var line = $("#line").val(); |
| 200 | - var date = $("#startDate").val(); | |
| 206 | + var date = $("#date").val();endDate | |
| 201 | 207 | var lpName = $("#lpName").val(); |
| 208 | + var endDate = $("#endDate").val(); | |
| 202 | 209 | var code = $("#code").val(); |
| 203 | 210 | $("#query").on("click",function(){ |
| 204 | 211 | line = $("#line").val(); |
| 205 | 212 | date = $("#date").val(); |
| 206 | 213 | lpName = $("#lpName").val(); |
| 207 | 214 | code = $("#code").val(); |
| 215 | + endDate = $("#endDate").val(); | |
| 208 | 216 | var type = "query"; |
| 209 | - $get("/realSchedule/correctForm",{line:line,date:date,lpName:lpName,code:code,type:type},function(result){ | |
| 217 | + $get("/realSchedule/correctForm",{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type},function(result){ | |
| 210 | 218 | var list_correctForm = template('list_correctForm',{list:result}); |
| 211 | 219 | // 把渲染好的模版html文本追加到表格中 |
| 212 | 220 | $('#forms .list_correctForm').html(list_correctForm); |
| ... | ... | @@ -224,7 +232,7 @@ |
| 224 | 232 | |
| 225 | 233 | $("#export").on("click",function(){ |
| 226 | 234 | var type = "export"; |
| 227 | - $get('/realSchedule/correctForm',{line:line,date:date,lpName:lpName,code:code,type:type},function(result){ | |
| 235 | + $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type},function(result){ | |
| 228 | 236 | window.open("/downloadFile/download?fileName=修正报表"+date); |
| 229 | 237 | }); |
| 230 | 238 | }); |
| ... | ... | @@ -234,7 +242,8 @@ |
| 234 | 242 | <script type="text/html" id="list_correctForm"> |
| 235 | 243 | {{each list as obj i}} |
| 236 | 244 | <tr> |
| 237 | - <td>{{i+1}}</td> | |
| 245 | + <td>{{i+1}}</td> | |
| 246 | + <td>{{obj.rq}}</td> | |
| 238 | 247 | <td>{{obj.lpName}}</td> |
| 239 | 248 | <td>{{obj.clZbh}}</td> |
| 240 | 249 | <td>{{obj.jName}}/{{obj.jGh}}</td> | ... | ... |
src/main/resources/static/pages/oil/add.html
| ... | ... | @@ -173,7 +173,7 @@ |
| 173 | 173 | <div class="row"> |
| 174 | 174 | <div class="col-md-offset-3 col-md-4"> |
| 175 | 175 | <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> |
| 176 | - <a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a> | |
| 176 | + <a type="button" class="btn default" href="list_ph.html" data-pjax><i class="fa fa-times"></i> 取消</a> | |
| 177 | 177 | </div> |
| 178 | 178 | </div> |
| 179 | 179 | </div> | ... | ... |