Commit c5221dc5ca529d3c20689dad7be8608c1a923981
1 parent
a5156f52
计划排班sql补上日期条件
Showing
2 changed files
with
6 additions
and
4 deletions
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -215,7 +215,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -215,7 +215,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 215 | 215 | ||
| 216 | if(model.length() != 0){ | 216 | if(model.length() != 0){ |
| 217 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; | 217 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; |
| 218 | - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | 218 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'" + |
| 219 | + " and bc_type != 'ldks' and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | ||
| 219 | 220 | ||
| 220 | ttList = jdbcTemplate.query(sql, | 221 | ttList = jdbcTemplate.query(sql, |
| 221 | new RowMapper<Long>(){ | 222 | new RowMapper<Long>(){ |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| @@ -636,8 +636,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -636,8 +636,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 636 | 636 | ||
| 637 | if(model.length() != 0){ | 637 | if(model.length() != 0){ |
| 638 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; | 638 | // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; |
| 639 | - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | ||
| 640 | - | 639 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'" + |
| 640 | + " and bc_type != 'ldks' and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | ||
| 641 | + | ||
| 641 | ttList = jdbcTemplate.query(sql, | 642 | ttList = jdbcTemplate.query(sql, |
| 642 | new RowMapper<Long>(){ | 643 | new RowMapper<Long>(){ |
| 643 | @Override | 644 | @Override |
| @@ -1208,7 +1209,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1208,7 +1209,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1208 | try { | 1209 | try { |
| 1209 | long qyrq = sdf.parse(m.get("qyrq").toString()).getTime(); | 1210 | long qyrq = sdf.parse(m.get("qyrq").toString()).getTime(); |
| 1210 | if(qyrq > date2.getTime()) | 1211 | if(qyrq > date2.getTime()) |
| 1211 | - break; | 1212 | + break DO; |
| 1212 | } catch (ParseException e) { | 1213 | } catch (ParseException e) { |
| 1213 | // TODO Auto-generated catch block | 1214 | // TODO Auto-generated catch block |
| 1214 | e.printStackTrace(); | 1215 | e.printStackTrace(); |