Commit 2377da07f0093df3c7fa07765982075e9bf2bfb1

Authored by 廖磊
2 parents 41e5778d 7707696e

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
src/main/java/com/bsth/controller/excep/NowOutboundController.java
1 package com.bsth.controller.excep; 1 package com.bsth.controller.excep;
2 2
  3 +import java.text.ParseException;
3 import java.util.HashMap; 4 import java.util.HashMap;
  5 +import java.util.List;
4 import java.util.Map; 6 import java.util.Map;
5 7
6 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
@@ -10,7 +12,9 @@ import org.springframework.web.bind.annotation.RequestParam; @@ -10,7 +12,9 @@ import org.springframework.web.bind.annotation.RequestParam;
10 import org.springframework.web.bind.annotation.RestController; 12 import org.springframework.web.bind.annotation.RestController;
11 13
12 import com.bsth.controller.BaseController; 14 import com.bsth.controller.BaseController;
  15 +import com.bsth.data.BasicData;
13 import com.bsth.entity.excep.Outbound; 16 import com.bsth.entity.excep.Outbound;
  17 +import com.bsth.entity.excep.Speeding;
14 import com.bsth.entity.sys.SysUser; 18 import com.bsth.entity.sys.SysUser;
15 import com.bsth.service.excep.NowOutboundService; 19 import com.bsth.service.excep.NowOutboundService;
16 import com.bsth.util.PageObject; 20 import com.bsth.util.PageObject;
@@ -44,5 +48,11 @@ public class NowOutboundController extends BaseController<SysUser, Integer>{ @@ -44,5 +48,11 @@ public class NowOutboundController extends BaseController<SysUser, Integer>{
44 return modelMap; 48 return modelMap;
45 } 49 }
46 50
  51 + @RequestMapping(value = "/findPosition", method = RequestMethod.GET)
  52 + public List<Outbound> findPosition(@RequestParam String vehicle,@RequestParam String startdate,@RequestParam String enddate) throws ParseException {
  53 + String deviceid = BasicData.deviceId2NbbmMap.inverse().get(vehicle);
  54 + List<Outbound> listOutbound = nowOutboundService.findPosition(deviceid,startdate,enddate);
  55 + return listOutbound;
  56 + }
