Commit 99f219666c1070ed67fbce625e2bd679aea91d48
1 parent
f9aeede9
mcy
Showing
2 changed files
with
18 additions
and
15 deletions
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -48,15 +48,18 @@ public class FormsServiceImpl implements FormsService { |
| 48 | 48 | @Override |
| 49 | 49 | public List<Waybillday> waybillday(Map<String, Object> map) { |
| 50 | 50 | List list1 = new ArrayList<>();// |
| 51 | - String sql = "select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,y.YH,c.personnel_name from bsth_c_ylb y" | |
| 52 | - + " LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " + " where to_days(y.RQ)=to_days('" | |
| 53 | - + map.get("date").toString() + "') " + " and y.XLBM=" + map.get("line").toString() + " GROUP BY y.NBBM"; | |
| 54 | - | |
| 51 | + String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name " | |
| 52 | + + "from bsth_c_s_sp_info_real x join " | |
| 53 | + + "( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" | |
| 54 | + + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " | |
| 55 | + + "where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) " | |
| 56 | + + "z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') " | |
| 57 | + + "and x.xl_bm='"+map.get("line").toString()+"' GROUP BY x.cl_zbh,j_gh"; | |
| 55 | 58 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 56 | 59 | @Override |
| 57 | 60 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 58 | 61 | Waybillday wbd = new Waybillday(); |
| 59 | - wbd.setCarPlate(arg0.getString("NBBM")); | |
| 62 | + wbd.setCarPlate(arg0.getString("cl_zbh")); | |
| 60 | 63 | wbd.setJzl(arg0.getString("JZL")); |
| 61 | 64 | wbd.setYh(arg0.getString("YH")); |
| 62 | 65 | wbd.setjName(arg0.getString("personnel_name")); |
| ... | ... | @@ -65,8 +68,8 @@ public class FormsServiceImpl implements FormsService { |
| 65 | 68 | // wbd.setYl(arg0.getString("yl")); |
| 66 | 69 | // wbd.setNbbm(arg0.getString("nbbm")); |
| 67 | 70 | Map<String, Object> maps = new HashMap<>(); |
| 68 | - maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("nbbm"), | |
| 69 | - arg0.getString("RQ")); | |
| 71 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | |
| 72 | + arg0.getString("schedule_date")); | |
| 70 | 73 | wbd.setJzl1(maps.get("ksgl").toString()); |
| 71 | 74 | wbd.setZlc(maps.get("realMileage").toString()); |
| 72 | 75 | |
| ... | ... | @@ -81,8 +84,9 @@ public class FormsServiceImpl implements FormsService { |
| 81 | 84 | @Override |
| 82 | 85 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { |
| 83 | 86 | String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " |
| 84 | - + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " + " where to_days(l.create_date)=to_days('" | |
| 85 | - + map.get("date").toString() + "') " + " and l.line_code=" + map.get("line").toString() | |
| 87 | + + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " | |
| 88 | + + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " | |
| 89 | + + " and l.line_code=" + map.get("line").toString() | |
| 86 | 90 | + " GROUP BY s.station_name "; |
| 87 | 91 | |
| 88 | 92 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| ... | ... | @@ -341,7 +345,6 @@ public class FormsServiceImpl implements FormsService { |
| 341 | 345 | return list; |
| 342 | 346 | } |
| 343 | 347 | |
| 344 | - | |
| 345 | 348 | // 营运线路出车率统计表 |
| 346 | 349 | @Override |
| 347 | 350 | public List<Turnoutrate> turnoutrate(Map<String, Object> map) { |
| ... | ... | @@ -398,7 +401,7 @@ public class FormsServiceImpl implements FormsService { |
| 398 | 401 | tu.setBcjh(arg0.getString("jbc").toString()); |
| 399 | 402 | tu.setBcsj(arg0.getString("sbc").toString()); |
| 400 | 403 | tu.setBbzxl(result2 + "%");// 班次执行率 |
| 401 | - //tu.setSm(arg0.getString("gs_name").toString()); | |
| 404 | + // tu.setSm(arg0.getString("gs_name").toString()); | |
| 402 | 405 | tu.setGsgs(arg0.getString("gslsbm").toString()); |
| 403 | 406 | tu.setFgsgs(arg0.getString("fgsbm").toString()); |
| 404 | 407 | return tu; |
| ... | ... | @@ -463,7 +466,7 @@ public class FormsServiceImpl implements FormsService { |
| 463 | 466 | tu.setBcjh(arg0.getString("jbc").toString()); |
| 464 | 467 | tu.setBcsj(arg0.getString("sbc").toString()); |
| 465 | 468 | tu.setBbzxl(result2 + "%");// 班次执行率 |
| 466 | - tu.setSm(arg0.getString("xl_name").toString()); | |
| 469 | + tu.setSm(arg0.getString("xl_name").toString()); | |
| 467 | 470 | tu.setGsgs(arg0.getString("gslsbm").toString()); |
| 468 | 471 | tu.setFgsgs(arg0.getString("fgsbm").toString()); |
| 469 | 472 | return tu; |
| ... | ... | @@ -474,7 +477,7 @@ public class FormsServiceImpl implements FormsService { |
| 474 | 477 | return list; |
| 475 | 478 | } |
| 476 | 479 | |
| 477 | - //营运线路名称统计表 | |
| 480 | + // 营运线路名称统计表 | |
| 478 | 481 | @Override |
| 479 | 482 | public List<Allline> allline(Map<String, Object> map) { |
| 480 | 483 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| ... | ... | @@ -529,7 +532,7 @@ public class FormsServiceImpl implements FormsService { |
| 529 | 532 | tu.setBcjh(arg0.getString("jbc").toString()); |
| 530 | 533 | tu.setBcsj(arg0.getString("sbc").toString()); |
| 531 | 534 | tu.setBbzxl(result2 + "%");// 班次执行率 |
| 532 | - //tu.setSm(arg0.getString("xl_name").toString()); | |
| 535 | + // tu.setSm(arg0.getString("xl_name").toString()); | |
| 533 | 536 | tu.setGsgs(arg0.getString("gslsbm").toString()); |
| 534 | 537 | tu.setFgsgs(arg0.getString("fgsbm").toString()); |
| 535 | 538 | return tu; | ... | ... |
src/main/resources/static/pages/forms/statement/waybillday.html
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 | $("#query").on("click",function(){ |
| 95 | 95 | line = $("#line").val(); |
| 96 | 96 | date = $("#date").val(); |
| 97 | - $post('/mcy_forms/waybillday',{line:line,date:date},function(result){ | |
| 97 | + $post('/mcy_forms/waybillday',{line:line,date:$("#date").val(),type:'query'},function(result){ | |
| 98 | 98 | $.each(result, function(i, obj) { |
| 99 | 99 | obj.requestType = reqCodeMap[obj.requestType]; |
| 100 | 100 | }); | ... | ... |