Commit 4dd4a8826b47e2a7ea5fafa32f7a55af758a31e2
Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into
minhang
Showing
39 changed files
with
1184 additions
and
482 deletions
src/main/java/com/bsth/controller/realcontrol/RealMapController.java
| @@ -35,4 +35,17 @@ public class RealMapController { | @@ -35,4 +35,17 @@ public class RealMapController { | ||
| 35 | public Map<String, Object> carParkSpatialData(){ | 35 | public Map<String, Object> carParkSpatialData(){ |
| 36 | return realMapService.carParkSpatialData(); | 36 | return realMapService.carParkSpatialData(); |
| 37 | } | 37 | } |
| 38 | + | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * | ||
| 42 | + * @Title: findRouteByLine | ||
| 43 | + * @Description: TODO(获取线路的站点,路段路由) | ||
| 44 | + * @param @param lineCode | ||
| 45 | + * @throws | ||
| 46 | + */ | ||
| 47 | + @RequestMapping(value = "/findRouteByLine") | ||
| 48 | + public Map<String, Object> findRouteByLine(@RequestParam String lineCode){ | ||
| 49 | + return realMapService.findRouteByLine(lineCode); | ||
| 50 | + } | ||
| 38 | } | 51 | } |
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/oil/impl/YlxxbServiceImpl.java
| @@ -52,14 +52,14 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | @@ -52,14 +52,14 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | ||
| 52 | // TODO Auto-generated catch block | 52 | // TODO Auto-generated catch block |
| 53 | e.printStackTrace(); | 53 | e.printStackTrace(); |
| 54 | } | 54 | } |
| 55 | - /*if(map.get("gsdm_in")!=null){ | 55 | + if(map.get("gsdm_in")!=null){ |
| 56 | map.put("ssgsdm_in", map.get("gsdm_in")); | 56 | map.put("ssgsdm_in", map.get("gsdm_in")); |
| 57 | map.remove("gsdm_in"); | 57 | map.remove("gsdm_in"); |
| 58 | 58 | ||
| 59 | }else{ | 59 | }else{ |
| 60 | map.put("ssgsdm_like", map.get("gsdm_like")); | 60 | map.put("ssgsdm_like", map.get("gsdm_like")); |
| 61 | map.remove("gsdm_like"); | 61 | map.remove("gsdm_like"); |
| 62 | - }*/ | 62 | + } |
| 63 | 63 | ||
| 64 | //根具条件查询指定日期Ylb的数据 | 64 | //根具条件查询指定日期Ylb的数据 |
| 65 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); | 65 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); |
src/main/java/com/bsth/service/realcontrol/RealMapService.java
| @@ -9,4 +9,6 @@ public interface RealMapService { | @@ -9,4 +9,6 @@ public interface RealMapService { | ||
| 9 | Map<String, Object> stationSpatialData(String idx); | 9 | Map<String, Object> stationSpatialData(String idx); |
| 10 | 10 | ||
| 11 | Map<String,Object> carParkSpatialData(); | 11 | Map<String,Object> carParkSpatialData(); |
| 12 | + | ||
| 13 | + Map<String,Object> findRouteByLine(String lineCode); | ||
| 12 | } | 14 | } |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| 1 | package com.bsth.service.realcontrol; | 1 | package com.bsth.service.realcontrol; |
| 2 | 2 | ||
| 3 | -import java.util.Collection; | ||
| 4 | -import java.util.List; | ||
| 5 | -import java.util.Map; | ||
| 6 | - | ||
| 7 | -import org.springframework.stereotype.Service; | ||
| 8 | - | ||
| 9 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; | 3 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| 10 | import com.bsth.controller.realcontrol.dto.DfsjChange; | 4 | import com.bsth.controller.realcontrol.dto.DfsjChange; |
| 11 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 5 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 12 | import com.bsth.service.BaseService; | 6 | import com.bsth.service.BaseService; |
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +import java.util.Collection; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 13 | 12 | ||
| 14 | @Service | 13 | @Service |
| 15 | public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, Long>{ | 14 | public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, Long>{ |
src/main/java/com/bsth/service/realcontrol/dto/SectionRouteCoords.java
0 → 100644
| 1 | +package com.bsth.service.realcontrol.dto; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 线调地图 路段路由DTO | ||
| 5 | + * Created by panzhao on 2016/12/1. | ||
| 6 | + */ | ||
| 7 | +public class SectionRouteCoords { | ||
| 8 | + | ||
| 9 | + private int id; | ||
| 10 | + | ||
| 11 | + private String lineCode; | ||
| 12 | + | ||
| 13 | + private String sectionCode; | ||
| 14 | + | ||
| 15 | + private String sectionrouteCode; | ||
| 16 | + | ||
| 17 | + private int directions; | ||
| 18 | + | ||
| 19 | + private String sectionName; | ||
| 20 | + | ||
| 21 | + private String gsectionVector; | ||
| 22 | + | ||
| 23 | + private Float sectionDistance; | ||
| 24 | + | ||
| 25 | + private Float sectionTime; | ||
| 26 | + | ||
| 27 | + public int getId() { | ||
| 28 | + return id; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public void setId(int id) { | ||
| 32 | + this.id = id; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public String getLineCode() { | ||
| 36 | + return lineCode; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + public void setLineCode(String lineCode) { | ||
| 40 | + this.lineCode = lineCode; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public String getSectionCode() { | ||
| 44 | + return sectionCode; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public void setSectionCode(String sectionCode) { | ||
| 48 | + this.sectionCode = sectionCode; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public String getSectionrouteCode() { | ||
| 52 | + return sectionrouteCode; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setSectionrouteCode(String sectionrouteCode) { | ||
| 56 | + this.sectionrouteCode = sectionrouteCode; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public int getDirections() { | ||
| 60 | + return directions; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public void setDirections(int directions) { | ||
| 64 | + this.directions = directions; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + public String getSectionName() { | ||
| 68 | + return sectionName; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public void setSectionName(String sectionName) { | ||
| 72 | + this.sectionName = sectionName; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public String getGsectionVector() { | ||
| 76 | + return gsectionVector; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + public void setGsectionVector(String gsectionVector) { | ||
| 80 | + this.gsectionVector = gsectionVector; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public Float getSectionDistance() { | ||
| 84 | + return sectionDistance; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public void setSectionDistance(Float sectionDistance) { | ||
| 88 | + this.sectionDistance = sectionDistance; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public Float getSectionTime() { | ||
| 92 | + return sectionTime; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public void setSectionTime(Float sectionTime) { | ||
| 96 | + this.sectionTime = sectionTime; | ||
| 97 | + } | ||
| 98 | +} |
src/main/java/com/bsth/service/realcontrol/impl/RealMapServiceImpl.java
| @@ -4,6 +4,8 @@ import com.bsth.common.ResponseCode; | @@ -4,6 +4,8 @@ import com.bsth.common.ResponseCode; | ||
| 4 | import com.bsth.controller.realcontrol.dto.StationSpatialData; | 4 | import com.bsth.controller.realcontrol.dto.StationSpatialData; |
| 5 | import com.bsth.entity.CarPark; | 5 | import com.bsth.entity.CarPark; |
| 6 | import com.bsth.service.realcontrol.RealMapService; | 6 | import com.bsth.service.realcontrol.RealMapService; |
| 7 | +import com.bsth.service.realcontrol.dto.SectionRouteCoords; | ||
| 8 | +import com.bsth.util.TransGPS; | ||
| 7 | import com.google.common.base.Splitter; | 9 | import com.google.common.base.Splitter; |
| 8 | import org.slf4j.Logger; | 10 | import org.slf4j.Logger; |
| 9 | import org.slf4j.LoggerFactory; | 11 | import org.slf4j.LoggerFactory; |
| @@ -12,9 +14,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper; | @@ -12,9 +14,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 12 | import org.springframework.jdbc.core.JdbcTemplate; | 14 | import org.springframework.jdbc.core.JdbcTemplate; |
| 13 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
| 14 | 16 | ||
| 15 | -import java.util.HashMap; | ||
| 16 | -import java.util.List; | ||
| 17 | -import java.util.Map; | 17 | +import java.util.*; |
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | * Created by panzhao on 2016/11/23. | 20 | * Created by panzhao on 2016/11/23. |
| @@ -36,13 +36,13 @@ public class RealMapServiceImpl implements RealMapService { | @@ -36,13 +36,13 @@ public class RealMapServiceImpl implements RealMapService { | ||
| 36 | //拼接in语句 | 36 | //拼接in语句 |
| 37 | String inStr = ""; | 37 | String inStr = ""; |
| 38 | for (String code : idArray) { | 38 | for (String code : idArray) { |
| 39 | - inStr += (",'" + code+"'"); | 39 | + inStr += (",'" + code + "'"); |
| 40 | } | 40 | } |
| 41 | inStr = " (" + inStr.substring(1) + ")"; | 41 | inStr = " (" + inStr.substring(1) + ")"; |
| 42 | 42 | ||
| 43 | - String sql = "select r.LINE_CODE,r.STATION_NAME,r.STATION_CODE,r.STATION_MARK,r.DIRECTIONS,r.DISTANCES,r.TO_TIME, r.VERSIONS,s.G_LONX,s.G_LATY,s.RADIUS,s.SHAPES_TYPE,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID, r.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in "+inStr+" and r.destroy=0"; | 43 | + String sql = "select r.LINE_CODE,r.STATION_NAME,r.STATION_CODE,r.STATION_MARK,r.DIRECTIONS,r.DISTANCES,r.TO_TIME, r.VERSIONS,s.G_LONX,s.G_LATY,s.RADIUS,s.SHAPES_TYPE,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID, r.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in " + inStr + " and r.destroy=0"; |
| 44 | 44 | ||
| 45 | - List<StationSpatialData> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(StationSpatialData.class)); | 45 | + List<StationSpatialData> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(StationSpatialData.class)); |
| 46 | rs.put("status", ResponseCode.SUCCESS); | 46 | rs.put("status", ResponseCode.SUCCESS); |
| 47 | rs.put("list", list); | 47 | rs.put("list", list); |
| 48 | } catch (Exception e) { | 48 | } catch (Exception e) { |
| @@ -61,7 +61,7 @@ public class RealMapServiceImpl implements RealMapService { | @@ -61,7 +61,7 @@ public class RealMapServiceImpl implements RealMapService { | ||
| 61 | try { | 61 | try { |
| 62 | String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0 and shapes_type='d'"; | 62 | String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0 and shapes_type='d'"; |
| 63 | 63 | ||
| 64 | - List<CarPark> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(CarPark.class)); | 64 | + List<CarPark> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(CarPark.class)); |
| 65 | rs.put("status", ResponseCode.SUCCESS); | 65 | rs.put("status", ResponseCode.SUCCESS); |
| 66 | rs.put("list", list); | 66 | rs.put("list", list); |
| 67 | } catch (Exception e) { | 67 | } catch (Exception e) { |
| @@ -71,4 +71,99 @@ public class RealMapServiceImpl implements RealMapService { | @@ -71,4 +71,99 @@ public class RealMapServiceImpl implements RealMapService { | ||
| 71 | } | 71 | } |
| 72 | return rs; | 72 | return rs; |
| 73 | } | 73 | } |
| 74 | + | ||
| 75 | + @Override | ||
| 76 | + public Map<String, Object> findRouteByLine(String lineCode) { | ||
| 77 | + Map<String, Object> rs = new HashMap<>(); | ||
| 78 | + String sql = "SELECT r.ID,r.LINE_CODE,r.SECTION_CODE,r.SECTIONROUTE_CODE,r.DIRECTIONS,s.SECTION_NAME,ST_AsText(s.GSECTION_VECTOR) GSECTION_VECTOR,s.SECTION_DISTANCE,s.SECTION_TIME FROM bsth_c_sectionroute r INNER JOIN bsth_c_section s on r.section_code=s.section_code WHERE r.line_code=? and r.destroy=0 order by sectionroute_code"; | ||
| 79 | + List<SectionRouteCoords> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(SectionRouteCoords.class), lineCode); | ||
| 80 | + | ||
| 81 | + //排序 | ||
| 82 | + Collections.sort(list, new Comparator<SectionRouteCoords>() { | ||
| 83 | + @Override | ||
| 84 | + public int compare(SectionRouteCoords o1, SectionRouteCoords o2) { | ||
| 85 | + return Integer.parseInt(o1.getSectionrouteCode()) - Integer.parseInt(o2.getSectionrouteCode()); | ||
| 86 | + } | ||
| 87 | + }); | ||
| 88 | + | ||
| 89 | + List<String> upList = new ArrayList<>(), | ||
| 90 | + downList = new ArrayList<>(); | ||
| 91 | + | ||
| 92 | + String vectorStr = ""; | ||
| 93 | + for (SectionRouteCoords sr : list) { | ||
| 94 | + vectorStr = sr.getGsectionVector(); | ||
| 95 | + vectorStr = vectorStr.substring(11, vectorStr.length() - 2); | ||
| 96 | + | ||
| 97 | + if (sr.getDirections() == 0) | ||
| 98 | + upList.add(vectorStr); | ||
| 99 | + else | ||
| 100 | + downList.add(vectorStr); | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + rs.put("up", upList); | ||
| 104 | + rs.put("down", downList); | ||
| 105 | + rs.put("up_bd", multiWgsToBd(upList)); | ||
| 106 | + rs.put("down_bd", multiWgsToBd(downList)); | ||
| 107 | + rs.put("up_gcj", multiWgsToGcj(upList)); | ||
| 108 | + rs.put("down_gcj", multiWgsToGcj(downList)); | ||
| 109 | + | ||
| 110 | + rs.put("lineId", lineCode); | ||
| 111 | + return rs; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + /** | ||
| 115 | + * wgs 坐标数组转 百度 | ||
| 116 | + * @param list | ||
| 117 | + * @return | ||
| 118 | + */ | ||
| 119 | + private List<String> multiWgsToBd(List<String> list) { | ||
| 120 | + List<String> bdList = new ArrayList<>(); | ||
| 121 | + | ||
| 122 | + StringBuilder itemStr; | ||
| 123 | + String[] subArr, cds; | ||
| 124 | + TransGPS.Location location; | ||
| 125 | + for(String item : list){ | ||
| 126 | + subArr = item.split(","); | ||
| 127 | + | ||
| 128 | + itemStr = new StringBuilder(); | ||
| 129 | + for(String coord : subArr){ | ||
| 130 | + cds = coord.split(" "); | ||
| 131 | + //城建转经纬度 | ||
| 132 | + //Map<String, Double> map = JWDUtil.ConvertSHToJW(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])); | ||
| 133 | + | ||
| 134 | + | ||
| 135 | + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])))); | ||
| 136 | + itemStr.append(location.getLng() + " " + location.getLat() + ","); | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + bdList.add(itemStr.substring(0, itemStr.length() - 1)); | ||
| 140 | + } | ||
| 141 | + return bdList; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + /** | ||
| 145 | + * wgs 坐标数组转 Gcj | ||
| 146 | + * @param list | ||
| 147 | + * @return | ||
| 148 | + */ | ||
| 149 | + private List<String> multiWgsToGcj(List<String> list) { | ||
| 150 | + List<String> gcjList = new ArrayList<>(); | ||
| 151 | + | ||
| 152 | + StringBuilder itemStr; | ||
| 153 | + String[] subArr, cds; | ||
| 154 | + TransGPS.Location location; | ||
| 155 | + for(String item : list){ | ||
| 156 | + subArr = item.split(","); | ||
| 157 | + | ||
| 158 | + itemStr = new StringBuilder(); | ||
| 159 | + for(String coord : subArr){ | ||
| 160 | + cds = coord.split(" "); | ||
| 161 | + location = TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]))); | ||
| 162 | + itemStr.append(location.getLng() + " " + location.getLat() + ","); | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + gcjList.add(itemStr.substring(0, itemStr.length() - 1)); | ||
| 166 | + } | ||
| 167 | + return gcjList; | ||
| 168 | + } | ||
| 74 | } | 169 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -33,7 +33,6 @@ import com.bsth.service.SectionRouteService; | @@ -33,7 +33,6 @@ import com.bsth.service.SectionRouteService; | ||
| 33 | import com.bsth.service.impl.BaseServiceImpl; | 33 | import com.bsth.service.impl.BaseServiceImpl; |
| 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 35 | import com.bsth.util.*; | 35 | import com.bsth.util.*; |
| 36 | -import com.bsth.util.TransGPS.Location; | ||
| 37 | import com.bsth.websocket.handler.SendUtils; | 36 | import com.bsth.websocket.handler.SendUtils; |
| 38 | import com.google.common.base.Splitter; | 37 | import com.google.common.base.Splitter; |
| 39 | import com.google.common.collect.ArrayListMultimap; | 38 | import com.google.common.collect.ArrayListMultimap; |
| @@ -991,7 +990,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -991,7 +990,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 991 | return ""; | 990 | return ""; |
| 992 | 991 | ||
| 993 | String gcjStr = ""; | 992 | String gcjStr = ""; |
| 994 | - Location location; | 993 | + TransGPS.Location location; |
| 995 | for(String crd : array){ | 994 | for(String crd : array){ |
| 996 | subArray = crd.split(" "); | 995 | subArray = crd.split(" "); |
| 997 | if(subArray.length != 2) | 996 | if(subArray.length != 2) |
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/control/lineallot/allot.html
| @@ -404,6 +404,7 @@ $(function(){ | @@ -404,6 +404,7 @@ $(function(){ | ||
| 404 | var f = arguments.callee | 404 | var f = arguments.callee |
| 405 | ,item = lsData[i]; | 405 | ,item = lsData[i]; |
| 406 | 406 | ||
| 407 | + //$.get('/realMap/findRouteByLine', {lineCode: item.lineCode}, function(rs){ | ||
| 407 | $.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){ | 408 | $.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){ |
| 408 | if(rs && rs.lineId){ | 409 | if(rs && rs.lineId){ |
| 409 | cacheData[item.lineCode] = rs; | 410 | cacheData[item.lineCode] = rs; |
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 | // 把数据填充到模版中 |
src/main/resources/static/pages/oil/checkJyryList.html
| @@ -75,10 +75,10 @@ | @@ -75,10 +75,10 @@ | ||
| 75 | <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq"> | 75 | <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq"> |
| 76 | </td> | 76 | </td> |
| 77 | <td> | 77 | <td> |
| 78 | -<!-- <select class="form-control" name="gsdm_like" id="jyryListGsdmId" ></select> --> | 78 | + <select class="form-control" name="gsdm_like" id="jyryListGsdmId" ></select> |
| 79 | </td> | 79 | </td> |
| 80 | <td> | 80 | <td> |
| 81 | -<!-- <select class="form-control" name="fgsdm_like" id="jyryListFgsdmId" ></select> --> | 81 | + <select class="form-control" name="fgsdm_like" id="jyryListFgsdmId" ></select> |
| 82 | </td> | 82 | </td> |
| 83 | <td> | 83 | <td> |
| 84 | </td> | 84 | </td> |
| @@ -265,7 +265,7 @@ $(function(){ | @@ -265,7 +265,7 @@ $(function(){ | ||
| 265 | // var i = layer.load(2); | 265 | // var i = layer.load(2); |
| 266 | 266 | ||
| 267 | var i = 2; | 267 | var i = 2; |
| 268 | - /* var jyryGsdm=$("#jyryListGsdmId").val(); | 268 | + var jyryGsdm=$("#jyryListGsdmId").val(); |
| 269 | var jyryFgsdm=$("#jyryListFgsdmId").val(); | 269 | var jyryFgsdm=$("#jyryListFgsdmId").val(); |
| 270 | if(jyryGsdm=="" || jyryGsdm==null){ | 270 | if(jyryGsdm=="" || jyryGsdm==null){ |
| 271 | params['gsdm_in']=gsqx; | 271 | params['gsdm_in']=gsqx; |
| @@ -283,7 +283,7 @@ $(function(){ | @@ -283,7 +283,7 @@ $(function(){ | ||
| 283 | } | 283 | } |
| 284 | params['fgsdm_in']=fgsqx1; | 284 | params['fgsdm_in']=fgsqx1; |
| 285 | } | 285 | } |
| 286 | - } */ | 286 | + } |
| 287 | 287 | ||
| 288 | $get('/ylxxb/pagequery' ,params, function(data){ | 288 | $get('/ylxxb/pagequery' ,params, function(data){ |
| 289 | $.each(data.dataList, function(i, obj) { | 289 | $.each(data.dataList, function(i, obj) { |
| @@ -296,7 +296,7 @@ $(function(){ | @@ -296,7 +296,7 @@ $(function(){ | ||
| 296 | if(pagination && data.dataList.length > 0){ | 296 | if(pagination && data.dataList.length > 0){ |
| 297 | //重新分页 | 297 | //重新分页 |
| 298 | initPagination = true; | 298 | initPagination = true; |
| 299 | - showPagination(data); | 299 | + //showPagination(data); |
| 300 | } | 300 | } |
| 301 | layer.close(i); | 301 | layer.close(i); |
| 302 | }); | 302 | }); |
src/main/resources/static/pages/oil/jyszList.html
| @@ -205,7 +205,7 @@ $(function(){ | @@ -205,7 +205,7 @@ $(function(){ | ||
| 205 | //更新时间排序 | 205 | //更新时间排序 |
| 206 | params['order'] = 'nbbm'; | 206 | params['order'] = 'nbbm'; |
| 207 | params['page'] = page; | 207 | params['page'] = page; |
| 208 | - var i = layer.load(2); | 208 | + var i = 2; |
| 209 | var jyszGsdm=$("#jyszListGsdmId").val(); | 209 | var jyszGsdm=$("#jyszListGsdmId").val(); |
| 210 | var jyszFgsdm=$("#jyszListFgsdmId").val(); | 210 | var jyszFgsdm=$("#jyszListFgsdmId").val(); |
| 211 | if(jyszGsdm==''|| jyszGsdm==null){ | 211 | if(jyszGsdm==''|| jyszGsdm==null){ |
src/main/resources/static/pages/oil/list.html
| @@ -58,45 +58,45 @@ | @@ -58,45 +58,45 @@ | ||
| 58 | id="datatable_ylb"> | 58 | id="datatable_ylb"> |
| 59 | <thead> | 59 | <thead> |
| 60 | <tr role="row" class="filter"> | 60 | <tr role="row" class="filter"> |
| 61 | - <td colspan="3"> | ||
| 62 | - <!-- 公司: | ||
| 63 | - <select name="ssgsdm" id="ssgsdm"> | ||
| 64 | - <option value="">请选择...</option> | ||
| 65 | - <option value="1">可用</option> | ||
| 66 | - <option value="0">禁用</option> | ||
| 67 | - </select> --> | 61 | + <td> 公司:</td> |
| 62 | + <td colspan="2"> | ||
| 63 | + | ||
| 64 | + <select class="form-control" name="ssgsdm_like" id="ylbListGsdmId" ></select> | ||
| 65 | + | ||
| 68 | </td> | 66 | </td> |
| 69 | <td> | 67 | <td> |
| 70 | - <!-- <select name="fgsdm"> --> | ||
| 71 | - <!-- <option value="">请选择...</option> --> | ||
| 72 | - <!-- <option value="1">可用</option> --> | ||
| 73 | - <!-- <option value="0">禁用</option> --> | ||
| 74 | - <!-- </select> --> | ||
| 75 | - | ||
| 76 | - 日期: | 68 | + 分公司: |
| 77 | </td> | 69 | </td> |
| 78 | <td colspan="2"> | 70 | <td colspan="2"> |
| 71 | + | ||
| 72 | + <select class="form-control" name="fgsdm_like" id="ylbListFgsdmId" ></select> | ||
| 73 | + </td> | ||
| 74 | + | ||
| 75 | + <td> | ||
| 76 | + 日期: | ||
| 77 | + </td> | ||
| 78 | + <td> | ||
| 79 | <input type="text" style="width: 80px" name="rq" id="rq"/> | 79 | <input type="text" style="width: 80px" name="rq" id="rq"/> |
| 80 | </td> | 80 | </td> |
| 81 | - <td colspan="2"> | ||
| 82 | - 线路: | 81 | + <td > |
| 82 | + 线路: | ||
| 83 | </td> | 83 | </td> |
| 84 | <td colspan="3"> | 84 | <td colspan="3"> |
| 85 | <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select> | 85 | <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select> |
| 86 | | 86 | |
| 87 | </td> | 87 | </td> |
| 88 | - <td colspan="2"> | ||
| 89 | - 内部编码: | 88 | + <td > |
| 89 | + 内部编码: | ||
| 90 | </td> | 90 | </td> |
| 91 | <td colspan="3"> | 91 | <td colspan="3"> |
| 92 | <select class="form-control" name="nbbm_eq" id="nbbm" style="width: 120px;"></select> | 92 | <select class="form-control" name="nbbm_eq" id="nbbm" style="width: 120px;"></select> |
| 93 | </td> | 93 | </td> |
| 94 | <td colspan="4"> | 94 | <td colspan="4"> |
| 95 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom"> | 95 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right:0px"> |
| 96 | <i class="fa fa-search"></i> 搜索 | 96 | <i class="fa fa-search"></i> 搜索 |
| 97 | </button> | 97 | </button> |
| 98 | 98 | ||
| 99 | - <button class="btn btn-sm red btn-outline filter-cancel"> | 99 | + <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px"> |
| 100 | <i class="fa fa-times"></i> 重置 | 100 | <i class="fa fa-times"></i> 重置 |
| 101 | </button> | 101 | </button> |
| 102 | 102 | ||
| @@ -351,6 +351,47 @@ | @@ -351,6 +351,47 @@ | ||
| 351 | } | 351 | } |
| 352 | }); | 352 | }); |
| 353 | 353 | ||
| 354 | + | ||
| 355 | + var gsqx=""; | ||
| 356 | + var fgsqx=""; | ||
| 357 | + | ||
| 358 | + $.get('/user/companyData', function(result){ | ||
| 359 | + obj = result; | ||
| 360 | + var options = '<option value="">请选择</option>'; | ||
| 361 | + for(var i = 0; i < obj.length; i++){ | ||
| 362 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 363 | + setFgsqx(obj[i].companyCode); | ||
| 364 | + gsqx +=obj[i].companyCode+","; | ||
| 365 | + } | ||
| 366 | + $('#ylbListGsdmId').html(options); | ||
| 367 | + updateCompany(); | ||
| 368 | + }); | ||
| 369 | + function setFgsqx(gs){ | ||
| 370 | + var company =gs | ||
| 371 | + var options = ''; | ||
| 372 | + for(var i = 0; i < obj.length; i++){ | ||
| 373 | + if(obj[i].companyCode == company){ | ||
| 374 | + var children = obj[i].children; | ||
| 375 | + for(var j = 0; j < children.length; j++){ | ||
| 376 | + fgsqx +=children[j].code+","; | ||
| 377 | + } | ||
| 378 | + } | ||
| 379 | + } | ||
| 380 | + } | ||
| 381 | + $("#ylbListGsdmId").on("change",updateCompany); | ||
| 382 | + function updateCompany(){ | ||
| 383 | + var company = $('#ylbListGsdmId').val(); | ||
| 384 | + var options = '<option value="">请选择</option>'; | ||
| 385 | + for(var i = 0; i < obj.length; i++){ | ||
| 386 | + if(obj[i].companyCode == company){ | ||
| 387 | + var children = obj[i].children; | ||
| 388 | + for(var j = 0; j < children.length; j++){ | ||
| 389 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 390 | + } | ||
| 391 | + } | ||
| 392 | + } | ||
| 393 | + $('#ylbListFgsdmId').html(options); | ||
| 394 | + } | ||
| 354 | /* | 395 | /* |
| 355 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 | 396 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 |
| 356 | */ | 397 | */ |
src/main/resources/static/real_control_v2/css/line_schedule.css
| @@ -309,7 +309,7 @@ span.fcsj-diff { | @@ -309,7 +309,7 @@ span.fcsj-diff { | ||
| 309 | 309 | ||
| 310 | .ct-form-modal form input, .ct-form-modal form select { | 310 | .ct-form-modal form input, .ct-form-modal form select { |
| 311 | width: 100%; | 311 | width: 100%; |
| 312 | - height: 34px!important; | 312 | + height: 34px; |
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | .ct-form-modal form small.font-danger { | 315 | .ct-form-modal form small.font-danger { |
| @@ -690,7 +690,7 @@ i.add-temp-sch-icon:hover{ | @@ -690,7 +690,7 @@ i.add-temp-sch-icon:hover{ | ||
| 690 | 690 | ||
| 691 | input.i-cbox[type=checkbox]{ | 691 | input.i-cbox[type=checkbox]{ |
| 692 | width: 20px; | 692 | width: 20px; |
| 693 | - height: 18px !important; | 693 | + height: 18px; |
| 694 | vertical-align: middle; | 694 | vertical-align: middle; |
| 695 | margin-top: -3px; | 695 | margin-top: -3px; |
| 696 | } | 696 | } |
| @@ -846,4 +846,23 @@ input.i-cbox[type=checkbox]{ | @@ -846,4 +846,23 @@ input.i-cbox[type=checkbox]{ | ||
| 846 | color: #bab6b6; | 846 | color: #bab6b6; |
| 847 | font-family: 微软雅黑; | 847 | font-family: 微软雅黑; |
| 848 | font-size: 13px; | 848 | font-size: 13px; |
| 849 | +} | ||
| 850 | + | ||
| 851 | +#add-sub-task-inpark-modal .uk-panel-box{ | ||
| 852 | + background-color: #ffffff; | ||
| 853 | +} | ||
| 854 | + | ||
| 855 | +#add-sub-task-inpark-modal .pl5{ | ||
| 856 | + padding-left: 5px; | ||
| 857 | +} | ||
| 858 | + | ||
| 859 | +#add-sub-task-inpark-modal.uk-modal .uk-form.fv-form{ | ||
| 860 | + margin-bottom: 0px !important; | ||
| 861 | +} | ||
| 862 | +#add-sub-task-inpark-modal .uk-form select{ | ||
| 863 | + width: 100% | ||
| 864 | +} | ||
| 865 | + | ||
| 866 | +#add-sub-task-inpark-modal .uk-grid{ | ||
| 867 | + margin-top: 10px; | ||
| 849 | } | 868 | } |
| 850 | \ No newline at end of file | 869 | \ No newline at end of file |
src/main/resources/static/real_control_v2/css/main.css
| @@ -314,4 +314,20 @@ li.map-panel{ | @@ -314,4 +314,20 @@ li.map-panel{ | ||
| 314 | .main-container .load-panel{ | 314 | .main-container .load-panel{ |
| 315 | display: block; | 315 | display: block; |
| 316 | color: #999797; | 316 | color: #999797; |
| 317 | +} | ||
| 318 | + | ||
| 319 | +.uk-panel-box-danger { | ||
| 320 | + background-color: #fff1f0; | ||
| 321 | + color: #d85030; | ||
| 322 | + border-color: rgba(216,80,48,.3); | ||
| 323 | +} | ||
| 324 | + | ||
| 325 | +.uk-panel-box-danger .uk-panel-title { | ||
| 326 | + color: #d85030; | ||
| 327 | +} | ||
| 328 | + | ||
| 329 | +.uk-badge-default { | ||
| 330 | + background-color: #a09b9c; | ||
| 331 | + background-image: -webkit-linear-gradient(top,#9a9898,#8c8687); | ||
| 332 | + background-image: linear-gradient(to bottom,#9a9898,#8c8687); | ||
| 317 | } | 333 | } |
| 318 | \ No newline at end of file | 334 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | <dl> | 37 | <dl> |
| 38 | <dt>序号</dt> | 38 | <dt>序号</dt> |
| 39 | <dt>开始时间 | 39 | <dt>开始时间 |
| 40 | - <i class="uk-icon-question-circle" data-uk-tooltip title="蓝色字为实发时间"></i></dt> | 40 | + <i class="uk-icon-question-circle" data-uk-tooltip title="蓝色字为实发时间"></i></dt> |
| 41 | <dt>结束时间</dt> | 41 | <dt>结束时间</dt> |
| 42 | <dt>起点</dt> | 42 | <dt>起点</dt> |
| 43 | <dt>终点</dt> | 43 | <dt>终点</dt> |
| @@ -79,9 +79,9 @@ | @@ -79,9 +79,9 @@ | ||
| 79 | <dd>{{i+1}}</dd> | 79 | <dd>{{i+1}}</dd> |
| 80 | <dd> | 80 | <dd> |
| 81 | {{if sch.fcsjActual==null}} | 81 | {{if sch.fcsjActual==null}} |
| 82 | - {{sch.dfsj}} | 82 | + {{sch.dfsj}} |
| 83 | {{else}} | 83 | {{else}} |
| 84 | - <span class="sjfc-time">{{sch.fcsjActual}}</span> | 84 | + <span class="sjfc-time">{{sch.fcsjActual}}</span> |
| 85 | {{/if}} | 85 | {{/if}} |
| 86 | 86 | ||
| 87 | {{if sch.bcType == "out"}} | 87 | {{if sch.bcType == "out"}} |
| @@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
| 98 | {{/if}} | 98 | {{/if}} |
| 99 | 99 | ||
| 100 | {{if sch.cTasks.length > 0}} | 100 | {{if sch.cTasks.length > 0}} |
| 101 | - <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> | 101 | + <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> |
| 102 | {{/if}} | 102 | {{/if}} |
| 103 | </dd> | 103 | </dd> |
| 104 | <dd>{{sch.zdsj}}</dd> | 104 | <dd>{{sch.zdsj}}</dd> |
| @@ -111,67 +111,67 @@ | @@ -111,67 +111,67 @@ | ||
| 111 | {{/each}} | 111 | {{/each}} |
| 112 | </script> | 112 | </script> |
| 113 | <script id="sub_task-table-temp" type="text/html"> | 113 | <script id="sub_task-table-temp" type="text/html"> |
| 114 | - {{each list as task i}} | 114 | + {{each list as task i}} |
| 115 | <dl data-id="{{task.id}}"> | 115 | <dl data-id="{{task.id}}"> |
| 116 | - <dd>{{i+1}}</dd> | ||
| 117 | - <dd><span class="nt-dictionary" data-group="ChildTaskType">{{task.type2}}</span></dd> | ||
| 118 | - <dd>{{task.startStationName}}</dd> | ||
| 119 | - <dd>{{task.endStationName}}</dd> | ||
| 120 | - <dd>{{task.startDate}}</dd> | ||
| 121 | - <dd>{{task.endDate}}</dd> | ||
| 122 | - <dd> | ||
| 123 | - {{task.mileage}} | ||
| 124 | - (<span class="nt-dictionary" data-group="MileageType">{{task.mileageType}}</span> | ||
| 125 | - {{if task.destroy}} | ||
| 126 | - <small style="color:red;">烂班</small> | ||
| 127 | - {{/if}} | ||
| 128 | - ) | ||
| 129 | - </dd> | ||
| 130 | - <dd title="{{task.remarks}}">{{task.remarks}}</dd> | 116 | + <dd>{{i+1}}</dd> |
| 117 | + <dd><span class="nt-dictionary" data-group="ChildTaskType">{{task.type2}}</span></dd> | ||
| 118 | + <dd>{{task.startStationName}}</dd> | ||
| 119 | + <dd>{{task.endStationName}}</dd> | ||
| 120 | + <dd>{{task.startDate}}</dd> | ||
| 121 | + <dd>{{task.endDate}}</dd> | ||
| 122 | + <dd> | ||
| 123 | + {{task.mileage}} | ||
| 124 | + (<span class="nt-dictionary" data-group="MileageType">{{task.mileageType}}</span> | ||
| 125 | + {{if task.destroy}} | ||
| 126 | + <small style="color:red;">烂班</small> | ||
| 127 | + {{/if}} | ||
| 128 | + ) | ||
| 129 | + </dd> | ||
| 130 | + <dd title="{{task.remarks}}">{{task.remarks}}</dd> | ||
| 131 | </dl> | 131 | </dl> |
| 132 | - {{/each}} | 132 | + {{/each}} |
| 133 | </script> | 133 | </script> |
| 134 | <script> | 134 | <script> |
| 135 | - (function() { | ||
| 136 | - var modal_opts = { center: false, bgclose: false, modal:false } | 135 | + (function () { |
| 136 | + var modal_opts = {center: false, bgclose: false, modal: false} | ||
| 137 | var modal = '#schedule-lj_zrw-modal', | 137 | var modal = '#schedule-lj_zrw-modal', |
| 138 | - f, | ||
| 139 | - m_t_body = '.main-schedule-table .ct_table_body', | ||
| 140 | - s_t_body = '.sub-task-table .ct_table_body', | ||
| 141 | - folder = '/real_control_v2/fragments/line_schedule/context_menu', | ||
| 142 | - sch, schList, lp2SchMap; | ||
| 143 | - $(modal).on('init', function(e, data) { | 138 | + f, |
| 139 | + m_t_body = '.main-schedule-table .ct_table_body', | ||
| 140 | + s_t_body = '.sub-task-table .ct_table_body', | ||
| 141 | + folder = '/real_control_v2/fragments/line_schedule/context_menu', | ||
| 142 | + sch, schList, lp2SchMap; | ||
| 143 | + $(modal).on('init', function (e, data) { | ||
| 144 | sch = data.sch; | 144 | sch = data.sch; |
| 145 | 145 | ||
| 146 | f = $('.search-form', modal); | 146 | f = $('.search-form', modal); |
| 147 | //线路下拉框 | 147 | //线路下拉框 |
| 148 | var opts = ''; | 148 | var opts = ''; |
| 149 | - $.each(gb_data_basic.activeLines, function() { | 149 | + $.each(gb_data_basic.activeLines, function () { |
| 150 | opts += '<option value="' + this.lineCode + '">' + this.name + '</option>'; | 150 | opts += '<option value="' + this.lineCode + '">' + this.name + '</option>'; |
| 151 | }); | 151 | }); |
| 152 | $('[name=lineSelect]', f).html(opts) | 152 | $('[name=lineSelect]', f).html(opts) |
| 153 | - .on('change', function() { | ||
| 154 | - var lineCode = $(this).val(); | ||
| 155 | - schList = gb_schedule_table.findScheduleByLine(lineCode); | ||
| 156 | - lp2SchMap = gb_common.groupBy(schList, 'lpName'); | 153 | + .on('change', function () { |
| 154 | + var lineCode = $(this).val(); | ||
| 155 | + schList = gb_schedule_table.findScheduleByLine(lineCode); | ||
| 156 | + lp2SchMap = gb_common.groupBy(schList, 'lpName'); | ||
| 157 | 157 | ||
| 158 | - var opts = ''; | ||
| 159 | - for (var lpName in lp2SchMap) | ||
| 160 | - opts += '<option value="' + lpName + '">' + lpName + '</option>'; | ||
| 161 | - $('[name=lpName]', f).html(opts).trigger('change'); | ||
| 162 | - }); | 158 | + var opts = ''; |
| 159 | + for (var lpName in lp2SchMap) | ||
| 160 | + opts += '<option value="' + lpName + '">' + lpName + '</option>'; | ||
| 161 | + $('[name=lpName]', f).html(opts).trigger('change'); | ||
| 162 | + }); | ||
| 163 | 163 | ||
| 164 | //路牌下拉框 | 164 | //路牌下拉框 |
| 165 | - $('[name=lpName]', f).on('change', function() { | 165 | + $('[name=lpName]', f).on('change', function () { |
| 166 | var list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort), | 166 | var list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort), |
| 167 | - htmlBody = template('schedule-main-table-temp', { | ||
| 168 | - list: list | ||
| 169 | - }); | 167 | + htmlBody = template('schedule-main-table-temp', { |
| 168 | + list: list | ||
| 169 | + }); | ||
| 170 | $(m_t_body, modal).html(htmlBody); | 170 | $(m_t_body, modal).html(htmlBody); |
| 171 | $(s_t_body, modal).empty(); | 171 | $(s_t_body, modal).empty(); |
| 172 | }); | 172 | }); |
| 173 | //班次点击 | 173 | //班次点击 |
| 174 | - $(modal).on('click contextmenu', m_t_body + ' dl', function() { | 174 | + $(modal).on('click contextmenu', m_t_body + ' dl', function () { |
| 175 | $(this).parent().find('.active').removeClass('active'); | 175 | $(this).parent().find('.active').removeClass('active'); |
| 176 | $(this).addClass('active'); | 176 | $(this).addClass('active'); |
| 177 | //show 子任务 | 177 | //show 子任务 |
| @@ -186,122 +186,133 @@ | @@ -186,122 +186,133 @@ | ||
| 186 | selectedDl(sch); | 186 | selectedDl(sch); |
| 187 | }); | 187 | }); |
| 188 | 188 | ||
| 189 | - function selectedDl(sch){ | ||
| 190 | - //默认选中项 | ||
| 191 | - $('[name=lineSelect]', f).val(sch.xlBm).trigger('change'); | ||
| 192 | - $('[name=lpName]', f).val(sch.lpName).trigger('change'); | ||
| 193 | - var dl = $('.main-schedule-table', modal).find('dl[data-id=' + sch.id + ']').trigger('click'); | ||
| 194 | - //滚动到可视区域 | ||
| 195 | - var cont = $('.main-schedule-wrap', modal); | ||
| 196 | - cont.animate({ | ||
| 197 | - scrollTop: dl.offset().top - cont.offset().top + cont.scrollTop() - 38 | ||
| 198 | - }, 500); | 189 | + function selectedDl(sch) { |
| 190 | + //默认选中项 | ||
| 191 | + $('[name=lineSelect]', f).val(sch.xlBm).trigger('change'); | ||
| 192 | + $('[name=lpName]', f).val(sch.lpName).trigger('change'); | ||
| 193 | + var dl = $('.main-schedule-table', modal).find('dl[data-id=' + sch.id + ']').trigger('click'); | ||
| 194 | + //滚动到可视区域 | ||
| 195 | + var cont = $('.main-schedule-wrap', modal); | ||
| 196 | + cont.animate({ | ||
| 197 | + scrollTop: dl.offset().top - cont.offset().top + cont.scrollTop() - 38 | ||
| 198 | + }, 500); | ||
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | - function getActiveSch(){ | ||
| 202 | - var dl=$('.main-schedule-table dl.active', modal) | ||
| 203 | - ,sch, lineCode=$('[name=lineSelect]', f).val(); | ||
| 204 | - if(dl.length > 0) | ||
| 205 | - sch=gb_schedule_table.findScheduleByLine(lineCode)[dl.data('id')]; | 201 | + function getActiveSch() { |
| 202 | + var dl = $('.main-schedule-table dl.active', modal) | ||
| 203 | + , sch, lineCode = $('[name=lineSelect]', f).val(); | ||
| 204 | + if (dl.length > 0) | ||
| 205 | + sch = gb_schedule_table.findScheduleByLine(lineCode)[dl.data('id')]; | ||
| 206 | 206 | ||
| 207 | - return sch; | 207 | + return sch; |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | //刷新主任务表格 | 210 | //刷新主任务表格 |
| 211 | - var m_s_table_update=function(e, opts){ | ||
| 212 | - var lineCode=$('[name=lineSelect]', f).val(); | ||
| 213 | - //重新获取班次数据 | ||
| 214 | - schList = gb_schedule_table.findScheduleByLine(lineCode); | ||
| 215 | - lp2SchMap = gb_common.groupBy(schList, 'lpName'); | ||
| 216 | - $('[name=lpName]', f).trigger('change'); | 211 | + var m_s_table_update = function (e, opts) { |
| 212 | + var lineCode = $('[name=lineSelect]', f).val(); | ||
| 213 | + //重新获取班次数据 | ||
| 214 | + schList = gb_schedule_table.findScheduleByLine(lineCode); | ||
| 215 | + lp2SchMap = gb_common.groupBy(schList, 'lpName'); | ||
| 216 | + $('[name=lpName]', f).trigger('change'); | ||
| 217 | 217 | ||
| 218 | - if(opts && opts.sch){ | ||
| 219 | - selectedDl(opts.sch); | ||
| 220 | - } | 218 | + if (opts && opts.sch) { |
| 219 | + selectedDl(opts.sch); | ||
| 220 | + } | ||
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | //刷新子任务表格 | 223 | //刷新子任务表格 |
| 224 | - var sub_task_update=function(){ | ||
| 225 | - var sch=getActiveSch() | ||
| 226 | - ,htmlStr='' | ||
| 227 | - ,tbody=$(s_t_body, modal); | ||
| 228 | - sch.cTasks.sort(sub_task_sort); | ||
| 229 | - htmlStr = template('sub_task-table-temp', {list: sch.cTasks}); | ||
| 230 | - tbody.html(htmlStr); | ||
| 231 | - //字典转换 | ||
| 232 | - dictionaryUtils.transformDom($('.nt-dictionary', tbody)); | 224 | + var sub_task_update = function () { |
| 225 | + var sch = getActiveSch() | ||
| 226 | + , htmlStr = '' | ||
| 227 | + , tbody = $(s_t_body, modal); | ||
| 228 | + sch.cTasks.sort(sub_task_sort); | ||
| 229 | + htmlStr = template('sub_task-table-temp', {list: sch.cTasks}); | ||
| 230 | + tbody.html(htmlStr); | ||
| 231 | + //字典转换 | ||
| 232 | + dictionaryUtils.transformDom($('.nt-dictionary', tbody)); | ||
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | //新增临加 | 235 | //新增临加 |
| 236 | - var add_temp_sch=function(){ | ||
| 237 | - var sch=getActiveSch(); | ||
| 238 | - if(!sch) | ||
| 239 | - sch={xlBm: $('[name=lineSelect]', f).val(), lpName: $('[name=lpName]', f).val()}; | 236 | + var add_temp_sch = function () { |
| 237 | + var sch = getActiveSch(); | ||
| 238 | + if (!sch) | ||
| 239 | + sch = {xlBm: $('[name=lineSelect]', f).val(), lpName: $('[name=lpName]', f).val()}; | ||
| 240 | 240 | ||
| 241 | - open_modal(folder + '/add_temp_sch.html', { | ||
| 242 | - sch:sch | ||
| 243 | - }, modal_opts); | 241 | + open_modal(folder + '/add_temp_sch.html', { |
| 242 | + sch: sch | ||
| 243 | + }, modal_opts); | ||
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | //删除临加班次 | 246 | //删除临加班次 |
| 247 | - var remove_sch=function(){ | ||
| 248 | - var sch = getActiveSch(); | ||
| 249 | - if(!sch || !sch.sflj) | ||
| 250 | - return notify_err('只能删除临加班次!'); | ||
| 251 | - var str='<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3>'; | ||
| 252 | - alt_confirm(str, function(){ | ||
| 253 | - gb_common.$del('/realSchedule/' + sch.id, function(rs){ | ||
| 254 | - //前端数据更新 | ||
| 255 | - gb_schedule_table.updateSchedule(rs.ts); | ||
| 256 | - gb_schedule_table.deheteSchedule(rs.delete); | ||
| 257 | - //m_s_table_update(); | ||
| 258 | - $('.main-schedule-table', modal).trigger('refresh'); | ||
| 259 | - }); | ||
| 260 | - }, '确定删除'); | ||
| 261 | - } | 247 | + var remove_sch = function () { |
| 248 | + var sch = getActiveSch(); | ||
| 249 | + if (!sch || !sch.sflj) | ||
| 250 | + return notify_err('只能删除临加班次!'); | ||
| 251 | + var str = '<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3>'; | ||
| 252 | + alt_confirm(str, function () { | ||
| 253 | + gb_common.$del('/realSchedule/' + sch.id, function (rs) { | ||
| 254 | + //前端数据更新 | ||
| 255 | + gb_schedule_table.updateSchedule(rs.ts); | ||
| 256 | + gb_schedule_table.deheteSchedule(rs.delete); | ||
| 257 | + //m_s_table_update(); | ||
| 258 | + $('.main-schedule-table', modal).trigger('refresh'); | ||
| 259 | + }); | ||
| 260 | + }, '确定删除'); | ||
| 261 | + }; | ||
| 262 | //添加自定义子任务 | 262 | //添加自定义子任务 |
| 263 | - var add_sub_task_other=function(){ | ||
| 264 | - var sch=getActiveSch(); | ||
| 265 | - if(!sch) | ||
| 266 | - return notify_err('无法获取到主任务信息!'); | ||
| 267 | - open_modal(folder + '/sub_task/add_sub_task_other.html', { | ||
| 268 | - sch:sch | ||
| 269 | - }, modal_opts); | ||
| 270 | - } | 263 | + var add_sub_task_other = function () { |
| 264 | + var sch = getActiveSch(); | ||
| 265 | + if (!sch) | ||
| 266 | + return notify_err('无法获取到主任务信息!'); | ||
| 267 | + open_modal(folder + '/sub_task/add_sub_task_other.html', { | ||
| 268 | + sch: sch | ||
| 269 | + }, modal_opts); | ||
| 270 | + }; | ||
| 271 | + | ||
| 272 | + //回场子任务 | ||
| 273 | + var add_sub_task_in = function () { | ||
| 274 | + var sch = getActiveSch(); | ||
| 275 | + if (!sch) | ||
| 276 | + return notify_err('无法获取到主任务信息!'); | ||
| 277 | + open_modal(folder + '/sub_task/add_sub_task_inpark.html', { | ||
| 278 | + sch: sch | ||
| 279 | + }, modal_opts); | ||
| 280 | + }; | ||
| 271 | 281 | ||
| 272 | //删除子任务 | 282 | //删除子任务 |
| 273 | - var remove_sub_task=function(){ | ||
| 274 | - var activeDl=$(s_t_body, modal).find('dl.context-menu-active'); | ||
| 275 | - if(activeDl.length==0) | ||
| 276 | - return; | ||
| 277 | - var dds=activeDl.find('dd'); | ||
| 278 | - console.log(dds); | ||
| 279 | - var id=activeDl.data('id') | ||
| 280 | - ,str='<h3>确定要删除子任务<span style="color:red;margin: 0 5px;">'+ $(dds[4]).text()+','+ $(dds[6]).text() +' </span>?</h3>'; | ||
| 281 | - alt_confirm(str, function(){ | ||
| 282 | - gb_common.$del('/childTask/' + id, function(rs){ | ||
| 283 | - gb_schedule_table.updateSchedule(rs.t); | ||
| 284 | - notify_succ('删除子任务成功!'); | ||
| 285 | - //刷新班次列表 | ||
| 286 | - m_s_table_update(); | ||
| 287 | - //选中班次 | ||
| 288 | - selectedDl(rs.t); | ||
| 289 | - }); | ||
| 290 | - }, '确定删除'); | ||
| 291 | - } | 283 | + var remove_sub_task = function () { |
| 284 | + var activeDl = $(s_t_body, modal).find('dl.context-menu-active'); | ||
| 285 | + if (activeDl.length == 0) | ||
| 286 | + return; | ||
| 287 | + var dds = activeDl.find('dd'); | ||
| 288 | + console.log(dds); | ||
| 289 | + var id = activeDl.data('id') | ||
| 290 | + , str = '<h3>确定要删除子任务<span style="color:red;margin: 0 5px;">' + $(dds[4]).text() + ',' + $(dds[6]).text() + ' </span>?</h3>'; | ||
| 291 | + alt_confirm(str, function () { | ||
| 292 | + gb_common.$del('/childTask/' + id, function (rs) { | ||
| 293 | + gb_schedule_table.updateSchedule(rs.t); | ||
| 294 | + notify_succ('删除子任务成功!'); | ||
| 295 | + //刷新班次列表 | ||
| 296 | + m_s_table_update(); | ||
| 297 | + //选中班次 | ||
| 298 | + selectedDl(rs.t); | ||
| 299 | + }); | ||
| 300 | + }, '确定删除'); | ||
| 301 | + }; | ||
| 292 | 302 | ||
| 293 | - var callbackHandler={ | ||
| 294 | - add_temp_sch:add_temp_sch, | ||
| 295 | - remove_sch: remove_sch, | ||
| 296 | - add_sub_task_other:add_sub_task_other, | ||
| 297 | - remove_sub_task: remove_sub_task | ||
| 298 | - } | 303 | + var callbackHandler = { |
| 304 | + add_temp_sch: add_temp_sch, | ||
| 305 | + remove_sch: remove_sch, | ||
| 306 | + add_sub_task_other: add_sub_task_other, | ||
| 307 | + add_sub_task_in: add_sub_task_in, | ||
| 308 | + remove_sub_task: remove_sub_task | ||
| 309 | + }; | ||
| 299 | 310 | ||
| 300 | //右键菜单 | 311 | //右键菜单 |
| 301 | $.contextMenu({ | 312 | $.contextMenu({ |
| 302 | - selector: modal+ ' '+m_t_body+' dl', | 313 | + selector: modal + ' ' + m_t_body + ' dl', |
| 303 | className: 'schedule-ct-menu', | 314 | className: 'schedule-ct-menu', |
| 304 | - callback: function(key, options) { | 315 | + callback: function (key, options) { |
| 305 | callbackHandler[key] && callbackHandler[key](); | 316 | callbackHandler[key] && callbackHandler[key](); |
| 306 | }, | 317 | }, |
| 307 | items: { | 318 | items: { |
| @@ -313,11 +324,11 @@ | @@ -313,11 +324,11 @@ | ||
| 313 | items: { | 324 | items: { |
| 314 | 'add_sub_task_in': { | 325 | 'add_sub_task_in': { |
| 315 | name: '回场', | 326 | name: '回场', |
| 316 | - disabled:true | 327 | + disabled: true |
| 317 | }, | 328 | }, |
| 318 | 'add_sub_task_out': { | 329 | 'add_sub_task_out': { |
| 319 | name: '出场', | 330 | name: '出场', |
| 320 | - disabled:true | 331 | + disabled: true |
| 321 | }, | 332 | }, |
| 322 | 'add_sub_task_other': { | 333 | 'add_sub_task_other': { |
| 323 | name: '自定义' | 334 | name: '自定义' |
| @@ -325,16 +336,16 @@ | @@ -325,16 +336,16 @@ | ||
| 325 | } | 336 | } |
| 326 | }, | 337 | }, |
| 327 | 'remove_sch': { | 338 | 'remove_sch': { |
| 328 | - name: '删除' | 339 | + name: '删除' |
| 329 | } | 340 | } |
| 330 | } | 341 | } |
| 331 | }); | 342 | }); |
| 332 | 343 | ||
| 333 | //右键菜单 | 344 | //右键菜单 |
| 334 | $.contextMenu({ | 345 | $.contextMenu({ |
| 335 | - selector: modal+' '+s_t_body+' dl', | 346 | + selector: modal + ' ' + s_t_body + ' dl', |
| 336 | className: 'schedule-ct-menu', | 347 | className: 'schedule-ct-menu', |
| 337 | - callback: function(key, options) { | 348 | + callback: function (key, options) { |
| 338 | callbackHandler[key] && callbackHandler[key](); | 349 | callbackHandler[key] && callbackHandler[key](); |
| 339 | }, | 350 | }, |
| 340 | items: { | 351 | items: { |
| @@ -349,8 +360,8 @@ | @@ -349,8 +360,8 @@ | ||
| 349 | 360 | ||
| 350 | $('.add-temp-sch-icon', modal).on('click', add_temp_sch); | 361 | $('.add-temp-sch-icon', modal).on('click', add_temp_sch); |
| 351 | 362 | ||
| 352 | - function sub_task_sort(a, b){ | ||
| 353 | - return a.id - b.id; | 363 | + function sub_task_sort(a, b) { |
| 364 | + return a.id - b.id; | ||
| 354 | } | 365 | } |
| 355 | })(); | 366 | })(); |
| 356 | </script> | 367 | </script> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_inpark.html
0 → 100644
| 1 | +<div class="uk-modal" id="add-sub-task-inpark-modal"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 935px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <div class="uk-modal-header"> | ||
| 5 | + <h2>回场子任务</h2></div> | ||
| 6 | + | ||
| 7 | + <div class="uk-grid tm-grid-truncate" data-uk-grid-margin=""> | ||
| 8 | + <div class="uk-width-medium-1-3 uk-row-first"> | ||
| 9 | + <div class="uk-panel uk-panel-box uk-panel-box-primary"> | ||
| 10 | + <div class="uk-panel-badge uk-badge">营运</div> | ||
| 11 | + <h3 class="uk-panel-title">线路上站点间</h3> | ||
| 12 | + <form class="uk-form uk-form-horizontal"> | ||
| 13 | + <div class="uk-grid"> | ||
| 14 | + <div class="uk-width-3-10"> | ||
| 15 | + <div class="uk-form-row"> | ||
| 16 | + <label class="uk-form-label">起点 </label> | ||
| 17 | + </div> | ||
| 18 | + </div> | ||
| 19 | + <div class="uk-width-7-10 pl5"> | ||
| 20 | + <select name="startStation" required></select> | ||
| 21 | + </div> | ||
| 22 | + </div> | ||
| 23 | + <div class="uk-grid"> | ||
| 24 | + <div class="uk-width-3-10"> | ||
| 25 | + <div class="uk-form-row"> | ||
| 26 | + <label class="uk-form-label">终点 </label> | ||
| 27 | + </div> | ||
| 28 | + </div> | ||
| 29 | + <div class="uk-width-7-10 pl5"> | ||
| 30 | + <select name="endStation" required></select> | ||
| 31 | + </div> | ||
| 32 | + </div> | ||
| 33 | + <div class="uk-grid"> | ||
| 34 | + <div class="uk-width-3-10"> | ||
| 35 | + <div class="uk-form-row"> | ||
| 36 | + <label class="uk-form-label">营运里程</label> | ||
| 37 | + </div> | ||
| 38 | + </div> | ||
| 39 | + <div class="uk-width-7-10 pl5"> | ||
| 40 | + <select name="endStation" required></select> | ||
| 41 | + </div> | ||
| 42 | + </div> | ||
| 43 | + </form> | ||
| 44 | + </div> | ||
| 45 | + </div> | ||
| 46 | + <div class="uk-width-medium-1-3"> | ||
| 47 | + <div class="uk-panel uk-panel-box uk-panel-box-secondary"> | ||
| 48 | + <div class="uk-panel-badge uk-badge uk-badge-default">空驶</div> | ||
| 49 | + <h3 class="uk-panel-title">进场</h3> | ||
| 50 | + Lorem ipsum dolor sit amet, consectetur adipisicing elit. <code>.uk-panel-box-primary</code> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + <div class="uk-width-medium-1-3"> | ||
| 54 | + <div class="uk-panel uk-panel-box uk-panel-box-danger"> | ||
| 55 | + <div class="uk-panel-badge uk-badge uk-badge-danger">烂班</div> | ||
| 56 | + <h3 class="uk-panel-title">线路上站点间</h3> | ||
| 57 | + Lorem ipsum dolor sit amet, consectetur adipisicing elit. <code>.uk-panel-box-primary</code> | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + | ||
| 63 | + <script id="sub-task-inpark-form-temp" type="text/html"> | ||
| 64 | + </script> | ||
| 65 | + | ||
| 66 | + <script> | ||
| 67 | + (function() { | ||
| 68 | + var modal = '#add-sub-task-inpark-modal', | ||
| 69 | + sch, stationRoutes, parks, information; | ||
| 70 | + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他']; | ||
| 71 | + $(modal).on('init', function(e, data) { | ||
| 72 | + sch = data.sch; | ||
| 73 | + //var formHtml = template('sub-task-inpark-form-temp', {sch:sch, adjustExps: adjustExps}); | ||
| 74 | + //$('form', modal).html(formHtml); | ||
| 75 | + //字典转换 | ||
| 76 | + //dictionaryUtils.transformDom($('.nt-dictionary', modal)); | ||
| 77 | + | ||
| 78 | + //站点路由 | ||
| 79 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function(a, b){ | ||
| 80 | + return a.stationRouteCode-b.stationRouteCode; | ||
| 81 | + }), 'directions'); | ||
| 82 | + //停车场 | ||
| 83 | + $.get('/basic/parks', function(rs){ | ||
| 84 | + parks=rs; | ||
| 85 | + }); | ||
| 86 | + //线路标准 | ||
| 87 | + information=gb_data_basic.getLineInformation(sch.xlBm); | ||
| 88 | + | ||
| 89 | + //submit | ||
| 90 | + var f = $('form', modal).formValidation(gb_form_validation_opts); | ||
| 91 | + f.on('success.form.fv', function(e) { | ||
| 92 | + disabled_submit_btn(this); | ||
| 93 | + e.preventDefault(); | ||
| 94 | + var data = $(this).serializeJSON(); | ||
| 95 | +/* | ||
| 96 | + gb_common.$post('/childTask', data, function(rs){ | ||
| 97 | + notify_succ('子任务添加成功'); | ||
| 98 | + gb_schedule_table.updateSchedule(rs.t); | ||
| 99 | + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t}); | ||
| 100 | + UIkit.modal(modal).hide(); | ||
| 101 | + });*/ | ||
| 102 | + }); | ||
| 103 | + }); | ||
| 104 | + })(); | ||
| 105 | + </script> | ||
| 106 | +</div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_other.html
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <div class="uk-modal-dialog" style="width: 635px;"> | 2 | <div class="uk-modal-dialog" style="width: 635px;"> |
| 3 | <a href="" class="uk-modal-close uk-close"></a> | 3 | <a href="" class="uk-modal-close uk-close"></a> |
| 4 | <div class="uk-modal-header"> | 4 | <div class="uk-modal-header"> |
| 5 | - <h2>新增自定义子任务</h2></div> | 5 | + <h2>自定义子任务</h2></div> |
| 6 | <form class="uk-form uk-form-horizontal"> | 6 | <form class="uk-form uk-form-horizontal"> |
| 7 | </form> | 7 | </form> |
| 8 | </div> | 8 | </div> |
src/main/resources/static/real_control_v2/js/common.js
| @@ -124,8 +124,8 @@ var gb_common = (function () { | @@ -124,8 +124,8 @@ var gb_common = (function () { | ||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | var get_device_tree_data = function (allGps, idBefore) { | 126 | var get_device_tree_data = function (allGps, idBefore) { |
| 127 | - if(!idBefore) | ||
| 128 | - idBefore=''; | 127 | + if (!idBefore) |
| 128 | + idBefore = ''; | ||
| 129 | var treeData = []; | 129 | var treeData = []; |
| 130 | //var data = groupBy(get_vals(gb_data_gps.allGps), 'lineId'); | 130 | //var data = groupBy(get_vals(gb_data_gps.allGps), 'lineId'); |
| 131 | var data = groupBy(get_vals(allGps), 'lineId'); | 131 | var data = groupBy(get_vals(allGps), 'lineId'); |
| @@ -135,28 +135,28 @@ var gb_common = (function () { | @@ -135,28 +135,28 @@ var gb_common = (function () { | ||
| 135 | data[name] = groupBy(data[code], 'upDown'); | 135 | data[name] = groupBy(data[code], 'upDown'); |
| 136 | treeData.push({ | 136 | treeData.push({ |
| 137 | 'text': name, | 137 | 'text': name, |
| 138 | - 'a_attr': {'type': 'line', 'id': idBefore+'line_'+code}, | 138 | + 'a_attr': {'type': 'line', 'id': idBefore + 'line_' + code}, |
| 139 | 'children': [{ | 139 | 'children': [{ |
| 140 | 'text': '上行', | 140 | 'text': '上行', |
| 141 | - 'children': grabs(data[name][0]), | 141 | + 'children': grabs(data[name][0], idBefore), |
| 142 | 'a_attr': { | 142 | 'a_attr': { |
| 143 | 'type': 'route', | 143 | 'type': 'route', |
| 144 | 'route': code + '_0', | 144 | 'route': code + '_0', |
| 145 | - 'id': idBefore+'route_' + code + '_0' | 145 | + 'id': idBefore + 'route_' + code + '_0' |
| 146 | } | 146 | } |
| 147 | }, { | 147 | }, { |
| 148 | 'text': '下行', | 148 | 'text': '下行', |
| 149 | - 'children': grabs(data[name][1]), | 149 | + 'children': grabs(data[name][1], idBefore), |
| 150 | 'a_attr': { | 150 | 'a_attr': { |
| 151 | 'type': 'route', | 151 | 'type': 'route', |
| 152 | 'route': code + '_1', | 152 | 'route': code + '_1', |
| 153 | - 'id': idBefore+'route_' + code + '_1' | 153 | + 'id': idBefore + 'route_' + code + '_1' |
| 154 | } | 154 | } |
| 155 | }] | 155 | }] |
| 156 | }); | 156 | }); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | - function grabs(array) { | 159 | + function grabs(array, idBefore) { |
| 160 | if (!array) | 160 | if (!array) |
| 161 | return; | 161 | return; |
| 162 | var rs = []; | 162 | var rs = []; |
| @@ -165,7 +165,8 @@ var gb_common = (function () { | @@ -165,7 +165,8 @@ var gb_common = (function () { | ||
| 165 | 'text': this.nbbm, | 165 | 'text': this.nbbm, |
| 166 | 'a_attr': { | 166 | 'a_attr': { |
| 167 | 'type': 'device', | 167 | 'type': 'device', |
| 168 | - 'device': this.deviceId | 168 | + 'device': this.deviceId, |
| 169 | + 'id': idBefore + 'device_' + this.nbbm | ||
| 169 | }, | 170 | }, |
| 170 | 'data': {lineId: this.lineId, upDown: this.upDown}, | 171 | 'data': {lineId: this.lineId, upDown: this.upDown}, |
| 171 | 'icon': 'uk-icon-bus' | 172 | 'icon': 'uk-icon-bus' |
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
| @@ -113,8 +113,17 @@ input[type=checkbox].disabled{ | @@ -113,8 +113,17 @@ input[type=checkbox].disabled{ | ||
| 113 | width: 240px; | 113 | width: 240px; |
| 114 | right: 327px; | 114 | right: 327px; |
| 115 | padding-left: 20px; | 115 | padding-left: 20px; |
| 116 | + transition: all .07s linear; | ||
| 116 | } | 117 | } |
| 117 | 118 | ||
| 119 | +.real_bottom_panel .telescopic{ | ||
| 120 | + position: absolute; | ||
| 121 | + top: 4px; | ||
| 122 | + right: 7px; | ||
| 123 | + color: #827f7f; | ||
| 124 | + cursor: pointer; | ||
| 125 | + font-size: 16px; | ||
| 126 | +} | ||
| 118 | 127 | ||
| 119 | .real_right_gps_panel>form{ | 128 | .real_right_gps_panel>form{ |
| 120 | text-align: center; | 129 | text-align: center; |
| @@ -180,7 +189,7 @@ input[type=checkbox].disabled{ | @@ -180,7 +189,7 @@ input[type=checkbox].disabled{ | ||
| 180 | width: 100%; | 189 | width: 100%; |
| 181 | height: 100%; | 190 | height: 100%; |
| 182 | height: calc(100% - 7px); | 191 | height: calc(100% - 7px); |
| 183 | - overflow: auto; | 192 | + overflow: hidden; |
| 184 | padding-top: 7px; | 193 | padding-top: 7px; |
| 185 | font-size: 13px; | 194 | font-size: 13px; |
| 186 | position: relative; | 195 | position: relative; |
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
| @@ -7,7 +7,7 @@ var gb_map_gps_tree = (function () { | @@ -7,7 +7,7 @@ var gb_map_gps_tree = (function () { | ||
| 7 | var jstreeChanged = function (e, node, event) { | 7 | var jstreeChanged = function (e, node, event) { |
| 8 | gb_map_overlay_mge.refresh(); | 8 | gb_map_overlay_mge.refresh(); |
| 9 | }; | 9 | }; |
| 10 | - | 10 | + |
| 11 | var init = function (cb) { | 11 | var init = function (cb) { |
| 12 | var allGps = gb_data_gps.allGps; | 12 | var allGps = gb_data_gps.allGps; |
| 13 | _devices = gb_common.get_keys(allGps); | 13 | _devices = gb_common.get_keys(allGps); |
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/baidu.js
| @@ -73,20 +73,35 @@ var gb_map_baidu = (function(){ | @@ -73,20 +73,35 @@ var gb_map_baidu = (function(){ | ||
| 73 | if(polylines[opt.id]) | 73 | if(polylines[opt.id]) |
| 74 | return; | 74 | return; |
| 75 | 75 | ||
| 76 | - var pos = [], temps; | ||
| 77 | - var route = opt.upDown==0?opt.route.up:opt.route.down; | 76 | + var pos, temps; |
| 77 | + var route = opt.upDown==0?opt.route.up_bd:opt.route.down_bd; | ||
| 78 | + var polyline, _pLines=[]; | ||
| 79 | + $.each(route, function (i, item) { | ||
| 80 | + | ||
| 81 | + pos = []; | ||
| 82 | + $.each(item.split(','), function () { | ||
| 83 | + temps = this.split(' '); | ||
| 84 | + pos.push(new BMap.Point(temps[0], temps[1])); | ||
| 85 | + }); | ||
| 86 | + polyline = new BMap.Polyline(pos, opt.style); | ||
| 87 | + map.addOverlay(polyline); | ||
| 88 | + _pLines.push(polyline); | ||
| 89 | + | ||
| 90 | + }); | ||
| 78 | 91 | ||
| 79 | - $.each(route.split(','), function(){ | 92 | + //根据ID保存映射 |
| 93 | + polylines[opt.id]=_pLines; | ||
| 94 | + /*$.each(route.split(','), function(){ | ||
| 80 | temps = this.split(' '); | 95 | temps = this.split(' '); |
| 81 | pos.push(new BMap.Point(temps[0], temps[1])); | 96 | pos.push(new BMap.Point(temps[0], temps[1])); |
| 82 | - }); | 97 | + });*/ |
| 83 | 98 | ||
| 84 | - var polyline = new BMap.Polyline(pos, opt.style); | 99 | + /*var polyline = new BMap.Polyline(pos, opt.style); |
| 85 | //根据ID保存映射 | 100 | //根据ID保存映射 |
| 86 | polylines[opt.id]=polyline; | 101 | polylines[opt.id]=polyline; |
| 87 | if(opt.hide) | 102 | if(opt.hide) |
| 88 | polyline.hide(); | 103 | polyline.hide(); |
| 89 | - map.addOverlay(polyline); | 104 | + map.addOverlay(polyline);*/ |
| 90 | 105 | ||
| 91 | //延迟居中,避免多次调用时抖动 | 106 | //延迟居中,避免多次调用时抖动 |
| 92 | //delayToCenter(pos[parseInt(pos.length / 2)]); | 107 | //delayToCenter(pos[parseInt(pos.length / 2)]); |
| @@ -102,16 +117,24 @@ var gb_map_baidu = (function(){ | @@ -102,16 +117,24 @@ var gb_map_baidu = (function(){ | ||
| 102 | refreshPolyline: function (opt) { | 117 | refreshPolyline: function (opt) { |
| 103 | var idx = opt.idx; | 118 | var idx = opt.idx; |
| 104 | for(var id in polylines){ | 119 | for(var id in polylines){ |
| 105 | - if(idx.indexOf(id) != -1) | ||
| 106 | - polylines[id].show(); | ||
| 107 | - else | ||
| 108 | - polylines[id].hide(); | 120 | + if(idx.indexOf(id) != -1){ |
| 121 | + $.each(polylines[id], function () { | ||
| 122 | + this.show(); | ||
| 123 | + }) | ||
| 124 | + } | ||
| 125 | + else{ | ||
| 126 | + $.each(polylines[id], function () { | ||
| 127 | + this.hide(); | ||
| 128 | + }) | ||
| 129 | + } | ||
| 109 | } | 130 | } |
| 110 | }, | 131 | }, |
| 111 | //定位到线路中间点 | 132 | //定位到线路中间点 |
| 112 | centerToLine: function (opt) { | 133 | centerToLine: function (opt) { |
| 113 | - var pos=polylines[opt.id].getPath(); | ||
| 114 | - delayToCenter(pos[parseInt(pos.length / 2)]); | 134 | + var _pLines = polylines[opt.id]; |
| 135 | + delayToCenter(_pLines[parseInt(_pLines.length/2)].getPath()[0]); | ||
| 136 | + //var pos=polylines[opt.id].getPath(); | ||
| 137 | + //delayToCenter(pos[parseInt(pos.length / 2)]); | ||
| 115 | }, | 138 | }, |
| 116 | //绘制GPS信号 | 139 | //绘制GPS信号 |
| 117 | drawRealGpsMarker: function(opts){ | 140 | drawRealGpsMarker: function(opts){ |
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/gaode.js
| @@ -83,8 +83,31 @@ var gb_map_gaode = (function() { | @@ -83,8 +83,31 @@ var gb_map_gaode = (function() { | ||
| 83 | map.clearMap(); | 83 | map.clearMap(); |
| 84 | }, | 84 | }, |
| 85 | drawLine: function(opt){ | 85 | drawLine: function(opt){ |
| 86 | - //linePolyline = []; | ||
| 87 | - var pos = [], temps; | 86 | + if(polylines[opt.id]) |
| 87 | + return; | ||
| 88 | + | ||
| 89 | + var pos, temps; | ||
| 90 | + var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj; | ||
| 91 | + | ||
| 92 | + var polyline, _pLines=[]; | ||
| 93 | + $.each(route, function (i, item) { | ||
| 94 | + | ||
| 95 | + pos = []; | ||
| 96 | + $.each(item.split(','), function () { | ||
| 97 | + temps = this.split(' '); | ||
| 98 | + pos.push([temps[0], temps[1]]); | ||
| 99 | + }); | ||
| 100 | + | ||
| 101 | + opt.style.path=pos; | ||
| 102 | + var polyline = new AMap.Polyline(opt.style); | ||
| 103 | + polyline.setMap(map); | ||
| 104 | + | ||
| 105 | + _pLines.push(polyline); | ||
| 106 | + }); | ||
| 107 | + | ||
| 108 | + polylines[opt.id]=_pLines; | ||
| 109 | + | ||
| 110 | + /*var pos = [], temps; | ||
| 88 | var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj; | 111 | var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj; |
| 89 | 112 | ||
| 90 | $.each(route.split(','), function(){ | 113 | $.each(route.split(','), function(){ |
| @@ -99,21 +122,30 @@ var gb_map_gaode = (function() { | @@ -99,21 +122,30 @@ var gb_map_gaode = (function() { | ||
| 99 | if(opt.hide) | 122 | if(opt.hide) |
| 100 | polyline.hide(); | 123 | polyline.hide(); |
| 101 | 124 | ||
| 102 | - polyline.setMap(map); | 125 | + polyline.setMap(map);*/ |
| 103 | }, | 126 | }, |
| 104 | //定位到线路中间点 | 127 | //定位到线路中间点 |
| 105 | centerToLine: function (opt) { | 128 | centerToLine: function (opt) { |
| 106 | - var pos=polylines[opt.id].getPath(); | ||
| 107 | - map.setCenter(pos[parseInt(pos.length / 2)]); | 129 | + //var pos=polylines[opt.id].getPath(); |
| 130 | + //map.setCenter(pos[parseInt(pos.length / 2)]); | ||
| 131 | + | ||
| 132 | + var _pLines = polylines[opt.id]; | ||
| 133 | + map.setCenter(_pLines[parseInt(_pLines.length/2)].getPath()[0]); | ||
| 108 | }, | 134 | }, |
| 109 | //根据id 显示polyline | 135 | //根据id 显示polyline |
| 110 | refreshPolyline: function (opt) { | 136 | refreshPolyline: function (opt) { |
| 111 | var idx = opt.idx; | 137 | var idx = opt.idx; |
| 112 | for(var id in polylines){ | 138 | for(var id in polylines){ |
| 113 | - if(idx.indexOf(id) != -1) | ||
| 114 | - polylines[id].show(); | ||
| 115 | - else | ||
| 116 | - polylines[id].hide(); | 139 | + if(idx.indexOf(id) != -1){ |
| 140 | + $.each(polylines[id], function () { | ||
| 141 | + this.show(); | ||
| 142 | + }) | ||
| 143 | + } | ||
| 144 | + else{ | ||
| 145 | + $.each(polylines[id], function () { | ||
| 146 | + this.hide(); | ||
| 147 | + }) | ||
| 148 | + } | ||
| 117 | } | 149 | } |
| 118 | }, | 150 | }, |
| 119 | drawStationMarker: function (opt) { | 151 | drawStationMarker: function (opt) { |
| @@ -332,7 +364,6 @@ var gb_map_gaode = (function() { | @@ -332,7 +364,6 @@ var gb_map_gaode = (function() { | ||
| 332 | if(config.carIcon.angle) { | 364 | if(config.carIcon.angle) { |
| 333 | marker.setIcon(gb_map_imap.busIcon); | 365 | marker.setIcon(gb_map_imap.busIcon); |
| 334 | marker.setAngle(gps.direction - 90); | 366 | marker.setAngle(gps.direction - 90); |
| 335 | - marker.setOffset(new AMap.Pixel(-(w / 2), -12)); | ||
| 336 | 367 | ||
| 337 | marker.setLabel({ | 368 | marker.setLabel({ |
| 338 | content: gps.nbbm, | 369 | content: gps.nbbm, |
| @@ -345,6 +376,7 @@ var gb_map_gaode = (function() { | @@ -345,6 +376,7 @@ var gb_map_gaode = (function() { | ||
| 345 | image: gb_map_imap.createCarIcon(gps, w) | 376 | image: gb_map_imap.createCarIcon(gps, w) |
| 346 | })); | 377 | })); |
| 347 | } | 378 | } |
| 379 | + marker.setOffset(new AMap.Pixel(-(w / 2), -12.5)); | ||
| 348 | } | 380 | } |
| 349 | 381 | ||
| 350 | //创建站点marker | 382 | //创建站点marker |
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js
| @@ -203,11 +203,11 @@ var gb_map_overlay_mge = (function () { | @@ -203,11 +203,11 @@ var gb_map_overlay_mge = (function () { | ||
| 203 | 203 | ||
| 204 | //地图居中至合理的位置 | 204 | //地图居中至合理的位置 |
| 205 | var centerToRational=function () { | 205 | var centerToRational=function () { |
| 206 | - var chs=gb_map_gps_tree.getChecked(); | 206 | + /*var chs=getCheckedDevice(); |
| 207 | if(chs && chs.length > 0){ | 207 | if(chs && chs.length > 0){ |
| 208 | var id=chs[0].data.lineId+'_'+chs[0].data.upDown; | 208 | var id=chs[0].data.lineId+'_'+chs[0].data.upDown; |
| 209 | gb_map_imap.call('centerToLine', {id: id}); | 209 | gb_map_imap.call('centerToLine', {id: id}); |
| 210 | - } | 210 | + }*/ |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | return { | 213 | return { |
src/main/resources/static/real_control_v2/mapmonitor/js/real.js
| @@ -10,11 +10,12 @@ var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaod | @@ -10,11 +10,12 @@ var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaod | ||
| 10 | .changeMap(gb_map_config.getConfig().map_type); | 10 | .changeMap(gb_map_config.getConfig().map_type); |
| 11 | 11 | ||
| 12 | //init tree | 12 | //init tree |
| 13 | - gb_map_gps_tree.init(function () { | 13 | + /*gb_map_gps_tree.init(function () { |
| 14 | gb_map_overlay_mge.init(); | 14 | gb_map_overlay_mge.init(); |
| 15 | gb_map_spatial_data.init(); | 15 | gb_map_spatial_data.init(); |
| 16 | - }); | 16 | + });*/ |
| 17 | 17 | ||
| 18 | +/* | ||
| 18 | $(".real_bottom_panel").resizable({ | 19 | $(".real_bottom_panel").resizable({ |
| 19 | handles: { | 20 | handles: { |
| 20 | 'n': '.real_bottom_panel #handle' | 21 | 'n': '.real_bottom_panel #handle' |
| @@ -22,6 +23,27 @@ var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaod | @@ -22,6 +23,27 @@ var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaod | ||
| 22 | maxHeight: 384, | 23 | maxHeight: 384, |
| 23 | minHeight: 18 | 24 | minHeight: 18 |
| 24 | }); | 25 | }); |
| 26 | +*/ | ||
| 27 | + | ||
| 28 | + var maxHeight=384, minHeight=124, threshold=8; | ||
| 29 | + $(".real_bottom_panel").on('mousewheel', function (e) { | ||
| 30 | + var event = e.originalEvent; | ||
| 31 | + var code = delta = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3; | ||
| 32 | + | ||
| 33 | + if(code > 0){ | ||
| 34 | + var h = $(this).height()-threshold; | ||
| 35 | + $(this).height(h>minHeight?h:minHeight); | ||
| 36 | + } | ||
| 37 | + else{ | ||
| 38 | + var h = $(this).height()+threshold; | ||
| 39 | + $(this).height(h<maxHeight?h:maxHeight); | ||
| 40 | + } | ||
| 41 | + return false; | ||
| 42 | + }); | ||
| 43 | + | ||
| 44 | + $('.real_bottom_panel .telescopic').on('click', function () { | ||
| 45 | + | ||
| 46 | + }); | ||
| 25 | }); | 47 | }); |
| 26 | 48 | ||
| 27 | var gb_map_consts = { | 49 | var gb_map_consts = { |
| @@ -36,13 +58,13 @@ var gb_map_consts = { | @@ -36,13 +58,13 @@ var gb_map_consts = { | ||
| 36 | CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) { | 58 | CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) { |
| 37 | if (w < 2 * r) r = w / 2; | 59 | if (w < 2 * r) r = w / 2; |
| 38 | if (h < 2 * r) r = h / 2; | 60 | if (h < 2 * r) r = h / 2; |
| 39 | - this.strokeStyle ='rgba(0,102,0,.1)'; | 61 | + this.strokeStyle = 'rgba(0,102,0,.1)'; |
| 40 | this.beginPath(); | 62 | this.beginPath(); |
| 41 | - this.moveTo(x+r, y); | ||
| 42 | - this.arcTo(x+w, y, x+w, y+h, r); | ||
| 43 | - this.arcTo(x+w, y+h, x, y+h, r); | ||
| 44 | - this.arcTo(x, y+h, x, y, r); | ||
| 45 | - this.arcTo(x, y, x+w, y, r); | 63 | + this.moveTo(x + r, y); |
| 64 | + this.arcTo(x + w, y, x + w, y + h, r); | ||
| 65 | + this.arcTo(x + w, y + h, x, y + h, r); | ||
| 66 | + this.arcTo(x, y + h, x, y, r); | ||
| 67 | + this.arcTo(x, y, x + w, y, r); | ||
| 46 | this.closePath(); | 68 | this.closePath(); |
| 47 | return this; | 69 | return this; |
| 48 | } | 70 | } |
| 49 | \ No newline at end of file | 71 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/js/spatial_data.js
| @@ -126,7 +126,7 @@ var gb_map_spatial_data = (function () { | @@ -126,7 +126,7 @@ var gb_map_spatial_data = (function () { | ||
| 126 | 126 | ||
| 127 | refresh(); | 127 | refresh(); |
| 128 | }); | 128 | }); |
| 129 | - } | 129 | + }; |
| 130 | 130 | ||
| 131 | //计算多边形面积 | 131 | //计算多边形面积 |
| 132 | function calcPolygonArea(polygonStr) { | 132 | function calcPolygonArea(polygonStr) { |
src/main/resources/static/real_control_v2/mapmonitor/real.html
| @@ -32,8 +32,11 @@ | @@ -32,8 +32,11 @@ | ||
| 32 | </div> | 32 | </div> |
| 33 | 33 | ||
| 34 | <div class="real_bottom_panel"> | 34 | <div class="real_bottom_panel"> |
| 35 | - <div id="handle" class="ui-resizable-handle ui-resizable-n"></div> | 35 | + <!--<div id="handle" class="ui-resizable-handle ui-resizable-n"></div>--> |
| 36 | <div class="real_br_cont map_config_wrap"></div> | 36 | <div class="real_br_cont map_config_wrap"></div> |
| 37 | + <div class="telescopic"> | ||
| 38 | + <i class="uk-icon-angle-double-up" ></i> | ||
| 39 | + </div> | ||
| 37 | </div> | 40 | </div> |
| 38 | 41 | ||
| 39 | <div class="real_spatial_panel"> | 42 | <div class="real_spatial_panel"> |