47 57
48 } 58 }
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
@@ -198,6 +198,7 @@ public class SchAttrCalculator { @@ -198,6 +198,7 @@ public class SchAttrCalculator {
198 public ScheduleRealInfo calcCurrentExecSch(List<ScheduleRealInfo> list){ 198 public ScheduleRealInfo calcCurrentExecSch(List<ScheduleRealInfo> list){
199 String lineCode = list.get(0).getXlBm(); 199 String lineCode = list.get(0).getXlBm();
200 LineConfig conf = lineConfigData.get(lineCode); 200 LineConfig conf = lineConfigData.get(lineCode);
  201 + long t = System.currentTimeMillis();
201 int outConfig = -1; 202 int outConfig = -1;
202 //限定出站既出场的停车场 203 //限定出站既出场的停车场
203 String park = null; 204 String park = null;
@@ -221,8 +222,62 @@ public class SchAttrCalculator { @@ -221,8 +222,62 @@ public class SchAttrCalculator {
221 if(StringUtils.isNotEmpty(sch.getZdsjActual())) 222 if(StringUtils.isNotEmpty(sch.getZdsjActual()))
222 continue; 223 continue;
223 224
  225 + if(Math.abs((t - sch.getDfsjT())) > 1000 * 60 * 60){
  226 + //差值较大,倒着找看有没有更合适的
  227 + ScheduleRealInfo schReverse = calcCurrentExecSchReverse(list, outConfig, limitPark, park);
  228 + if(null != schReverse && !schReverse.getId().equals(sch.getId())){
  229 + logger.info("calc_current_exec_sch_reverse... -" + schReverse.getId());
  230 + return suitableExecSch(schReverse, sch, t);
  231 + }
  232 + }
224 return sch; 233 return sch;
225 } 234 }
226 return null; 235 return null;
227 } 236 }
  237 +
  238 + /**
  239 + * 反转匹配一个班次
  240 + * @param list
  241 + * @param outConfig
  242 + * @param limitPark
  243 + * @param park
  244 + * @return
  245 + */
  246 + private ScheduleRealInfo calcCurrentExecSchReverse(List<ScheduleRealInfo> list, int outConfig, boolean limitPark, String park){
  247 + ScheduleRealInfo near = null;
  248 + for(ScheduleRealInfo sch : list){
  249 + //如果是出站既出场,忽略出场班次
  250 + if(outConfig == 2 && isInout(sch)
  251 + && (!limitPark || park.equals(sch.getQdzCode()) || park.equals(sch.getZdzCode())))
  252 + continue;
  253 +
  254 + //忽略烂班
  255 + if(sch.isDestroy())
  256 + continue;
  257 +
  258 + if(StringUtils.isNotEmpty(sch.getZdsjActual())){
  259 + near = null;
  260 + continue;
  261 + }
  262 +
  263 + if(null == near)
  264 + near = sch;
  265 + }
  266 + return near;
  267 + }
  268 +
  269 + /**
  270 + * 比较2个班次,谁是指定时间更合适执行的
  271 + * @param schReverse
  272 + * @param sch
  273 + * @param t
  274 + * @return
  275 + */
  276 + private ScheduleRealInfo suitableExecSch(ScheduleRealInfo schReverse, ScheduleRealInfo sch, long t){
  277 + return Math.abs(t - schReverse.getDfsjT()) > Math.abs(t - sch.getDfsjT())?sch: schReverse;
  278 + }
  279 +
  280 + private boolean isInout(ScheduleRealInfo sch){
  281 + return sch.getBcType().equals("out") || sch.getBcType().equals("in");
  282 + }
228 } 283 }
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
@@ -101,6 +101,7 @@ public class LateAdjustHandle implements ApplicationContextAware{ @@ -101,6 +101,7 @@ public class LateAdjustHandle implements ApplicationContextAware{
101 lateSchMap.remove(sch.getClZbh()); 101 lateSchMap.remove(sch.getClZbh());
102 sch.setLate2(false); 102 sch.setLate2(false);
103 sch.setLateMinute(0); 103 sch.setLateMinute(0);
  104 + sch.setDfAuto(false);
104 } 105 }
105 }catch (Exception e){ 106 }catch (Exception e){
106 logger.error("", e); 107 logger.error("", e);
src/main/java/com/bsth/entity/excep/Outbound.java
@@ -34,9 +34,6 @@ public class Outbound { @@ -34,9 +34,6 @@ public class Outbound {
34 */ 34 */
35 private String lineName; 35 private String lineName;
36 36
37 -  
38 -  
39 -  
40 /** 37 /**
41 * 上下行(0 上行 , 1 下行 , -1 无效) 38 * 上下行(0 上行 , 1 下行 , -1 无效)
42 */ 39 */
@@ -57,18 +54,66 @@ public class Outbound { @@ -57,18 +54,66 @@ public class Outbound {
57 */ 54 */
58 private String location; 55 private String location;
59 56
  57 + /**
  58 + * 超速结束时经度
  59 + */
  60 + private Float endlon;
  61 +
  62 + /**
  63 + * 超速结束时纬度
  64 + */
  65 + private Float endlat;
60 66
61 /** 67 /**
62 * 时间戳 68 * 时间戳
63 */ 69 */
64 private Long timestamp; 70 private Long timestamp;
65 71
  72 + public Float getEndlon() {
  73 + return endlon;
  74 + }
  75 +
  76 + public void setEndlon(Float endlon) {
  77 + this.endlon = endlon;
  78 + }
  79 +
  80 + public Float getEndlat() {
  81 + return endlat;
  82 + }
  83 +
  84 + public void setEndlat(Float endlat) {
  85 + this.endlat = endlat;
  86 + }
  87 +
  88 + public Long getEndtimestamp() {
  89 + return endtimestamp;
  90 + }
  91 +
  92 + public void setEndtimestamp(Long endtimestamp) {
  93 + this.endtimestamp = endtimestamp;
  94 + }
  95 +
  96 + public String getEndtimestampDate() {
  97 + return endtimestampDate;
  98 + }
  99 +
  100 + public void setEndtimestampDate(String endtimestampDate) {
  101 + this.endtimestampDate = endtimestampDate;
  102 + }
  103 +
66 /** 104 /**
67 * 时间戳转换的时间 105 * 时间戳转换的时间
68 */ 106 */
69 private String timestampDate; 107 private String timestampDate;
70 108
71 109
  110 + //结束时间,单位:秒/s
  111 + @Transient
  112 + private Long endtimestamp;
  113 +
  114 + @Transient
  115 + private String endtimestampDate;
  116 +
72 /** 117 /**
73 * 时间 118 * 时间
74 */ 119 */
src/main/java/com/bsth/service/excep/NowOutboundService.java
1 package com.bsth.service.excep; 1 package com.bsth.service.excep;
2 2
  3 +import java.util.List;
3 import java.util.Map; 4 import java.util.Map;
4 5
5 import com.bsth.entity.excep.Outbound; 6 import com.bsth.entity.excep.Outbound;
@@ -8,4 +9,6 @@ import com.bsth.util.PageObject; @@ -8,4 +9,6 @@ import com.bsth.util.PageObject;
8 public interface NowOutboundService { 9 public interface NowOutboundService {
9 PageObject <Outbound> Pagequery(Map<String, Object> map) ; 10 PageObject <Outbound> Pagequery(Map<String, Object> map) ;
10 Map<String, Object> getReport( Map<String, Object> map); 11 Map<String, Object> getReport( Map<String, Object> map);
  12 + List<Outbound> findPosition(String deviceid, String startdate,
  13 + String enddate);
11 } 14 }
src/main/java/com/bsth/service/excep/impl/NowOutboundServiceImpl.java
@@ -14,16 +14,16 @@ import java.util.Map; @@ -14,16 +14,16 @@ import java.util.Map;
14 14
15 import org.springframework.beans.factory.annotation.Autowired; 15 import org.springframework.beans.factory.annotation.Autowired;
16 import org.springframework.jdbc.core.JdbcTemplate; 16 import org.springframework.jdbc.core.JdbcTemplate;
17 -import org.springframework.jdbc.core.RowMapper;  
18 import org.springframework.stereotype.Service; 17 import org.springframework.stereotype.Service;
19 18
20 import com.bsth.data.BasicData; 19 import com.bsth.data.BasicData;
21 import com.bsth.entity.excep.Outbound; 20 import com.bsth.entity.excep.Outbound;
22 -import com.bsth.entity.realcontrol.ScheduleRealInfo;  
23 import com.bsth.service.excep.NowOutboundService; 21 import com.bsth.service.excep.NowOutboundService;
24 import com.bsth.util.EchartConver; 22 import com.bsth.util.EchartConver;
25 import com.bsth.util.PageHelper; 23 import com.bsth.util.PageHelper;
26 import com.bsth.util.PageObject; 24 import com.bsth.util.PageObject;
  25 +import com.bsth.util.TransGPS;
  26 +import com.bsth.util.TransGPS.Location;
27 import com.bsth.util.db.DBUtils_MS; 27 import com.bsth.util.db.DBUtils_MS;
28 import com.github.abel533.echarts.Option; 28 import com.github.abel533.echarts.Option;
29 import com.google.gson.Gson; 29 import com.google.gson.Gson;
@@ -37,7 +37,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -37,7 +37,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{
37 ResultSet rs = null; 37 ResultSet rs = null;
38 int page=Integer.parseInt(map.get("page").toString()); 38 int page=Integer.parseInt(map.get("page").toString());
39 List<Outbound> list=new ArrayList<Outbound>(); 39 List<Outbound> list=new ArrayList<Outbound>();
40 - String sql="select * from bsth_c_outbound where 1=1 "; 40 + String sql="select * from bsth_c_outbound_handle where 1=1 ";
41 Object line=map.get("line"); 41 Object line=map.get("line");
42 Object nbbm=map.get("nbbm"); 42 Object nbbm=map.get("nbbm");
43 Object updown=map.get("updown"); 43 Object updown=map.get("updown");
@@ -61,7 +61,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -61,7 +61,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{
61 try { 61 try {
62 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime(); 62 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime();
63 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime(); 63 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime();
64 - sql += " and timestamp >="+t1 +" and timestamp <="+t2; 64 + sql += " and starttimestamp >="+t1 +" and endtimestamp <="+t2;
65 } catch (ParseException e) { 65 } catch (ParseException e) {
66 // TODO Auto-generated catch block 66 // TODO Auto-generated catch block
67 e.printStackTrace(); 67 e.printStackTrace();
@@ -69,8 +69,10 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -69,8 +69,10 @@ public class NowOutboundServiceImpl implements NowOutboundService{
69 } 69 }
70 70
71 } 71 }
72 - // sql +=" order by id limit ?,?";  
73 - sql +=" order by timestamp limit ?,?"; 72 +
  73 + sql +=" and endtimestamp - starttimestamp >10000 ";//越界超过30秒的才显示,有待探讨。
  74 +
  75 + sql +=" order by starttimestamp limit ?,?";
74 76
75 try { 77 try {
76 conn = DBUtils_MS.getConnection(); 78 conn = DBUtils_MS.getConnection();
@@ -90,22 +92,29 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -90,22 +92,29 @@ public class NowOutboundServiceImpl implements NowOutboundService{
90 } 92 }
91 93
92 static List<Outbound> resultSet2Set(ResultSet rs) throws SQLException{ 94 static List<Outbound> resultSet2Set(ResultSet rs) throws SQLException{
93 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); 95 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
94 List<Outbound> list=new ArrayList<Outbound>(); 96 List<Outbound> list=new ArrayList<Outbound>();
95 Outbound outbound; 97 Outbound outbound;
  98 + Location location;
96 while(rs.next()){ 99 while(rs.next()){
97 outbound=new Outbound(); 100 outbound=new Outbound();
98 - // outbound.setId(Integer.valueOf(rs.getObject("id").toString())); 101 + outbound.setId(Integer.valueOf(rs.getObject("id").toString()));
99 outbound.setLine(Integer.valueOf(rs.getObject("line").toString())); 102 outbound.setLine(Integer.valueOf(rs.getObject("line").toString()));
100 outbound.setUpDown(Integer.valueOf(rs.getObject("up_down").toString())); 103 outbound.setUpDown(Integer.valueOf(rs.getObject("up_down").toString()));
101 - outbound.setLon(Float.valueOf(rs.getObject("lon").toString()));  
102 - outbound.setLat(Float.valueOf(rs.getObject("lat").toString())); 104 + //将gps的经纬度转成百度的经纬度
  105 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(rs.getFloat("startLon"), rs.getFloat("startLat"))));
  106 + outbound.setLon((float)location.getLng());
  107 + outbound.setLat((float)location.getLat());
  108 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(rs.getFloat("endLon"), rs.getFloat("endLat"))));
  109 + outbound.setEndlon((float)location.getLng());
  110 + outbound.setEndlat((float)location.getLat());
  111 + outbound.setTimestamp((Long.valueOf(rs.getObject("startTimestamp").toString())));
  112 + outbound.setTimestampDate(sdf.format(new Date(outbound.getTimestamp())));
  113 + outbound.setEndtimestamp((Long.valueOf(rs.getObject("endTimestamp").toString())));
  114 + outbound.setEndtimestampDate(sdf.format(new Date(outbound.getEndtimestamp())));
103 //run 时注解 115 //run 时注解
104 outbound.setLineName(BasicData.lineCode2NameMap.get(outbound.getLine().toString())); 116 outbound.setLineName(BasicData.lineCode2NameMap.get(outbound.getLine().toString()));
105 - outbound.setTimestamp((Long.valueOf(rs.getObject("timestamp").toString())));  
106 - outbound.setTimestampDate(sdf.format(new Date(outbound.getTimestamp())));  
107 outbound.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString())); 117 outbound.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString()));
108 -// outbound.setLocation(rs.getObject("location")==null?"":rs.getObject("location").toString());  
109 list.add(outbound); 118 list.add(outbound);
110 } 119 }
111 return list; 120 return list;
@@ -114,7 +123,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -114,7 +123,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{
114 @Override 123 @Override
115 public PageObject<Outbound> Pagequery(Map<String, Object> map) { 124 public PageObject<Outbound> Pagequery(Map<String, Object> map) {
116 // TODO Auto-generated method stub PageObject<Outbound> Pagequery 125 // TODO Auto-generated method stub PageObject<Outbound> Pagequery
117 - String sql="select count(*) record from bsth_c_outbound where 1=1 "; 126 + String sql="select count(*) record from bsth_c_outbound_handle where 1=1 ";
118 Object line=map.get("line"); 127 Object line=map.get("line");
119 Object nbbm=map.get("nbbm"); 128 Object nbbm=map.get("nbbm");
120 Object updown=map.get("updown"); 129 Object updown=map.get("updown");
@@ -139,7 +148,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -139,7 +148,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{
139 try { 148 try {
140 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime(); 149 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime();
141 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime(); 150 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime();
142 - sql += " and timestamp >="+t1 +" and timestamp <="+t2; 151 + sql += " and starttimestamp >="+t1 +" and endtimestamp <="+t2;
143 } catch (ParseException e) { 152 } catch (ParseException e) {
144 // TODO Auto-generated catch block 153 // TODO Auto-generated catch block
145 e.printStackTrace(); 154 e.printStackTrace();
@@ -147,6 +156,9 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -147,6 +156,9 @@ public class NowOutboundServiceImpl implements NowOutboundService{
147 } 156 }
148 157
149 } 158 }
  159 +
  160 + sql +=" and endtimestamp - starttimestamp >10000 ";//yue越界超过10秒的才显示,有待探讨。
  161 +
150 Connection conn = null; 162 Connection conn = null;
151 PreparedStatement ps = null; 163 PreparedStatement ps = null;
152 ResultSet rs = null; 164 ResultSet rs = null;
@@ -165,10 +177,9 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -165,10 +177,9 @@ public class NowOutboundServiceImpl implements NowOutboundService{
165 }finally { 177 }finally {
166 DBUtils_MS.close(rs, ps, conn); 178 DBUtils_MS.close(rs, ps, conn);
167 } 179 }
168 -  
169 PageHelper pageHelper = new PageHelper(totalData, map); 180 PageHelper pageHelper = new PageHelper(totalData, map);
170 List<Outbound> list=findAll(pageHelper.getMap()); 181 List<Outbound> list=findAll(pageHelper.getMap());
171 - for (int i = 0; i < list.size(); i++) { 182 +/* for (int i = 0; i < list.size(); i++) {
172 String nbbm2=list.get(i).getVehicle() ; 183 String nbbm2=list.get(i).getVehicle() ;
173 Long d1=list.get(i).getTimestamp(); 184 Long d1=list.get(i).getTimestamp();
174 Date datess = new Date(d1); 185 Date datess = new Date(d1);
@@ -194,7 +205,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -194,7 +205,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{
194 205
195 } 206 }
196 207
197 - } 208 + }*/
198 PageObject<Outbound> pageObject = pageHelper.getPageObject(); 209 PageObject<Outbound> pageObject = pageHelper.getPageObject();
199 pageObject.setDataList(list); 210 pageObject.setDataList(list);
200 return pageObject; 211 return pageObject;
@@ -319,4 +330,45 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -319,4 +330,45 @@ public class NowOutboundServiceImpl implements NowOutboundService{
319 330
320 return dataList; 331 return dataList;
321 } 332 }
  333 +
  334 + @Override
  335 + public List<Outbound> findPosition(String deviceid, String startdate,
  336 + String enddate){
  337 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  338 + String sql = "select vehicle,line,up_down,lon,lat,timestamp from bsth_c_outbound where vehicle = ? and timestamp >= ? and timestamp <= ? order by timestamp ";
  339 + Connection conn = null;
  340 + PreparedStatement ps = null;
  341 + ResultSet rs = null;
  342 + List<Outbound> listResult = new ArrayList<Outbound>();
  343 + Outbound outbound = null;
  344 + try {
  345 + conn = DBUtils_MS.getConnection();
  346 + ps = conn.prepareStatement(sql);
  347 + long startTime = sdf.parse(startdate).getTime();
  348 + long endTime = sdf.parse(enddate).getTime();
  349 + ps.setString(1, deviceid);
  350 + ps.setLong(2,startTime);
  351 + ps.setLong(3,endTime);
  352 + rs = ps.executeQuery();
  353 + Location location;
  354 + while (rs.next()) {
  355 + outbound = new Outbound();
  356 + outbound.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString()));
  357 + location = TransGPS.LocationMake(rs.getFloat("lon"), rs.getFloat("lat"));
  358 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
  359 + outbound.setLon((float)location.getLng());
  360 + outbound.setLat((float)location.getLat());
  361 + outbound.setTimestamp(rs.getLong("timestamp"));
  362 + // 上下行
  363 + listResult.add(outbound);
  364 + }
  365 + } catch (Exception e) {
  366 + e.printStackTrace();
  367 + } finally {
  368 + DBUtils_MS.close(rs, ps, conn);
  369 + }
  370 + return listResult;
  371 +
  372 + }
  373 +
