Commit a078cb179538d483c7a73c06f66c6996f2efc899
1 parent
cc3f91ad
update...
Showing
3 changed files
with
8 additions
and
2 deletions
src/main/java/com/bsth/data/Station2ParkBuffer.java
| @@ -50,6 +50,8 @@ public class Station2ParkBuffer implements CommandLineRunner { | @@ -50,6 +50,8 @@ public class Station2ParkBuffer implements CommandLineRunner { | ||
| 50 | 50 | ||
| 51 | public static StationToPark get(String lineCode, String sName, String eName) { | 51 | public static StationToPark get(String lineCode, String sName, String eName) { |
| 52 | List<StationToPark> list = get(lineCode); | 52 | List<StationToPark> list = get(lineCode); |
| 53 | + if(null == list) | ||
| 54 | + return null; | ||
| 53 | StationToPark stp = null; | 55 | StationToPark stp = null; |
| 54 | for (StationToPark s : list) { | 56 | for (StationToPark s : list) { |
| 55 | if (s.getStationName().equals(sName) && s.getParkName().equals(eName)) { | 57 | if (s.getStationName().equals(sName) && s.getParkName().equals(eName)) { |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -16,6 +16,8 @@ import com.bsth.service.schedule.SchedulePlanInfoService; | @@ -16,6 +16,8 @@ import com.bsth.service.schedule.SchedulePlanInfoService; | ||
| 16 | import com.bsth.websocket.handler.SendUtils; | 16 | import com.bsth.websocket.handler.SendUtils; |
| 17 | import com.google.common.collect.ArrayListMultimap; | 17 | import com.google.common.collect.ArrayListMultimap; |
| 18 | import com.google.common.collect.HashMultimap; | 18 | import com.google.common.collect.HashMultimap; |
| 19 | +import com.google.common.collect.ListMultimap; | ||
| 20 | +import com.google.common.collect.Multimaps; | ||
| 19 | import org.apache.commons.lang3.StringUtils; | 21 | import org.apache.commons.lang3.StringUtils; |
| 20 | import org.joda.time.format.DateTimeFormat; | 22 | import org.joda.time.format.DateTimeFormat; |
| 21 | import org.joda.time.format.DateTimeFormatter; | 23 | import org.joda.time.format.DateTimeFormatter; |
| @@ -55,7 +57,7 @@ public class DayOfSchedule { | @@ -55,7 +57,7 @@ public class DayOfSchedule { | ||
| 55 | public static Map<String, List<SchedulePlanInfo>> schedulePlanMap; | 57 | public static Map<String, List<SchedulePlanInfo>> schedulePlanMap; |
| 56 | 58 | ||
| 57 | // 按车辆分组的班次数据 | 59 | // 按车辆分组的班次数据 |
| 58 | - private static ArrayListMultimap<String, ScheduleRealInfo> nbbmScheduleMap; | 60 | + private static ListMultimap<String, ScheduleRealInfo> nbbmScheduleMap; |
| 59 | 61 | ||
| 60 | //按线路分组计划用车 | 62 | //按线路分组计划用车 |
| 61 | private static HashMultimap<String, String> lineNbbmsMap; | 63 | private static HashMultimap<String, String> lineNbbmsMap; |
| @@ -104,6 +106,8 @@ public class DayOfSchedule { | @@ -104,6 +106,8 @@ public class DayOfSchedule { | ||
| 104 | 106 | ||
| 105 | static { | 107 | static { |
| 106 | nbbmScheduleMap = ArrayListMultimap.create(); | 108 | nbbmScheduleMap = ArrayListMultimap.create(); |
| 109 | + nbbmScheduleMap = Multimaps.synchronizedListMultimap(nbbmScheduleMap); | ||
| 110 | + | ||
| 107 | lpScheduleMap = ArrayListMultimap.create(); | 111 | lpScheduleMap = ArrayListMultimap.create(); |
| 108 | lineNbbmsMap = HashMultimap.create(); | 112 | lineNbbmsMap = HashMultimap.create(); |
| 109 | 113 |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
| @@ -298,7 +298,7 @@ | @@ -298,7 +298,7 @@ | ||
| 298 | nbbm: nbbm | 298 | nbbm: nbbm |
| 299 | } | 299 | } |
| 300 | , function (rs) { | 300 | , function (rs) { |
| 301 | - $('form.tzrc_form [type=submit]', modal).removeAttr('disabled'); | 301 | + //$('form.tzrc_form [type=submit]', modal).removeAttr('disabled'); |
| 302 | if(rs['checkStatus']==1) | 302 | if(rs['checkStatus']==1) |
| 303 | cb && cb(); | 303 | cb && cb(); |
| 304 | else if (rs['checkStatus']==-2){ | 304 | else if (rs['checkStatus']==-2){ |