Commit 31b14daffce6de32fea03ba66e469eedfa606b7b
Merge branch 'pudong' of http://222.66.0.204:8090//panzhaov5/bsth_control into pudong
Showing
7 changed files
with
51 additions
and
22 deletions
src/main/java/com/bsth/common/Constants.java
| ... | ... | @@ -38,6 +38,7 @@ public class Constants { |
| 38 | 38 | |
| 39 | 39 | public static final String SESSION_USERNAME = "sessionUserName"; |
| 40 | 40 | public static final String COMPANY_AUTHORITYS = "cmyAuths"; |
| 41 | + public static final String STATION_AND_SECTION_COUNT = "/station/updateStationAndSectionCode"; | |
| 41 | 42 | |
| 42 | 43 | /** |
| 43 | 44 | * 解除调度指令和班次的外键约束 | ... | ... |
src/main/java/com/bsth/data/gpsdata_v2/GpsRealData.java
| ... | ... | @@ -123,7 +123,13 @@ public class GpsRealData { |
| 123 | 123 | * @Title: get @Description: TODO(线路编码获取GPS集合) @throws |
| 124 | 124 | */ |
| 125 | 125 | public List<GpsEntity> getByLine(String lineCode) { |
| 126 | - NavigableSet<String> set = lineCode2Devices.get(lineCode); | |
| 126 | + NavigableSet<String> set = lineCode2Devices.get(lineCode);//实际车载 | |
| 127 | + Set<String> nbbmSet = dayOfSchedule.findCarByLineCode(lineCode);//计划用车 | |
| 128 | + | |
| 129 | + Map<String, String> nbbm2deviceMap = BasicData.deviceId2NbbmMap.inverse(); | |
| 130 | + for(String nbbm : nbbmSet){ | |
| 131 | + set.add(nbbm2deviceMap.get(nbbm)); | |
| 132 | + } | |
| 127 | 133 | |
| 128 | 134 | List<GpsEntity> rs = new ArrayList<>(); |
| 129 | 135 | GpsEntity gps; | ... | ... |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -15,6 +15,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 15 | 15 | import com.bsth.service.schedule.SchedulePlanInfoService; |
| 16 | 16 | import com.bsth.websocket.handler.SendUtils; |
| 17 | 17 | import com.google.common.collect.ArrayListMultimap; |
| 18 | +import com.google.common.collect.HashMultimap; | |
| 18 | 19 | import org.apache.commons.lang3.StringUtils; |
| 19 | 20 | import org.joda.time.format.DateTimeFormat; |
| 20 | 21 | import org.joda.time.format.DateTimeFormatter; |
| ... | ... | @@ -55,6 +56,9 @@ public class DayOfSchedule { |
| 55 | 56 | // 按车辆分组的班次数据 |
| 56 | 57 | private static ArrayListMultimap<String, ScheduleRealInfo> nbbmScheduleMap; |
| 57 | 58 | |
| 59 | + //按线路分组计划用车 | |
| 60 | + private static HashMultimap<String, String> lineNbbmsMap; | |
| 61 | + | |
| 58 | 62 | //按路牌分组的班次数据 线路编码_路牌名称 ——> 班次list |
| 59 | 63 | private static ArrayListMultimap<String, ScheduleRealInfo> lpScheduleMap; |
| 60 | 64 | |
| ... | ... | @@ -199,6 +203,8 @@ public class DayOfSchedule { |
| 199 | 203 | reCalcExecPlan(nbbm); |
| 200 | 204 | } |
| 201 | 205 | |
| 206 | + //分组计划用车 | |
| 207 | + reCalcLineNbbms(); | |
| 202 | 208 | // 页面 翻班通知 |
| 203 | 209 | //sendUtils.shiftSchedule(lineCode); |
| 204 | 210 | } catch (Exception e) { |
| ... | ... | @@ -543,15 +549,15 @@ public class DayOfSchedule { |
| 543 | 549 | * @Description: TODO(线路下运营的车辆) |
| 544 | 550 | */ |
| 545 | 551 | public Set<String> findCarByLineCode(String lineCode) { |
| 546 | - Set<String> rs = new HashSet<>(); | |
| 552 | + /*Set<String> rs = new HashSet<>(); | |
| 547 | 553 | |
| 548 | 554 | Collection<ScheduleRealInfo> schs = nbbmScheduleMap.values(); |
| 549 | 555 | for (ScheduleRealInfo sch : schs) { |
| 550 | 556 | if (sch.getXlBm().equals(lineCode)) |
| 551 | 557 | rs.add(sch.getClZbh()); |
| 552 | 558 | } |
| 553 | - | |
| 554 | - return rs; | |
| 559 | +*/ | |
| 560 | + return lineNbbmsMap.get(lineCode); | |
| 555 | 561 | } |
| 556 | 562 | |
| 557 | 563 | public List<ScheduleRealInfo> findByNbbm(String nbbm) { |
| ... | ... | @@ -908,6 +914,8 @@ public class DayOfSchedule { |
| 908 | 914 | //重新计算车辆当前执行班次 |
| 909 | 915 | reCalcExecPlan(newClZbh); |
| 910 | 916 | reCalcExecPlan(sch.getClZbh()); |
| 917 | + //重新分组计划用车 | |
| 918 | + reCalcLineNbbms(); | |
| 911 | 919 | return ups; |
| 912 | 920 | } |
| 913 | 921 | |
| ... | ... | @@ -1082,6 +1090,20 @@ public class DayOfSchedule { |
| 1082 | 1090 | return id2SchedulMap.size(); |
| 1083 | 1091 | } |
| 1084 | 1092 | |
| 1093 | + /** | |
| 1094 | + * 重新计算线路计划用车 | |
| 1095 | + */ | |
| 1096 | + public void reCalcLineNbbms(){ | |
| 1097 | + HashMultimap<String, String> multimap = HashMultimap.create(); | |
| 1098 | + | |
| 1099 | + Collection<ScheduleRealInfo> schs = nbbmScheduleMap.values(); | |
| 1100 | + for (ScheduleRealInfo sch : schs) { | |
| 1101 | + multimap.put(sch.getXlBm(), sch.getClZbh()); | |
| 1102 | + } | |
| 1103 | + | |
| 1104 | + lineNbbmsMap = multimap; | |
| 1105 | + } | |
| 1106 | + | |
| 1085 | 1107 | public String sizeString(){ |
| 1086 | 1108 | return id2SchedulMap.size() + "/" + nbbmScheduleMap.size(); |
| 1087 | 1109 | } | ... | ... |
src/main/java/com/bsth/filter/BaseFilter.java
| ... | ... | @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { |
| 17 | 17 | * 白名单 |
| 18 | 18 | */ |
| 19 | 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 20 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL }; | |
| 20 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT }; | |
| 21 | 21 | |
| 22 | 22 | @Override |
| 23 | 23 | public void destroy() { | ... | ... |
src/main/java/com/bsth/security/WebSecurityConfig.java
| ... | ... | @@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { |
| 36 | 36 | public void configure(WebSecurity web) throws Exception { |
| 37 | 37 | // 白名单 |
| 38 | 38 | web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA, |
| 39 | - Constants.SERVICE_INTERFACE, Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL); | |
| 39 | + Constants.SERVICE_INTERFACE, Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT); | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | @Override | ... | ... |
src/main/java/com/bsth/security/filter/LoginInterceptor.java
| ... | ... | @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter { |
| 33 | 33 | * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证 |
| 34 | 34 | */ |
| 35 | 35 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 36 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL }; | |
| 36 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT }; | |
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | @Override | ... | ... |
src/main/resources/static/index.html
| ... | ... | @@ -612,24 +612,24 @@ |
| 612 | 612 | |
| 613 | 613 | <!-- 地图相关 --> |
| 614 | 614 | <!-- 百度 --> |
| 615 | -<!--<script--> | |
| 616 | - <!--src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"--> | |
| 617 | - <!--data-exclude=1></script>--> | |
| 618 | -<!--<script--> | |
| 619 | - <!--src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"--> | |
| 620 | - <!--data-exclude=1></script>--> | |
| 621 | -<!--<script type="text/javascript"--> | |
| 622 | - <!--src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"--> | |
| 623 | - <!--data-exclude=1></script>--> | |
| 624 | -<!--<script type="text/javascript"--> | |
| 625 | - <!--src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "--> | |
| 626 | - <!--data-exclude=1></script>--> | |
| 615 | +<script | |
| 616 | + src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT" | |
| 617 | + data-exclude=1></script> | |
| 618 | +<script | |
| 619 | + src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js" | |
| 620 | + data-exclude=1></script> | |
| 621 | +<script type="text/javascript" | |
| 622 | + src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js" | |
| 623 | + data-exclude=1></script> | |
| 624 | +<script type="text/javascript" | |
| 625 | + src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js " | |
| 626 | + data-exclude=1></script> | |
| 627 | 627 | <script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script> |
| 628 | 628 | <script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script> |
| 629 | 629 | <!-- 高德 --> |
| 630 | -<!--<script--> | |
| 631 | - <!--src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"--> | |
| 632 | - <!--data-exclude=1></script>--> | |
| 630 | +<script | |
| 631 | + src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda" | |
| 632 | + data-exclude=1></script> | |
| 633 | 633 | |
| 634 | 634 | <script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> |
| 635 | 635 | ... | ... |