322 } 374 }
src/main/java/com/bsth/service/excep/impl/NowSpeedingServiceImpl.java
@@ -39,7 +39,7 @@ public class NowSpeedingServiceImpl implements NowSpeedingService { @@ -39,7 +39,7 @@ public class NowSpeedingServiceImpl implements NowSpeedingService {
39 ResultSet rs = null; 39 ResultSet rs = null;
40 int page=Integer.parseInt(map.get("page").toString()); 40 int page=Integer.parseInt(map.get("page").toString());
41 List<Speeding> list=new ArrayList<Speeding>(); 41 List<Speeding> list=new ArrayList<Speeding>();
42 - String sql="select * from bsth_c_speedingmh where 1=1 "; 42 + String sql="select * from bsth_c_speeding_handle where 1=1 ";
43 Object line=map.get("line"); 43 Object line=map.get("line");
44 Object updown=map.get("updown"); 44 Object updown=map.get("updown");
45 Object startDate=map.get("startDate"); 45 Object startDate=map.get("startDate");
@@ -128,7 +128,7 @@ public class NowSpeedingServiceImpl implements NowSpeedingService { @@ -128,7 +128,7 @@ public class NowSpeedingServiceImpl implements NowSpeedingService {
128 128
129 @Override 129 @Override
130 public PageObject<Speeding> Pagequery(Map<String, Object> map) { 130 public PageObject<Speeding> Pagequery(Map<String, Object> map) {
131 - String sql="select count(*) record from bsth_c_speedingmh where 1=1 "; 131 + String sql="select count(*) record from bsth_c_speeding_handle where 1=1 ";
132 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 132 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
133 Object line=map.get("line"); 133 Object line=map.get("line");
134 Object updown=map.get("updown"); 134 Object updown=map.get("updown");
src/main/resources/static/pages/base/interval/edit.html
@@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
49 <div class="col-md-12" style="margin-top:10px"> 49 <div class="col-md-12" style="margin-top:10px">
50 <label class="control-label col-md-5"> 间隔等级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label> 50 <label class="control-label col-md-5"> 间隔等级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
51 <div class="col-md-4"> 51 <div class="col-md-4">
52 - <input type="text" class="form-control" name="level" id="levelInput" placeholder="间隔等级"> 52 + <input type="text" class="form-control" name="level" id="levelInput" placeholder="间隔等级" readonly>
53 </div> 53 </div>
54 </div> 54 </div>
55 55
src/main/resources/static/pages/base/interval/js/interval-add-form.js
@@ -30,21 +30,18 @@ $(function(){ @@ -30,21 +30,18 @@ $(function(){
30 focusInvalid : true, 30 focusInvalid : true,
31 // 需要验证的表单元素 31 // 需要验证的表单元素
32 rules : { 32 rules : {
33 - // 公司名称编码  
34 'level' : { 33 'level' : {
35 // 必填项 34 // 必填项
36 required : true, 35 required : true,
37 // 最大长度 36 // 最大长度
38 maxlength: 10 37 maxlength: 10
39 }, 38 },
40 - // 公司名称  
41 'peak' : { 39 'peak' : {
42 // 必填项 40 // 必填项
43 required : true, 41 required : true,
44 // 最大长度 42 // 最大长度
45 maxlength: 10 43 maxlength: 10
46 }, 44 },
47 - // 公司名称  
48 'trough' : { 45 'trough' : {
49 // 必填项 46 // 必填项
50 required : true, 47 required : true,
src/main/resources/static/pages/base/interval/js/interval-edit-form.js
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 var intervalId = $.url().param('no'); 12 var intervalId = $.url().param('no');
13 // 如果参数ID不为空 13 // 如果参数ID不为空
14 if(intervalId) { 14 if(intervalId) {
15 - // 获取线路Id元素并设值 15 + // 获取间隔信息Id元素并设值
16 $('#intervalId').val(intervalId); 16 $('#intervalId').val(intervalId);
17 /** 根据ID查询详细信息 */ 17 /** 根据ID查询详细信息 */
18 $get('/interval/' + intervalId ,null, function(result){ 18 $get('/interval/' + intervalId ,null, function(result){
@@ -50,21 +50,18 @@ @@ -50,21 +50,18 @@
50 focusInvalid : true, 50 focusInvalid : true,
51 // 需要验证的表单元素 51 // 需要验证的表单元素
52 rules : { 52 rules : {
53 - // 公司名称编码  
54 'level' : { 53 'level' : {
55 // 必填项 54 // 必填项
56 required : true, 55 required : true,
57 // 最大长度 56 // 最大长度
58 maxlength: 10 57 maxlength: 10
59 }, 58 },
60 - // 公司名称  
61 'peak' : { 59 'peak' : {
62 // 必填项 60 // 必填项
63 required : true, 61 required : true,
64 // 最大长度 62 // 最大长度
65 maxlength: 10 63 maxlength: 10
66 }, 64 },
67 - // 公司名称  
68 'trough' : { 65 'trough' : {
69 // 必填项 66 // 必填项
70 required : true, 67 required : true,
src/main/resources/static/pages/base/interval/js/interval-list-table.js
@@ -114,6 +114,25 @@ @@ -114,6 +114,25 @@
114 // 把数据填充到模版中 114 // 把数据填充到模版中
115 var tbodyHtml = template('interval_list_temp',{list:result.content}); 115 var tbodyHtml = template('interval_list_temp',{list:result.content});
116 $('#datatable_interval tbody').html(tbodyHtml); 116 $('#datatable_interval tbody').html(tbodyHtml);
  117 + /**
  118 + * 绑定删除事件。
  119 + */
  120 + $(".delete").click(function(){
  121 + var intervalId = $(this).data('id');
  122 + layer.confirm('是否要删除间隔信息?', {
  123 + btn: ['确定','取消'] //按钮
  124 + }, function(){
  125 + $.ajax({
  126 + url: '/interval/' + intervalId,
  127 + type: 'DELETE',
  128 + success: function(result) {
  129 + window.location.href = 'list.html';
  130 + }
  131 + });
  132 + }, function(){
  133 + });
  134 + });
  135 +
117 // 是重新分页且返回数据长度大于0 136 // 是重新分页且返回数据长度大于0
118 if(isPon && result.content.length > 0){ 137 if(isPon && result.content.length > 0){
119 // 重新分页 138 // 重新分页
@@ -154,4 +173,5 @@ @@ -154,4 +173,5 @@
154 } 173 }
155 }); 174 });
156 } 175 }
  176 +
157 })(); 177 })();
158 \ No newline at end of file 178 \ No newline at end of file
src/main/resources/static/pages/base/interval/list.html
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 <span class="caption-subject font-dark sbold uppercase">间隔信息</span> 25 <span class="caption-subject font-dark sbold uppercase">间隔信息</span>
26 </div> 26 </div>
27 <div class="actions"> 27 <div class="actions">
28 - <div class="btn-group btn-group-devided" data-toggle="buttons"> 28 + <div class="btn-group btn-group-devided" data-toggle="buttons" style="display:none">
29 <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加间隔信息</a> 29 <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加间隔信息</a>
30 </div> 30 </div>
31 </div> 31 </div>
@@ -36,7 +36,6 @@ @@ -36,7 +36,6 @@
36 <thead> 36 <thead>
37 <tr role="row" class="heading"> 37 <tr role="row" class="heading">
38 <th >序号</th> 38 <th >序号</th>
39 - <th >间隔ID</th>  
40 <th >间隔等级</th> 39 <th >间隔等级</th>
41 <th >高峰间隔时间</th> 40 <th >高峰间隔时间</th>
42 <th >低谷间隔时间</th> 41 <th >低谷间隔时间</th>
@@ -47,7 +46,6 @@ @@ -47,7 +46,6 @@
47 <td></td> 46 <td></td>
48 <td></td> 47 <td></td>
49 <td></td> 48 <td></td>
50 - <td></td>  
51 <td> 49 <td>
52 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 50 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
53 <i class="fa fa-search"></i> 搜索 51 <i class="fa fa-search"></i> 搜索
@@ -76,9 +74,6 @@ @@ -76,9 +74,6 @@
76 {{(list.page*10)+(i+1)}} 74 {{(list.page*10)+(i+1)}}
77 </td> 75 </td>
78 <td> 76 <td>
79 - {{obj.id}}  
80 - </td>  
81 - <td>  
82 {{obj.level}} 77 {{obj.level}}
83 </td> 78 </td>
84 <td> 79 <td>
@@ -89,7 +84,7 @@ @@ -89,7 +84,7 @@
89 </td> 84 </td>
90 <td> 85 <td>
91 <a href="edit.html?no={{obj.id}}" class="btn btn-info btn-sm" data-pjax> 修改 </a> 86 <a href="edit.html?no={{obj.id}}" class="btn btn-info btn-sm" data-pjax> 修改 </a>
92 - <a class="btn btn-danger btn-sm" onclick="del({{obj.id}})"> 删除</a> 87 + <a class="btn btn-danger btn-sm delete" data-id={{obj.id}}> 删除</a>
93 </td> 88 </td>
94 </tr> 89 </tr>
95 {{/each}} 90 {{/each}}
@@ -99,22 +94,4 @@ @@ -99,22 +94,4 @@
99 </tr> 94 </tr>
100 {{/if}} 95 {{/if}}
101 </script> 96 </script>
102 -<!-- <script src="/pages/base/line/js/tipso.js"></script> -->  
103 -<!-- 线路信息片段JS模块 -->  
104 -<script src="/pages/base/interval/js/interval-list-table.js"></script>  
105 -<script>  
106 - function del(intervalId){  
107 - layer.confirm('确定要删除间隔信息吗?', {  
108 - btn: ['确定','取消'] //按钮  
109 - }, function(){  
110 - $.ajax({  
111 - url: '/interval/' + intervalId,  
112 - type: 'DELETE',  
113 - success: function(result) {  
114 - window.location.href = 'list.html';  
115 - }  
116 - });  
117 - }, function(){  
118 - });  
119 - }  
120 -</script>  
121 \ No newline at end of file 97 \ No newline at end of file
  98 +<script src="/pages/base/interval/js/interval-list-table.js"></script>
122 \ No newline at end of file 99 \ No newline at end of file
src/main/resources/static/pages/excep/js/line-list-function.js
@@ -48,7 +48,7 @@ var PublicFunctions = function () { @@ -48,7 +48,7 @@ var PublicFunctions = function () {
48 linePanlThree : function(lineId,data,direction) { 48 linePanlThree : function(lineId,data,direction) {
49 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */ 49 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
50 $get('/stationroute/getStationRouteCenterPoints',{lineId:lineId,direction:direction},function(resultdata) { 50 $get('/stationroute/getStationRouteCenterPoints',{lineId:lineId,direction:direction},function(resultdata) {
51 - SpeedingMap.clearMarkAndOverlays(); 51 + BasicMap.clearMarkAndOverlays();
52 var polyline_center; 52 var polyline_center;
53 // 如果站点路由数据不为空 53 // 如果站点路由数据不为空
54 if(resultdata.length>0) { 54 if(resultdata.length>0) {
@@ -66,7 +66,7 @@ var PublicFunctions = function () { @@ -66,7 +66,7 @@ var PublicFunctions = function () {
66 // 设置中心点 66 // 设置中心点
67 var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]); 67 var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
68 /** 在地图上画点 @param:<point_center:中心坐标点> */ 68 /** 在地图上画点 @param:<point_center:中心坐标点> */
69 - SpeedingMap.drawingUpStationPoint(point_center,stationName,s+1); 69 + BasicMap.drawingUpStationPoint(point_center,stationName,s+1);
70 } 70 }
71 71
72 } 72 }
@@ -91,7 +91,7 @@ var PublicFunctions = function () { @@ -91,7 +91,7 @@ var PublicFunctions = function () {
91 polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1])); 91 polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
92 } 92 }
93 /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */ 93 /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
94 - SpeedingMap.drawingUpline01(polylineArray,polyline_center,data[d]); 94 + BasicMap.drawingUpline01(polylineArray,polyline_center,data[d]);
95 } 95 }
96 } 96 }
97 }); 97 });
src/main/resources/static/pages/excep/js/map.js 0 → 100644
  1 +/**
  2 + * 百度地图
  3 + *
  4 + * - - - - - -》init:地图初始化
  5 + *
  6 + * - - - - - -》getDistanceAndDuration:获取距离与时间
  7 + *
  8 + * - - - - - -》drawingUpline:在地图上画出上行线路走向
  9 + *
  10 + * - - - - - -》stationsPointsToLibraryPoint:根据站点坐标匹配库中的公交站点(手动规划)
  11 + */
  12 +
  13 +var BasicMap = function () {
  14 +
  15 + /** BasicMap 全局变量定义 mapBValue:地图对象;polyUpline:走向折线;sectionList:截取过的路段 ;pointIndex:计算路段被切的次数;
  16 + * firstPoint:截取路段的第一个点;iseditStatus:路段是否在编辑状态;isCutSection : 获取路段是否在截取状态*/
  17 + var mapBValue = '', polyUpline='', sectionList = [], pointIndex = 0, iseditStatus = false, firstPoint = {}, isCutSection = false;
  18 +
  19 + var Bmap = {
  20 +
  21 + init : function() {
  22 +
  23 + // 设置中心点,
  24 + var CENTER_POINT = {lng : 121.528733,lat : 31.237425};
  25 +
  26 + // 百度API Key
  27 + var bdKey = 'IGGrr4UjwIYzatoCRFKEL8sT';
  28 +
  29 + // 初始化百度地图
  30 + mapBValue = new BMap.Map("BasicMap");
  31 +
  32 + //中心点和缩放级别
  33 + mapBValue.centerAndZoom(new BMap.Point(CENTER_POINT.lng,CENTER_POINT.lat),15);
  34 +
  35 + //启用地图拖拽事件,默认启用(可不写)
  36 + mapBValue.enableDragging();
  37 +
  38 + //启用地图滚轮放大缩小
  39 + mapBValue.enableScrollWheelZoom();
  40 +
  41 + //禁用鼠标双击放大
  42 + mapBValue.disableDoubleClickZoom();
  43 +
  44 + //启用键盘上下左右键移动地图
  45 + mapBValue.enableKeyboard();
  46 +
  47 + return mapBValue;
  48 + },
  49 + /** 获取第一个切路段的点 @return Point*/
  50 + getFirstPoint : function() {
  51 + return firstPoint;
  52 + },
  53 + /** 获取地图对象 @return 地图对象map */
  54 + getmapBValue : function() {
  55 +
  56 + return mapBValue;
  57 +
  58 + },
  59 +
  60 + getPolyUpline : function() {
  61 +
  62 + return polyUpline;
  63 + },
  64 +
  65 + /** 获取截取过的路段 @return 路段对象List */
  66 + getSectionList : function() {
  67 +
  68 + return sectionList;
  69 +
  70 + },
  71 + setSectionList : function(list) {
  72 +
  73 + sectionList = list;
  74 + },
  75 + initCutSectionPoint : function() {
  76 + sectionList = [];
  77 + var tbodyHtml = template('section_list',{list : sectionList});
  78 + $('#section_table tbody').html(tbodyHtml);
  79 + },
  80 + /** 获取切路段的点下标 @return int*/
  81 + setPointIndex : function(index) {
  82 + pointIndex = index;
  83 + },
  84 + getPointIndex : function() {
  85 +
  86 + return pointIndex;
  87 +
  88 + },
  89 + /** 获取路段是否在编辑状态 @return boolean*/
  90 + getIsEditStatus : function() {
  91 + return iseditStatus;
  92 + },
  93 + setIsEditStatus : function(v) {
  94 + iseditStatus = v ;
  95 + },
  96 +
  97 + /** 获取路段是否在截取状态 @return boolean*/
  98 + getIsCutSection : function() {
  99 + return isCutSection;
  100 + },
  101 + setIsCutSection : function(v) {
  102 + isCutSection = v ;
  103 + },
  104 +
  105 + /** 获取距离与时间 @param <points:坐标点集合> */
  106 + getDistanceAndDuration : function(points,callback){
  107 +
  108 + // 获取长度
  109 + var len = points.length;
  110 + (function(){
  111 +
  112 + if (!arguments.callee.count) {
  113 +
  114 + arguments.callee.count = 0;
  115 +
  116 + }
  117 +
  118 + arguments.callee.count++;
  119 +
  120 + var index = parseInt(arguments.callee.count) - 1;
  121 +
  122 + if (index >= len-1) {
  123 +
  124 + callback && callback(points);
  125 +
  126 + return;
  127 + }
  128 +
  129 + // 当函数被调用时,它的arguments.callee对象就会指向自身,也就是一个对自己的引用。(当前正在执行的函数。)
  130 + var f = arguments.callee;
  131 + // 起点坐标 <坐标格式:40.056878,116.30815>
  132 + var origin = points[index].potion.lat + ',' + points[index].potion.lng;
  133 +
  134 + // 终点坐标 <坐标格式:40.056878,116.30815>
  135 + var destination = points[index+1].potion.lat + ',' + points[index+1].potion.lng;
  136 + var region = '上海';
  137 +
  138 + var origin_region = '上海';
  139 +
  140 + var destination_region = '上海';
  141 +
  142 + var output = 'json';
  143 +
  144 + var ak_My = 'wjlITmXeCek5MxyU3ZUBkTeU8B0o0npk';
  145 +
  146 + /**
  147 + * origin:起点名称或经纬度;
  148 + *
  149 + * destination:终点名称或经纬度;
  150 + *
  151 + * origin_region:起始点所在城市,驾车导航时必填。
  152 + *
  153 + * destination_region:终点所在城市,驾车导航时必填。
  154 + *
  155 + * output :表示输出类型,可设置为xml或json,默认为xml。
  156 + *
  157 + **/
  158 + var paramsB = {origin:origin,destination:destination,region:region,origin_region:origin_region,destination_region:destination_region,output:output,ak:ak_My};
  159 +
  160 + /** @description :未认证开发者默认配额为:2000次/天。 */
  161 + $.ajax({
  162 +
  163 + // 百度地图根据坐标获取两点之间的时间与距离
  164 + url: 'http://api.map.baidu.com/direction/v1?mode=transit',
  165 +
  166 + data: paramsB,
  167 +
  168 + dataType: 'jsonp',
  169 +
  170 + success: function(r){
  171 +
  172 + if(r) {
  173 +
  174 + if(r.message=='ok') {
  175 +
  176 + if(r.result.taxi==null) {
  177 +
  178 + // 获取距离(单位:米)
  179 + points[index+1].distance = 0;
  180 +
  181 + // 获取时间(单位:秒)
  182 + points[index+1].duration = 0;
  183 +
  184 + }else {
  185 +
  186 + // 获取距离(单位:米)
  187 + points[index+1].distance = r.result.taxi.distance;
  188 +
  189 + // 获取时间(单位:秒)
  190 + points[index+1].duration = r.result.taxi.duration;
  191 +
  192 + }
  193 +
  194 +
  195 + }
  196 +
  197 + }
  198 +
  199 + f();
  200 + }
  201 + });
  202 +
  203 + })();
  204 +
  205 + },
  206 + // 在地图上画出上行线路走向
  207 + drawingUpline01 : function (polylineArray,polyline_center,data) {
  208 + var polyUpline01 = 'polyline' + '_' + data.sectionrouteId;
  209 + // 创建线路走向
  210 + polyUpline01 = new BMap.Polyline(polylineArray, {strokeColor : "blue",strokeWeight : 6,strokeOpacity : 0.5});
  211 + polyUpline01.data = data;
  212 + // 把折线添加到地图上
  213 + mapBValue.addOverlay(polyUpline01);
  214 + var sectionPoint = [];
  215 + // 线路单击事件
  216 + polyUpline01.addEventListener('click',function(e) {
  217 + if(BasicMap.getIsEditStatus()) {
  218 + layer.msg('请先保存正在编辑的路段信息...');
  219 + return false;
  220 + }
  221 + if(BasicMap.getIsCutSection()) {
  222 + layer.msg('请先撤销所有切路段的点...');
  223 + return false;
  224 + }
  225 + polyUpline01.enableEditing();
  226 + BasicMap.setIsEditStatus(true);
  227 + });
  228 +
  229 + // 添加路段双击事件
  230 + polyUpline01.addEventListener("dblclick",function(e){
  231 + if(BasicMap.getIsCutSection()) {
  232 + layer.msg('请先撤销所有切路段的点...');
  233 + return false;
  234 + }
  235 + BasicMap.setIsEditStatus(false);
  236 + // 关闭
  237 + layer.closeAll();
  238 + polyUpline01.disableEditing();
  239 + EditSectionObj.setEitdSection(polyUpline01.data);
  240 + // 获取折线坐标集合
  241 + var editPloyLineArray = polyUpline01.getPath();
  242 + EditSectionObj.setEitdBsectionVector(JSON.stringify(editPloyLineArray));
  243 + sectionList = [];
  244 + var tbodyHtml = template('section_list',{list : sectionList});
  245 + // 截取路段
  246 + $('#section_table tbody').html(tbodyHtml);
  247 + // 加载修改路段弹出层mobal页面
  248 + $.get('editsection.html', function(m){
  249 + $(pjaxContainer).append(m);
  250 + $('#edit_section_mobal_cache').trigger('editSectionMobalCache_show', [BasicMap,GetAjaxData,EditSectionObj,PublicFunctions]);
  251 + });
  252 + });
  253 +
  254 + // 路段右击事件
  255 + var editSection = function(e,ee,marker){
  256 + if(BasicMap.getIsEditStatus()) {
  257 + layer.msg('请先保存正在编辑的路段信息...');
  258 + return false;
  259 + }
  260 + var lng = e.lng;
  261 + var lat = e.lat;
  262 + var sectionName = null;
  263 + var marker = new BMap.Marker(new BMap.Point(lng, lat)); // 创建点
  264 + marker.isFlag = true;
  265 + if(pointIndex == 0) {
  266 + sectionPoint[pointIndex] = {lng:lng , lat:lat};
  267 + layer.msg('进入切路段状态,请选择本路段的终点!');
  268 + mapBValue.addOverlay(marker);// 添加覆盖物
  269 + firstPoint = {lng:lng, lat:lat};
  270 + pointIndex++;
  271 + EditSectionObj.setEitdSection(polyUpline01.data);
  272 + // 获取折线坐标集合
  273 + var editPloyLineArray = polyUpline01.getPath();
  274 + EditSectionObj.setEitdBsectionVector(JSON.stringify(editPloyLineArray));
  275 + } else if (pointIndex > 0) {
  276 + layer.prompt({title: '请输入路段名!'}, function(sectionName, index){
  277 + pointList = [];
  278 + sectionPoint[pointIndex] = {lng:lng , lat:lat};
  279 + pointList[0] = sectionPoint[pointIndex-1];
  280 + pointList[1] = sectionPoint[pointIndex];
  281 + sectionList.push({name:sectionName, section:pointList});
  282 + layer.close(index);
  283 + layer.msg('路段截取成功,请选择下一个路段的终点');
  284 + mapBValue.addOverlay(marker);// 添加覆盖物
  285 + var tbodyHtml = template('section_list',{list : sectionList});
  286 + // 截取路段
  287 + $('#section_table tbody').html(tbodyHtml);
  288 + pointIndex++;
  289 + });
  290 + }
  291 + BasicMap.setIsCutSection(true);
  292 + }
  293 + var markerMenu=new BMap.ContextMenu();
  294 + markerMenu.addItem(new BMap.MenuItem('切路段',editSection.bind(polyUpline01)));
  295 + polyUpline01.addContextMenu(markerMenu);
  296 +
  297 +
  298 + var PanOptions_ ={noAnimation :true};
  299 + mapBValue.reset();
  300 + mapBValue.panTo(polyline_center,PanOptions_);
  301 + mapBValue.panBy(500,-510,PanOptions_);
  302 + mapBValue.setZoom(14);
  303 + },
  304 + // 删除点刷新cutSectionTable
  305 + refreshCutSectionTable : function() {
  306 + var tbodyHtml = template('section_list',{list : sectionList});
  307 + $('#section_table tbody').html(tbodyHtml);
  308 + },
  309 + // 删除点刷新覆盖物
  310 + deleteCutSectionPoint : function(point) {
  311 + var lng = point.lng;
  312 + var lat = point.lat;
  313 + var allOverlay = mapBValue.getOverlays();
  314 + // 删除最后一个点
  315 + for (var i = 0; i < allOverlay.length -1; i++){
  316 + if(allOverlay[i].isFlag) {
  317 + if(allOverlay[i].point.lng == lng && allOverlay[i].point.lat == lat){
  318 + mapBValue.removeOverlay(allOverlay[i]);
  319 + break;
  320 + }
  321 + }
  322 + }
  323 + },
  324 + /** 在地图上画点 @param:<point_center:中心坐标点> */
  325 + drawingUpStationPoint : function(point_center,stationName,s) {
  326 +
  327 + // 自定义标注物图片
  328 + var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/gjzd.png',new BMap.Size(10, 10));
  329 +
  330 + var html2 = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -10px; top: -35px; overflow: hidden;">'
  331 + + '<img class="rm3_image" style="border:none;left:0px; top:0px; position:absolute;" src="/pages/base/stationroute/css/img/back160.png">'
  332 + + '</div>'
  333 + + '<label class=" BMapLabel" unselectable="on" style="position: absolute; -moz-user-select: none; display: inline; cursor: inherit; border: 0px none; padding: 2px 1px 1px; white-space: nowrap; font: 12px arial,simsun; z-index: 80; color: rgb(255, 102, 0); left: 15px; top: -35px;"><span style="float: left; color: #fdfdfd; margin-left: -22px; font-size: 6px;">'+ s+'</span>'+ stationName+'</label>';
  334 +
  335 +
  336 + var myRichMarker1 = new BMapLib.RichMarker(html2, point_center,{
  337 + "anchor" : new BMap.Size(-10,8),
  338 + "enableDragging" : true});
  339 +
  340 +
  341 + myRichMarker1.disableDragging();
  342 + mapBValue.addOverlay(myRichMarker1);
  343 +
  344 +
  345 + // 创建标注物
  346 + marker = new BMap.Marker(point_center,{icon : icon_target});
  347 +
  348 + // 允许覆盖物在map.clearOverlays方法中被清除。
  349 + marker.enableMassClear();
  350 +
  351 + mapBValue.addOverlay(marker);
  352 + },
  353 +
  354 + // 根据站点坐标匹配库中的公交站点(手动规划)
  355 + stationsPointsToLibraryPoint : function(arra,callback) {
  356 + // 获取长度
  357 + var len = arra.length;
  358 + var station = {};
  359 + var stationList = [];
  360 + (function(){
  361 + if (!arguments.callee.count) {
  362 + arguments.callee.count = 0;
  363 + }
  364 + arguments.callee.count++;
  365 + var index = parseInt(arguments.callee.count) - 1;
  366 + if (index >= len) {
  367 + callback && callback(stationList);
  368 + return ;
  369 + }
  370 + var f = arguments.callee;
  371 + station = arra[index];
  372 + if(arra[index].name!=''){
  373 +
  374 + $.get('/station/matchStation',station,function(resultStation) {
  375 + stationList.push({name:resultStation.name ,wgs:arra[index].wgs,potion:{lng:resultStation.potion_lng, lat:resultStation.potion_lat}, isHave:resultStation.isHave , id:resultStation.id});
  376 + f();
  377 + });
  378 + }else {
  379 + f();
  380 + }
  381 + })()
  382 + },
  383 + clearMarkAndOverlays : function() {
  384 +
  385 + // 清楚地图覆盖物
  386 + mapBValue.clearOverlays();
  387 +
  388 + mapBValue.removeOverlay();
  389 +
  390 + }
  391 +
  392 + }
  393 +
  394 + return Bmap;
  395 +
  396 +}();
0 \ No newline at end of file 397 \ No newline at end of file
src/main/resources/static/pages/excep/mhspeedingList.html
@@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
128 data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}" 128 data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}"
129 data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}" 129 data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}"
130 data-endlat="{{obj.endlat}}" data-lineid="{{obj.lineId}}" data-updown="{{obj.upDown}}"> 130 data-endlat="{{obj.endlat}}" data-lineid="{{obj.lineId}}" data-updown="{{obj.upDown}}">
131 - 查看轨迹 131 + 轨迹回放
132 </a> 132 </a>
133 </td> 133 </td>
134 <td> 134 <td>
@@ -270,7 +270,6 @@ $(function(){ @@ -270,7 +270,6 @@ $(function(){
270 index++; 270 index++;
271 }); 271 });
272 })(); 272 })();
273 - console.log(listResult);  
274 }); 273 });
275 } 274 }
276 275
src/main/resources/static/pages/excep/outBoundMap.html deleted 100644 → 0
1 -<link href="/pages/base/stationroute/css/bmap_base.css" rel="stylesheet" type="text/css" />  
2 -<div class="portlet-body">  
3 - <!-- 地图 -->  
4 - <div id="bmap_basic" class="bmaps"></div>  
5 -</div>  
6 -<!-- load事件 -->  
7 -<script src="/pages/excep/js/outboundmap-load.js"></script>  
8 -<!-- 线路类 -->  
9 -<script src="/pages/excep/js/outboundline.js"></script>  
10 -<!-- 绘图类 -->  
11 -<script src="/pages/base/stationroute/js/drawingManager.js"></script>  
12 -<!-- 地图类 -->  
13 -<script src="/pages/excep/js/outbound-map.js"></script>  
14 -<!-- 函数与方法 -->  
15 -<script src="/pages/excep/js/outboundmap-function.js"></script>  
16 -<!-- ajax请求类 -->  
17 -<script src="/pages/base/stationroute/js/stationroute-ajax-getdata.js"></script>  
18 -  
src/main/resources/static/pages/excep/outboundMap.html 0 → 100644
  1 +<style>
  2 + .play_back-layer .layui-layer-title{
  3 + height: 36px;
  4 + border-bottom: none;
  5 + }
  6 +</style>
  7 +
  8 +<div id="titleMap">
  9 +<button id="run" style="margin-left:10px" class="btn btn-sm green btn-outline filter-submit margin-bottom">运行</button>
  10 +</div>
  11 +<div id="BasicMap">
  12 +</div>
  13 +<style type="text/css">
  14 +
  15 +#BasicMap{
  16 + width: 100%;
  17 + border: 2px solid #fdfdfd;
  18 + height: calc(100% - 30px);
  19 + overflow: hidden;
  20 +}
  21 +</style>
  22 +<script type="text/javascript" src="/pages/excep/js/map.js"></script>
  23 +<script type="text/javascript" src="/pages/excep/js/line-list-function.js"></script>
  24 +
  25 +<script type="text/javascript">
  26 +$(function(){
  27 + var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间
  28 + localStorage.clear();//清楚前端缓存
  29 + var vehicle = dataArr[0];
  30 + var startdate = dataArr[1];
  31 + var enddate = dataArr[2];
  32 + var lon = dataArr[3];//起点经度
  33 + var lat = dataArr[4];//起点纬度
  34 + var endLon = dataArr[5];//终点经度
  35 + var endLat = dataArr[6];//终点纬度
  36 + var lineid = dataArr[7];
  37 + var directionData = dataArr[8];
  38 + var pointObj;//坐标和速度组成的对象
  39 + var Points = [];//坐标和速度对象的集合
  40 + var coordinateArr = [];//坐标点数组
  41 + $.ajax({
  42 + type: "GET",
  43 + async:false,
  44 + url: '/nowbound/findPosition',
  45 + data: {vehicle:vehicle,startdate:startdate,enddate:enddate},
  46 + success: function(data){
  47 + $.each(data,function(i,item){
  48 + if(item.lon>1 && item.lat>1){
  49 + pointObj = new Object();
  50 + pointObj.coordinate = new BMap.Point(item.lon,item.lat);
  51 + pointObj.vehicle = item.vehicle;
  52 + Points.push(pointObj);
  53 + }
  54 + });
  55 + }
  56 + });
  57 + setTimeout(function(){
  58 + var map = BasicMap.init();//创建地图
  59 + $get('/sectionroute/findSection',{'line.id_eq' : lineid , 'directions_eq' :directionData},function(data) {
  60 + // 在地图上画出线路走向
  61 + PublicFunctions.linePanlThree(lineid,data,directionData);
  62 + });
  63 + var myP1 = new BMap.Point(lon,lat); //起点
  64 + var myP2 = new BMap.Point(endLon,endLat); //终点
  65 + for(i in Points){
  66 + coordinateArr.push(Points[i].coordinate);
  67 + }
  68 + var polyline = new BMap.Polyline(coordinateArr, {strokeColor:"red", strokeWeight:5, strokeOpacity:0.5});//创建折线
  69 + var myIcon = new BMap.Icon("/pages/excep/img/bus.png", new BMap.Size(32, 70), {//小车图片
  70 + imageOffset: new BMap.Size(5,20) //图片的偏移量。为了是图片底部中心对准坐标点。
  71 + });
  72 +
  73 + var carMk;
  74 + $(document).on('click', '#run', function() {
  75 + map.centerAndZoom(new BMap.Point(lon,lat),16);//地图中心点坐标 */
  76 + if(typeof(carMk)!="undefined"){
  77 + map.removeOverlay(carMk);//清空上一次的轨迹
  78 + }
  79 + carMk = new BMap.Marker(coordinateArr[0],{icon:myIcon});
  80 + map.addOverlay(polyline);//增加折线
  81 + var paths = coordinateArr.length;//获得有几个点
  82 + map.addOverlay(carMk);
  83 + i=0;
  84 + setTimeout(function(){
  85 + resetMkPoint(0);
  86 + },500);
  87 + function resetMkPoint(i){
  88 + carMk.setPosition(coordinateArr[i]);
  89 + if(i < paths-1){
  90 + setTimeout(function(){
  91 + i++;
  92 + resetMkPoint(i);
  93 + },500);
  94 + }
  95 + };
  96 +
  97 + });
  98 + }, 500);
  99 + });
  100 +</script>
  101 +
  102 +
