Commit 4ce1c75711b7b7016f03ef963c5c19fab4fee582
Merge branch 'master' of http://222.66.0.204:8090/panzhaov5/bsth_control
Showing
10 changed files
with
112 additions
and
32 deletions
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -52,7 +52,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -52,7 +52,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 52 | " b.section_type AS sectionType," + | 52 | " b.section_type AS sectionType," + |
| 53 | " b.csection_vector AS sectionCsectionVector," + | 53 | " b.csection_vector AS sectionCsectionVector," + |
| 54 | " AsText(b.bsection_vector) AS sectionBsectionVector," + | 54 | " AsText(b.bsection_vector) AS sectionBsectionVector," + |
| 55 | - " AsText(b.gsection_vector) sectionGsectionVector," + | 55 | + " AsText(b.gsection_vector) AS sectionGsectionVector," + |
| 56 | " b.road_coding AS sectionRoadCoding," + | 56 | " b.road_coding AS sectionRoadCoding," + |
| 57 | " b.section_distance AS sectionDistance," + | 57 | " b.section_distance AS sectionDistance," + |
| 58 | " b.section_time AS sectionTime," + | 58 | " b.section_time AS sectionTime," + |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| @@ -335,12 +335,30 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -335,12 +335,30 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 335 | arg0.setDbType(dbType); | 335 | arg0.setDbType(dbType); |
| 336 | 336 | ||
| 337 | 337 | ||
| 338 | + String gLonxStr = JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("x").equals("") ? null : JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("x").toString(); | ||
| 339 | + | ||
| 340 | + String gLatyStr = JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("y").equals("") ? null : JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("y").toString(); | ||
| 341 | + | ||
| 342 | + float gLonx = 0.0f; | ||
| 343 | + | ||
| 344 | + float gLaty = 0.0f; | ||
| 345 | + | ||
| 338 | /** to WGS坐标 */ | 346 | /** to WGS坐标 */ |
| 339 | Location resultPoint = FromBDPointToWGSPoint(bLonx,bLatx); | 347 | Location resultPoint = FromBDPointToWGSPoint(bLonx,bLatx); |
| 340 | 348 | ||
| 341 | - arg0.setgLonx((float)resultPoint.getLng()); | 349 | + if(gLonxStr==null) |
| 350 | + gLonx = (float)resultPoint.getLng(); | ||
| 351 | + else | ||
| 352 | + gLonx = Float.valueOf(gLonxStr); | ||
| 353 | + | ||
| 354 | + if(gLatyStr==null) | ||
| 355 | + gLaty = (float)resultPoint.getLat(); | ||
| 356 | + else | ||
| 357 | + gLaty = Float.valueOf(gLatyStr); | ||
| 358 | + | ||
| 359 | + arg0.setgLonx(gLonx); | ||
| 342 | 360 | ||
| 343 | - arg0.setgLaty((float)resultPoint.getLat()); | 361 | + arg0.setgLaty(gLaty); |
| 344 | 362 | ||
| 345 | // 站点地理位置WGS坐标经度 | 363 | // 站点地理位置WGS坐标经度 |
| 346 | // String gLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("WGSpotion").toString()).get("Lng").toString(); | 364 | // String gLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("WGSpotion").toString()).get("Lng").toString(); |
src/main/resources/static/pages/base/line/add.html
| @@ -220,8 +220,8 @@ | @@ -220,8 +220,8 @@ | ||
| 220 | <input type="text" class="form-control" name="endPhone" id="startPhoneInput" placeholder="终点站调度电话"> | 220 | <input type="text" class="form-control" name="endPhone" id="startPhoneInput" placeholder="终点站调度电话"> |
| 221 | </div> | 221 | </div> |
| 222 | </div> | 222 | </div> |
| 223 | - <!-- | ||
| 224 | - 起始站名称 | 223 | + |
| 224 | + <!-- 起始站名称 --> | ||
| 225 | <div class="form-group"> | 225 | <div class="form-group"> |
| 226 | <label class="control-label col-md-3"> 起始站名称: </label> | 226 | <label class="control-label col-md-3"> 起始站名称: </label> |
| 227 | <div class="col-md-4"> | 227 | <div class="col-md-4"> |
| @@ -229,6 +229,14 @@ | @@ -229,6 +229,14 @@ | ||
| 229 | </div> | 229 | </div> |
| 230 | </div> | 230 | </div> |
| 231 | 231 | ||
| 232 | + <!-- 终点站名称 --> | ||
| 233 | + <div class="form-group"> | ||
| 234 | + <label class="control-label col-md-3"> 终点站名称: </label> | ||
| 235 | + <div class="col-md-4"> | ||
| 236 | + <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称"> | ||
| 237 | + </div> | ||
| 238 | + </div> | ||
| 239 | + <!-- | ||
| 232 | 起始站首班车时间 | 240 | 起始站首班车时间 |
| 233 | <div class="form-group"> | 241 | <div class="form-group"> |
| 234 | <label class="control-label col-md-3"> 起始站首班车时间: </label> | 242 | <label class="control-label col-md-3"> 起始站首班车时间: </label> |
| @@ -246,14 +254,6 @@ | @@ -246,14 +254,6 @@ | ||
| 246 | </div> | 254 | </div> |
| 247 | 255 | ||
| 248 | 256 | ||
| 249 | - 终点站名称 | ||
| 250 | - <div class="form-group"> | ||
| 251 | - <label class="control-label col-md-3"> 终点站名称: </label> | ||
| 252 | - <div class="col-md-4"> | ||
| 253 | - <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称"> | ||
| 254 | - </div> | ||
| 255 | - </div> | ||
| 256 | - | ||
| 257 | 终点站首班时间 | 257 | 终点站首班时间 |
| 258 | <div class="form-group"> | 258 | <div class="form-group"> |
| 259 | <label class="control-label col-md-3"> 终点站首班车时间: </label> | 259 | <label class="control-label col-md-3"> 终点站首班车时间: </label> |
src/main/resources/static/pages/base/line/edit.html
| @@ -219,7 +219,23 @@ | @@ -219,7 +219,23 @@ | ||
| 219 | </div> | 219 | </div> |
| 220 | </div> | 220 | </div> |
| 221 | 221 | ||
| 222 | - <!-- 车辆总数 --> | 222 | + <!-- 起始站名称 --> |
| 223 | + <div class="form-group"> | ||
| 224 | + <label class="control-label col-md-3"> 起始站名称: </label> | ||
| 225 | + <div class="col-md-4"> | ||
| 226 | + <input type="text" class="form-control" name="startStationName" id="startStationNameInput" placeholder="起始站名称"> | ||
| 227 | + </div> | ||
| 228 | + </div> | ||
| 229 | + | ||
| 230 | + <!-- 终点站名称 --> | ||
| 231 | + <div class="form-group"> | ||
| 232 | + <label class="control-label col-md-3"> 终点站名称: </label> | ||
| 233 | + <div class="col-md-4"> | ||
| 234 | + <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称"> | ||
| 235 | + </div> | ||
| 236 | + </div> | ||
| 237 | + | ||
| 238 | + <!-- 车辆总数 --> | ||
| 223 | <div class="form-group"> | 239 | <div class="form-group"> |
| 224 | <label class="control-label col-md-3"> 车辆总数: </label> | 240 | <label class="control-label col-md-3"> 车辆总数: </label> |
| 225 | <div class="col-md-4"> | 241 | <div class="col-md-4"> |
src/main/resources/static/pages/base/line/list.html
| @@ -50,14 +50,14 @@ | @@ -50,14 +50,14 @@ | ||
| 50 | <tr role="row" class="heading"> | 50 | <tr role="row" class="heading"> |
| 51 | <th width="2%">#</th> | 51 | <th width="2%">#</th> |
| 52 | <th width="4%">序号</th> | 52 | <th width="4%">序号</th> |
| 53 | - <th width="7%">线路编码</th> | 53 | + <th width="5%">线路编码</th> |
| 54 | <th width="8%">线路名称</th> | 54 | <th width="8%">线路名称</th> |
| 55 | <th width="7%">所属公司</th> | 55 | <th width="7%">所属公司</th> |
| 56 | <!-- 闵行没有下属公司,这里暂时注释掉 --> | 56 | <!-- 闵行没有下属公司,这里暂时注释掉 --> |
| 57 | <!-- <th width="8%">所属分公司</th> --> | 57 | <!-- <th width="8%">所属分公司</th> --> |
| 58 | <th width="6%">线路性质</th> | 58 | <th width="6%">线路性质</th> |
| 59 | <th width="6%">线路等级</th> | 59 | <th width="6%">线路等级</th> |
| 60 | - <th width="7%">上海市线路编码</th> | 60 | + <th width="8%">上海市线路编码</th> |
| 61 | <th width="7%">是否撤销</th> | 61 | <th width="7%">是否撤销</th> |
| 62 | <th width="6%">线路标准</th> | 62 | <th width="6%">线路标准</th> |
| 63 | <th width="6%">站点详情</th> | 63 | <th width="6%">站点详情</th> |
src/main/resources/static/pages/base/section/js/add-form-wizard.js
| @@ -304,9 +304,9 @@ var FormWizard = function() { | @@ -304,9 +304,9 @@ var FormWizard = function() { | ||
| 304 | 304 | ||
| 305 | var paramsStationsArray = []; | 305 | var paramsStationsArray = []; |
| 306 | 306 | ||
| 307 | - paramsStationsArray[0] = stationStartValue; | 307 | + paramsStationsArray[0] = stationStartValue+'公交车站'; |
| 308 | 308 | ||
| 309 | - paramsStationsArray[1]= stationEndValue; | 309 | + paramsStationsArray[1]= stationEndValue+'公交车站'; |
| 310 | 310 | ||
| 311 | $('#sectionNameInput').val(stationStartValue + '至' + stationEndValue ); | 311 | $('#sectionNameInput').val(stationStartValue + '至' + stationEndValue ); |
| 312 | 312 | ||
| @@ -329,9 +329,9 @@ var FormWizard = function() { | @@ -329,9 +329,9 @@ var FormWizard = function() { | ||
| 329 | 329 | ||
| 330 | }else if(baseResValue ==1) { | 330 | }else if(baseResValue ==1) { |
| 331 | 331 | ||
| 332 | - SectionVmapWorlds.localSearchFromAdreesToPoint(stationStartValue); | 332 | + SectionVmapWorlds.localSearchFromAdreesToPoint(stationStartValue+'公交车站'); |
| 333 | 333 | ||
| 334 | - SectionVmapWorlds.localSearchFromAdreesToPoint(stationEndValue); | 334 | + SectionVmapWorlds.localSearchFromAdreesToPoint(stationEndValue+'公交车站'); |
| 335 | 335 | ||
| 336 | SectionVmapWorlds.drawingManagerOpen(); | 336 | SectionVmapWorlds.drawingManagerOpen(); |
| 337 | 337 |
src/main/resources/static/pages/base/station/js/add-form-wizard.js
| @@ -322,7 +322,7 @@ var FormWizard = function() { | @@ -322,7 +322,7 @@ var FormWizard = function() { | ||
| 322 | 322 | ||
| 323 | if(baseResValue == 0) { | 323 | if(baseResValue == 0) { |
| 324 | 324 | ||
| 325 | - StationPVmapWorlds.localSearchFromAdreesToPoint(stationNameV,function(p) { | 325 | + StationPVmapWorlds.localSearchFromAdreesToPoint(stationNameV+'公交车站',function(p) { |
| 326 | 326 | ||
| 327 | if(p) { | 327 | if(p) { |
| 328 | 328 | ||
| @@ -337,7 +337,7 @@ var FormWizard = function() { | @@ -337,7 +337,7 @@ var FormWizard = function() { | ||
| 337 | 337 | ||
| 338 | }else if(baseResValue ==1) { | 338 | }else if(baseResValue ==1) { |
| 339 | 339 | ||
| 340 | - StationPVmapWorlds.localSearchFromAdreesToPoint(stationNameV,function(p) {}); | 340 | + StationPVmapWorlds.localSearchFromAdreesToPoint(stationNameV+'公交车站',function(p) {}); |
| 341 | 341 | ||
| 342 | $('.leftUtils').show(); | 342 | $('.leftUtils').show(); |
| 343 | 343 |
src/main/resources/static/pages/base/stationroute/addstationstemplate.html
| @@ -25,8 +25,8 @@ | @@ -25,8 +25,8 @@ | ||
| 25 | <label class="control-label col-md-3"> | 25 | <label class="control-label col-md-3"> |
| 26 | <span class="required"> * </span> 站点名称: | 26 | <span class="required"> * </span> 站点名称: |
| 27 | </label> | 27 | </label> |
| 28 | - <div class="col-md-6"> | ||
| 29 | - <textarea class="form-control" rows="10" name="stations" id="stationsInput" placeholder="站点名称"></textarea> | 28 | + <div class="col-md-9"> |
| 29 | + <textarea class="form-control" rows="12" name="stations" id="stationsInput" placeholder="站点名称"></textarea> | ||
| 30 | </div> | 30 | </div> |
| 31 | </div> | 31 | </div> |
| 32 | 32 | ||
| @@ -35,7 +35,16 @@ | @@ -35,7 +35,16 @@ | ||
| 35 | <div class="form-group"> | 35 | <div class="form-group"> |
| 36 | <div class="alert alert-info font-blue-chambray" style="background-color: #2C3E50"> | 36 | <div class="alert alert-info font-blue-chambray" style="background-color: #2C3E50"> |
| 37 | <h5 class="block"><span class="help-block" style="color:#1bbc9b;"> * 手动添加站点规划说明: </span></h5> | 37 | <h5 class="block"><span class="help-block" style="color:#1bbc9b;"> * 手动添加站点规划说明: </span></h5> |
| 38 | - <p><span class="help-block" style="color:#1bbc9b;"> 请在文本域中按站点顺序依次输入站点名称,每输入完一个站名时请按回车键(Enter)换行.</span> </p> | 38 | + <p> |
| 39 | + <span class="help-block" style="color:#1bbc9b;"> | ||
| 40 | + 请在文本域中按站点顺序依次输入站点名称(如果已有站点GPS坐标,请将坐标跟在站点名称后面用【Tab】键隔开),每输入完一个站名时请按回车键【Enter】换行. | ||
| 41 | + 例如:<br><br> | ||
| 42 | + <!-- <HR style="FILTER: alpha(opacity=0,finishopacity=100,style=1)" width="80%" color=#987cb9 SIZE=3> --> | ||
| 43 | + 浦东大道金桥路 121.496612 31.238960<br> | ||
| 44 | + 浦东大道居家桥路 121.496618 31.238957<br> | ||
| 45 | + 浦东大道德平路 121.496622 31.238948<br> | ||
| 46 | + </span> | ||
| 47 | + </p> | ||
| 39 | </div> | 48 | </div> |
| 40 | </div> | 49 | </div> |
| 41 | </form> | 50 | </form> |
| @@ -143,9 +152,45 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | @@ -143,9 +152,45 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | ||
| 143 | // 站点名称字符串切割 | 152 | // 站点名称字符串切割 |
| 144 | var paramsStationsArray = params.stations.split('\r\n'); | 153 | var paramsStationsArray = params.stations.split('\r\n'); |
| 145 | 154 | ||
| 146 | - // 根据站点名称获取百度坐标 | ||
| 147 | - map.stationsNameToPoints(paramsStationsArray,function(resultJson) { | 155 | + var stationList = []; |
| 156 | + | ||
| 157 | + var len = paramsStationsArray.length; | ||
| 158 | + | ||
| 159 | + if(len>0) { | ||
| 160 | + | ||
| 161 | + for(var k =0;k<len;k++) { | ||
| 162 | + | ||
| 163 | + debugger; | ||
| 164 | + | ||
| 165 | + if(paramsStationsArray[k]=="") | ||
| 166 | + continue; | ||
| 167 | + | ||
| 168 | + var tempStr = paramsStationsArray[k].split('\t'); | ||
| 169 | + | ||
| 170 | + if(tempStr.length<2){ | ||
| 171 | + | ||
| 172 | + stationList.push({name:paramsStationsArray[k]+"公交车站",wgs:{x:'',y:''}}); | ||
| 173 | + | ||
| 174 | + }else { | ||
| 175 | + | ||
| 176 | + stationList.push({name:tempStr[0]+"公交车站",wgs:{x:tempStr[1], y:tempStr[2]}}); | ||
| 177 | + | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + }else { | ||
| 148 | 183 | ||
| 184 | + layer.msg('请按说明规则输入站点!'); | ||
| 185 | + | ||
| 186 | + return; | ||
| 187 | + | ||
| 188 | + } | ||
| 189 | + console.log(stationList); | ||
| 190 | + // 根据站点名称获取百度坐标 | ||
| 191 | + map.stationsNameToPoints(stationList,function(resultJson) { | ||
| 192 | + console.log(resultJson); | ||
| 193 | + debugger; | ||
| 149 | // 根据坐标点获取两点之间的时间与距离 | 194 | // 根据坐标点获取两点之间的时间与距离 |
| 150 | map.getDistanceAndDuration(resultJson,function(stationdataList) { | 195 | map.getDistanceAndDuration(resultJson,function(stationdataList) { |
| 151 | 196 | ||
| @@ -216,7 +261,7 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | @@ -216,7 +261,7 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | ||
| 216 | layer.closeAll(); | 261 | layer.closeAll(); |
| 217 | 262 | ||
| 218 | // 清除地图覆盖物 | 263 | // 清除地图覆盖物 |
| 219 | - map.clearOverlays(); | 264 | + map.clearMarkAndOverlays(); |
| 220 | 265 | ||
| 221 | // 刷新树 | 266 | // 刷新树 |
| 222 | fun.resjtreeDate(addLine.id,directionData); | 267 | fun.resjtreeDate(addLine.id,directionData); |
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
| @@ -184,7 +184,7 @@ var GetAjaxData = function(){ | @@ -184,7 +184,7 @@ var GetAjaxData = function(){ | ||
| 184 | // 保存 | 184 | // 保存 |
| 185 | $post('/station/manualSave',params,function(rd) { | 185 | $post('/station/manualSave',params,function(rd) { |
| 186 | 186 | ||
| 187 | - return callback && callback(rd); | 187 | + callback && callback(rd); |
| 188 | 188 | ||
| 189 | }); | 189 | }); |
| 190 | 190 |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| @@ -717,11 +717,11 @@ var WorldsBMap = function () { | @@ -717,11 +717,11 @@ var WorldsBMap = function () { | ||
| 717 | 717 | ||
| 718 | var f = arguments.callee; | 718 | var f = arguments.callee; |
| 719 | 719 | ||
| 720 | - if(arra[index]!=''){ | 720 | + if(arra[index].name!=''){ |
| 721 | 721 | ||
| 722 | var localSearch = new BMap.LocalSearch(mapBValue); | 722 | var localSearch = new BMap.LocalSearch(mapBValue); |
| 723 | 723 | ||
| 724 | - localSearch.search(arra[index]); | 724 | + localSearch.search(arra[index].name); |
| 725 | 725 | ||
| 726 | localSearch.setSearchCompleteCallback(function (searchResult) { | 726 | localSearch.setSearchCompleteCallback(function (searchResult) { |
| 727 | 727 | ||
| @@ -729,7 +729,8 @@ var WorldsBMap = function () { | @@ -729,7 +729,8 @@ var WorldsBMap = function () { | ||
| 729 | 729 | ||
| 730 | if(poi) { | 730 | if(poi) { |
| 731 | 731 | ||
| 732 | - stationList.push({name:arra[index],potion:{lng:poi.point.lng,lat:poi.point.lat}}); | 732 | + /* stationList.push({name:arra[index],potion:{lng:poi.point.lng,lat:poi.point.lat}});*/ |
| 733 | + stationList.push({name:arra[index].name.replace('公交站',''),wgs:arra[index].wgs,potion:{lng:poi.point.lng,lat:poi.point.lat}}); | ||
| 733 | 734 | ||
| 734 | f(); | 735 | f(); |
| 735 | 736 |