Commit 7f44aa98dd7551fa17867649668052ee39edb8aa
1 parent
72a50070
班次到离站报表,站点编码模糊查询改成相等查询。
Showing
2 changed files
with
11 additions
and
5 deletions
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -247,8 +247,12 @@ public class ReportServiceImpl implements ReportService{ |
| 247 | 247 | PreparedStatement ps = null; |
| 248 | 248 | ResultSet rs = null; |
| 249 | 249 | String year=fcsj.substring(0,4); |
| 250 | - String sql = "select * from bsth_c_arrival_info_"+year+" where line_id=? AND weeks_year>=? " | |
| 251 | - + " AND weeks_year<=? AND ts > ? AND ts <=? AND up_down=? AND stop_no like ? order by ts"; | |
| 250 | + String sql = "select * from bsth_c_arrival_info_"+year+" where line_id = ? AND weeks_year >= ? " | |
| 251 | + + " AND weeks_year <= ? AND ts > ? AND ts <= ? AND up_down = ? "; | |
| 252 | + if(zd != null && zd.length() > 0){ | |
| 253 | + sql += " AND stop_no = ? "; | |
| 254 | + } | |
| 255 | + sql += " order by ts "; | |
| 252 | 256 | try{ |
| 253 | 257 | conn = DBUtils_MS.getConnection(); |
| 254 | 258 | ps = conn.prepareStatement(sql); |
| ... | ... | @@ -258,7 +262,9 @@ public class ReportServiceImpl implements ReportService{ |
| 258 | 262 | ps.setLong(4, date1); |
| 259 | 263 | ps.setLong(5, date2); |
| 260 | 264 | ps.setString(6, zdlx); |
| 261 | - ps.setString(7, "%"+zd+"%"); | |
| 265 | + if(zd != null && zd.length() > 0){ | |
| 266 | + ps.setString(7, zd); | |
| 267 | + } | |
| 262 | 268 | rs = ps.executeQuery(); |
| 263 | 269 | |
| 264 | 270 | list = resultSet2Set(rs); | ... | ... |
src/main/resources/static/pages/report/inoutstation.html
| ... | ... | @@ -275,8 +275,8 @@ |
| 275 | 275 | $("#gsdm").val(temp[0]); |
| 276 | 276 | updateCompany(); |
| 277 | 277 | $("#fgsdm").val(temp[1]); |
| 278 | - $("#gsdm").attr("disabled", true); | |
| 279 | - $("#fgsdm").attr("disabled", true); | |
| 278 | +// $("#gsdm").attr("disabled", true); | |
| 279 | +// $("#fgsdm").attr("disabled", true); | |
| 280 | 280 | } |
| 281 | 281 | }); |
| 282 | 282 | ... | ... |