src/main/resources/static/pages/excep/pdboundList.html
@@ -56,26 +56,21 @@ @@ -56,26 +56,21 @@
56 <th width="3%">#</th> 56 <th width="3%">#</th>
57 <th width="15%">线路</th> 57 <th width="15%">线路</th>
58 <th width="13%">车辆自编号</th> 58 <th width="13%">车辆自编号</th>
59 - <th width="100">车辆坐标</th>  
60 - <th width="11%">路牌名</th>  
61 <th width="10%">上下行</th> 59 <th width="10%">上下行</th>
62 - <th width="18%">时间</th> 60 + <th width="10%">越界位置</th>
  61 + <th width="18%">越界开始时间</th>
  62 + <th width="100">查看轨迹</th>
63 <th width="18%">操作</th> 63 <th width="18%">操作</th>
64 </tr> 64 </tr>
65 <tr role="row" class="filter"> 65 <tr role="row" class="filter">
66 <td></td> 66 <td></td>
67 <td> 67 <td>
68 -<!-- <input type="text" class="form-control form-filter input-sm" name="userName_like"> -->  
69 <select class="form-control" name="line" id="line" style="width: 150px;"></select> 68 <select class="form-control" name="line" id="line" style="width: 150px;"></select>
70 </td> 69 </td>
71 <td> 70 <td>
72 -<!-- <input type="text" class="form-control form-filter input-sm" name="nbbm"> -->  
73 <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select> 71 <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select>
74 </td> 72 </td>
75 <td> 73 <td>
76 - </td>  
77 - <td></td>  
78 - <td>  
79 <select class="form-control form-filter " name="updown"> 74 <select class="form-control form-filter " name="updown">
80 <option value="">请选择...</option> 75 <option value="">请选择...</option>
81 <option value="0">上行</option> 76 <option value="0">上行</option>
@@ -84,8 +79,11 @@ @@ -84,8 +79,11 @@
84 </select> 79 </select>
85 </td> 80 </td>
86 <td> 81 <td>
  82 + </td>
  83 + <td>
