Commit ecf01a0cc2e23e687438faed88469fabd85f8554
1 parent
3853ecfc
LGF 报表
Showing
14 changed files
with
461 additions
and
249 deletions
src/main/java/com/bsth/controller/schedule/PeopleCarPlanController.java
| @@ -20,33 +20,33 @@ public class PeopleCarPlanController { | @@ -20,33 +20,33 @@ public class PeopleCarPlanController { | ||
| 20 | private PeopleCarPlanService peopleCarPlanService; | 20 | private PeopleCarPlanService peopleCarPlanService; |
| 21 | 21 | ||
| 22 | @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET) | 22 | @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET) |
| 23 | - public List<Map<String,Object>> queryPeopleCar(@RequestParam String line, @RequestParam String date, @RequestParam String type){ | ||
| 24 | - return peopleCarPlanService.queryPeopleCar(line, date, type); | 23 | + public List<Map<String,Object>> queryPeopleCar(@RequestParam Map<String, Object> map){ |
| 24 | + return peopleCarPlanService.queryPeopleCar(map); | ||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | @RequestMapping(value="/workDaily", method = RequestMethod.GET) | 27 | @RequestMapping(value="/workDaily", method = RequestMethod.GET) |
| 28 | - public List<Map<String,Object>> workDaily(@RequestParam String line, @RequestParam String date, @RequestParam String type){ | ||
| 29 | - return peopleCarPlanService.workDaily(line, date, type); | 28 | + public List<Map<String,Object>> workDaily(@RequestParam Map<String, Object> map){ |
| 29 | + return peopleCarPlanService.workDaily(map); | ||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) | 32 | @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) |
| 33 | - public Map<String, Object> scheduleAnaly(@RequestParam String page, @RequestParam String line, @RequestParam String startDate, @RequestParam String endDate, @RequestParam String model, @RequestParam String type){ | ||
| 34 | - return peopleCarPlanService.scheduleAnaly(page, line, startDate, endDate, model, type); | 33 | + public Map<String, Object> scheduleAnaly(@RequestParam Map<String, Object> map){ |
| 34 | + return peopleCarPlanService.scheduleAnaly(map); | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | @RequestMapping(value="/getModel", method = RequestMethod.GET) | 37 | @RequestMapping(value="/getModel", method = RequestMethod.GET) |
| 38 | - public List<Map<String,Object>> getModel(@RequestParam String line, @RequestParam String startDate, @RequestParam String endDate){ | ||
| 39 | - return peopleCarPlanService.getModel(line, startDate, endDate); | 38 | + public List<Map<String,Object>> getModel(@RequestParam Map<String, Object> map){ |
| 39 | + return peopleCarPlanService.getModel(map); | ||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET) | 42 | @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET) |
| 43 | - public List<Map<String,Object>> firstAndLastBus(@RequestParam String line, @RequestParam String date, @RequestParam String type){ | ||
| 44 | - return peopleCarPlanService.firstAndLastBus(line, date, type); | 43 | + public List<Map<String,Object>> firstAndLastBus(@RequestParam Map<String, Object> map){ |
| 44 | + return peopleCarPlanService.firstAndLastBus(map); | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | @RequestMapping(value="/commandState", method = RequestMethod.GET) | 47 | @RequestMapping(value="/commandState", method = RequestMethod.GET) |
| 48 | - public List<Map<String,Object>> commandState(@RequestParam String line, @RequestParam String date, @RequestParam String code){ | ||
| 49 | - return peopleCarPlanService.commandState(line, date, code); | 48 | + public List<Map<String,Object>> commandState(@RequestParam Map<String, Object> map){ |
| 49 | + return peopleCarPlanService.commandState(map); | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | } | 52 | } |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper; | @@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper; | ||
| 18 | import org.springframework.stereotype.Service; | 18 | import org.springframework.stereotype.Service; |
| 19 | 19 | ||
| 20 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 20 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 21 | -import com.bsth.entity.schedule.TTInfoDetail; | ||
| 22 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 21 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 23 | import com.bsth.service.BusIntervalService; | 22 | import com.bsth.service.BusIntervalService; |
| 24 | import com.bsth.service.schedule.PeopleCarPlanService; | 23 | import com.bsth.service.schedule.PeopleCarPlanService; |
| @@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 39 | private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 38 | private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 40 | private DecimalFormat df = new DecimalFormat("##0.00"); | 39 | private DecimalFormat df = new DecimalFormat("##0.00"); |
| 41 | 40 | ||
| 42 | - public List<ScheduleRealInfo> getSchedule(String line, String startDate, String endDate, String model, String times){ | ||
| 43 | - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); | 41 | + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String startDate, String endDate, String model, String times){ |
| 42 | + List<Long> ttList = new ArrayList<Long>(); | ||
| 44 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 43 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 45 | List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); | 44 | List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); |
| 46 | 45 | ||
| @@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 54 | String[] split = times.split("-"); | 53 | String[] split = times.split("-"); |
| 55 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; | 54 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; |
| 56 | } | 55 | } |
| 56 | + if(company.length() != 0){ | ||
| 57 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 58 | + } | ||
| 57 | sql += " and bc_type = 'normal'"; | 59 | sql += " and bc_type = 'normal'"; |
| 58 | 60 | ||
| 59 | list =jdbcTemplate.query(sql, | 61 | list =jdbcTemplate.query(sql, |
| @@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 85 | schedule.setClZbh(rs.getString("cl_zbh")); | 87 | schedule.setClZbh(rs.getString("cl_zbh")); |
| 86 | schedule.setjGh(rs.getString("j_gh")); | 88 | schedule.setjGh(rs.getString("j_gh")); |
| 87 | schedule.setjName(rs.getString("j_name")); | 89 | schedule.setjName(rs.getString("j_name")); |
| 90 | + schedule.setSpId(rs.getLong("sp_id")); | ||
| 88 | return schedule; | 91 | return schedule; |
| 89 | } | 92 | } |
| 90 | }); | 93 | }); |
| 91 | 94 | ||
| 92 | if(model.length() != 0){ | 95 | if(model.length() != 0){ |
| 93 | - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; | 96 | +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; |
| 97 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'"; | ||
| 94 | 98 | ||
| 95 | ttList =jdbcTemplate.query(sql, | 99 | ttList =jdbcTemplate.query(sql, |
| 96 | - new RowMapper<TTInfoDetail>(){ | 100 | + new RowMapper<Long>(){ |
| 97 | @Override | 101 | @Override |
| 98 | - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 99 | - TTInfoDetail ttInfo = new TTInfoDetail(); | ||
| 100 | - ttInfo.setBcType(rs.getString("bc_type")); | ||
| 101 | - ttInfo.setBcs(rs.getInt("bcs")); | ||
| 102 | - ttInfo.setFcsj(rs.getString("fcsj")); | ||
| 103 | - ttInfo.setBcsj(rs.getInt("bcsj")); | ||
| 104 | - return ttInfo; | 102 | + public Long mapRow(ResultSet rs, int rowNum) throws SQLException { |
| 103 | + return rs.getLong("id"); | ||
| 105 | } | 104 | } |
| 106 | }); | 105 | }); |
| 107 | } | 106 | } |
| @@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 133 | } | 132 | } |
| 134 | DO:{ | 133 | DO:{ |
| 135 | if(model.length() != 0){ | 134 | if(model.length() != 0){ |
| 136 | - for(TTInfoDetail tt : ttList){ | ||
| 137 | - if(tt.getBcs() == schedule.getBcs() && tt.getFcsj().equals(schedule.getFcsj()) | ||
| 138 | - && tt.getBcsj() == schedule.getBcsj()){ | ||
| 139 | - resList.add(schedule); | ||
| 140 | - break DO; | 135 | + for(Long tt : ttList){ |
| 136 | + if(tt == schedule.getSpId()){ | ||
| 137 | + resList.add(schedule); | ||
| 138 | + break DO; | ||
| 141 | } | 139 | } |
| 142 | } | 140 | } |
| 143 | } else { | 141 | } else { |
| @@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 210 | public List<Map<String, Object>> interval(Map<String, Object> map) { | 208 | public List<Map<String, Object>> interval(Map<String, Object> map) { |
| 211 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 209 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 212 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 210 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 213 | - | 211 | + |
| 212 | + String company = map.get("company").toString(); | ||
| 213 | + String subCompany = map.get("subCompany").toString(); | ||
| 214 | String line = map.get("line").toString(); | 214 | String line = map.get("line").toString(); |
| 215 | String startDate = map.get("startDate").toString(); | 215 | String startDate = map.get("startDate").toString(); |
| 216 | String endDate = map.get("endDate").toString(); | 216 | String endDate = map.get("endDate").toString(); |
| @@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 228 | times = "06:00-07:00"; | 228 | times = "06:00-07:00"; |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); | 231 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 232 | 232 | ||
| 233 | String[] date1 = startDate.split("-"); | 233 | String[] date1 = startDate.split("-"); |
| 234 | String[] date2 = endDate.split("-"); | 234 | String[] date2 = endDate.split("-"); |
| @@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 254 | long sjInterval = 0; | 254 | long sjInterval = 0; |
| 255 | int jhNum = 0; | 255 | int jhNum = 0; |
| 256 | int sjNum = 0; | 256 | int sjNum = 0; |
| 257 | - String company = "", subCompany = ""; | 257 | + String companyName = "", subCompanyName = ""; |
| 258 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 258 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 259 | Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>(); | 259 | Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>(); |
| 260 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 260 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| @@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 269 | jhNum++; | 269 | jhNum++; |
| 270 | ScheduleRealInfo schedule1 = tempList.get(i - 1); | 270 | ScheduleRealInfo schedule1 = tempList.get(i - 1); |
| 271 | ScheduleRealInfo schedule2 = tempList.get(i); | 271 | ScheduleRealInfo schedule2 = tempList.get(i); |
| 272 | - if(schedule1.getGsName() != null && company.length() == 0) | ||
| 273 | - company = schedule1.getGsName(); | ||
| 274 | - if(schedule1.getFgsName() != null && subCompany.length() == 0) | ||
| 275 | - subCompany = schedule1.getFgsName(); | 272 | + |
| 273 | + if(schedule1.getGsName() != null && companyName.length() == 0) | ||
| 274 | + companyName = schedule1.getGsName(); | ||
| 275 | + if(schedule1.getFgsName() != null && subCompanyName.length() == 0) | ||
| 276 | + subCompanyName = schedule1.getFgsName(); | ||
| 277 | + | ||
| 276 | jhInterval += schedule2.getFcsjT(); | 278 | jhInterval += schedule2.getFcsjT(); |
| 277 | jhInterval -= schedule1.getFcsjT(); | 279 | jhInterval -= schedule1.getFcsjT(); |
| 278 | if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){ | 280 | if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){ |
| @@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 290 | tempMap.put("line", keys[0]); | 292 | tempMap.put("line", keys[0]); |
| 291 | tempMap.put("qdz", keys[1]); | 293 | tempMap.put("qdz", keys[1]); |
| 292 | tempMap.put("times", times); | 294 | tempMap.put("times", times); |
| 293 | - tempMap.put("company", company); | ||
| 294 | - tempMap.put("subCompany", subCompany); | 295 | + tempMap.put("company", companyName); |
| 296 | + tempMap.put("subCompany", subCompanyName); | ||
| 295 | if(jhNum != 0) | 297 | if(jhNum != 0) |
| 296 | tempMap.put("jhInterval", jhInterval/jhNum); | 298 | tempMap.put("jhInterval", jhInterval/jhNum); |
| 297 | else | 299 | else |
| @@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 333 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 335 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 334 | Map<String, Object> modelMap = new HashMap<String, Object>(); | 336 | Map<String, Object> modelMap = new HashMap<String, Object>(); |
| 335 | 337 | ||
| 338 | + String company = map.get("company").toString(); | ||
| 339 | + String subCompany = map.get("subCompany").toString(); | ||
| 336 | String line = map.get("line").toString(); | 340 | String line = map.get("line").toString(); |
| 337 | String startDate = map.get("startDate").toString(); | 341 | String startDate = map.get("startDate").toString(); |
| 338 | String endDate = map.get("endDate").toString(); | 342 | String endDate = map.get("endDate").toString(); |
| @@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 351 | times = "06:00-07:00"; | 355 | times = "06:00-07:00"; |
| 352 | } | 356 | } |
| 353 | 357 | ||
| 354 | - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); | 358 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 355 | 359 | ||
| 356 | String[] date1 = startDate.split("-"); | 360 | String[] date1 = startDate.split("-"); |
| 357 | String[] date2 = endDate.split("-"); | 361 | String[] date2 = endDate.split("-"); |
| @@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 389 | double yssd = 0; | 393 | double yssd = 0; |
| 390 | int yyNum = 0; | 394 | int yyNum = 0; |
| 391 | int ysNum = 0; | 395 | int ysNum = 0; |
| 392 | - String company = "", subCompany = ""; | 396 | + String companyName = "", subCompanyName = ""; |
| 393 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 397 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 394 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 395 | - company = schedule.getGsName(); | ||
| 396 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 397 | - subCompany = schedule.getFgsName(); | 398 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 399 | + companyName = schedule.getGsName(); | ||
| 400 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 401 | + subCompanyName = schedule.getFgsName(); | ||
| 398 | if(!tempMap.containsKey("xlDir")) | 402 | if(!tempMap.containsKey("xlDir")) |
| 399 | tempMap.put("xlDir", schedule.getXlDir()); | 403 | tempMap.put("xlDir", schedule.getXlDir()); |
| 400 | if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0")) | 404 | if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0")) |
| @@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 424 | tempMap.put("line", keys[0]); | 428 | tempMap.put("line", keys[0]); |
| 425 | tempMap.put("lp", keys[1]); | 429 | tempMap.put("lp", keys[1]); |
| 426 | tempMap.put("zdz", keys[2]); | 430 | tempMap.put("zdz", keys[2]); |
| 427 | - tempMap.put("company", company); | ||
| 428 | - tempMap.put("subCompany", subCompany); | 431 | + tempMap.put("company", companyName); |
| 432 | + tempMap.put("subCompany", subCompanyName); | ||
| 429 | 433 | ||
| 430 | tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟"); | 434 | tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟"); |
| 431 | yysjSum += yysj; | 435 | yysjSum += yysj; |
| @@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 465 | List<Integer> keyList = new ArrayList<Integer>(); | 469 | List<Integer> keyList = new ArrayList<Integer>(); |
| 466 | Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>(); | 470 | Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>(); |
| 467 | for(Map<String, Object> m : keyMap2.get(key)){ | 471 | for(Map<String, Object> m : keyMap2.get(key)){ |
| 468 | - Integer num = Integer.valueOf(m.get("lp").toString())*10+Integer.valueOf(m.get("xlDir").toString()); | 472 | + String lp = m.get("lp").toString(); |
| 473 | + String str = ""; | ||
| 474 | + for(int i = 0; i < lp.length(); i++){ | ||
| 475 | + str += (int)lp.charAt(i); | ||
| 476 | + } | ||
| 477 | + Integer num = Integer.valueOf(str)*10+Integer.valueOf(m.get("xlDir").toString()); | ||
| 469 | if(!temp.containsKey(num)){ | 478 | if(!temp.containsKey(num)){ |
| 470 | temp.put(num, new ArrayList<Map<String, Object>>()); | 479 | temp.put(num, new ArrayList<Map<String, Object>>()); |
| 471 | keyList.add(num); | 480 | keyList.add(num); |
| @@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 494 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); | 503 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 495 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); | 504 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); |
| 496 | 505 | ||
| 506 | + String company = map.get("company").toString(); | ||
| 507 | + String subCompany = map.get("subCompany").toString(); | ||
| 497 | String line = map.get("line").toString(); | 508 | String line = map.get("line").toString(); |
| 498 | String startDate = map.get("startDate").toString(); | 509 | String startDate = map.get("startDate").toString(); |
| 499 | String endDate = map.get("endDate").toString(); | 510 | String endDate = map.get("endDate").toString(); |
| @@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 512 | times = "06:00-07:00"; | 523 | times = "06:00-07:00"; |
| 513 | } | 524 | } |
| 514 | 525 | ||
| 515 | - list = getSchedule(line, startDate, endDate, model, times); | 526 | + list = getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 516 | 527 | ||
| 517 | String[] date1 = startDate.split("-"); | 528 | String[] date1 = startDate.split("-"); |
| 518 | String[] date2 = endDate.split("-"); | 529 | String[] date2 = endDate.split("-"); |
| @@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 559 | long sjtz = 0l; | 570 | long sjtz = 0l; |
| 560 | long tzsjMax = 0l; | 571 | long tzsjMax = 0l; |
| 561 | long tzsjMin = 0l; | 572 | long tzsjMin = 0l; |
| 562 | - String company = "", subCompany = ""; | 573 | + String companyName = "", subCompanyName = ""; |
| 563 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 574 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 564 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 565 | - company = schedule.getGsName(); | ||
| 566 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 567 | - subCompany = schedule.getFgsName(); | 575 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 576 | + companyName = schedule.getGsName(); | ||
| 577 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 578 | + subCompanyName = schedule.getFgsName(); | ||
| 568 | long tzsj = 0l; | 579 | long tzsj = 0l; |
| 569 | long yssj = 0l; | 580 | long yssj = 0l; |
| 570 | jhbc++; | 581 | jhbc++; |
| @@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 618 | tempMap.put("jhfc", keys[3]); | 629 | tempMap.put("jhfc", keys[3]); |
| 619 | tempMap.put("station", keys[4]); | 630 | tempMap.put("station", keys[4]); |
| 620 | tempMap.put("times", times); | 631 | tempMap.put("times", times); |
| 621 | - tempMap.put("company", company); | ||
| 622 | - tempMap.put("subCompany", subCompany); | 632 | + tempMap.put("company", companyName); |
| 633 | + tempMap.put("subCompany", subCompanyName); | ||
| 623 | if(startDate.equals(endDate)) | 634 | if(startDate.equals(endDate)) |
| 624 | tempMap.put("dates", startDate); | 635 | tempMap.put("dates", startDate); |
| 625 | else | 636 | else |
| @@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 692 | int wdfc2 = 0; | 703 | int wdfc2 = 0; |
| 693 | int ys = 0; | 704 | int ys = 0; |
| 694 | int tz = 0; | 705 | int tz = 0; |
| 695 | - String company = ""; | 706 | + String companyName = "", subCompanyName = ""; |
| 696 | for(Map<String, Object> m : keyMap0.get(key)){ | 707 | for(Map<String, Object> m : keyMap0.get(key)){ |
| 697 | - if(m.containsKey("company") && company.length() == 0) | ||
| 698 | - company = m.get("company").toString(); | 708 | + if(m.containsKey("company") && companyName.length() == 0) |
| 709 | + companyName = m.get("company").toString(); | ||
| 710 | + if(m.containsKey("subCompany") && subCompanyName.length() == 0) | ||
| 711 | + subCompanyName = m.get("subCompany").toString(); | ||
| 699 | jhbc += Integer.valueOf(m.get("jhbc").toString()); | 712 | jhbc += Integer.valueOf(m.get("jhbc").toString()); |
| 700 | sjbc += Integer.valueOf(m.get("sjbc").toString()); | 713 | sjbc += Integer.valueOf(m.get("sjbc").toString()); |
| 701 | wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1)); | 714 | wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1)); |
| @@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 709 | tempMap.put("dates", startDate); | 722 | tempMap.put("dates", startDate); |
| 710 | else | 723 | else |
| 711 | tempMap.put("dates", startDate + "--" + endDate); | 724 | tempMap.put("dates", startDate + "--" + endDate); |
| 712 | - tempMap.put("company", company); | 725 | + tempMap.put("company", companyName); |
| 726 | + tempMap.put("subCompany", subCompanyName); | ||
| 713 | String[] keys = key.split("/"); | 727 | String[] keys = key.split("/"); |
| 714 | tempMap.put("line", keys[0]); | 728 | tempMap.put("line", keys[0]); |
| 715 | tempMap.put("lp", keys[1]); | 729 | tempMap.put("lp", keys[1]); |
| @@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 733 | 747 | ||
| 734 | for(String key : keyMap1.keySet()){ | 748 | for(String key : keyMap1.keySet()){ |
| 735 | Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() { | 749 | Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() { |
| 736 | - | 750 | + |
| 737 | public int compare(Map<String, Object> o1, Map<String, Object> o2) { | 751 | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
| 752 | + Integer a; | ||
| 753 | + Integer b; | ||
| 754 | + String lp1 = o1.get("lp").toString(); | ||
| 755 | + String lp2 = o2.get("lp").toString(); | ||
| 756 | + String str1 = ""; | ||
| 757 | + String str2 = ""; | ||
| 758 | + for(int i = 0; i < lp1.length(); i++){ | ||
| 759 | + str1 += (int)lp1.charAt(i); | ||
| 760 | + } | ||
| 761 | + for(int i = 0; i < lp2.length(); i++){ | ||
| 762 | + str2 += (int)lp2.charAt(i); | ||
| 763 | + } | ||
| 738 | 764 | ||
| 739 | - Integer a = Integer.valueOf(o1.get("lp").toString()); | ||
| 740 | - Integer b = Integer.valueOf(o2.get("lp").toString()); | 765 | + a = Integer.valueOf(str1); |
| 766 | + b = Integer.valueOf(str2); | ||
| 741 | 767 | ||
| 742 | // 升序 | 768 | // 升序 |
| 743 | return a.compareTo(b); | 769 | return a.compareTo(b); |
| @@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 757 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 783 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 758 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 784 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 759 | 785 | ||
| 786 | + String company = map.get("company").toString(); | ||
| 787 | + String subCompany = map.get("subCompany").toString(); | ||
| 760 | String line = map.get("line").toString(); | 788 | String line = map.get("line").toString(); |
| 761 | String startDate = map.get("startDate").toString(); | 789 | String startDate = map.get("startDate").toString(); |
| 762 | String endDate = map.get("endDate").toString(); | 790 | String endDate = map.get("endDate").toString(); |
| @@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 774 | times = "06:00-07:00"; | 802 | times = "06:00-07:00"; |
| 775 | } | 803 | } |
| 776 | 804 | ||
| 777 | - list = getSchedule(line, startDate, endDate, model, times); | 805 | + list = getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 778 | 806 | ||
| 779 | String[] date1 = startDate.split("-"); | 807 | String[] date1 = startDate.split("-"); |
| 780 | String[] date2 = endDate.split("-"); | 808 | String[] date2 = endDate.split("-"); |
| @@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 807 | qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, | 835 | qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, |
| 808 | qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; | 836 | qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; |
| 809 | int qtbc = 0, qtlc = 0; | 837 | int qtbc = 0, qtlc = 0; |
| 810 | - String company = "", subCompany = ""; | 838 | + String companyName = "", subCompanyName = ""; |
| 811 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 839 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 812 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 813 | - company = schedule.getGsName(); | ||
| 814 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 815 | - subCompany = schedule.getFgsName(); | 840 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 841 | + companyName = schedule.getGsName(); | ||
| 842 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 843 | + subCompanyName = schedule.getFgsName(); | ||
| 816 | jhbc++; | 844 | jhbc++; |
| 817 | if(schedule.getJhlc() != null) | 845 | if(schedule.getJhlc() != null) |
| 818 | jhlc += schedule.getJhlc(); | 846 | jhlc += schedule.getJhlc(); |
| @@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 861 | tempMap.put("date", startDate); | 889 | tempMap.put("date", startDate); |
| 862 | else | 890 | else |
| 863 | tempMap.put("date", startDate + "--" + endDate); | 891 | tempMap.put("date", startDate + "--" + endDate); |
| 864 | - tempMap.put("company", company); | ||
| 865 | - tempMap.put("subCompany", subCompany); | 892 | + tempMap.put("company", companyName); |
| 893 | + tempMap.put("subCompany", subCompanyName); | ||
| 866 | tempMap.put("times", times); | 894 | tempMap.put("times", times); |
| 867 | tempMap.put("line", key); | 895 | tempMap.put("line", key); |
| 868 | tempMap.put("jhbc", jhbc); | 896 | tempMap.put("jhbc", jhbc); |
| @@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 919 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); | 947 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 920 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); | 948 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); |
| 921 | 949 | ||
| 950 | + String company = map.get("company").toString(); | ||
| 951 | + String subCompany = map.get("subCompany").toString(); | ||
| 922 | String line = map.get("line").toString(); | 952 | String line = map.get("line").toString(); |
| 923 | String startDate = map.get("startDate").toString(); | 953 | String startDate = map.get("startDate").toString(); |
| 924 | String endDate = map.get("endDate").toString(); | 954 | String endDate = map.get("endDate").toString(); |
| @@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 941 | String[] split = times.split("-"); | 971 | String[] split = times.split("-"); |
| 942 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; | 972 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; |
| 943 | } | 973 | } |
| 974 | + if(company.length() != 0){ | ||
| 975 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 976 | + } | ||
| 944 | sql += " and bc_type = 'normal'"; | 977 | sql += " and bc_type = 'normal'"; |
| 945 | 978 | ||
| 946 | list =jdbcTemplate.query(sql, | 979 | list =jdbcTemplate.query(sql, |
src/main/java/com/bsth/service/schedule/PeopleCarPlanService.java
| @@ -5,15 +5,15 @@ import java.util.Map; | @@ -5,15 +5,15 @@ import java.util.Map; | ||
| 5 | 5 | ||
| 6 | public interface PeopleCarPlanService { | 6 | public interface PeopleCarPlanService { |
| 7 | 7 | ||
| 8 | - List<Map<String, Object>> queryPeopleCar(String line, String date, String type); | 8 | + List<Map<String, Object>> queryPeopleCar(Map<String, Object> map); |
| 9 | 9 | ||
| 10 | - List<Map<String, Object>> workDaily(String line, String date, String type); | 10 | + List<Map<String, Object>> workDaily(Map<String, Object> map); |
| 11 | 11 | ||
| 12 | - Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type); | 12 | + Map<String, Object> scheduleAnaly(Map<String, Object> map); |
| 13 | 13 | ||
| 14 | - List<Map<String, Object>> getModel(String line, String startDate, String endDate); | 14 | + List<Map<String, Object>> getModel(Map<String, Object> map); |
| 15 | 15 | ||
| 16 | - List<Map<String, Object>> firstAndLastBus(String line, String date, String type); | 16 | + List<Map<String, Object>> firstAndLastBus(Map<String, Object> map); |
| 17 | 17 | ||
| 18 | - List<Map<String, Object>> commandState(String line, String date, String code); | 18 | + List<Map<String, Object>> commandState(Map<String, Object> map); |
| 19 | } | 19 | } |
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| @@ -23,10 +23,8 @@ import org.springframework.stereotype.Service; | @@ -23,10 +23,8 @@ import org.springframework.stereotype.Service; | ||
| 23 | 23 | ||
| 24 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 24 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 25 | import com.bsth.entity.schedule.SchedulePlanInfo; | 25 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 26 | -import com.bsth.entity.schedule.TTInfoDetail; | ||
| 27 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 26 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 28 | import com.bsth.util.ReportUtils; | 27 | import com.bsth.util.ReportUtils; |
| 29 | -import com.ibm.wsdl.util.xml.DOM2Writer; | ||
| 30 | 28 | ||
| 31 | @Service | 29 | @Service |
| 32 | public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | 30 | public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| @@ -37,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -37,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 37 | @Autowired | 35 | @Autowired |
| 38 | private JdbcTemplate jdbcTemplate; | 36 | private JdbcTemplate jdbcTemplate; |
| 39 | 37 | ||
| 38 | + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){ | ||
| 39 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 40 | + | ||
| 41 | + try { | ||
| 42 | + String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; | ||
| 43 | + | ||
| 44 | + if(line.length() != 0) | ||
| 45 | + sql += " and xl_bm = '"+line+"'"; | ||
| 46 | + if(company.length() != 0) | ||
| 47 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 48 | + | ||
| 49 | + list =jdbcTemplate.query(sql, | ||
| 50 | + new RowMapper<ScheduleRealInfo>(){ | ||
| 51 | + @Override | ||
| 52 | + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 53 | + ScheduleRealInfo schedule = new ScheduleRealInfo(); | ||
| 54 | + schedule.setScheduleDateStr(rs.getString("schedule_date_Str")); | ||
| 55 | + schedule.setRealExecDate(rs.getString("real_exec_date")); | ||
| 56 | + schedule.setXlName(rs.getString("xl_name")); | ||
| 57 | + schedule.setLpName(rs.getString("lp_name")); | ||
| 58 | + schedule.setBcType(rs.getString("bc_type")); | ||
| 59 | + schedule.setBcs(rs.getInt("bcs")); | ||
| 60 | + schedule.setBcsj(rs.getInt("bcsj")); | ||
| 61 | + schedule.setJhlc(rs.getDouble("jhlc")); | ||
| 62 | + schedule.setDfsj(rs.getString("dfsj")); | ||
| 63 | + schedule.setFcsj(rs.getString("fcsj")); | ||
| 64 | + schedule.setFcsjActual(rs.getString("fcsj_actual")); | ||
| 65 | + schedule.setZdsj(rs.getString("zdsj")); | ||
| 66 | + schedule.setZdsjActual(rs.getString("zdsj_actual")); | ||
| 67 | + schedule.setQdzName(rs.getString("qdz_name")); | ||
| 68 | + schedule.setZdzName(rs.getString("zdz_name")); | ||
| 69 | + schedule.setXlDir(rs.getString("xl_dir")); | ||
| 70 | + schedule.setStatus(rs.getInt("status")); | ||
| 71 | + schedule.setRemarks(rs.getString("remarks")); | ||
| 72 | + schedule.setGsName(rs.getString("gs_name")); | ||
| 73 | + schedule.setFgsName(rs.getString("fgs_name")); | ||
| 74 | + schedule.setClZbh(rs.getString("cl_zbh")); | ||
| 75 | + schedule.setjGh(rs.getString("j_gh")); | ||
| 76 | + schedule.setjName(rs.getString("j_name")); | ||
| 77 | + schedule.setsGh(rs.getString("s_gh")); | ||
| 78 | + schedule.setsName(rs.getString("s_name")); | ||
| 79 | + schedule.setSpId(rs.getLong("sp_id")); | ||
| 80 | + return schedule; | ||
| 81 | + } | ||
| 82 | + }); | ||
| 83 | + | ||
| 84 | + } catch (Exception e) { | ||
| 85 | + // TODO: handle exception | ||
| 86 | + e.printStackTrace(); | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + return list; | ||
| 90 | + } | ||
| 91 | + | ||
| 40 | @Override | 92 | @Override |
| 41 | - public List<Map<String, Object>> queryPeopleCar(String line, String date, String type) { | 93 | + public List<Map<String, Object>> queryPeopleCar(Map<String, Object> map) { |
| 42 | Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); | 94 | Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); |
| 43 | Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>(); | 95 | Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>(); |
| 44 | List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>(); | 96 | List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>(); |
| 45 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 97 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 46 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); | 98 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 47 | 99 | ||
| 100 | + String company = map.get("company").toString(); | ||
| 101 | + String subCompany = map.get("subCompany").toString(); | ||
| 102 | + String line = map.get("line").toString(); | ||
| 103 | + String date = map.get("date").toString(); | ||
| 104 | + String type = map.get("type").toString(); | ||
| 105 | + | ||
| 48 | if(date.length() == 0){ | 106 | if(date.length() == 0){ |
| 49 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 107 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 50 | } | 108 | } |
| @@ -55,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -55,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 55 | if(line.length() != 0){ | 113 | if(line.length() != 0){ |
| 56 | sql += " and xl_bm = '"+line+"'"; | 114 | sql += " and xl_bm = '"+line+"'"; |
| 57 | } | 115 | } |
| 116 | + if(company.length() != 0){ | ||
| 117 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 118 | + } | ||
| 58 | 119 | ||
| 59 | list =jdbcTemplate.query(sql, | 120 | list =jdbcTemplate.query(sql, |
| 60 | new RowMapper<SchedulePlanInfo>(){ | 121 | new RowMapper<SchedulePlanInfo>(){ |
| @@ -69,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -69,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 69 | schedule.setjName(rs.getString("j_name")); | 130 | schedule.setjName(rs.getString("j_name")); |
| 70 | schedule.setsName(rs.getString("s_name")); | 131 | schedule.setsName(rs.getString("s_name")); |
| 71 | schedule.setJhlc(rs.getDouble("jhlc")); | 132 | schedule.setJhlc(rs.getDouble("jhlc")); |
| 133 | + schedule.setGsName(rs.getString("gs_name")); | ||
| 134 | + schedule.setFgsName(rs.getString("fgs_name")); | ||
| 72 | return schedule; | 135 | return schedule; |
| 73 | } | 136 | } |
| 74 | }); | 137 | }); |
| @@ -90,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -90,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 90 | for(String key : keyMap.keySet()){ | 153 | for(String key : keyMap.keySet()){ |
| 91 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 154 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 92 | BigDecimal jhlc = new BigDecimal(0); | 155 | BigDecimal jhlc = new BigDecimal(0); |
| 156 | + String companyName = "", subCompanyName = ""; | ||
| 93 | for(SchedulePlanInfo schedule : keyMap.get(key)){ | 157 | for(SchedulePlanInfo schedule : keyMap.get(key)){ |
| 158 | + if(schedule.getGsName() != null && companyName.length() == 0) | ||
| 159 | + companyName = schedule.getGsName(); | ||
| 160 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 161 | + subCompanyName = schedule.getFgsName(); | ||
| 94 | if(schedule.getJhlc() != null) | 162 | if(schedule.getJhlc() != null) |
| 95 | jhlc = jhlc.add(new BigDecimal(schedule.getJhlc())); | 163 | jhlc = jhlc.add(new BigDecimal(schedule.getJhlc())); |
| 96 | } | 164 | } |
| @@ -101,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -101,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 101 | tempMap.put("clzbh", split[2]); | 169 | tempMap.put("clzbh", split[2]); |
| 102 | tempMap.put("jName", split[3]); | 170 | tempMap.put("jName", split[3]); |
| 103 | tempMap.put("sName", split[4]); | 171 | tempMap.put("sName", split[4]); |
| 172 | + tempMap.put("company", companyName); | ||
| 173 | + tempMap.put("subCompany", subCompanyName); | ||
| 104 | if(split[4].equals("null")) | 174 | if(split[4].equals("null")) |
| 105 | tempMap.put("sName", "/"); | 175 | tempMap.put("sName", "/"); |
| 106 | tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP)); | 176 | tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP)); |
| @@ -117,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -117,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 117 | Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>(); | 187 | Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>(); |
| 118 | List<Integer> keyList = new ArrayList<Integer>(); | 188 | List<Integer> keyList = new ArrayList<Integer>(); |
| 119 | for(Map<String, Object> m : temp.get(key)){ | 189 | for(Map<String, Object> m : temp.get(key)){ |
| 120 | - int i = Integer.valueOf(m.get("lp").toString()); | 190 | + String lp = m.get("lp").toString(); |
| 191 | + String str = ""; | ||
| 192 | + for(int i = 0; i < lp.length(); i++){ | ||
| 193 | + str += (int)lp.charAt(i); | ||
| 194 | + } | ||
| 195 | + int i = Integer.valueOf(str); | ||
| 121 | if(!tempList.containsKey(i)) | 196 | if(!tempList.containsKey(i)) |
| 122 | tempList.put(i, new ArrayList<Map<String, Object>>()); | 197 | tempList.put(i, new ArrayList<Map<String, Object>>()); |
| 123 | tempList.get(i).add(m); | 198 | tempList.get(i).add(m); |
| @@ -135,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -135,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 135 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 210 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 136 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 211 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 137 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 212 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 138 | - Map<String,Object> map = new HashMap<String, Object>(); | 213 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 139 | ReportUtils ee = new ReportUtils(); | 214 | ReportUtils ee = new ReportUtils(); |
| 140 | try { | 215 | try { |
| 141 | listI.add(resList.iterator()); | 216 | listI.add(resList.iterator()); |
| 142 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 217 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 143 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\peoCarPlan.xls", | 218 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\peoCarPlan.xls", |
| 144 | path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | 219 | path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); |
| 145 | } catch (Exception e) { | 220 | } catch (Exception e) { |
| 146 | // TODO: handle exception | 221 | // TODO: handle exception |
| @@ -152,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -152,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 152 | } | 227 | } |
| 153 | 228 | ||
| 154 | @Override | 229 | @Override |
| 155 | - public List<Map<String, Object>> workDaily(String line, String date, String type) { | 230 | + public List<Map<String, Object>> workDaily(Map<String, Object> map) { |
| 156 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 231 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 157 | DecimalFormat df = new DecimalFormat("###0.##"); | 232 | DecimalFormat df = new DecimalFormat("###0.##"); |
| 233 | + | ||
| 234 | + String company = map.get("company").toString(); | ||
| 235 | + String subCompany = map.get("subCompany").toString(); | ||
| 236 | + String line = map.get("line").toString(); | ||
| 237 | + String date = map.get("date").toString(); | ||
| 238 | + String type = map.get("type").toString(); | ||
| 239 | + | ||
| 158 | if(date.length() == 0){ | 240 | if(date.length() == 0){ |
| 159 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 241 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 160 | } | 242 | } |
| 161 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 162 | - if(line.length() != 0) | ||
| 163 | - list = scheduleRealInfoRepository.scheduleDaily(line, date); | ||
| 164 | - else | ||
| 165 | - list = scheduleRealInfoRepository.findByDate(date); | 243 | + |
| 244 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); | ||
| 245 | + | ||
| 166 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 246 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 167 | for(ScheduleRealInfo schedule : list){ | 247 | for(ScheduleRealInfo schedule : list){ |
| 168 | String key = schedule.getXlName(); | 248 | String key = schedule.getXlName(); |
| @@ -179,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -179,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 179 | Long wgfEnd = 0l; | 259 | Long wgfEnd = 0l; |
| 180 | try { | 260 | try { |
| 181 | //早晚高峰时段 | 261 | //早晚高峰时段 |
| 182 | - zgfBegin = sdf.parse(date + "07:30").getTime(); | ||
| 183 | - zgfEnd = sdf.parse(date + "09:30").getTime(); | ||
| 184 | - wgfBegin = sdf.parse(date + "16:30").getTime(); | ||
| 185 | - wgfEnd = sdf.parse(date + "18:30").getTime(); | 262 | + zgfBegin = sdf.parse(date + "06:30").getTime(); |
| 263 | + zgfEnd = sdf.parse(date + "08:30").getTime(); | ||
| 264 | + wgfBegin = sdf.parse(date + "16:00").getTime(); | ||
| 265 | + wgfEnd = sdf.parse(date + "18:00").getTime(); | ||
| 186 | } catch (ParseException e) { | 266 | } catch (ParseException e) { |
| 187 | // TODO Auto-generated catch block | 267 | // TODO Auto-generated catch block |
| 188 | e.printStackTrace(); | 268 | e.printStackTrace(); |
| @@ -190,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -190,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 190 | for(String key : keyMap.keySet()){ | 270 | for(String key : keyMap.keySet()){ |
| 191 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 271 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 192 | Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>(); | 272 | Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>(); |
| 193 | - int jhbc = 0; | ||
| 194 | - int dftz = 0; | ||
| 195 | - int jhcc = 0; | ||
| 196 | - int sjcc = 0; | ||
| 197 | - int upfk = 0; | ||
| 198 | - int updk = 0; | ||
| 199 | - int dnfk = 0; | ||
| 200 | - int dndk = 0; | ||
| 201 | - int upfm = 0; | ||
| 202 | - int updm = 0; | ||
| 203 | - int dnfm = 0; | ||
| 204 | - int dndm = 0; | ||
| 205 | - int jhsb = 0; | ||
| 206 | - int sjsb = 0; | ||
| 207 | - int jhmb = 0; | ||
| 208 | - int sjmb = 0; | ||
| 209 | - int jhzgf = 0; | ||
| 210 | - int sjzgf = 0; | ||
| 211 | - int jhwgf = 0; | ||
| 212 | - int sjwgf = 0; | 273 | + int jhbc = 0, dftz = 0, jhcc = 0, sjcc = 0; |
| 274 | + int upfk = 0, updk = 0, dnfk = 0, dndk = 0; | ||
| 275 | + int upfm = 0, updm = 0, dnfm = 0, dndm = 0; | ||
| 276 | + int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0; | ||
| 277 | + int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0; | ||
| 213 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 278 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 214 | schedule.setFcsjAll(schedule.getFcsj()); | 279 | schedule.setFcsjAll(schedule.getFcsj()); |
| 215 | 280 | ||
| @@ -334,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -334,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 334 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 399 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 335 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 400 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 336 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 401 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 337 | - Map<String,Object> map = new HashMap<String, Object>(); | 402 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 338 | ReportUtils ee = new ReportUtils(); | 403 | ReportUtils ee = new ReportUtils(); |
| 339 | try { | 404 | try { |
| 340 | listI.add(resList.iterator()); | 405 | listI.add(resList.iterator()); |
| 341 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 406 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 342 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\workDaily.xls", | 407 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\workDaily.xls", |
| 343 | path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | 408 | path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); |
| 344 | } catch (Exception e) { | 409 | } catch (Exception e) { |
| 345 | // TODO: handle exception | 410 | // TODO: handle exception |
| @@ -351,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -351,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 351 | } | 416 | } |
| 352 | 417 | ||
| 353 | @Override | 418 | @Override |
| 354 | - public Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type) { | 419 | + public Map<String, Object> scheduleAnaly(Map<String, Object> map) { |
| 355 | DecimalFormat df = new DecimalFormat("00"); | 420 | DecimalFormat df = new DecimalFormat("00"); |
| 356 | - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); | 421 | +// List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); |
| 422 | + List<Long> ttList = new ArrayList<Long>(); | ||
| 357 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 423 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 358 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 424 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 359 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | 425 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); |
| 360 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 426 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 361 | Map<String, Object> modelMap = new HashMap<String, Object>(); | 427 | Map<String, Object> modelMap = new HashMap<String, Object>(); |
| 362 | 428 | ||
| 429 | + String company = map.get("company").toString(); | ||
| 430 | + String subCompany = map.get("subCompany").toString(); | ||
| 431 | + String page = map.get("page").toString(); | ||
| 432 | + String line = map.get("line").toString(); | ||
| 433 | + String startDate = map.get("startDate").toString(); | ||
| 434 | + String endDate = map.get("endDate").toString(); | ||
| 435 | + String model = map.get("model").toString(); | ||
| 436 | + String type = map.get("type").toString(); | ||
| 437 | + | ||
| 363 | if(startDate.length() == 0){ | 438 | if(startDate.length() == 0){ |
| 364 | startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 439 | startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 365 | } | 440 | } |
| @@ -372,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -372,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 372 | if(line.length() != 0){ | 447 | if(line.length() != 0){ |
| 373 | sql += " and xl_bm = '"+line+"'"; | 448 | sql += " and xl_bm = '"+line+"'"; |
| 374 | } | 449 | } |
| 450 | + if(company.length() != 0){ | ||
| 451 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 452 | + } | ||
| 375 | sql += " and bc_type = 'normal'"; | 453 | sql += " and bc_type = 'normal'"; |
| 376 | 454 | ||
| 377 | list =jdbcTemplate.query(sql, | 455 | list =jdbcTemplate.query(sql, |
| @@ -390,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -390,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 390 | schedule.setZdsjActual(rs.getString("zdsj_actual")); | 468 | schedule.setZdsjActual(rs.getString("zdsj_actual")); |
| 391 | schedule.setBcsj(rs.getInt("bcsj")); | 469 | schedule.setBcsj(rs.getInt("bcsj")); |
| 392 | schedule.setQdzName(rs.getString("qdz_name")); | 470 | schedule.setQdzName(rs.getString("qdz_name")); |
| 471 | + schedule.setSpId(rs.getLong("sp_id")); | ||
| 393 | return schedule; | 472 | return schedule; |
| 394 | } | 473 | } |
| 395 | }); | 474 | }); |
| 396 | 475 | ||
| 397 | if(model.length() != 0){ | 476 | if(model.length() != 0){ |
| 398 | - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; | ||
| 399 | - } | 477 | +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; |
| 478 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'"; | ||
| 400 | 479 | ||
| 401 | - ttList =jdbcTemplate.query(sql, | ||
| 402 | - new RowMapper<TTInfoDetail>(){ | ||
| 403 | - @Override | ||
| 404 | - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 405 | - TTInfoDetail ttInfo = new TTInfoDetail(); | ||
| 406 | - ttInfo.setBcType(rs.getString("bc_type")); | ||
| 407 | - ttInfo.setBcs(rs.getInt("bcs")); | ||
| 408 | - ttInfo.setFcno(rs.getInt("fcno")); | ||
| 409 | - ttInfo.setFcsj(rs.getString("fcsj")); | ||
| 410 | - ttInfo.setBcsj(rs.getInt("bcsj")); | ||
| 411 | - return ttInfo; | ||
| 412 | - } | ||
| 413 | - }); | 480 | + ttList = jdbcTemplate.query(sql, |
| 481 | + new RowMapper<Long>(){ | ||
| 482 | + @Override | ||
| 483 | + public Long mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 484 | + return rs.getLong("id"); | ||
| 485 | + } | ||
| 486 | + }); | ||
| 487 | + | ||
| 488 | + } | ||
| 414 | 489 | ||
| 415 | } catch (Exception e) { | 490 | } catch (Exception e) { |
| 416 | // TODO Auto-generated catch block | 491 | // TODO Auto-generated catch block |
| @@ -421,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -421,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 421 | for(ScheduleRealInfo schedule : list){ | 496 | for(ScheduleRealInfo schedule : list){ |
| 422 | DO:{ | 497 | DO:{ |
| 423 | if(model.length() != 0){ | 498 | if(model.length() != 0){ |
| 424 | - for(TTInfoDetail tt : ttList){ | ||
| 425 | - if(tt.getBcs() == schedule.getBcs() && tt.getFcno() == schedule.getFcno() | ||
| 426 | - && tt.getFcsj().equals(schedule.getFcsj()) && tt.getBcsj() == schedule.getBcsj()){ | 499 | + for(Long tt : ttList){ |
| 500 | + if(tt == schedule.getSpId()){ | ||
| 427 | String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); | 501 | String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); |
| 428 | if(!keyMap.containsKey(key)) | 502 | if(!keyMap.containsKey(key)) |
| 429 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | 503 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| @@ -534,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -534,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 534 | } | 608 | } |
| 535 | Collections.sort(keyList); | 609 | Collections.sort(keyList); |
| 536 | for(Integer Int : keyList){ | 610 | for(Integer Int : keyList){ |
| 537 | - Map<String, Object> map = tempMap.get(Int); | ||
| 538 | - String str = map.get("line").toString(); | 611 | + Map<String, Object> m = tempMap.get(Int); |
| 612 | + String str = m.get("line").toString(); | ||
| 539 | if(!listMap2.containsKey(str)) | 613 | if(!listMap2.containsKey(str)) |
| 540 | listMap2.put(str, new ArrayList<Map<String, Object>>()); | 614 | listMap2.put(str, new ArrayList<Map<String, Object>>()); |
| 541 | - listMap2.get(str).add(map); | 615 | + listMap2.get(str).add(m); |
| 542 | } | 616 | } |
| 543 | } | 617 | } |
| 544 | for(String str : listMap2.keySet()){ | 618 | for(String str : listMap2.keySet()){ |
| 545 | - for(Map<String, Object> map : listMap2.get(str)){ | ||
| 546 | - resList.add(map); | 619 | + for(Map<String, Object> m : listMap2.get(str)){ |
| 620 | + resList.add(m); | ||
| 547 | } | 621 | } |
| 548 | } | 622 | } |
| 549 | 623 | ||
| @@ -561,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -561,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 561 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 635 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 562 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 636 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 563 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 637 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 564 | - Map<String,Object> map = new HashMap<String, Object>(); | 638 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 565 | ReportUtils ee = new ReportUtils(); | 639 | ReportUtils ee = new ReportUtils(); |
| 566 | try { | 640 | try { |
| 567 | listI.add(resList.iterator()); | 641 | listI.add(resList.iterator()); |
| 568 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 642 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 569 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\scheduleAnaly.xls", | 643 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\scheduleAnaly.xls", |
| 570 | path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); | 644 | path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); |
| 571 | } catch (Exception e) { | 645 | } catch (Exception e) { |
| 572 | // TODO: handle exception | 646 | // TODO: handle exception |
| @@ -578,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -578,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 578 | } | 652 | } |
| 579 | 653 | ||
| 580 | @Override | 654 | @Override |
| 581 | - public List<Map<String, Object>> getModel(String line, String startDate, String endDate) { | 655 | + public List<Map<String, Object>> getModel(Map<String, Object> map) { |
| 582 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 656 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 583 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 657 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 584 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 658 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 585 | SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE"); | 659 | SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE"); |
| 586 | 660 | ||
| 661 | + String line = map.get("line").toString(); | ||
| 662 | + String startDate = map.get("startDate").toString(); | ||
| 663 | + String endDate = map.get("endDate").toString(); | ||
| 664 | + | ||
| 587 | if(startDate.length() == 0){ | 665 | if(startDate.length() == 0){ |
| 588 | startDate = sdf.format(new Date()); | 666 | startDate = sdf.format(new Date()); |
| 589 | } | 667 | } |
| @@ -650,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -650,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 650 | ruleDays1.add(6); | 728 | ruleDays1.add(6); |
| 651 | specialDays1.add(sdf.format(tempDate)); | 729 | specialDays1.add(sdf.format(tempDate)); |
| 652 | } | 730 | } |
| 653 | - for(Map<String, Object> map : list){ | ||
| 654 | - String[] ruleDays = map.get("ruleDays").toString().split(","); | ||
| 655 | - String[] specialDays = map.get("specialDays").toString().split(","); | 731 | + for(Map<String, Object> m : list){ |
| 732 | + String[] ruleDays = m.get("ruleDays").toString().split(","); | ||
| 733 | + String[] specialDays = m.get("specialDays").toString().split(","); | ||
| 656 | boolean flag = false; | 734 | boolean flag = false; |
| 657 | DO:{ | 735 | DO:{ |
| 658 | try { | 736 | try { |
| 659 | - long qyrq = sdf.parse(map.get("qyrq").toString()).getTime(); | 737 | + long qyrq = sdf.parse(m.get("qyrq").toString()).getTime(); |
| 660 | if(qyrq > date2.getTime()) | 738 | if(qyrq > date2.getTime()) |
| 661 | break; | 739 | break; |
| 662 | } catch (ParseException e) { | 740 | } catch (ParseException e) { |
| @@ -681,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -681,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 681 | } | 759 | } |
| 682 | } | 760 | } |
| 683 | if(flag) | 761 | if(flag) |
| 684 | - resList.add(map); | 762 | + resList.add(m); |
| 685 | } | 763 | } |
| 686 | 764 | ||
| 687 | return resList; | 765 | return resList; |
| 688 | } | 766 | } |
| 689 | 767 | ||
| 690 | @Override | 768 | @Override |
| 691 | - public List<Map<String, Object>> firstAndLastBus(String line, String date, String type) { | ||
| 692 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 769 | + public List<Map<String, Object>> firstAndLastBus(Map<String, Object> map) { |
| 693 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 770 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 694 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 771 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 695 | 772 | ||
| 773 | + String company = map.get("company").toString(); | ||
| 774 | + String subCompany = map.get("subCompany").toString(); | ||
| 775 | + String line = map.get("line").toString(); | ||
| 776 | + String date = map.get("date").toString(); | ||
| 777 | + String type = map.get("type").toString(); | ||
| 778 | + | ||
| 696 | if(date.length() == 0) | 779 | if(date.length() == 0) |
| 697 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 780 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 698 | - if(line.length() != 0) | ||
| 699 | - list = scheduleRealInfoRepository.scheduleDaily(line, date); | ||
| 700 | - else | ||
| 701 | - list = scheduleRealInfoRepository.findByDate(date); | 781 | + |
| 782 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); | ||
| 702 | 783 | ||
| 703 | for(ScheduleRealInfo schedule : list){ | 784 | for(ScheduleRealInfo schedule : list){ |
| 704 | if(!schedule.getBcType().equals("normal")) | 785 | if(!schedule.getBcType().equals("normal")) |
| @@ -714,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -714,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 714 | List<Long> longList0 = new ArrayList<Long>(); | 795 | List<Long> longList0 = new ArrayList<Long>(); |
| 715 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); | 796 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); |
| 716 | List<Long> longList1 = new ArrayList<Long>(); | 797 | List<Long> longList1 = new ArrayList<Long>(); |
| 717 | - String company = "", subCompany = ""; | 798 | + String companyName = "", subCompanyName = ""; |
| 718 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 799 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 719 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 720 | - company = schedule.getGsName(); | ||
| 721 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 722 | - subCompany = schedule.getFgsName(); | 800 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 801 | + companyName = schedule.getGsName(); | ||
| 802 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 803 | + subCompanyName = schedule.getFgsName(); | ||
| 723 | String[] split = schedule.getFcsj().split(":"); | 804 | String[] split = schedule.getFcsj().split(":"); |
| 724 | long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | 805 | long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 725 | schedule.setFcsjT(min); | 806 | schedule.setFcsjT(min); |
| @@ -738,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -738,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 738 | ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | 819 | ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); |
| 739 | ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | 820 | ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); |
| 740 | tempMap.put("date", date); | 821 | tempMap.put("date", date); |
| 741 | - tempMap.put("company", company); | ||
| 742 | - tempMap.put("subCompany", subCompany); | 822 | + tempMap.put("company", companyName); |
| 823 | + tempMap.put("subCompany", subCompanyName); | ||
| 743 | tempMap.put("line", key); | 824 | tempMap.put("line", key); |
| 744 | tempMap.put("qdzFirst0", shouban0.getQdzName()); | 825 | tempMap.put("qdzFirst0", shouban0.getQdzName()); |
| 745 | tempMap.put("jhfcFirst0", shouban0.getFcsj()); | 826 | tempMap.put("jhfcFirst0", shouban0.getFcsj()); |
| @@ -808,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -808,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 808 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 889 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 809 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 890 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 810 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 891 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 811 | - Map<String,Object> map = new HashMap<String, Object>(); | 892 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 812 | ReportUtils ee = new ReportUtils(); | 893 | ReportUtils ee = new ReportUtils(); |
| 813 | try { | 894 | try { |
| 814 | listI.add(resList.iterator()); | 895 | listI.add(resList.iterator()); |
| 815 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 896 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 816 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\firstAndLastBus.xls", | 897 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\firstAndLastBus.xls", |
| 817 | path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | 898 | path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); |
| 818 | } catch (Exception e) { | 899 | } catch (Exception e) { |
| 819 | // TODO: handle exception | 900 | // TODO: handle exception |
| @@ -825,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -825,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 825 | } | 906 | } |
| 826 | 907 | ||
| 827 | @Override | 908 | @Override |
| 828 | - public List<Map<String, Object>> commandState(String line, String date, String code) { | 909 | + public List<Map<String, Object>> commandState(Map<String, Object> map) { |
| 829 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 910 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 830 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 911 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 831 | Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); | 912 | Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); |
| 832 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); | 913 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); |
| 914 | + | ||
| 915 | + String company = map.get("company").toString(); | ||
| 916 | + String subCompany = map.get("subCompany").toString(); | ||
| 917 | + String line = map.get("line").toString(); | ||
| 918 | + String date = map.get("date").toString(); | ||
| 919 | + String code = map.get("code").toString(); | ||
| 833 | 920 | ||
| 834 | if(date.length() == 0) | 921 | if(date.length() == 0) |
| 835 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 922 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 836 | 923 | ||
| 837 | try { | 924 | try { |
| 838 | 925 | ||
| 839 | - String sql = "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + | 926 | + String sql = |
| 927 | + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " + | ||
| 840 | "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; | 928 | "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; |
| 841 | if(line.length() != 0){ | 929 | if(line.length() != 0){ |
| 842 | sql += " and xl_bm = '"+line+"'"; | 930 | sql += " and xl_bm = '"+line+"'"; |
| @@ -844,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -844,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 844 | if(code.length() != 0){ | 932 | if(code.length() != 0){ |
| 845 | sql += " and cl_zbh = '"+code+"'"; | 933 | sql += " and cl_zbh = '"+code+"'"; |
| 846 | } | 934 | } |
| 935 | + if(company.length() != 0){ | ||
| 936 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 937 | + } | ||
| 847 | sql += " union " + | 938 | sql += " union " + |
| 848 | - "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + | 939 | + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " + |
| 849 | "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; | 940 | "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; |
| 850 | if(line.length() != 0){ | 941 | if(line.length() != 0){ |
| 851 | sql += " and xl_bm = '"+line+"'"; | 942 | sql += " and xl_bm = '"+line+"'"; |
| @@ -853,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -853,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 853 | if(code.length() != 0){ | 944 | if(code.length() != 0){ |
| 854 | sql += " and cl_zbh = '"+code+"'"; | 945 | sql += " and cl_zbh = '"+code+"'"; |
| 855 | } | 946 | } |
| 947 | + if(company.length() != 0){ | ||
| 948 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 949 | + } | ||
| 856 | sql += " order by fcsj"; | 950 | sql += " order by fcsj"; |
| 857 | 951 | ||
| 858 | list = jdbcTemplate.query(sql, | 952 | list = jdbcTemplate.query(sql, |
| @@ -872,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -872,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 872 | map.put("reply47", rs.getString("reply47")); | 966 | map.put("reply47", rs.getString("reply47")); |
| 873 | map.put("reply46time", rs.getString("reply46time")); | 967 | map.put("reply46time", rs.getString("reply46time")); |
| 874 | map.put("reply47time", rs.getString("reply47time")); | 968 | map.put("reply47time", rs.getString("reply47time")); |
| 969 | + map.put("company", rs.getObject("gs_name")); | ||
| 970 | + map.put("subCompany", rs.getObject("fgs_name")); | ||
| 875 | return map; | 971 | return map; |
| 876 | } | 972 | } |
| 877 | }); | 973 | }); |
| @@ -881,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -881,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 881 | e.printStackTrace(); | 977 | e.printStackTrace(); |
| 882 | } | 978 | } |
| 883 | 979 | ||
| 884 | - for(Map<String, Object> map : list){ | ||
| 885 | - String key = map.get("line") + "/" + map.get("clZbh") + "/" + map.get("jGh") + "/" + map.get("jName"); | 980 | + for(Map<String, Object> m : list){ |
| 981 | + String key = m.get("line") + "/" + m.get("clZbh") + "/" + m.get("jGh") + "/" + m.get("jName"); | ||
| 886 | if(!keyMap.containsKey(key)) | 982 | if(!keyMap.containsKey(key)) |
| 887 | keyMap.put(key, new ArrayList<Map<String, Object>>()); | 983 | keyMap.put(key, new ArrayList<Map<String, Object>>()); |
| 888 | - keyMap.get(key).add(map); | 984 | + keyMap.get(key).add(m); |
| 889 | } | 985 | } |
| 890 | for(String key : keyMap.keySet()){ | 986 | for(String key : keyMap.keySet()){ |
| 891 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 987 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 892 | Set<String> tempSet = new HashSet<String>(); | 988 | Set<String> tempSet = new HashSet<String>(); |
| 893 | int sjf = 0; | 989 | int sjf = 0; |
| 894 | int wqr = 0; | 990 | int wqr = 0; |
| 895 | - for(Map<String, Object> map : keyMap.get(key)){ | ||
| 896 | - tempSet.add(map.get("id").toString()); | ||
| 897 | - if(map.get("timestamp") != null){ | 991 | + String companyName = "", subCompanyName = ""; |
| 992 | + for(Map<String, Object> m : keyMap.get(key)){ | ||
| 993 | + if(m.containsKey("company") && m.get("company").toString().length()!=0 && companyName.length()==0) | ||
| 994 | + companyName = m.get("company").toString(); | ||
| 995 | + if(m.containsKey("subCompany") && m.get("subCompany").toString().length()!=0 && subCompanyName.length()==0) | ||
| 996 | + subCompanyName = m.get("subCompany").toString(); | ||
| 997 | + tempSet.add(m.get("id").toString()); | ||
| 998 | + if(m.get("timestamp") != null){ | ||
| 898 | sjf++; | 999 | sjf++; |
| 899 | - if(map.get("reply47").toString().equals("-1")) | 1000 | + if(m.get("reply47").toString().equals("-1")) |
| 900 | wqr++; | 1001 | wqr++; |
| 901 | - map.put("time", sdf.format(new Date(Long.valueOf(map.get("timestamp").toString())))); | 1002 | + m.put("time", sdf.format(new Date(Long.valueOf(m.get("timestamp").toString())))); |
| 902 | } else | 1003 | } else |
| 903 | - map.put("time", "/"); | 1004 | + m.put("time", "/"); |
| 904 | 1005 | ||
| 905 | - if(map.get("reply46time") != null) | ||
| 906 | - map.put("time46", sdf.format(new Date(Long.valueOf(map.get("reply46time").toString())))); | 1006 | + if(m.get("reply46time") != null) |
| 1007 | + m.put("time46", sdf.format(new Date(Long.valueOf(m.get("reply46time").toString())))); | ||
| 907 | else | 1008 | else |
| 908 | - map.put("time46", "/"); | 1009 | + m.put("time46", "/"); |
| 909 | 1010 | ||
| 910 | - if(map.get("reply47time") != null) | ||
| 911 | - map.put("time47", sdf.format(new Date(Long.valueOf(map.get("reply47time").toString())))); | 1011 | + if(m.get("reply47time") != null) |
| 1012 | + m.put("time47", sdf.format(new Date(Long.valueOf(m.get("reply47time").toString())))); | ||
| 912 | else | 1013 | else |
| 913 | - map.put("time47", "/"); | 1014 | + m.put("time47", "/"); |
| 914 | 1015 | ||
| 915 | } | 1016 | } |
| 1017 | + tempMap.put("company", companyName); | ||
| 1018 | + tempMap.put("subCompany", subCompanyName); | ||
| 916 | String[] split = key.split("/"); | 1019 | String[] split = key.split("/"); |
| 917 | tempMap.put("date", date); | 1020 | tempMap.put("date", date); |
| 918 | tempMap.put("line", split[0]); | 1021 | tempMap.put("line", split[0]); |
src/main/resources/static/pages/forms/statement/busInterval.html
| @@ -128,13 +128,13 @@ | @@ -128,13 +128,13 @@ | ||
| 128 | var year = d.getFullYear(); | 128 | var year = d.getFullYear(); |
| 129 | var month = d.getMonth() + 1; | 129 | var month = d.getMonth() + 1; |
| 130 | var day = d.getDate(); | 130 | var day = d.getDate(); |
| 131 | - if(month > 9){ | ||
| 132 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 133 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 134 | - } else { | ||
| 135 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 136 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 137 | - } | 131 | + if(month < 10) |
| 132 | + month = "0" + month; | ||
| 133 | + if(day < 10) | ||
| 134 | + day = "0" + day; | ||
| 135 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 136 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 137 | + | ||
| 138 | $("#times1").val("06:00"); | 138 | $("#times1").val("06:00"); |
| 139 | $("#times2").val("07:00"); | 139 | $("#times2").val("07:00"); |
| 140 | 140 | ||
| @@ -227,6 +227,8 @@ | @@ -227,6 +227,8 @@ | ||
| 227 | var endDate = $("#endDate").val(); | 227 | var endDate = $("#endDate").val(); |
| 228 | var model = $("#model").val(); | 228 | var model = $("#model").val(); |
| 229 | var times = $("#times1").val() + "-" + $("#times2").val(); | 229 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 230 | + var company = $("#company").val(); | ||
| 231 | + var subCompany = $("#subCompany").val(); | ||
| 230 | function jsDoQuery(pagination){ | 232 | function jsDoQuery(pagination){ |
| 231 | var params = {}; | 233 | var params = {}; |
| 232 | // line = $("#line").val(); | 234 | // line = $("#line").val(); |
| @@ -234,11 +236,15 @@ | @@ -234,11 +236,15 @@ | ||
| 234 | endDate = $("#endDate").val(); | 236 | endDate = $("#endDate").val(); |
| 235 | model = $("#model").val(); | 237 | model = $("#model").val(); |
| 236 | times = $("#times1").val() + "-" + $("#times2").val(); | 238 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 239 | + company = $("#company").val(); | ||
| 240 | + subCompany = $("#subCompany").val(); | ||
| 237 | params['line'] = line; | 241 | params['line'] = line; |
| 238 | params['startDate'] = startDate; | 242 | params['startDate'] = startDate; |
| 239 | params['endDate'] = endDate; | 243 | params['endDate'] = endDate; |
| 240 | params['model'] = model; | 244 | params['model'] = model; |
| 241 | params['times'] = times; | 245 | params['times'] = times; |
| 246 | + params['company'] = company; | ||
| 247 | + params['subCompany'] = subCompany; | ||
| 242 | params['type'] = "query"; | 248 | params['type'] = "query"; |
| 243 | $(".hidden").removeClass("hidden"); | 249 | $(".hidden").removeClass("hidden"); |
| 244 | $get('/busInterval/interval', params, function(result){ | 250 | $get('/busInterval/interval', params, function(result){ |
src/main/resources/static/pages/forms/statement/commandState.html
| @@ -60,6 +60,8 @@ | @@ -60,6 +60,8 @@ | ||
| 60 | <thead> | 60 | <thead> |
| 61 | <tr class="hidden"> | 61 | <tr class="hidden"> |
| 62 | <th>日期</th> | 62 | <th>日期</th> |
| 63 | + <th>公司</th> | ||
| 64 | + <th>分公司</th> | ||
| 63 | <th>线路</th> | 65 | <th>线路</th> |
| 64 | <th>车辆</th> | 66 | <th>车辆</th> |
| 65 | <th>人员</th> | 67 | <th>人员</th> |
| @@ -125,18 +127,20 @@ | @@ -125,18 +127,20 @@ | ||
| 125 | var year = d.getFullYear(); | 127 | var year = d.getFullYear(); |
| 126 | var month = d.getMonth() + 1; | 128 | var month = d.getMonth() + 1; |
| 127 | var day = d.getDate(); | 129 | var day = d.getDate(); |
| 128 | - if(month > 9){ | ||
| 129 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 130 | - } else { | ||
| 131 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 132 | - } | 130 | + if(month < 10) |
| 131 | + month = "0" + month; | ||
| 132 | + if(day < 10) | ||
| 133 | + day = "0" + day; | ||
| 134 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 133 | 135 | ||
| 134 | $.get('/basic/lineCode2Name',function(result){ | 136 | $.get('/basic/lineCode2Name',function(result){ |
| 135 | var data=[]; | 137 | var data=[]; |
| 136 | 138 | ||
| 139 | + data.push({id: "", text: "全部线路"}); | ||
| 137 | for(var code in result){ | 140 | for(var code in result){ |
| 138 | data.push({id: code, text: result[code]}); | 141 | data.push({id: code, text: result[code]}); |
| 139 | } | 142 | } |
| 143 | + | ||
| 140 | console.log(data); | 144 | console.log(data); |
| 141 | initPinYinSelect2('#line',data,''); | 145 | initPinYinSelect2('#line',data,''); |
| 142 | }) | 146 | }) |
| @@ -215,9 +219,14 @@ | @@ -215,9 +219,14 @@ | ||
| 215 | 219 | ||
| 216 | function jsDoQuery(pagination){ | 220 | function jsDoQuery(pagination){ |
| 217 | var params = {}; | 221 | var params = {}; |
| 218 | - params['line'] = $("#line").val(); | 222 | + var line = $("#line").val(); |
| 223 | + if(line = " ") | ||
| 224 | + line = ""; | ||
| 225 | + params['line'] = line; | ||
| 219 | params['date'] = $("#date").val(); | 226 | params['date'] = $("#date").val(); |
| 220 | params['code'] = $("#code").val(); | 227 | params['code'] = $("#code").val(); |
| 228 | + params['company'] = $("#company").val(); | ||
| 229 | + params['subCompany'] = $("#subCompany").val(); | ||
| 221 | $("#forms .hidden").removeClass("hidden"); | 230 | $("#forms .hidden").removeClass("hidden"); |
| 222 | $get('/pcpc/commandState', params, function(result){ | 231 | $get('/pcpc/commandState', params, function(result){ |
| 223 | // 把数据填充到模版中 | 232 | // 把数据填充到模版中 |
| @@ -260,6 +269,8 @@ | @@ -260,6 +269,8 @@ | ||
| 260 | {{each list as obj i}} | 269 | {{each list as obj i}} |
| 261 | <tr> | 270 | <tr> |
| 262 | <td>{{obj.date}}</td> | 271 | <td>{{obj.date}}</td> |
| 272 | + <td>{{obj.company}}</td> | ||
| 273 | + <td>{{obj.subCompany}}</td> | ||
| 263 | <td>{{obj.line}}</td> | 274 | <td>{{obj.line}}</td> |
| 264 | <td>{{obj.clZbh}}</td> | 275 | <td>{{obj.clZbh}}</td> |
| 265 | <td><a id="jsy">{{obj.jsy}}</a></td> | 276 | <td><a id="jsy">{{obj.jsy}}</a></td> |
| @@ -270,7 +281,7 @@ | @@ -270,7 +281,7 @@ | ||
| 270 | {{/each}} | 281 | {{/each}} |
| 271 | {{if list.length == 0}} | 282 | {{if list.length == 0}} |
| 272 | <tr> | 283 | <tr> |
| 273 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 284 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 274 | </tr> | 285 | </tr> |
| 275 | {{/if}} | 286 | {{/if}} |
| 276 | </script> | 287 | </script> |
src/main/resources/static/pages/forms/statement/correctStatis.html
| @@ -101,7 +101,6 @@ | @@ -101,7 +101,6 @@ | ||
| 101 | <script> | 101 | <script> |
| 102 | $(function(){ | 102 | $(function(){ |
| 103 | 103 | ||
| 104 | - | ||
| 105 | // 关闭左侧栏 | 104 | // 关闭左侧栏 |
| 106 | if (!$('body').hasClass('page-sidebar-closed')) | 105 | if (!$('body').hasClass('page-sidebar-closed')) |
| 107 | $('.menu-toggler.sidebar-toggler').click(); | 106 | $('.menu-toggler.sidebar-toggler').click(); |
| @@ -127,13 +126,13 @@ | @@ -127,13 +126,13 @@ | ||
| 127 | var year = d.getFullYear(); | 126 | var year = d.getFullYear(); |
| 128 | var month = d.getMonth() + 1; | 127 | var month = d.getMonth() + 1; |
| 129 | var day = d.getDate(); | 128 | var day = d.getDate(); |
| 130 | - if(month > 9){ | ||
| 131 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 132 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 133 | - } else { | ||
| 134 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 135 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 136 | - } | 129 | + if(month < 10) |
| 130 | + month = "0" + month; | ||
| 131 | + if(day < 10) | ||
| 132 | + day = "0" + day; | ||
| 133 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 134 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 135 | + | ||
| 137 | $("#times1").val("06:00"); | 136 | $("#times1").val("06:00"); |
| 138 | $("#times2").val("07:00"); | 137 | $("#times2").val("07:00"); |
| 139 | 138 | ||
| @@ -184,8 +183,8 @@ | @@ -184,8 +183,8 @@ | ||
| 184 | 183 | ||
| 185 | $("#query").on("click",jsDoQuery); | 184 | $("#query").on("click",jsDoQuery); |
| 186 | 185 | ||
| 187 | - var company; | ||
| 188 | - var subCompany; | 186 | + var company = $("#company").val(); |
| 187 | + var subCompany = $("#subCompany").val(); | ||
| 189 | var lines; | 188 | var lines; |
| 190 | var line = $("#line").val(); | 189 | var line = $("#line").val(); |
| 191 | var startDate = $("#startDate").val(); | 190 | var startDate = $("#startDate").val(); |
| @@ -197,10 +196,14 @@ | @@ -197,10 +196,14 @@ | ||
| 197 | startDate = $("#startDate").val(); | 196 | startDate = $("#startDate").val(); |
| 198 | endDate = $("#endDate").val(); | 197 | endDate = $("#endDate").val(); |
| 199 | times = $("#times1").val() + "-" + $("#times2").val(); | 198 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 199 | + company = $("#company").val(); | ||
| 200 | + subCompany = $("#subCompany").val(); | ||
| 200 | params['line'] = line; | 201 | params['line'] = line; |
| 201 | params['startDate'] = startDate; | 202 | params['startDate'] = startDate; |
| 202 | params['endDate'] = endDate; | 203 | params['endDate'] = endDate; |
| 203 | params['times'] = times; | 204 | params['times'] = times; |
| 205 | + params['company'] = company; | ||
| 206 | + params['subCompany'] = subCompany; | ||
| 204 | params['type'] = "query"; | 207 | params['type'] = "query"; |
| 205 | // $(".hidden").removeClass("hidden"); | 208 | // $(".hidden").removeClass("hidden"); |
| 206 | $get('/busInterval/correctStatis', params, function(result){ | 209 | $get('/busInterval/correctStatis', params, function(result){ |
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
| @@ -111,15 +111,16 @@ | @@ -111,15 +111,16 @@ | ||
| 111 | var year = d.getFullYear(); | 111 | var year = d.getFullYear(); |
| 112 | var month = d.getMonth() + 1; | 112 | var month = d.getMonth() + 1; |
| 113 | var day = d.getDate(); | 113 | var day = d.getDate(); |
| 114 | - if(month > 9){ | ||
| 115 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 116 | - } else { | ||
| 117 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 118 | - } | 114 | + if(month < 10) |
| 115 | + month = "0" + month; | ||
| 116 | + if(day < 10) | ||
| 117 | + day = "0" + day; | ||
| 118 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 119 | 119 | ||
| 120 | $.get('/basic/lineCode2Name',function(result){ | 120 | $.get('/basic/lineCode2Name',function(result){ |
| 121 | var data=[]; | 121 | var data=[]; |
| 122 | 122 | ||
| 123 | + data.push({id: " ", text: "全部线路"}); | ||
| 123 | for(var code in result){ | 124 | for(var code in result){ |
| 124 | data.push({id: code, text: result[code]}); | 125 | data.push({id: code, text: result[code]}); |
| 125 | } | 126 | } |
| @@ -160,12 +161,21 @@ | @@ -160,12 +161,21 @@ | ||
| 160 | 161 | ||
| 161 | $("#query").on("click",jsDoQuery); | 162 | $("#query").on("click",jsDoQuery); |
| 162 | 163 | ||
| 164 | + var company = $("#company").val(); | ||
| 165 | + var subCompany = $("#subCompany").val(); | ||
| 163 | var line = $("#line").val(); | 166 | var line = $("#line").val(); |
| 164 | var date = $("#date").val(); | 167 | var date = $("#date").val(); |
| 165 | function jsDoQuery(pagination){ | 168 | function jsDoQuery(pagination){ |
| 166 | var params = {}; | 169 | var params = {}; |
| 170 | + company = $("#company").val(); | ||
| 171 | + subCompany = $("#subCompany").val(); | ||
| 167 | line = $("#line").val(); | 172 | line = $("#line").val(); |
| 168 | date = $("#date").val(); | 173 | date = $("#date").val(); |
| 174 | + if(line == " ") | ||
| 175 | + line = ""; | ||
| 176 | + params['company'] = company; | ||
| 177 | + params['subCompany'] = subCompany; | ||
| 178 | + params['line'] = line; | ||
| 169 | params['line'] = line; | 179 | params['line'] = line; |
| 170 | params['date'] = date; | 180 | params['date'] = date; |
| 171 | params['type'] = "query"; | 181 | params['type'] = "query"; |
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
| @@ -134,13 +134,13 @@ | @@ -134,13 +134,13 @@ | ||
| 134 | var year = d.getFullYear(); | 134 | var year = d.getFullYear(); |
| 135 | var month = d.getMonth() + 1; | 135 | var month = d.getMonth() + 1; |
| 136 | var day = d.getDate(); | 136 | var day = d.getDate(); |
| 137 | - if(month > 9){ | ||
| 138 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 139 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 140 | - } else { | ||
| 141 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 142 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 143 | - } | 137 | + if(month < 10) |
| 138 | + month = "0" + month; | ||
| 139 | + if(day < 10) | ||
| 140 | + day = "0" + day; | ||
| 141 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 142 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 143 | + | ||
| 144 | $("#times1").val("06:00"); | 144 | $("#times1").val("06:00"); |
| 145 | $("#times2").val("07:00"); | 145 | $("#times2").val("07:00"); |
| 146 | 146 | ||
| @@ -222,6 +222,8 @@ | @@ -222,6 +222,8 @@ | ||
| 222 | var endDate = $("#endDate").val(); | 222 | var endDate = $("#endDate").val(); |
| 223 | var model = $("#model").val(); | 223 | var model = $("#model").val(); |
| 224 | var times = $("#times1").val() + "-" + $("#times2").val(); | 224 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 225 | + var company = $("#company").val(); | ||
| 226 | + var subCompany = $("#subCompany").val(); | ||
| 225 | function jsDoQuery(pagination){ | 227 | function jsDoQuery(pagination){ |
| 226 | var reason = $("input[name='reason']"); | 228 | var reason = $("input[name='reason']"); |
| 227 | var params = {}; | 229 | var params = {}; |
| @@ -230,11 +232,15 @@ | @@ -230,11 +232,15 @@ | ||
| 230 | endDate = $("#endDate").val(); | 232 | endDate = $("#endDate").val(); |
| 231 | model = $("#model").val(); | 233 | model = $("#model").val(); |
| 232 | times = $("#times1").val() + "-" + $("#times2").val(); | 234 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 235 | + company = $("#company").val(); | ||
| 236 | + subCompany = $("#subCompany").val(); | ||
| 233 | params['line'] = line; | 237 | params['line'] = line; |
| 234 | params['startDate'] = startDate; | 238 | params['startDate'] = startDate; |
| 235 | params['endDate'] = endDate; | 239 | params['endDate'] = endDate; |
| 236 | params['model'] = model; | 240 | params['model'] = model; |
| 237 | params['times'] = times; | 241 | params['times'] = times; |
| 242 | + params['company'] = company; | ||
| 243 | + params['subCompany'] = subCompany; | ||
| 238 | params['type'] = "query"; | 244 | params['type'] = "query"; |
| 239 | // $(".hidden").removeClass("hidden"); | 245 | // $(".hidden").removeClass("hidden"); |
| 240 | $get('/busInterval/lbStatuAnaly', params, function(result){ | 246 | $get('/busInterval/lbStatuAnaly', params, function(result){ |
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
| @@ -192,13 +192,13 @@ | @@ -192,13 +192,13 @@ | ||
| 192 | var year = d.getFullYear(); | 192 | var year = d.getFullYear(); |
| 193 | var month = d.getMonth() + 1; | 193 | var month = d.getMonth() + 1; |
| 194 | var day = d.getDate(); | 194 | var day = d.getDate(); |
| 195 | - if(month > 9){ | ||
| 196 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 197 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 198 | - } else { | ||
| 199 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 200 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 201 | - } | 195 | + if(month < 10) |
| 196 | + month = "0" + month; | ||
| 197 | + if(day < 10) | ||
| 198 | + day = "0" + day; | ||
| 199 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 200 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 201 | + | ||
| 202 | $("#times1").val("06:00"); | 202 | $("#times1").val("06:00"); |
| 203 | $("#times2").val("07:00"); | 203 | $("#times2").val("07:00"); |
| 204 | 204 | ||
| @@ -267,6 +267,8 @@ | @@ -267,6 +267,8 @@ | ||
| 267 | var model = $("#model").val(); | 267 | var model = $("#model").val(); |
| 268 | var times = $("#times1").val() + "-" + $("#times2").val(); | 268 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 269 | var upDown = $("#upDown").val(); | 269 | var upDown = $("#upDown").val(); |
| 270 | + var company = $("#company").val(); | ||
| 271 | + var subCompany = $("#subCompany").val(); | ||
| 270 | function jsDoQuery(pagination){ | 272 | function jsDoQuery(pagination){ |
| 271 | var params = {}; | 273 | var params = {}; |
| 272 | // line = $("#line").val(); | 274 | // line = $("#line").val(); |
| @@ -275,12 +277,16 @@ | @@ -275,12 +277,16 @@ | ||
| 275 | model = $("#model").val(); | 277 | model = $("#model").val(); |
| 276 | times = $("#times1").val() + "-" + $("#times2").val(); | 278 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 277 | upDown = $("#upDown").val(); | 279 | upDown = $("#upDown").val(); |
| 280 | + company = $("#company").val(); | ||
| 281 | + subCompany = $("#subCompany").val(); | ||
| 278 | params['line'] = line; | 282 | params['line'] = line; |
| 279 | params['startDate'] = startDate; | 283 | params['startDate'] = startDate; |
| 280 | params['endDate'] = endDate; | 284 | params['endDate'] = endDate; |
| 281 | params['model'] = model; | 285 | params['model'] = model; |
| 282 | params['times'] = times; | 286 | params['times'] = times; |
| 283 | params['upDown'] = upDown; | 287 | params['upDown'] = upDown; |
| 288 | + params['company'] = company; | ||
| 289 | + params['subCompany'] = subCompany; | ||
| 284 | params['type'] = "query"; | 290 | params['type'] = "query"; |
| 285 | $("#forms .hidden").removeClass("hidden"); | 291 | $("#forms .hidden").removeClass("hidden"); |
| 286 | $get('/busInterval/lineTimeAnaliy', params, function(result){ | 292 | $get('/busInterval/lineTimeAnaliy', params, function(result){ |
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
| @@ -55,6 +55,8 @@ | @@ -55,6 +55,8 @@ | ||
| 55 | <thead> | 55 | <thead> |
| 56 | <tr class="hidden"> | 56 | <tr class="hidden"> |
| 57 | <th>日期</th> | 57 | <th>日期</th> |
| 58 | + <th>公司</th> | ||
| 59 | + <th>分公司</th> | ||
| 58 | <th>线路</th> | 60 | <th>线路</th> |
| 59 | <th>路牌</th> | 61 | <th>路牌</th> |
| 60 | <th>车辆</th> | 62 | <th>车辆</th> |
| @@ -92,11 +94,11 @@ | @@ -92,11 +94,11 @@ | ||
| 92 | var year = d.getFullYear(); | 94 | var year = d.getFullYear(); |
| 93 | var month = d.getMonth() + 1; | 95 | var month = d.getMonth() + 1; |
| 94 | var day = d.getDate(); | 96 | var day = d.getDate(); |
| 95 | - if(month > 9){ | ||
| 96 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 97 | - } else { | ||
| 98 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 99 | - } | 97 | + if(month < 10) |
| 98 | + month = "0" + month; | ||
| 99 | + if(day < 10) | ||
| 100 | + day = "0" + day; | ||
| 101 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 100 | 102 | ||
| 101 | $.get('/basic/lineCode2Name',function(result){ | 103 | $.get('/basic/lineCode2Name',function(result){ |
| 102 | var data=[]; | 104 | var data=[]; |
| @@ -144,12 +146,18 @@ | @@ -144,12 +146,18 @@ | ||
| 144 | 146 | ||
| 145 | var line = $("#line").val(); | 147 | var line = $("#line").val(); |
| 146 | var date = $("#date").val(); | 148 | var date = $("#date").val(); |
| 149 | + var company = $("#company").val(); | ||
| 150 | + var subCompany = $("#subCompany").val(); | ||
| 147 | function jsDoQuery(pagination){ | 151 | function jsDoQuery(pagination){ |
| 148 | var params = {}; | 152 | var params = {}; |
| 153 | + company = $("#company").val(); | ||
| 154 | + subCompany = $("#subCompany").val(); | ||
| 149 | line = $("#line").val(); | 155 | line = $("#line").val(); |
| 150 | date = $("#date").val(); | 156 | date = $("#date").val(); |
| 151 | if(line == " ") | 157 | if(line == " ") |
| 152 | line = ""; | 158 | line = ""; |
| 159 | + params['company'] = company; | ||
| 160 | + params['subCompany'] = subCompany; | ||
| 153 | params['line'] = line; | 161 | params['line'] = line; |
| 154 | params['date'] = date; | 162 | params['date'] = date; |
| 155 | params['type'] = "query"; | 163 | params['type'] = "query"; |
| @@ -177,6 +185,8 @@ | @@ -177,6 +185,8 @@ | ||
| 177 | {{each list as obj i}} | 185 | {{each list as obj i}} |
| 178 | <tr> | 186 | <tr> |
| 179 | <td>{{obj.date}}</td> | 187 | <td>{{obj.date}}</td> |
| 188 | + <td>{{obj.company}}</td> | ||
| 189 | + <td>{{obj.subCompany}}</td> | ||
| 180 | <td>{{obj.line}}</td> | 190 | <td>{{obj.line}}</td> |
| 181 | <td>{{obj.lp}}</td> | 191 | <td>{{obj.lp}}</td> |
| 182 | <td>{{obj.clzbh}}</td> | 192 | <td>{{obj.clzbh}}</td> |
| @@ -187,7 +197,7 @@ | @@ -187,7 +197,7 @@ | ||
| 187 | {{/each}} | 197 | {{/each}} |
| 188 | {{if list.length == 0}} | 198 | {{if list.length == 0}} |
| 189 | <tr> | 199 | <tr> |
| 190 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 200 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 191 | </tr> | 201 | </tr> |
| 192 | {{/if}} | 202 | {{/if}} |
| 193 | </script> | 203 | </script> |
| 194 | \ No newline at end of file | 204 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| @@ -114,13 +114,12 @@ | @@ -114,13 +114,12 @@ | ||
| 114 | var year = d.getFullYear(); | 114 | var year = d.getFullYear(); |
| 115 | var month = d.getMonth() + 1; | 115 | var month = d.getMonth() + 1; |
| 116 | var day = d.getDate(); | 116 | var day = d.getDate(); |
| 117 | - if(month > 9){ | ||
| 118 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 119 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 120 | - } else { | ||
| 121 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 122 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 123 | - } | 117 | + if(month < 10) |
| 118 | + month = "0" + month; | ||
| 119 | + if(day < 10) | ||
| 120 | + day = "0" + day; | ||
| 121 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 122 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 124 | 123 | ||
| 125 | $.get('/basic/lineCode2Name',function(result){ | 124 | $.get('/basic/lineCode2Name',function(result){ |
| 126 | var data=[]; | 125 | var data=[]; |
| @@ -176,17 +175,23 @@ | @@ -176,17 +175,23 @@ | ||
| 176 | var startDate = $("#startDate").val(); | 175 | var startDate = $("#startDate").val(); |
| 177 | var endDate = $("#endDate").val(); | 176 | var endDate = $("#endDate").val(); |
| 178 | var model = $("#model").val(); | 177 | var model = $("#model").val(); |
| 178 | + var company = $("#company").val(); | ||
| 179 | + var subCompany = $("#subCompany").val(); | ||
| 179 | function jsDoQuery(pagination){ | 180 | function jsDoQuery(pagination){ |
| 180 | var params = {}; | 181 | var params = {}; |
| 181 | // line = $("#line").val(); | 182 | // line = $("#line").val(); |
| 182 | startDate = $("#startDate").val(); | 183 | startDate = $("#startDate").val(); |
| 183 | endDate = $("#endDate").val(); | 184 | endDate = $("#endDate").val(); |
| 184 | model = $("#model").val(); | 185 | model = $("#model").val(); |
| 186 | + company = $("#company").val(); | ||
| 187 | + subCompany = $("#subCompany").val(); | ||
| 185 | params['page'] = page; | 188 | params['page'] = page; |
| 186 | params['line'] = line; | 189 | params['line'] = line; |
| 187 | params['startDate'] = startDate; | 190 | params['startDate'] = startDate; |
| 188 | params['endDate'] = endDate; | 191 | params['endDate'] = endDate; |
| 189 | params['model'] = model; | 192 | params['model'] = model; |
| 193 | + params['company'] = company; | ||
| 194 | + params['subCompany'] = subCompany; | ||
| 190 | params['type'] = "query"; | 195 | params['type'] = "query"; |
| 191 | $(".hidden").removeClass("hidden"); | 196 | $(".hidden").removeClass("hidden"); |
| 192 | $get('/pcpc/scheduleAnaly', params, function(result){ | 197 | $get('/pcpc/scheduleAnaly', params, function(result){ |
| @@ -199,8 +204,12 @@ | @@ -199,8 +204,12 @@ | ||
| 199 | //重新分页 | 204 | //重新分页 |
| 200 | initPagination = true; | 205 | initPagination = true; |
| 201 | showPagination(result); | 206 | showPagination(result); |
| 207 | + | ||
| 208 | + $('#pagination').show(); | ||
| 209 | + } else if(result.dataList.length == 0){ | ||
| 210 | + $('#pagination').hide(); | ||
| 202 | } | 211 | } |
| 203 | - }); | 212 | + }); |
| 204 | } | 213 | } |
| 205 | 214 | ||
| 206 | $("#export").on("click",function(){ | 215 | $("#export").on("click",function(){ |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| @@ -136,13 +136,13 @@ | @@ -136,13 +136,13 @@ | ||
| 136 | var year = d.getFullYear(); | 136 | var year = d.getFullYear(); |
| 137 | var month = d.getMonth() + 1; | 137 | var month = d.getMonth() + 1; |
| 138 | var day = d.getDate(); | 138 | var day = d.getDate(); |
| 139 | - if(month > 9){ | ||
| 140 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 141 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 142 | - } else { | ||
| 143 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 144 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 145 | - } | 139 | + if(month < 10) |
| 140 | + month = "0" + month; | ||
| 141 | + if(day < 10) | ||
| 142 | + day = "0" + day; | ||
| 143 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 144 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 145 | + | ||
| 146 | $("#times1").val("06:00"); | 146 | $("#times1").val("06:00"); |
| 147 | $("#times2").val("07:00"); | 147 | $("#times2").val("07:00"); |
| 148 | 148 | ||
| @@ -211,6 +211,8 @@ | @@ -211,6 +211,8 @@ | ||
| 211 | var model = $("#model").val(); | 211 | var model = $("#model").val(); |
| 212 | var times = $("#times1").val() + "-" + $("#times2").val(); | 212 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 213 | var upDown = $("#upDown").val(); | 213 | var upDown = $("#upDown").val(); |
| 214 | + var company = $("#company").val(); | ||
| 215 | + var subCompany = $("#subCompany").val(); | ||
| 214 | function jsDoQuery(pagination){ | 216 | function jsDoQuery(pagination){ |
| 215 | var params = {}; | 217 | var params = {}; |
| 216 | // line = $("#line").val(); | 218 | // line = $("#line").val(); |
| @@ -219,12 +221,16 @@ | @@ -219,12 +221,16 @@ | ||
| 219 | model = $("#model").val(); | 221 | model = $("#model").val(); |
| 220 | times = $("#times1").val() + "-" + $("#times2").val(); | 222 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 221 | upDown = $("#upDown").val(); | 223 | upDown = $("#upDown").val(); |
| 224 | + company = $("#company").val(); | ||
| 225 | + subCompany = $("#subCompany").val(); | ||
| 222 | params['line'] = line; | 226 | params['line'] = line; |
| 223 | params['startDate'] = startDate; | 227 | params['startDate'] = startDate; |
| 224 | params['endDate'] = endDate; | 228 | params['endDate'] = endDate; |
| 225 | params['model'] = model; | 229 | params['model'] = model; |
| 226 | params['times'] = times; | 230 | params['times'] = times; |
| 227 | params['upDown'] = upDown; | 231 | params['upDown'] = upDown; |
| 232 | + params['company'] = company; | ||
| 233 | + params['subCompany'] = subCompany; | ||
| 228 | params['type'] = "query"; | 234 | params['type'] = "query"; |
| 229 | $(".hidden").removeClass("hidden"); | 235 | $(".hidden").removeClass("hidden"); |
| 230 | $get('/busInterval/timeAndSpeed', params, function(result){ | 236 | $get('/busInterval/timeAndSpeed', params, function(result){ |
src/main/resources/static/pages/forms/statement/workDaily.html
| @@ -102,15 +102,16 @@ | @@ -102,15 +102,16 @@ | ||
| 102 | var year = d.getFullYear(); | 102 | var year = d.getFullYear(); |
| 103 | var month = d.getMonth() + 1; | 103 | var month = d.getMonth() + 1; |
| 104 | var day = d.getDate(); | 104 | var day = d.getDate(); |
| 105 | - if(month > 9){ | ||
| 106 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 107 | - } else { | ||
| 108 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 109 | - } | 105 | + if(month < 10) |
| 106 | + month = "0" + month; | ||
| 107 | + if(day < 10) | ||
| 108 | + day = "0" + day; | ||
| 109 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 110 | 110 | ||
| 111 | $.get('/basic/lineCode2Name',function(result){ | 111 | $.get('/basic/lineCode2Name',function(result){ |
| 112 | var data=[]; | 112 | var data=[]; |
| 113 | 113 | ||
| 114 | + data.push({id: " ", text: "全部线路"}); | ||
| 114 | for(var code in result){ | 115 | for(var code in result){ |
| 115 | data.push({id: code, text: result[code]}); | 116 | data.push({id: code, text: result[code]}); |
| 116 | } | 117 | } |
| @@ -153,13 +154,21 @@ | @@ -153,13 +154,21 @@ | ||
| 153 | 154 | ||
| 154 | var line = $("#line").val(); | 155 | var line = $("#line").val(); |
| 155 | var date = $("#date").val(); | 156 | var date = $("#date").val(); |
| 157 | + var company = $("#company").val(); | ||
| 158 | + var subCompany = $("#subCompany").val(); | ||
| 156 | function jsDoQuery(pagination){ | 159 | function jsDoQuery(pagination){ |
| 157 | var params = {}; | 160 | var params = {}; |
| 158 | line = $("#line").val(); | 161 | line = $("#line").val(); |
| 159 | date = $("#date").val(); | 162 | date = $("#date").val(); |
| 163 | + company = $("#company").val(); | ||
| 164 | + subCompany = $("#subCompany").val(); | ||
| 165 | + if(line == " ") | ||
| 166 | + line = ""; | ||
| 160 | params['line'] = line; | 167 | params['line'] = line; |
| 161 | params['date'] = date; | 168 | params['date'] = date; |
| 162 | params['type'] = "query"; | 169 | params['type'] = "query"; |
| 170 | + params['company'] = company; | ||
| 171 | + params['subCompany'] = subCompany; | ||
| 163 | $(".hidden").removeClass("hidden"); | 172 | $(".hidden").removeClass("hidden"); |
| 164 | $get('/pcpc/workDaily', params, function(result){ | 173 | $get('/pcpc/workDaily', params, function(result){ |
| 165 | // 把数据填充到模版中 | 174 | // 把数据填充到模版中 |