Commit c1595ad92406fa741493b6de8baaa4ed2cec65ec
1 parent
45776ffe
时刻表分析 公司,分公司查询null判断
Showing
1 changed file
with
9 additions
and
5 deletions
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| @@ -495,8 +495,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -495,8 +495,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 495 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 495 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 496 | Map<String, Object> modelMap = new HashMap<String, Object>(); | 496 | Map<String, Object> modelMap = new HashMap<String, Object>(); |
| 497 | 497 | ||
| 498 | - String company = map.get("company").toString(); | ||
| 499 | - String subCompany = map.get("subCompany").toString(); | 498 | + String company = ""; |
| 499 | + if(map.get("company")!=null) | ||
| 500 | + company=map.get("company").toString(); | ||
| 501 | + String subCompany = ""; | ||
| 502 | + if(map.get("subCompany")!=null) | ||
| 503 | + subCompany=map.get("subCompany").toString(); | ||
| 500 | String page = map.get("page").toString(); | 504 | String page = map.get("page").toString(); |
| 501 | String line = map.get("line").toString(); | 505 | String line = map.get("line").toString(); |
| 502 | String startDate = map.get("startDate").toString(); | 506 | String startDate = map.get("startDate").toString(); |
| @@ -516,9 +520,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -516,9 +520,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 516 | if(line.length() != 0){ | 520 | if(line.length() != 0){ |
| 517 | sql += " and xl_bm = '"+line+"'"; | 521 | sql += " and xl_bm = '"+line+"'"; |
| 518 | } | 522 | } |
| 519 | - if(company.length() != 0){ | ||
| 520 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 521 | - } | 523 | +// if(company.length() != 0){ |
| 524 | + sql += " and gs_bm like %'"+company+"'% and fgs_bm like %'"+subCompany+"%'"; | ||
| 525 | +// } | ||
| 522 | sql += " and bc_type != 'in' and bc_type != 'out'"; | 526 | sql += " and bc_type != 'in' and bc_type != 'out'"; |
| 523 | 527 | ||
| 524 | list = jdbcTemplate.query(sql, | 528 | list = jdbcTemplate.query(sql, |