Commit 6f233257fad7a5465c7715ae0dfdcbaeda27e086
1 parent
3678d3fe
mcy
Showing
6 changed files
with
76 additions
and
55 deletions
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| 1 | package com.bsth.service.forms.impl; | 1 | package com.bsth.service.forms.impl; |
| 2 | 2 | ||
| 3 | -import java.math.BigDecimal; | ||
| 4 | -import java.math.MathContext; | ||
| 5 | -import java.math.RoundingMode; | ||
| 6 | import java.sql.ResultSet; | 3 | import java.sql.ResultSet; |
| 7 | import java.sql.SQLException; | 4 | import java.sql.SQLException; |
| 8 | import java.text.NumberFormat; | 5 | import java.text.NumberFormat; |
| 9 | import java.text.ParseException; | 6 | import java.text.ParseException; |
| 10 | import java.text.SimpleDateFormat; | 7 | import java.text.SimpleDateFormat; |
| 11 | -import java.util.ArrayList; | ||
| 12 | import java.util.Date; | 8 | import java.util.Date; |
| 13 | import java.util.HashMap; | 9 | import java.util.HashMap; |
| 14 | import java.util.List; | 10 | import java.util.List; |
| @@ -32,8 +28,6 @@ import com.bsth.entity.mcy_forms.Changetochange; | @@ -32,8 +28,6 @@ import com.bsth.entity.mcy_forms.Changetochange; | ||
| 32 | import com.bsth.entity.mcy_forms.Executionrate; | 28 | import com.bsth.entity.mcy_forms.Executionrate; |
| 33 | import com.bsth.service.forms.FormsService; | 29 | import com.bsth.service.forms.FormsService; |
| 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 30 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 35 | -import com.bsth.util.ReportRelatedUtils; | ||
| 36 | -import com.bsth.util.ReportUtils; | ||
| 37 | 31 | ||
| 38 | @Service | 32 | @Service |
| 39 | public class FormsServiceImpl implements FormsService { | 33 | public class FormsServiceImpl implements FormsService { |
| @@ -47,17 +41,17 @@ public class FormsServiceImpl implements FormsService { | @@ -47,17 +41,17 @@ public class FormsServiceImpl implements FormsService { | ||
| 47 | // 行车路单日报表 | 41 | // 行车路单日报表 |
| 48 | @Override | 42 | @Override |
| 49 | public List<Waybillday> waybillday(Map<String, Object> map) { | 43 | public List<Waybillday> waybillday(Map<String, Object> map) { |
| 50 | - List list1 = new ArrayList<>();// | ||
| 51 | - String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name,x.gs_bm,x.gs_name,x.fgs_bm,x.fgs_name " | 44 | + String sql ="select x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name,x.schedule_date,x.gs_bm,x.gs_name,x.fgs_bm,x.fgs_name " |
| 52 | + " from bsth_c_s_sp_info_real x INNER join " | 45 | + " from bsth_c_s_sp_info_real x INNER join " |
| 53 | + " ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" | 46 | + " ( 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 " | 47 | + " 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) " | 48 | + " 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()+"') " | 49 | + " 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()+"'" | 50 | + " and x.xl_bm='"+map.get("line").toString()+"'" |
| 58 | - + " and x.gs_bm='"+map.get("gsdmWaybillday").toString()+"'" | ||
| 59 | - + " and x.fgs_bm='"+map.get("fgsdmWaybillday").toString() | ||
| 60 | - + "' GROUP BY x.cl_zbh,j_gh"; | 51 | + /*+ " and x.gs_bm='"+map.get("gsdmWaybillday").toString()+"'" |
| 52 | + + " and x.fgs_bm='"+map.get("fgsdmWaybillday").toString()+"'"*/ | ||
| 53 | + + " GROUP BY x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name,x.schedule_date,x.gs_bm,x.gs_name,x.fgs_bm,x.fgs_name"; | ||
| 54 | + //x.cl_zbh,j_gh | ||
| 61 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { | 55 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 62 | @Override | 56 | @Override |
| 63 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { | 57 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| @@ -86,16 +80,18 @@ public class FormsServiceImpl implements FormsService { | @@ -86,16 +80,18 @@ public class FormsServiceImpl implements FormsService { | ||
| 86 | // 线路客流量报表 | 80 | // 线路客流量报表 |
| 87 | @Override | 81 | @Override |
| 88 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { | 82 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { |
| 89 | - String sql = " SELECT s.station_name,l.name,l.create_date,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" | 83 | + String sql = " SELECT s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" |
| 90 | + " from bsth_c_stationroute s " | 84 | + " from bsth_c_stationroute s " |
| 91 | + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " | 85 | + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " |
| 92 | + " LEFT JOIN bsth_c_s_sp_info_real r on r.xl_bm=l.line_code" | 86 | + " LEFT JOIN bsth_c_s_sp_info_real r on r.xl_bm=l.line_code" |
| 93 | + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " | 87 | + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " |
| 94 | - + " and l.line_code=" + map.get("line").toString() | 88 | + + " and l.line_code=" + map.get("line").toString() |
| 89 | + + " AND r.gs_bm is not null" | ||
| 95 | /*+ " and r.gs_bm='"+map.get("gsdmLine").toString()+"'" | 90 | /*+ " and r.gs_bm='"+map.get("gsdmLine").toString()+"'" |
| 96 | + " and r.fgs_bm='"+map.get("fgsdmLine").toString()+"'"*/ | 91 | + " and r.fgs_bm='"+map.get("fgsdmLine").toString()+"'"*/ |
| 97 | - + " GROUP BY s.station_name "; | 92 | + + " GROUP BY s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; |
| 98 | 93 | ||
| 94 | + //s.station_name | ||
| 99 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { | 95 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| 100 | 96 | ||
| 101 | @Override | 97 | @Override |
| @@ -115,17 +111,17 @@ public class FormsServiceImpl implements FormsService { | @@ -115,17 +111,17 @@ public class FormsServiceImpl implements FormsService { | ||
| 115 | 111 | ||
| 116 | @Override | 112 | @Override |
| 117 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { | 113 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { |
| 118 | - List list1 = new ArrayList<>();// | ||
| 119 | - String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 114 | + String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 120 | + " from bsth_c_s_sp_info_real r " | 115 | + " from bsth_c_s_sp_info_real r " |
| 121 | - + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " | ||
| 122 | - + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " | ||
| 123 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | 116 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " |
| 124 | + " and to_days('" + map.get("endDate").toString() + "') " | 117 | + " and to_days('" + map.get("endDate").toString() + "') " |
| 125 | + " and r.xl_bm='"+ map.get("line").toString() + "'" | 118 | + " and r.xl_bm='"+ map.get("line").toString() + "'" |
| 119 | + + " AND r.gs_bm is not null" | ||
| 126 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" | 120 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" |
| 127 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ | 121 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ |
| 128 | - + " GROUP BY r.j_name" + " ORDER BY r.j_name"; | 122 | + + " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" |
| 123 | + + " ORDER BY r.j_name"; | ||
| 124 | + //r.j_name | ||
| 129 | startDate = map.get("startDate").toString(); | 125 | startDate = map.get("startDate").toString(); |
| 130 | endDate = map.get("endDate").toString(); | 126 | endDate = map.get("endDate").toString(); |
| 131 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | 127 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { |
| @@ -134,7 +130,7 @@ public class FormsServiceImpl implements FormsService { | @@ -134,7 +130,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 134 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | 130 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 135 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); | 131 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 136 | shif.setjName(arg0.getString("j_name")); | 132 | shif.setjName(arg0.getString("j_name")); |
| 137 | - | 133 | + |
| 138 | Map<String, Object> maps = new HashMap<>(); | 134 | Map<String, Object> maps = new HashMap<>(); |
| 139 | 135 | ||
| 140 | maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | 136 | maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, |
| @@ -160,14 +156,15 @@ public class FormsServiceImpl implements FormsService { | @@ -160,14 +156,15 @@ public class FormsServiceImpl implements FormsService { | ||
| 160 | // 班次车辆人员日统计 | 156 | // 班次车辆人员日统计 |
| 161 | @Override | 157 | @Override |
| 162 | public List<Shifday> shifday(Map<String, Object> map) { | 158 | public List<Shifday> shifday(Map<String, Object> map) { |
| 163 | - String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date," | 159 | + String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm," |
| 164 | + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 160 | + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 165 | - + " FROM bsth_c_s_sp_info_real r " | 161 | + + " FROM bsth_c_s_sp_info_real r " |
| 166 | + " where to_days(r.schedule_date)=to_days('" | 162 | + " where to_days(r.schedule_date)=to_days('" |
| 167 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() | 163 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() |
| 168 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" | 164 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" |
| 169 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ | 165 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ |
| 170 | - + " GROUP BY r.j_name "; | 166 | + + " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 167 | + + " ORDER BY r.lp_name asc"; | ||
| 171 | 168 | ||
| 172 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | 169 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { |
| 173 | 170 | ||
| @@ -282,14 +279,18 @@ public class FormsServiceImpl implements FormsService { | @@ -282,14 +279,18 @@ public class FormsServiceImpl implements FormsService { | ||
| 282 | 279 | ||
| 283 | rq = rq2 + "-" + rq3; | 280 | rq = rq2 + "-" + rq3; |
| 284 | 281 | ||
| 285 | - String sql = " SELECT r.schedule_date_str,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | ||
| 286 | - + " FROM bsth_c_ylb y LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | 282 | + String sql = " SELECT r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 283 | + + " FROM bsth_c_s_sp_info_real r " | ||
| 284 | + + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | ||
| 285 | + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" | ||
| 286 | + + " and y.XLBM= '" + map.get("line").toString() + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y on r.cl_zbh=y.nbbm " | ||
| 287 | + " where r.schedule_date_str BETWEEN '" + map.get("startDate").toString() + "'" | 287 | + " where r.schedule_date_str BETWEEN '" + map.get("startDate").toString() + "'" |
| 288 | - + " and '"+ map.get("endDate").toString() + "'" + " and r.xl_bm='" | ||
| 289 | - + map.get("line").toString() + "'" | 288 | + + " and '"+ map.get("endDate").toString() + "'" |
| 289 | + + " and r.xl_bm='" + map.get("line").toString() + "'" | ||
| 290 | + + " AND r.gs_bm is not null" | ||
| 290 | /* + " and r.gs_bm='"+map.get("gsdmSing").toString()+"'" | 291 | /* + " and r.gs_bm='"+map.get("gsdmSing").toString()+"'" |
| 291 | + " and r.fgs_bm='"+map.get("fgsdmSing").toString()+"'"*/ | 292 | + " and r.fgs_bm='"+map.get("fgsdmSing").toString()+"'"*/ |
| 292 | - + " GROUP BY y.NBBM "; | 293 | + + " GROUP BY r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; |
| 293 | 294 | ||
| 294 | startDate = map.get("startDate").toString(); | 295 | startDate = map.get("startDate").toString(); |
| 295 | endDate = map.get("endDate").toString(); | 296 | endDate = map.get("endDate").toString(); |
| @@ -328,22 +329,27 @@ public class FormsServiceImpl implements FormsService { | @@ -328,22 +329,27 @@ public class FormsServiceImpl implements FormsService { | ||
| 328 | @Override | 329 | @Override |
| 329 | public List<Operationservice> operationservice(Map<String, Object> map) { | 330 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 330 | 331 | ||
| 331 | - String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | ||
| 332 | - + " FROM bsth_c_ylb y LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | 332 | + String sql = " SELECT r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 333 | + + " FROM bsth_c_s_sp_info_real r " | ||
| 334 | + // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | ||
| 335 | + + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | ||
| 336 | + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" | ||
| 337 | + + " and y.XLBM= '" + map.get("line").toString() + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y on r.cl_zbh=y.nbbm " | ||
| 333 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() | 338 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() |
| 334 | + "'" + " and '" + map.get("endDate").toString() + "'" | 339 | + "'" + " and '" + map.get("endDate").toString() + "'" |
| 335 | + " and r.xl_bm='" + map.get("line").toString() + "'" | 340 | + " and r.xl_bm='" + map.get("line").toString() + "'" |
| 336 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" | 341 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" |
| 337 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ | 342 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ |
| 338 | - + " GROUP BY r.cl_zbh "; | 343 | + + " AND r.gs_bm is not null" |
| 344 | + + " GROUP BY r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name"; | ||
| 345 | + | ||
| 346 | + //r.j_name | ||
| 339 | startDate = map.get("startDate").toString(); | 347 | startDate = map.get("startDate").toString(); |
| 340 | endDate = map.get("endDate").toString(); | 348 | endDate = map.get("endDate").toString(); |
| 341 | List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | 349 | List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { |
| 342 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 343 | 350 | ||
| 344 | @Override | 351 | @Override |
| 345 | public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | 352 | public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 346 | - Singledata sin = new Singledata(); | ||
| 347 | Operationservice op = new Operationservice(); | 353 | Operationservice op = new Operationservice(); |
| 348 | op.setXlName(arg0.getString("xl_name").toString()); | 354 | op.setXlName(arg0.getString("xl_name").toString()); |
| 349 | op.setJzl(arg0.getString("JZL").toString()); | 355 | op.setJzl(arg0.getString("JZL").toString()); |
| @@ -365,20 +371,26 @@ public class FormsServiceImpl implements FormsService { | @@ -365,20 +371,26 @@ public class FormsServiceImpl implements FormsService { | ||
| 365 | public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { | 371 | public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { |
| 366 | 372 | ||
| 367 | String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 373 | String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 368 | - + " FROM bsth_c_ylb y LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM " | 374 | + + " FROM bsth_c_s_sp_info_real r " |
| 375 | + + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | ||
| 376 | + + " where to_days(y.RQ)=to_days('" + date + "') and y.XLBM= '" + line + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y " | ||
| 377 | + + " on r.cl_zbh=y.nbbm " | ||
| 369 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" | 378 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" |
| 370 | + " and r.xl_bm='" + line + "' " | 379 | + " and r.xl_bm='" + line + "' " |
| 380 | + + " AND r.gs_bm is not null" | ||
| 371 | /* + " and r.gs_bm='"+gsdmVehic +"'" | 381 | /* + " and r.gs_bm='"+gsdmVehic +"'" |
| 372 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ | 382 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ |
| 373 | - + " GROUP BY r.cl_zbh "; | 383 | + + " GROUP BY r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; |
| 374 | 384 | ||
| 385 | + | ||
| 386 | + //r.cl_zbh | ||
| 375 | List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | 387 | List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { |
| 376 | @Override | 388 | @Override |
| 377 | public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | 389 | public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 378 | Vehicleloading ve = new Vehicleloading(); | 390 | Vehicleloading ve = new Vehicleloading(); |
| 379 | ve.setrQ(arg0.getString("schedule_date_str").toString()); | 391 | ve.setrQ(arg0.getString("schedule_date_str").toString()); |
| 380 | ve.setgS(arg0.getString("gs_name").toString()); | 392 | ve.setgS(arg0.getString("gs_name").toString()); |
| 381 | - ve.setxL(arg0.getString("xl_bm").toString()); | 393 | + ve.setxL(arg0.getString("xl_name").toString()); |
| 382 | ve.setClzbh(arg0.getString("cl_zbh").toString()); | 394 | ve.setClzbh(arg0.getString("cl_zbh").toString()); |
| 383 | ve.setHyl(arg0.getString("YH").toString()); | 395 | ve.setHyl(arg0.getString("YH").toString()); |
| 384 | ve.setJzl(arg0.getString("JZL").toString()); | 396 | ve.setJzl(arg0.getString("JZL").toString()); |
| @@ -464,6 +476,8 @@ public class FormsServiceImpl implements FormsService { | @@ -464,6 +476,8 @@ public class FormsServiceImpl implements FormsService { | ||
| 464 | return list; | 476 | return list; |
| 465 | } | 477 | } |
| 466 | 478 | ||
| 479 | + | ||
| 480 | + //班次执行率统计表 | ||
| 467 | @Override | 481 | @Override |
| 468 | public List<Executionrate> executionrate(Map<String, Object> map) { | 482 | public List<Executionrate> executionrate(Map<String, Object> map) { |
| 469 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 483 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -487,6 +501,8 @@ public class FormsServiceImpl implements FormsService { | @@ -487,6 +501,8 @@ public class FormsServiceImpl implements FormsService { | ||
| 487 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | 501 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 488 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | 502 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" |
| 489 | + map.get("line").toString() + "' AND gs_bm is not null" | 503 | + map.get("line").toString() + "' AND gs_bm is not null" |
| 504 | + /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" | ||
| 505 | + + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"*/ | ||
| 490 | + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | 506 | + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" |
| 491 | + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | 507 | + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " |
| 492 | + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 508 | + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " |
| @@ -553,6 +569,8 @@ public class FormsServiceImpl implements FormsService { | @@ -553,6 +569,8 @@ public class FormsServiceImpl implements FormsService { | ||
| 553 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | 569 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 554 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | 570 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" |
| 555 | + map.get("line").toString() + "' AND gs_bm is not null" | 571 | + map.get("line").toString() + "' AND gs_bm is not null" |
| 572 | + /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" | ||
| 573 | + + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"*/ | ||
| 556 | + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | 574 | + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" |
| 557 | + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | 575 | + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " |
| 558 | + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 576 | + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " |
src/main/resources/static/pages/forms/statement/allline.html
| @@ -43,14 +43,14 @@ | @@ -43,14 +43,14 @@ | ||
| 43 | <div class="portlet light porttlet-fit bordered"> | 43 | <div class="portlet light porttlet-fit bordered"> |
| 44 | <div class="portlet-title"> | 44 | <div class="portlet-title"> |
| 45 | <form class="form-inline" action="" method="post"> | 45 | <form class="form-inline" action="" method="post"> |
| 46 | - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_allline"> | 46 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_allline"> |
| 47 | <span class="item-label" style="width: 80px;">公司: </span> | 47 | <span class="item-label" style="width: 80px;">公司: </span> |
| 48 | <select class="form-control" name="company" id="gsdmAllline" style="width: 140px;"></select> | 48 | <select class="form-control" name="company" id="gsdmAllline" style="width: 140px;"></select> |
| 49 | </div> | 49 | </div> |
| 50 | <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_allline"> | 50 | <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_allline"> |
| 51 | <span class="item-label" style="width: 80px;">分公司: </span> | 51 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 52 | <select class="form-control" name="subCompany" id="fgsdmAllline" style="width: 140px;"></select> | 52 | <select class="form-control" name="subCompany" id="fgsdmAllline" style="width: 140px;"></select> |
| 53 | - </div> | 53 | + </div> --> |
| 54 | <div style="display: inline-block;"> | 54 | <div style="display: inline-block;"> |
| 55 | <span class="item-label" style="width: 80px;">线路: </span> <select | 55 | <span class="item-label" style="width: 80px;">线路: </span> <select |
| 56 | class="form-control" name="line" id="line" style="width: 120px;"></select> | 56 | class="form-control" name="line" id="line" style="width: 120px;"></select> |
| @@ -186,19 +186,17 @@ | @@ -186,19 +186,17 @@ | ||
| 186 | var line; | 186 | var line; |
| 187 | var startDate; | 187 | var startDate; |
| 188 | var endDate; | 188 | var endDate; |
| 189 | - $("#query") | ||
| 190 | - .on( | ||
| 191 | - "click", | ||
| 192 | - function() { | ||
| 193 | - | 189 | + var gsdmAllline; |
| 190 | + var fgsdmAllline; | ||
| 191 | + $("#query").on("click",function() { | ||
| 194 | line = $("#line").val(); | 192 | line = $("#line").val(); |
| 195 | startDate1 = $("#startDate").val(); | 193 | startDate1 = $("#startDate").val(); |
| 196 | endDate1 = $("#endDate").val(); | 194 | endDate1 = $("#endDate").val(); |
| 197 | - | 195 | + gsdmAllline = $("#gsdmAllline").val(); |
| 196 | + fgsdmAllline = $("#fgsdmAllline").val(); | ||
| 198 | if (startDate1 != '' && endDate1 != '') { | 197 | if (startDate1 != '' && endDate1 != '') { |
| 199 | - $post( | ||
| 200 | - '/mcy_forms/allline', | ||
| 201 | - { | 198 | + $post('/mcy_forms/allline',{ |
| 199 | + /* gsdmAllline:gsdmAllline,fgsdmAllline:fgsdmAllline, */ | ||
| 202 | line : line, | 200 | line : line, |
| 203 | startDate : $("#startDate").val(), | 201 | startDate : $("#startDate").val(), |
| 204 | endDate : $("#endDate").val(), | 202 | endDate : $("#endDate").val(), |
src/main/resources/static/pages/forms/statement/executionrate.html
| @@ -37,14 +37,14 @@ | @@ -37,14 +37,14 @@ | ||
| 37 | <div class="portlet light porttlet-fit bordered"> | 37 | <div class="portlet light porttlet-fit bordered"> |
| 38 | <div class="portlet-title"> | 38 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action="" method="post"> | 39 | <form class="form-inline" action="" method="post"> |
| 40 | - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_ececut"> | 40 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_ececut"> |
| 41 | <span class="item-label" style="width: 80px;">公司: </span> | 41 | <span class="item-label" style="width: 80px;">公司: </span> |
| 42 | <select class="form-control" name="company" id="gsdmEcecut" style="width: 140px;"></select> | 42 | <select class="form-control" name="company" id="gsdmEcecut" style="width: 140px;"></select> |
| 43 | </div> | 43 | </div> |
| 44 | <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_ececut"> | 44 | <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_ececut"> |
| 45 | <span class="item-label" style="width: 80px;">分公司: </span> | 45 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 46 | <select class="form-control" name="subCompany" id="fgsdmEcecut" style="width: 140px;"></select> | 46 | <select class="form-control" name="subCompany" id="fgsdmEcecut" style="width: 140px;"></select> |
| 47 | - </div> | 47 | + </div> --> |
| 48 | <div style="display: inline-block;"> | 48 | <div style="display: inline-block;"> |
| 49 | <span class="item-label" style="width: 80px;">线路: </span> | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| 50 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> | 50 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> |
| @@ -171,19 +171,23 @@ | @@ -171,19 +171,23 @@ | ||
| 171 | var line; | 171 | var line; |
| 172 | var startDate; | 172 | var startDate; |
| 173 | var endDate; | 173 | var endDate; |
| 174 | + var gsdmEcecut; | ||
| 175 | + var fgsdmEcecut; | ||
| 174 | $("#query").on("click",function(){ | 176 | $("#query").on("click",function(){ |
| 175 | 177 | ||
| 176 | line = $("#line").val(); | 178 | line = $("#line").val(); |
| 177 | startDate1=$("#startDate").val(); | 179 | startDate1=$("#startDate").val(); |
| 178 | endDate1=$("#endDate").val(); | 180 | endDate1=$("#endDate").val(); |
| 179 | - | 181 | + gsdmEcecut=$("#gsdmEcecut").val(); |
| 182 | + fgsdmEcecut=$("#fgsdmEcecut").val(); | ||
| 180 | if(startDate1!=''&&endDate1!=''){ | 183 | if(startDate1!=''&&endDate1!=''){ |
| 181 | - $post('/mcy_forms/executionrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | 184 | + $post('/mcy_forms/executionrate',{/* gsdmEcecut:gsdmEcecut,fgsdmEcecut:fgsdmEcecut, */line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ |
| 182 | // 把数据填充到模版中 | 185 | // 把数据填充到模版中 |
| 183 | var tbodyHtml = template('executionrate',{list:result}); | 186 | var tbodyHtml = template('executionrate',{list:result}); |
| 184 | // 把渲染好的模版html文本追加到表格中 | 187 | // 把渲染好的模版html文本追加到表格中 |
| 185 | $('#tbody').html(tbodyHtml); | 188 | $('#tbody').html(tbodyHtml); |
| 186 | line = $("#line").val(); | 189 | line = $("#line").val(); |
| 190 | + | ||
| 187 | startDate = $("#startDate").val(); | 191 | startDate = $("#startDate").val(); |
| 188 | endDate = $("#endDate").val(); | 192 | endDate = $("#endDate").val(); |
| 189 | $("#sDate").text(startDate); | 193 | $("#sDate").text(startDate); |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| @@ -198,7 +198,7 @@ | @@ -198,7 +198,7 @@ | ||
| 198 | } | 198 | } |
| 199 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | 199 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); |
| 200 | }); | 200 | }); |
| 201 | - console.log(result); | 201 | + |
| 202 | var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result}); | 202 | var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result}); |
| 203 | // 把渲染好的模版html文本追加到表格中 | 203 | // 把渲染好的模版html文本追加到表格中 |
| 204 | $('#forms tbody').html(list_shiftuehiclemanth); | 204 | $('#forms tbody').html(list_shiftuehiclemanth); |
src/main/resources/static/pages/forms/statement/waybillday.html
| @@ -28,14 +28,14 @@ | @@ -28,14 +28,14 @@ | ||
| 28 | <div class="portlet light porttlet-fit bordered"> | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 30 | <form class="form-inline" action="" method="post"> | 30 | <form class="form-inline" action="" method="post"> |
| 31 | - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_waybillday"> | 31 | + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_waybillday"> |
| 32 | <span class="item-label" style="width: 80px;">公司: </span> | 32 | <span class="item-label" style="width: 80px;">公司: </span> |
| 33 | <select class="form-control" name="company" id="gsdmWaybillday" style="width: 140px;"></select> | 33 | <select class="form-control" name="company" id="gsdmWaybillday" style="width: 140px;"></select> |
| 34 | </div> | 34 | </div> |
| 35 | <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_waybillday"> | 35 | <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_waybillday"> |
| 36 | <span class="item-label" style="width: 80px;">分公司: </span> | 36 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 37 | <select class="form-control" name="subCompany" id="fgsdmWaybillday" style="width: 140px;"></select> | 37 | <select class="form-control" name="subCompany" id="fgsdmWaybillday" style="width: 140px;"></select> |
| 38 | - </div> | 38 | + </div> --> |
| 39 | <div style="display: inline-block;"> | 39 | <div style="display: inline-block;"> |
| 40 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </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> |
| @@ -143,7 +143,7 @@ | @@ -143,7 +143,7 @@ | ||
| 143 | gsdmWaybillday=$("#gsdmWaybillday").val(); | 143 | gsdmWaybillday=$("#gsdmWaybillday").val(); |
| 144 | fgsdmWaybillday = $("#fgsdmWaybillday").val(); | 144 | fgsdmWaybillday = $("#fgsdmWaybillday").val(); |
| 145 | 145 | ||
| 146 | - $post('/mcy_forms/waybillday',{gsdmWaybillday:gsdmWaybillday,fgsdmWaybillday:fgsdmWaybillday,line:line,date:$("#date").val(),type:'query'},function(result){ | 146 | + $post('/mcy_forms/waybillday',{/* gsdmWaybillday:gsdmWaybillday,fgsdmWaybillday:fgsdmWaybillday, */line:line,date:$("#date").val(),type:'query'},function(result){ |
| 147 | $.each(result, function(i, obj) { | 147 | $.each(result, function(i, obj) { |
| 148 | obj.requestType = reqCodeMap[obj.requestType]; | 148 | obj.requestType = reqCodeMap[obj.requestType]; |
| 149 | }); | 149 | }); |
src/main/resources/static/pages/report/timetable/timetable.html
| @@ -245,6 +245,7 @@ | @@ -245,6 +245,7 @@ | ||
| 245 | initPinYinSelect2('#line',data,''); | 245 | initPinYinSelect2('#line',data,''); |
| 246 | 246 | ||
| 247 | }) | 247 | }) |
| 248 | + | ||
| 248 | //查询 | 249 | //查询 |
| 249 | $("#query").on('click',function(){ | 250 | $("#query").on('click',function(){ |
| 250 | console.log($("#gsdmTime").val()); | 251 | console.log($("#gsdmTime").val()); |