87 <input class="form-control" type="date" name="date" /> 84 <input class="form-control" type="date" name="date" />
88 </td> 85 </td>
  86 + <td></td>
89 <td> 87 <td>
90 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 88 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
91 <i class="fa fa-search"></i> 搜索</button> 89 <i class="fa fa-search"></i> 搜索</button>
@@ -119,15 +117,6 @@ @@ -119,15 +117,6 @@
119 {{obj.vehicle}} 117 {{obj.vehicle}}
120 </td> 118 </td>
121 <td> 119 <td>
122 - <a href="/pages/excep/outBoundMap.html?no={{obj.line}},{{obj.upDown}},{{obj.lon}},{{obj.lat}}"  
123 - class="btn default blue-stripe btn-sm" data-pjax>  
124 - 查看车辆位置  
125 - </a>  
126 - </td>  
127 - <td>  
128 - {{obj.lpname}}  
129 - </td>  
130 - <td>  
131 {{if obj.upDown==0}} 120 {{if obj.upDown==0}}
132 上行 121 上行
133 {{else if obj.upDown==1}} 122 {{else if obj.upDown==1}}
@@ -137,9 +126,20 @@ @@ -137,9 +126,20 @@
137 {{/if}} 126 {{/if}}
138 </td> 127 </td>
139 <td> 128 <td>
  129 + {{obj.address}}
  130 + </td>
  131 + <td>
