Commit 2cb12b3623643cbb6d50934ef0026318225c1557
1 parent
170562b9
浦东公交计划调度功能优化
1、首页提示人员停用后台查询sql优化
Showing
1 changed file
with
24 additions
and
11 deletions
src/main/java/com/bsth/service/schedule/impl/EmployeeConfigInfoServiceImpl.java
| @@ -303,19 +303,32 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl<EmployeeConfigIn | @@ -303,19 +303,32 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl<EmployeeConfigIn | ||
| 303 | // 2、计算从当前时间开始的排班计划中是否有停用人员 | 303 | // 2、计算从当前时间开始的排班计划中是否有停用人员 |
| 304 | String sql = | 304 | String sql = |
| 305 | "select distinct " + | 305 | "select distinct " + |
| 306 | - "pinfo.xl_name xlName " + | ||
| 307 | - ", pinfo.schedule_date scheduleDate " + | ||
| 308 | - "from " + | ||
| 309 | - "(" + | ||
| 310 | - "select plan.xl_name, plan.schedule_date " + | 306 | + "plan.xl_name xlName " + |
| 307 | + ", plan.schedule_date scheduleDate " + | ||
| 311 | "from bsth_c_s_sp_info plan " + | 308 | "from bsth_c_s_sp_info plan " + |
| 312 | - "left join bsth_c_personnel jsy on plan.j = jsy.id " + | ||
| 313 | - "left join bsth_c_personnel spy on plan.s = spy.id " + | ||
| 314 | - "where schedule_date >= ? " + | 309 | + "left join bsth_c_personnel jsy on jsy.id = plan.j " + |
| 310 | + "left join bsth_c_personnel spy on spy.id = plan.s " + | ||
| 311 | + "where plan.schedule_date >= ? " + | ||
| 315 | "and (jsy.destroy = 1 || spy.destroy = 1) " + | 312 | "and (jsy.destroy = 1 || spy.destroy = 1) " + |
| 316 | - "order by plan.xl_name asc, plan.schedule_date asc " + | ||
| 317 | - ") pinfo " + | ||
| 318 | - "group by pinfo.xl_name, pinfo.schedule_date "; | 313 | + "group by plan.xl_name, plan.schedule_date " + |
| 314 | + "order by plan.xl_name, plan.schedule_date "; | ||
| 315 | + | ||
| 316 | +// String sql = | ||
| 317 | +// "select distinct " + | ||
| 318 | +// "pinfo.xl_name xlName " + | ||
| 319 | +// ", pinfo.schedule_date scheduleDate " + | ||
| 320 | +// "from " + | ||
| 321 | +// "(" + | ||
| 322 | +// "select plan.xl_name, plan.schedule_date " + | ||
| 323 | +// "from bsth_c_s_sp_info plan " + | ||
| 324 | +// "left join bsth_c_personnel jsy on plan.j = jsy.id " + | ||
| 325 | +// "left join bsth_c_personnel spy on plan.s = spy.id " + | ||
| 326 | +// "where schedule_date >= ? " + | ||
| 327 | +// "and (jsy.destroy = 1 || spy.destroy = 1) " + | ||
| 328 | +// "order by plan.xl_name asc, plan.schedule_date asc " + | ||
| 329 | +// ") pinfo " + | ||
| 330 | +// "group by pinfo.xl_name, pinfo.schedule_date "; | ||
| 331 | + | ||
| 319 | 332 | ||
| 320 | Date currentDate = new Date(DateUtils.getTimestamp()); | 333 | Date currentDate = new Date(DateUtils.getTimestamp()); |
| 321 | System.out.println(currentDate); | 334 | System.out.println(currentDate); |