140 {{obj.timestampDate}} 132 {{obj.timestampDate}}
141 </td> 133 </td>
142 <td> 134 <td>
  135 + <a class="btn default blue-stripe btn-sm lookTrajectory" data-vehicle ="{{obj.vehicle}}"
  136 + data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}"
  137 + data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}"
  138 + data-endlat="{{obj.endlat}}" data-lineid="{{obj.line}}" data-updown="{{obj.upDown}}">
  139 + 轨迹回放
  140 + </a>
  141 + </td>
  142 + <td>
143 143
144 </td> 144 </td>
145 </tr> 145 </tr>
@@ -170,7 +170,6 @@ $(function(){ @@ -170,7 +170,6 @@ $(function(){
170 jsDoQuery(parameter,true); 170 jsDoQuery(parameter,true);
171 //重置 171 //重置
172 $('tr.filter .filter-cancel').on('click', function(){ 172 $('tr.filter .filter-cancel').on('click', function(){
173 - debugger;  
174 $('tr.filter input, select').val('').change(); 173 $('tr.filter input, select').val('').change();
175 jsDoQuery(null, true); 174 jsDoQuery(null, true);
176 }); 175 });
@@ -205,19 +204,55 @@ $(function(){ @@ -205,19 +204,55 @@ $(function(){
205 params['page'] = page; 204 params['page'] = page;
206 var i = layer.load(2); 205 var i = layer.load(2);
207 $get('/nowbound/pagequery' ,params, function(data){ 206 $get('/nowbound/pagequery' ,params, function(data){
208 -// $.each(data.content, function(i, obj) {  
209 -// obj.lastLoginDate = moment(obj.lastLoginDate).format("YYYY-MM-DD HH:mm:ss");  
210 -// });  
211 - var bodyHtm = template('bound_list_temp', {list: data.dataList});  
212 - $('#datatable_bound tbody').html(bodyHtm)  
213 - .find('.icheck').iCheck(icheckOptions)  
214 - .on('ifChanged', iCheckChange);  
215 - if(pagination && data.dataList.length > 0){  
216 - //重新分页  
217 - initPagination = true;  
218 - showPagination(data);  
219 - }  
220 - layer.close(i); 207 + var listResult = data.dataList;
  208 + var index=0;
  209 + (function(){
  210 + var f = arguments.callee;
  211 + if(index >= listResult.length){
  212 + var bodyHtm = template('bound_list_temp', {list:listResult});
  213 + $('#datatable_bound tbody').html(bodyHtm).find('.icheck').iCheck(icheckOptions).on('ifChanged', iCheckChange);
  214 + if(pagination && data.dataList.length > 0){
  215 + //重新分页
  216 + initPagination = true;
  217 + showPagination(data);
  218 + }
  219 + layer.close(i);
  220 + $(".lookTrajectory").click(function(){
  221 + var vehicle = $(this).data('vehicle');
  222 + var startDate = $(this).data('startdate');
  223 + var endDate = $(this).data('enddate');
  224 + var lon = $(this).data('lon');
  225 + var lat = $(this).data('lat');
  226 + var endLon = $(this).data('endlon');
  227 + var endLat = $(this).data('endlat');
  228 + var lineid = $(this).data('lineid');
  229 + var upDown = $(this).data('updown');
  230 + var storage = window.localStorage;
  231 + storage.setItem("zbhAndDate",vehicle+","+startDate+","+endDate+","+lon+","+lat+","+endLon+","+endLat+","+lineid+","+upDown);
  232 + $.get('/pages/excep/outboundMap.html?',function (result) {
  233 + layer.open({
  234 + type: 1,
  235 + title:'<i class="uk-icon-play-circle"></i>轨迹回放',
  236 + shadeClose: true,
  237 + shade: true,
  238 + scrollbar: false,
  239 + maxmin: false, //开启最大化最小化按钮
  240 + area: ['100%', '100%'],
  241 + content:result,//内容
  242 + });
  243 + });
  244 + })
  245 + return;
  246 + }
  247 + var result = listResult[index];
  248 + new BMap.Geocoder().getLocation(new BMap.Point(result.lon,result.lat), function(rs){
  249 + var addComp = rs.addressComponents;
  250 + result.address = addComp.district+addComp.street+addComp.streetNumber;
  251 + f();
  252 + index++;
  253 + });
  254 + })();
  255 +
221 }); 256 });
222 } 257 }
223 258
@@ -345,7 +380,6 @@ $(&#39;#nbbm&#39;).select2({ @@ -345,7 +380,6 @@ $(&#39;#nbbm&#39;).select2({
345 380
346 //改变状态 381 //改变状态
347 function changeEnabled(id,enabled){ 382 function changeEnabled(id,enabled){
348 - debugger  
349 $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){ 383 $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){
350 jsDoQuery(null, true); 384 jsDoQuery(null, true);
351 }) 385 })
src/main/resources/static/pages/excep/speedingMap.html
@@ -8,23 +8,24 @@ @@ -8,23 +8,24 @@
8 <div id="titleMap"> 8 <div id="titleMap">
9 <button id="run" style="margin-left:10px" class="btn btn-sm green btn-outline filter-submit margin-bottom">运行</button> 9 <button id="run" style="margin-left:10px" class="btn btn-sm green btn-outline filter-submit margin-bottom">运行</button>
10 </div> 10 </div>
11 -<div id="speedingMap"> 11 +<div id="BasicMap">
12 </div> 12 </div>
13 <style type="text/css"> 13 <style type="text/css">
14 14
15 -#speedingMap{ 15 +#BasicMap{
16 width: 100%; 16 width: 100%;
17 border: 2px solid #fdfdfd; 17 border: 2px solid #fdfdfd;
18 height: calc(100% - 30px); 18 height: calc(100% - 30px);
19 overflow: hidden; 19 overflow: hidden;
20 } 20 }
21 </style> 21 </style>
22 -<script type="text/javascript" src="/pages/excep/js/speeding-map.js"></script> 22 +<script type="text/javascript" src="/pages/excep/js/map.js"></script>
23 <script type="text/javascript" src="/pages/excep/js/line-list-function.js"></script> 23 <script type="text/javascript" src="/pages/excep/js/line-list-function.js"></script>
24 24
25 <script type="text/javascript"> 25 <script type="text/javascript">
26 $(function(){ 26 $(function(){
27 var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间 27 var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间
  28 + localStorage.clear();//清楚前端缓存
28 var vehicle = dataArr[0]; 29 var vehicle = dataArr[0];
29 var startdate = dataArr[1]; 30 var startdate = dataArr[1];
30 var enddate = dataArr[2]; 31 var enddate = dataArr[2];
@@ -55,16 +56,14 @@ $(function(){ @@ -55,16 +56,14 @@ $(function(){
55 } 56 }
56 }); 57 });
57 setTimeout(function(){ 58 setTimeout(function(){
58 - var map = SpeedingMap.init();//创建地图 59 + var map = BasicMap.init();//创建地图
  60 + debugger;
59 $get('/sectionroute/findSection',{'line.id_eq' : lineid , 'directions_eq' :directionData},function(data) { 61 $get('/sectionroute/findSection',{'line.id_eq' : lineid , 'directions_eq' :directionData},function(data) {
60 // 在地图上画出线路走向 62 // 在地图上画出线路走向
61 PublicFunctions.linePanlThree(lineid,data,directionData); 63 PublicFunctions.linePanlThree(lineid,data,directionData);
62 }); 64 });
63 var myP1 = new BMap.Point(lon,lat); //起点 65 var myP1 = new BMap.Point(lon,lat); //起点
64 var myP2 = new BMap.Point(endLon,endLat); //终点 66 var myP2 = new BMap.Point(endLon,endLat); //终点
65 -/* var centerLon = (parseFloat(lon)+parseFloat(endLon))/2;  
66 - var centerLat = (parseFloat(lat)+parseFloat(endLat))/2;  
67 - map.centerAndZoom(new BMap.Point(centerLon,centerLat),18);//地图中心点坐标 */  
68 for(i in Points){ 67 for(i in Points){
69 coordinateArr.push(Points[i].coordinate); 68 coordinateArr.push(Points[i].coordinate);
70 } 69 }
src/main/resources/static/pages/permission/authorize_all/user_auth.html
@@ -141,7 +141,8 @@ @@ -141,7 +141,8 @@
141 '55_3': '上南公司(六分公司)', '55_1': '上南公司(二分公司)', '55_2': '上南公司(三分公司)', '55_4': '上南公司(一分公司)', '55_5': '上南公司(培训部)', 141 '55_3': '上南公司(六分公司)', '55_1': '上南公司(二分公司)', '55_2': '上南公司(三分公司)', '55_4': '上南公司(一分公司)', '55_5': '上南公司(培训部)',
142 '22_2': '金高公司(二分公司)', '22_1': '金高公司(四分公司)', '22_3': '金高公司(三分公司)', '22_5': '金高公司(一分公司)', 142 '22_2': '金高公司(二分公司)', '22_1': '金高公司(四分公司)', '22_3': '金高公司(三分公司)', '22_5': '金高公司(一分公司)',
143 '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_6': '南汇公司(航头枢纽站)', 143 '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_6': '南汇公司(航头枢纽站)',
144 - '05_5': '杨高公司(杨高分公司)', '05_6': '杨高公司(周浦分公司)', '05_3': '杨高公司(芦潮港分公司)', '05_1': '杨高公司(川沙分公司)', '05_2': '杨高公司(金桥分公司)' 144 + '05_5': '杨高公司(杨高分公司)', '05_6': '杨高公司(周浦分公司)', '05_3': '杨高公司(芦潮港分公司)', '05_1': '杨高公司(川沙分公司)', '05_2': '杨高公司(金桥分公司)',
  145 + '77_78': '闵行公司', '99_100': '青浦公交'
145 }; 146 };
146 147
147 var defauleConfig; 148 var defauleConfig;
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
@@ -146,6 +146,7 @@ @@ -146,6 +146,7 @@
146 var f = $('form', modal).formValidation(gb_form_validation_opts); 146 var f = $('form', modal).formValidation(gb_form_validation_opts);
147 f.on('success.form.fv', function(e) { 147 f.on('success.form.fv', function(e) {
148 e.preventDefault(); 148 e.preventDefault();
  149 + $('[type=submit]', f).attr('disabled', 'disabled');
149 var data = $(this).serializeJSON(); 150 var data = $(this).serializeJSON();
150 if(data.dfsj==sch.dfsj && data.remarks=='' && data.bcType == sch.bcType){ 151 if(data.dfsj==sch.dfsj && data.remarks=='' && data.bcType == sch.bcType){
151 return; 152 return;