Commit be1aec8cde8db93157a257546d70d95e7588b3c9
Merge branch 'master' of http://222.66.0.204:8090/panzhaov5/bsth_control
Showing
13 changed files
with
311 additions
and
165 deletions
src/main/java/com/bsth/controller/schedule/TTInfoController.java
| @@ -7,6 +7,7 @@ import com.bsth.repository.schedule.TTInfoRepository; | @@ -7,6 +7,7 @@ import com.bsth.repository.schedule.TTInfoRepository; | ||
| 7 | import com.bsth.service.schedule.utils.DataToolsProperties; | 7 | import com.bsth.service.schedule.utils.DataToolsProperties; |
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 9 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 10 | +import org.springframework.data.domain.Page; | ||
| 10 | import org.springframework.web.bind.annotation.*; | 11 | import org.springframework.web.bind.annotation.*; |
| 11 | 12 | ||
| 12 | import java.util.Map; | 13 | import java.util.Map; |
| @@ -59,4 +60,13 @@ public class TTInfoController extends BaseController<TTInfo, Long> { | @@ -59,4 +60,13 @@ public class TTInfoController extends BaseController<TTInfo, Long> { | ||
| 59 | // 一般比较自编号是否重复 | 60 | // 一般比较自编号是否重复 |
| 60 | return baseService.validateEquale(map); | 61 | return baseService.validateEquale(map); |
| 61 | } | 62 | } |
| 63 | + | ||
| 64 | + @Override | ||
| 65 | + public Page<TTInfo> list(@RequestParam Map<String, Object> map, @RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "10") int size, @RequestParam(defaultValue = "id") String order, @RequestParam(defaultValue = "DESC") String direction) { | ||
| 66 | + // 如果有isCancel键值,将其值变成boolean | ||
| 67 | + if (map.get("isCancel_eq") != null) | ||
| 68 | + map.put("isCancel_eq", new Boolean(map.get("isCancel_eq").toString())); | ||
| 69 | + | ||
| 70 | + return super.list(map, page, size, order, direction); | ||
| 71 | + } | ||
| 62 | } | 72 | } |
src/main/java/com/bsth/entity/schedule/TTInfo.java
| @@ -41,6 +41,9 @@ public class TTInfo { | @@ -41,6 +41,9 @@ public class TTInfo { | ||
| 41 | /** 是否启用调度模版 */ | 41 | /** 是否启用调度模版 */ |
| 42 | @Column(nullable = false) | 42 | @Column(nullable = false) |
| 43 | private Boolean isEnableDisTemplate; | 43 | private Boolean isEnableDisTemplate; |
| 44 | + /** 是否删除(标记) */ | ||
| 45 | + @Column(nullable = false) | ||
| 46 | + private Boolean isCancel = false; | ||
| 44 | 47 | ||
| 45 | /** 模版类型(TODO:时刻表,间隔式,这个以后用枚举还是字典再议,现在先用文字) */ | 48 | /** 模版类型(TODO:时刻表,间隔式,这个以后用枚举还是字典再议,现在先用文字) */ |
| 46 | private String templateType; | 49 | private String templateType; |
| @@ -193,4 +196,11 @@ public class TTInfo { | @@ -193,4 +196,11 @@ public class TTInfo { | ||
| 193 | this.updateDate = updateDate; | 196 | this.updateDate = updateDate; |
| 194 | } | 197 | } |
| 195 | 198 | ||
| 199 | + public Boolean getIsCancel() { | ||
| 200 | + return isCancel; | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + public void setIsCancel(Boolean isCancel) { | ||
| 204 | + this.isCancel = isCancel; | ||
| 205 | + } | ||
| 196 | } | 206 | } |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| @@ -131,10 +131,12 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -131,10 +131,12 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 131 | 131 | ||
| 132 | Map<String, Object> resultSaveMapm = new HashMap<String,Object>(); | 132 | Map<String, Object> resultSaveMapm = new HashMap<String,Object>(); |
| 133 | 133 | ||
| 134 | + String baseRes = map.get("baseRes").equals("") ? "" : map.get("baseRes").toString(); | ||
| 135 | + | ||
| 134 | if(!stationJSON.equals("")) { | 136 | if(!stationJSON.equals("")) { |
| 135 | 137 | ||
| 136 | // 保存站点与站点路由信息 | 138 | // 保存站点与站点路由信息 |
| 137 | - resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine); | 139 | + resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine,baseRes); |
| 138 | 140 | ||
| 139 | } | 141 | } |
| 140 | 142 | ||
| @@ -258,7 +260,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -258,7 +260,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 258 | */ | 260 | */ |
| 259 | public Map<String, Object> savaStationAndStationRouteInfo(String stationJSON,double sectionDistance,double sectionDuration,String dbType, | 261 | public Map<String, Object> savaStationAndStationRouteInfo(String stationJSON,double sectionDistance,double sectionDuration,String dbType, |
| 260 | 262 | ||
| 261 | - int radius,String shapesType,int destroy,int versions,double sumUpOrDownMileage,int directions,Line resultLine) throws Exception{ | 263 | + int radius,String shapesType,int destroy,int versions,double sumUpOrDownMileage,int directions,Line resultLine,String baseRes) throws Exception{ |
| 262 | 264 | ||
| 263 | Map<String, Object> paramsMeleageAndDistncDura = new HashMap<String,Object>(); | 265 | Map<String, Object> paramsMeleageAndDistncDura = new HashMap<String,Object>(); |
| 264 | 266 | ||
| @@ -302,9 +304,6 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -302,9 +304,6 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 302 | // 百度坐标纬度 | 304 | // 百度坐标纬度 |
| 303 | String bLatx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lat").toString(); | 305 | String bLatx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lat").toString(); |
| 304 | 306 | ||
| 305 | - // 百度经纬度 | ||
| 306 | - bJwpoints = bLonx + " " + bLatx; | ||
| 307 | - | ||
| 308 | List<Object[]> stationNameList = repository.findStationName(stationName); | 307 | List<Object[]> stationNameList = repository.findStationName(stationName); |
| 309 | 308 | ||
| 310 | boolean isHave = isHaveStationname(bJwpoints,stationNameList); | 309 | boolean isHave = isHaveStationname(bJwpoints,stationNameList); |
| @@ -343,10 +342,84 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -343,10 +342,84 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 343 | 342 | ||
| 344 | float gLaty = 0.0f; | 343 | float gLaty = 0.0f; |
| 345 | 344 | ||
| 346 | - /** to WGS坐标 */ | ||
| 347 | - Location resultPoint = FromBDPointToWGSPoint(bLonx,bLatx); | 345 | + Location resultPoint = null; |
| 346 | + | ||
| 347 | + if(baseRes.equals("No")){ | ||
| 348 | + | ||
| 349 | + /** BD to WGS坐标 */ | ||
| 350 | + resultPoint = FromBDPointToWGSPoint(bLonx,bLatx); | ||
| 351 | + | ||
| 352 | + if(gLonxStr==null) | ||
| 353 | + gLonx = (float)resultPoint.getLng(); | ||
| 354 | + else | ||
| 355 | + gLonx = Float.valueOf(gLonxStr); | ||
| 356 | + | ||
| 357 | + if(gLatyStr==null) | ||
| 358 | + gLaty = (float)resultPoint.getLat(); | ||
| 359 | + else | ||
| 360 | + gLaty = Float.valueOf(gLatyStr); | ||
| 361 | + | ||
| 362 | + arg0.setgLonx(gLonx); | ||
| 363 | + | ||
| 364 | + arg0.setgLaty(gLaty); | ||
| 365 | + | ||
| 366 | + // 百度经纬度 | ||
| 367 | + bJwpoints = bLonx + " " + bLatx; | ||
| 368 | + | ||
| 369 | + arg0.setbJwpoints(bJwpoints); | ||
| 370 | + | ||
| 371 | + }else if(baseRes.equals("GCJ02")){ | ||
| 372 | + | ||
| 373 | + Location bdLoc = TransGPS.LocationMake(Double.valueOf(gLonxStr), Double.valueOf(gLatyStr)); | ||
| 374 | + | ||
| 375 | + Location location = TransGPS.bd_encrypt(bdLoc); | ||
| 376 | + | ||
| 377 | + String GCJLng = String.valueOf(location.getLng()); | ||
| 378 | + | ||
| 379 | + String GCJLat = String.valueOf(location.getLat()); | ||
| 380 | + | ||
| 381 | + resultPoint = FromBDPointToWGSPoint(GCJLng,GCJLat); | ||
| 382 | + | ||
| 383 | + bJwpoints = GCJLng + " " +GCJLat; | ||
| 384 | + | ||
| 385 | + arg0.setgLonx((float)location.getLng()); | ||
| 386 | + | ||
| 387 | + arg0.setgLaty((float)location.getLat()); | ||
| 388 | + | ||
| 389 | + arg0.setbJwpoints(bJwpoints); | ||
| 390 | + | ||
| 391 | + | ||
| 392 | + }else if(baseRes.equals("BD09")){ | ||
| 393 | + | ||
| 394 | + resultPoint = FromBDPointToWGSPoint(gLonxStr, gLatyStr); | ||
| 395 | + | ||
| 396 | + bJwpoints = gLonxStr+ " " + gLatyStr; | ||
| 397 | + | ||
| 398 | + arg0.setgLonx((float)resultPoint.getLng()); | ||
| 399 | + | ||
| 400 | + arg0.setgLaty((float)resultPoint.getLat()); | ||
| 401 | + | ||
| 402 | + }else if(baseRes.equals("WGS84")){ | ||
| 403 | + | ||
| 404 | + Location bdLoc = TransGPS.LocationMake(Double.valueOf(gLonxStr), Double.valueOf(gLatyStr)); | ||
| 405 | + | ||
| 406 | + Location gcjLoc = TransGPS.transformFromWGSToGCJ(bdLoc); | ||
| 407 | + | ||
| 408 | + Location bdEn = TransGPS.bd_encrypt(gcjLoc); | ||
| 409 | + | ||
| 410 | + bJwpoints = String.valueOf(bdEn.getLng()) + " " + String.valueOf(bdEn.getLat()); | ||
| 411 | + | ||
| 412 | + arg0.setbJwpoints(bJwpoints); | ||
| 413 | + | ||
| 414 | + arg0.setgLonx(Float.valueOf(gLonxStr)); | ||
| 415 | + | ||
| 416 | + arg0.setgLaty(Float.valueOf(gLatyStr)); | ||
| 417 | + | ||
| 418 | + } | ||
| 419 | + | ||
| 420 | + | ||
| 348 | 421 | ||
| 349 | - if(gLonxStr==null) | 422 | + /* if(gLonxStr==null) |
| 350 | gLonx = (float)resultPoint.getLng(); | 423 | gLonx = (float)resultPoint.getLng(); |
| 351 | else | 424 | else |
| 352 | gLonx = Float.valueOf(gLonxStr); | 425 | gLonx = Float.valueOf(gLonxStr); |
| @@ -358,7 +431,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -358,7 +431,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 358 | 431 | ||
| 359 | arg0.setgLonx(gLonx); | 432 | arg0.setgLonx(gLonx); |
| 360 | 433 | ||
| 361 | - arg0.setgLaty(gLaty); | 434 | + arg0.setgLaty(gLaty);*/ |
| 362 | 435 | ||
| 363 | // 站点地理位置WGS坐标经度 | 436 | // 站点地理位置WGS坐标经度 |
| 364 | // String gLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("WGSpotion").toString()).get("Lng").toString(); | 437 | // String gLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("WGSpotion").toString()).get("Lng").toString(); |
| @@ -379,7 +452,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -379,7 +452,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 379 | // 版本号 | 452 | // 版本号 |
| 380 | arg0.setVersions(versions); | 453 | arg0.setVersions(versions); |
| 381 | 454 | ||
| 382 | - arg0.setbJwpoints(bJwpoints); | 455 | + /*arg0.setbJwpoints(bJwpoints);*/ |
| 383 | 456 | ||
| 384 | // 插入站点信息 | 457 | // 插入站点信息 |
| 385 | repository.save(arg0); | 458 | repository.save(arg0); |
| @@ -1280,6 +1353,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1280,6 +1353,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1280 | 1353 | ||
| 1281 | } | 1354 | } |
| 1282 | 1355 | ||
| 1356 | + | ||
| 1283 | @Override | 1357 | @Override |
| 1284 | public Map<String, Object> manualSave(Map<String, Object> map) { | 1358 | public Map<String, Object> manualSave(Map<String, Object> map) { |
| 1285 | 1359 | ||
| @@ -1331,10 +1405,12 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1331,10 +1405,12 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1331 | 1405 | ||
| 1332 | Map<String, Object> resultSaveMapm = new HashMap<String,Object>(); | 1406 | Map<String, Object> resultSaveMapm = new HashMap<String,Object>(); |
| 1333 | 1407 | ||
| 1408 | + String baseRes = map.get("baseRes").equals("") ? "" : map.get("baseRes").toString(); | ||
| 1409 | + | ||
| 1334 | if(!stationJSON.equals("")) { | 1410 | if(!stationJSON.equals("")) { |
| 1335 | 1411 | ||
| 1336 | // 保存站点与站点路由信息 | 1412 | // 保存站点与站点路由信息 |
| 1337 | - // resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine); | 1413 | + resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine,baseRes); |
| 1338 | 1414 | ||
| 1339 | } | 1415 | } |
| 1340 | 1416 | ||
| @@ -1347,7 +1423,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1347,7 +1423,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1347 | // 如果路段信息JSON字符串不为空 | 1423 | // 如果路段信息JSON字符串不为空 |
| 1348 | if(!sectionJSON.equals("")) { | 1424 | if(!sectionJSON.equals("")) { |
| 1349 | 1425 | ||
| 1350 | - // manualSaveSectionAndSectionRoute(sectionJSON, speedLimitStr, sectionDistance, sectionDuration, dbType, versions, resultLine, destroy, directions); | 1426 | + manualSaveSectionAndSectionRoute(sectionJSON, speedLimitStr, sectionDistance, sectionDuration, dbType, versions, resultLine, destroy, directions); |
| 1351 | 1427 | ||
| 1352 | } | 1428 | } |
| 1353 | 1429 |
src/main/java/com/bsth/service/schedule/TTInfoServiceImpl.java
| 1 | package com.bsth.service.schedule; | 1 | package com.bsth.service.schedule; |
| 2 | 2 | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 3 | import com.bsth.entity.schedule.TTInfo; | 4 | import com.bsth.entity.schedule.TTInfo; |
| 4 | -import com.bsth.repository.schedule.TTInfoDetailRepository; | 5 | +import com.bsth.repository.schedule.TTInfoRepository; |
| 5 | import com.bsth.service.impl.BaseServiceImpl; | 6 | import com.bsth.service.impl.BaseServiceImpl; |
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | +import org.springframework.dao.DataIntegrityViolationException; | ||
| 7 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| 8 | 10 | ||
| 9 | import javax.transaction.Transactional; | 11 | import javax.transaction.Transactional; |
| 12 | +import java.util.HashMap; | ||
| 10 | import java.util.Map; | 13 | import java.util.Map; |
| 11 | 14 | ||
| 12 | /** | 15 | /** |
| @@ -16,11 +19,21 @@ import java.util.Map; | @@ -16,11 +19,21 @@ import java.util.Map; | ||
| 16 | @Transactional | 19 | @Transactional |
| 17 | public class TTInfoServiceImpl extends BaseServiceImpl<TTInfo, Long> implements TTInfoService { | 20 | public class TTInfoServiceImpl extends BaseServiceImpl<TTInfo, Long> implements TTInfoService { |
| 18 | @Autowired | 21 | @Autowired |
| 19 | - private TTInfoDetailRepository ttInfoDetailRepository; | 22 | + private TTInfoRepository ttInfoRepository; |
| 20 | 23 | ||
| 21 | @Override | 24 | @Override |
| 22 | public Map<String, Object> delete(Long aLong) { | 25 | public Map<String, Object> delete(Long aLong) { |
| 23 | - ttInfoDetailRepository.deleteByTtinfoId(aLong); | ||
| 24 | - return super.delete(aLong); | 26 | + TTInfo ttInfo = ttInfoRepository.findOne(aLong); |
| 27 | + ttInfo.setIsCancel(true); | ||
| 28 | + | ||
| 29 | + Map<String, Object> map = new HashMap<>(); | ||
| 30 | + try{ | ||
| 31 | + ttInfoRepository.save(ttInfo); | ||
| 32 | + map.put("status", ResponseCode.SUCCESS); | ||
| 33 | + }catch(DataIntegrityViolationException de){ | ||
| 34 | + map.put("status", ResponseCode.ERROR); | ||
| 35 | + map.put("msg", "“完整性约束”校验失败,请检查要删除的对象是否存在外键约束"); | ||
| 36 | + } | ||
| 37 | + return map; | ||
| 25 | } | 38 | } |
| 26 | } | 39 | } |
src/main/java/com/bsth/service/schedule/rules/strategy/IStrategyImpl.java
| @@ -37,6 +37,7 @@ public class IStrategyImpl implements IStrategy { | @@ -37,6 +37,7 @@ public class IStrategyImpl implements IStrategy { | ||
| 37 | // 查询参数 | 37 | // 查询参数 |
| 38 | Map<String, Object> param = new HashMap<>(); | 38 | Map<String, Object> param = new HashMap<>(); |
| 39 | param.put("xl.id_eq", xlId); // 线路id | 39 | param.put("xl.id_eq", xlId); // 线路id |
| 40 | + param.put("isCancel_eq", false); // 没有作废 | ||
| 40 | param.put("isEnableDisTemplate_eq", true); // 是否启用 | 41 | param.put("isEnableDisTemplate_eq", true); // 是否启用 |
| 41 | Iterable<TTInfo> ttInfoIterable = ttInfoService.list(param); | 42 | Iterable<TTInfo> ttInfoIterable = ttInfoService.list(param); |
| 42 | Iterator<TTInfo> ttInfoIterator = ttInfoIterable.iterator(); | 43 | Iterator<TTInfo> ttInfoIterator = ttInfoIterable.iterator(); |
src/main/resources/rules/shiftloop.drl
| @@ -361,12 +361,12 @@ end | @@ -361,12 +361,12 @@ end | ||
| 361 | 361 | ||
| 362 | rule "calcu_guideboard_range_loop_1_1" | 362 | rule "calcu_guideboard_range_loop_1_1" |
| 363 | when | 363 | when |
| 364 | - Calcu_guideboard_range_loop_param($ruleId : ruleId, $sdays : sdays, sdays <= temp) | 364 | + Calcu_guideboard_range_loop_param($ruleId : ruleId, $sdays : sdays, (sdays - 1) <= temp) |
| 365 | Calcu_guideboard_index_result(ruleId == $ruleId, $index : calcu_index) | 365 | Calcu_guideboard_index_result(ruleId == $ruleId, $index : calcu_index) |
| 366 | then | 366 | then |
| 367 | Calcu_guideboard_range_loop_result cgrlr = new Calcu_guideboard_range_loop_result(); | 367 | Calcu_guideboard_range_loop_result cgrlr = new Calcu_guideboard_range_loop_result(); |
| 368 | cgrlr.setRuleId($ruleId); | 368 | cgrlr.setRuleId($ruleId); |
| 369 | - cgrlr.setFirstLoopSize($index + $sdays); | 369 | + cgrlr.setFirstLoopSize($index + $sdays - 1); |
| 370 | cgrlr.setMiddelLoopCount(0); | 370 | cgrlr.setMiddelLoopCount(0); |
| 371 | cgrlr.setRangeSize(0); | 371 | cgrlr.setRangeSize(0); |
| 372 | cgrlr.setLastLoopSize(0); | 372 | cgrlr.setLastLoopSize(0); |
| @@ -382,7 +382,7 @@ end | @@ -382,7 +382,7 @@ end | ||
| 382 | 382 | ||
| 383 | rule "calcu_guideboard_range_loop_1_2" | 383 | rule "calcu_guideboard_range_loop_1_2" |
| 384 | when | 384 | when |
| 385 | - Calcu_guideboard_range_loop_param($ruleId : ruleId, $sdays : sdays, $temp : temp, sdays > temp) | 385 | + Calcu_guideboard_range_loop_param($ruleId : ruleId, $sdays : sdays, $temp : temp, (sdays - 1) > temp) |
| 386 | Calcu_guideboard_index_result(ruleId == $ruleId, $index : calcu_index) | 386 | Calcu_guideboard_index_result(ruleId == $ruleId, $index : calcu_index) |
| 387 | ScheduleRule_input(ruleId == $ruleId, $rangesize : guideboardIds.size()) | 387 | ScheduleRule_input(ruleId == $ruleId, $rangesize : guideboardIds.size()) |
| 388 | then | 388 | then |
| @@ -390,7 +390,7 @@ rule "calcu_guideboard_range_loop_1_2" | @@ -390,7 +390,7 @@ rule "calcu_guideboard_range_loop_1_2" | ||
| 390 | cgrlr.setRuleId($ruleId); | 390 | cgrlr.setRuleId($ruleId); |
| 391 | cgrlr.setFirstLoopSize($index + $temp); | 391 | cgrlr.setFirstLoopSize($index + $temp); |
| 392 | 392 | ||
| 393 | - int gbd_days_temp_minus = $sdays - $temp; | 393 | + int gbd_days_temp_minus = $sdays - 1 - $temp; |
| 394 | int gbd_days_temp_minus_svalue = (int) (gbd_days_temp_minus / new Integer($rangesize)); | 394 | int gbd_days_temp_minus_svalue = (int) (gbd_days_temp_minus / new Integer($rangesize)); |
| 395 | int gbd_days_temp_minus_yvalue = gbd_days_temp_minus % new Integer($rangesize); | 395 | int gbd_days_temp_minus_yvalue = gbd_days_temp_minus % new Integer($rangesize); |
| 396 | 396 | ||
| @@ -438,12 +438,12 @@ end | @@ -438,12 +438,12 @@ end | ||
| 438 | 438 | ||
| 439 | rule "calcu_employee_range_loop_1_1" | 439 | rule "calcu_employee_range_loop_1_1" |
| 440 | when | 440 | when |
| 441 | - Calcu_employee_range_loop_param($ruleId : ruleId, $sdays : sdays, sdays <= temp) | 441 | + Calcu_employee_range_loop_param($ruleId : ruleId, $sdays : sdays, sdays - 1 <= temp) |
| 442 | Calcu_employee_index_result(ruleId == $ruleId, $index : calcu_index) | 442 | Calcu_employee_index_result(ruleId == $ruleId, $index : calcu_index) |
| 443 | then | 443 | then |
| 444 | Calcu_employee_range_loop_result cgrlr = new Calcu_employee_range_loop_result(); | 444 | Calcu_employee_range_loop_result cgrlr = new Calcu_employee_range_loop_result(); |
| 445 | cgrlr.setRuleId($ruleId); | 445 | cgrlr.setRuleId($ruleId); |
| 446 | - cgrlr.setFirstLoopSize($index + $sdays); | 446 | + cgrlr.setFirstLoopSize($index + $sdays - 1); |
| 447 | cgrlr.setMiddelLoopCount(0); | 447 | cgrlr.setMiddelLoopCount(0); |
| 448 | cgrlr.setRangeSize(0); | 448 | cgrlr.setRangeSize(0); |
| 449 | cgrlr.setLastLoopSize(0); | 449 | cgrlr.setLastLoopSize(0); |
| @@ -459,7 +459,7 @@ end | @@ -459,7 +459,7 @@ end | ||
| 459 | 459 | ||
| 460 | rule "calcu_employee_range_loop_1_2" | 460 | rule "calcu_employee_range_loop_1_2" |
| 461 | when | 461 | when |
| 462 | - Calcu_employee_range_loop_param($ruleId : ruleId, $sdays : sdays, $temp : temp, sdays > temp) | 462 | + Calcu_employee_range_loop_param($ruleId : ruleId, $sdays : sdays, $temp : temp, sdays - 1 > temp) |
| 463 | Calcu_employee_index_result(ruleId == $ruleId, $index : calcu_index) | 463 | Calcu_employee_index_result(ruleId == $ruleId, $index : calcu_index) |
| 464 | ScheduleRule_input(ruleId == $ruleId, $rangesize : employeeConfigIds.size()) | 464 | ScheduleRule_input(ruleId == $ruleId, $rangesize : employeeConfigIds.size()) |
| 465 | then | 465 | then |
| @@ -467,7 +467,7 @@ rule "calcu_employee_range_loop_1_2" | @@ -467,7 +467,7 @@ rule "calcu_employee_range_loop_1_2" | ||
| 467 | cgrlr.setRuleId($ruleId); | 467 | cgrlr.setRuleId($ruleId); |
| 468 | cgrlr.setFirstLoopSize($index + $temp); | 468 | cgrlr.setFirstLoopSize($index + $temp); |
| 469 | 469 | ||
| 470 | - int gbd_days_temp_minus = $sdays - $temp; | 470 | + int gbd_days_temp_minus = $sdays - 1 - $temp; |
| 471 | int gbd_days_temp_minus_svalue = (int) (gbd_days_temp_minus / new Integer($rangesize)); | 471 | int gbd_days_temp_minus_svalue = (int) (gbd_days_temp_minus / new Integer($rangesize)); |
| 472 | int gbd_days_temp_minus_yvalue = gbd_days_temp_minus % new Integer($rangesize); | 472 | int gbd_days_temp_minus_yvalue = gbd_days_temp_minus % new Integer($rangesize); |
| 473 | 473 | ||
| @@ -546,6 +546,8 @@ rule "calcu_loop_guideboard" | @@ -546,6 +546,8 @@ rule "calcu_loop_guideboard" | ||
| 546 | clgr.setRuleId($ruleId); | 546 | clgr.setRuleId($ruleId); |
| 547 | clgr.setGo_list(scheduleResult_outputs); | 547 | clgr.setGo_list(scheduleResult_outputs); |
| 548 | 548 | ||
| 549 | + System.out.println(scheduleResult_outputs.size()); | ||
| 550 | + | ||
| 549 | insert(clgr); | 551 | insert(clgr); |
| 550 | end | 552 | end |
| 551 | 553 | ||
| @@ -608,6 +610,8 @@ rule "calcu_loop_employee" | @@ -608,6 +610,8 @@ rule "calcu_loop_employee" | ||
| 608 | clgr.setRuleId($ruleId); | 610 | clgr.setRuleId($ruleId); |
| 609 | clgr.setEo_list(scheduleResult_outputs); | 611 | clgr.setEo_list(scheduleResult_outputs); |
| 610 | 612 | ||
| 613 | + System.out.println(scheduleResult_outputs.size()); | ||
| 614 | + | ||
| 611 | insert(clgr); | 615 | insert(clgr); |
| 612 | end | 616 | end |
| 613 | 617 |
src/main/resources/static/pages/base/stationroute/addstationstemplate.html
| @@ -40,10 +40,10 @@ | @@ -40,10 +40,10 @@ | ||
| 40 | <input type="radio" class="icheck" name="baseRes" value='No'> 暂无坐标系 | 40 | <input type="radio" class="icheck" name="baseRes" value='No'> 暂无坐标系 |
| 41 | </label> | 41 | </label> |
| 42 | <label> | 42 | <label> |
| 43 | - <input type="radio" class="icheck" name="baseRes" value='GCJ-02' > 火星坐标系 | 43 | + <input type="radio" class="icheck" name="baseRes" value='GCJ02' > 火星坐标系 |
| 44 | </label> | 44 | </label> |
| 45 | <label > | 45 | <label > |
| 46 | - <input type="radio" class="icheck" name="baseRes" value='BD-09'> 百度坐标系 | 46 | + <input type="radio" class="icheck" name="baseRes" value='BD09'> 百度坐标系 |
| 47 | </label> | 47 | </label> |
| 48 | <label > | 48 | <label > |
| 49 | <input type="radio" class="icheck" name="baseRes" value='WGS84' checked> WGS84坐标系 | 49 | <input type="radio" class="icheck" name="baseRes" value='WGS84' checked> WGS84坐标系 |
| @@ -59,7 +59,6 @@ | @@ -59,7 +59,6 @@ | ||
| 59 | <span class="help-block" style="color:#1bbc9b;"> | 59 | <span class="help-block" style="color:#1bbc9b;"> |
| 60 | 请在文本域中按站点顺序依次输入站点名称(如果已有站点GPS坐标,请将坐标跟在站点名称后面用【Tab】键隔开),每输入完一个站名时请按回车键【Enter】换行. | 60 | 请在文本域中按站点顺序依次输入站点名称(如果已有站点GPS坐标,请将坐标跟在站点名称后面用【Tab】键隔开),每输入完一个站名时请按回车键【Enter】换行. |
| 61 | 例如:<br><br> | 61 | 例如:<br><br> |
| 62 | - <!-- <HR style="FILTER: alpha(opacity=0,finishopacity=100,style=1)" width="80%" color=#987cb9 SIZE=3> --> | ||
| 63 | 浦东大道金桥路 121.496612 31.238960<br> | 62 | 浦东大道金桥路 121.496612 31.238960<br> |
| 64 | 浦东大道居家桥路 121.496618 31.238957<br> | 63 | 浦东大道居家桥路 121.496618 31.238957<br> |
| 65 | 浦东大道德平路 121.496622 31.238948<br> | 64 | 浦东大道德平路 121.496622 31.238948<br> |
| @@ -80,6 +79,8 @@ | @@ -80,6 +79,8 @@ | ||
| 80 | 79 | ||
| 81 | $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,ajaxd,dir,line,fun){ | 80 | $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,ajaxd,dir,line,fun){ |
| 82 | 81 | ||
| 82 | + | ||
| 83 | + | ||
| 83 | // 延迟加载显示mobal | 84 | // 延迟加载显示mobal |
| 84 | setTimeout(function(){$('#add_station_template_mobal').modal({show : true,backdrop: 'static', keyboard: false});},200); | 85 | setTimeout(function(){$('#add_station_template_mobal').modal({show : true,backdrop: 'static', keyboard: false});},200); |
| 85 | 86 | ||
| @@ -149,15 +150,24 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | @@ -149,15 +150,24 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | ||
| 149 | 150 | ||
| 150 | var directionData = dir; | 151 | var directionData = dir; |
| 151 | 152 | ||
| 153 | + // 定义线路名称 | ||
| 154 | + var lineNameV = $('.portlet-title .caption').text(); | ||
| 155 | + | ||
| 156 | + var dirStr = ''; | ||
| 157 | + | ||
| 152 | // 上行 | 158 | // 上行 |
| 153 | if(directionData==0){ | 159 | if(directionData==0){ |
| 154 | 160 | ||
| 161 | + dirStr = '上行路段'; | ||
| 162 | + | ||
| 155 | // 隐藏上行规划 | 163 | // 隐藏上行规划 |
| 156 | $('#upToolsMobal').hide(); | 164 | $('#upToolsMobal').hide(); |
| 157 | 165 | ||
| 158 | // 下行 | 166 | // 下行 |
| 159 | }else if(directionData==1){ | 167 | }else if(directionData==1){ |
| 160 | 168 | ||
| 169 | + dirStr = '下行路段'; | ||
| 170 | + | ||
| 161 | // 隐藏上行规划 | 171 | // 隐藏上行规划 |
| 162 | $('#downToolsMobal').hide(); | 172 | $('#downToolsMobal').hide(); |
| 163 | 173 | ||
| @@ -167,163 +177,181 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | @@ -167,163 +177,181 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a | ||
| 167 | var i = layer.load(0,{offset:['200px', '280px']}); | 177 | var i = layer.load(0,{offset:['200px', '280px']}); |
| 168 | 178 | ||
| 169 | // 表单序列化 | 179 | // 表单序列化 |
| 170 | - var params = form.serializeJSON(); | 180 | + var paramsForm = form.serializeJSON(); |
| 171 | 181 | ||
| 172 | - var baseResValue = params.baseRes; | 182 | + var baseResValue = paramsForm.baseRes; |
| 173 | 183 | ||
| 174 | // 站点名称字符串切割 | 184 | // 站点名称字符串切割 |
| 175 | - var paramsStationsArray = params.stations.split('\r\n'); | 185 | + var array = paramsForm.stations.split('\r\n'); |
| 176 | 186 | ||
| 177 | - var len = paramsStationsArray.length; | 187 | + var arrayFormat = inputStationValueFormat(array); |
| 178 | 188 | ||
| 179 | - if(baseResValue=='No'){ | ||
| 180 | - | ||
| 181 | - debugger; | ||
| 182 | - | ||
| 183 | - var stationList = []; | ||
| 184 | - | ||
| 185 | - for(var k =0;k<len;k++) | ||
| 186 | - stationList.push({name:paramsStationsArray[k]+'公交车站'}); | ||
| 187 | - | ||
| 188 | - | ||
| 189 | - console.log(stationList); | ||
| 190 | - | ||
| 191 | - return; | 189 | + |
| 190 | + // 根据站点名称获取百度坐标 | ||
| 191 | + map.stationsNameToPoints(arrayFormat,function(resultJson) { | ||
| 192 | 192 | ||
| 193 | - // 根据站点名称获取百度坐标 | ||
| 194 | - map.stationsNameToPoints(stationList,function(resultJson) { | 193 | + // 根据坐标点获取两点之间的时间与距离 |
| 194 | + map.getDistanceAndDuration(resultJson,function(stationdataList) { | ||
| 195 | + | ||
| 196 | + // 设置第一个站的距离 | ||
| 197 | + stationdataList[0].distance = ''; | ||
| 198 | + | ||
| 199 | + // 设置第一个站的时间 | ||
| 200 | + stationdataList[0].duration = ''; | ||
| 201 | + | ||
| 202 | + // 定义站点信息JSON字符串 | ||
| 203 | + var stationJSON = JSON.stringify(stationdataList); | ||
| 204 | + | ||
| 205 | + var addLine = line.getLineObj(); | ||
| 206 | + | ||
| 207 | + // 参数集合 | ||
| 208 | + var params = {}; | ||
| 209 | + | ||
| 210 | + params.baseRes = baseResValue; | ||
| 211 | + | ||
| 212 | + // 站点信息JSON字符串 | ||
| 213 | + params.stationJSON = stationJSON; | ||
| 214 | + | ||
| 215 | + // 线路ID | ||
| 216 | + params.lineId = addLine.id; | ||
| 217 | + | ||
| 218 | + // 方向 | ||
| 219 | + params.directions = directionData; | ||
| 220 | + | ||
| 221 | + // 原始坐标类型 | ||
| 222 | + params.dbType = 'b'; | ||
| 223 | + | ||
| 224 | + // 圆形半径 | ||
| 225 | + params.radius = '100'; | ||
| 226 | + | ||
| 227 | + // 限速 | ||
| 228 | + params.speedLimit = '60'; | ||
| 195 | 229 | ||
| 196 | - // 根据坐标点获取两点之间的时间与距离 | ||
| 197 | - map.getDistanceAndDuration(resultJson,function(stationdataList) { | 230 | + // 图形类型(r:圆形;p:多边形) |
| 231 | + params.shapesType = 'r'; | ||
| 232 | + | ||
| 233 | + // destroy:是否撤销 | ||
| 234 | + params.destroy = '0'; | ||
| 235 | + | ||
| 236 | + // versions:版本号 | ||
| 237 | + params.versions = '1'; | ||
| 238 | + | ||
| 239 | + map.lineInfoPanl(lineNameV,directionData,function(BusLine){ | ||
| 198 | 240 | ||
| 199 | - // 根据坐标点获取两点之间的折线路段 | ||
| 200 | - map.getSectionListPlonly(stationdataList,function(sectiondata) { | ||
| 201 | - | ||
| 202 | - var addLine = LineObj.getLineObj(); | ||
| 203 | - | ||
| 204 | - // 设置第一个站的距离 | ||
| 205 | - stationdataList[0].distance = ''; | ||
| 206 | - | ||
| 207 | - // 设置第一个站的时间 | ||
| 208 | - stationdataList[0].duration = ''; | ||
| 209 | - | ||
| 210 | - // 定义站点信息JSON字符串 | ||
| 211 | - var stationJSON = JSON.stringify(stationdataList); | ||
| 212 | - | ||
| 213 | - // 定义路段信息字符串 | ||
| 214 | - var sectionJSON = JSON.stringify(sectiondata); | ||
| 215 | - | ||
| 216 | - // 参数集合 | ||
| 217 | - var params = {}; | ||
| 218 | - | ||
| 219 | - // 站点信息JSON字符串 | ||
| 220 | - params.stationJSON = stationJSON; | ||
| 221 | - | ||
| 222 | - // 线路ID | ||
| 223 | - params.lineId = addLine.id; | ||
| 224 | - | ||
| 225 | - // 方向 | ||
| 226 | - params.directions = directionData; | 241 | + // 如果线路信息不为空 |
| 242 | + if(BusLine){ | ||
| 227 | 243 | ||
| 228 | - // 原始坐标类型 | ||
| 229 | - params.dbType = 'b'; | ||
| 230 | - | ||
| 231 | - // 圆形半径 | ||
| 232 | - params.radius = '100'; | ||
| 233 | - | ||
| 234 | - // 限速 | ||
| 235 | - params.speedLimit = '60'; | ||
| 236 | - | ||
| 237 | - // 图形类型(r:圆形;p:多边形) | ||
| 238 | - params.shapesType = 'r'; | ||
| 239 | - | ||
| 240 | - // destroy:是否撤销 | ||
| 241 | - params.destroy = '0'; | ||
| 242 | - | ||
| 243 | - // versions:版本号 | ||
| 244 | - params.versions = '1'; | ||
| 245 | - | ||
| 246 | - // 路段信息JSON字符串 | ||
| 247 | - params.sectionJSON = sectionJSON; | ||
| 248 | - | ||
| 249 | - // 保存 | ||
| 250 | - ajaxd.manualSave(params,function(rd) { | ||
| 251 | - | ||
| 252 | - if(rd.status='SUCCESS') { | 244 | + if(BusLine.zB.length == 0){ |
| 245 | + | ||
| 246 | + // 根据坐标点获取两点之间的折线路段 | ||
| 247 | + map.getSectionListPlonly(stationdataList,function(sectiondata) { | ||
| 253 | 248 | ||
| 254 | - layer.msg('保存成功!'); | 249 | + // 定义路段信息字符串 |
| 250 | + var sectionJSON = JSON.stringify(sectiondata); | ||
| 255 | 251 | ||
| 256 | - }else { | 252 | + // 路段信息JSON字符串 |
| 253 | + params.sectionJSON = sectionJSON; | ||
| 257 | 254 | ||
| 258 | - layer.msg('保存失败!'); | 255 | + addSave(params,addLine.id,directionData); |
| 259 | 256 | ||
| 260 | - } | 257 | + }); |
| 261 | 258 | ||
| 262 | - // 关闭弹出层 | ||
| 263 | - layer.closeAll(); | ||
| 264 | 259 | ||
| 265 | - // 清除地图覆盖物 | ||
| 266 | - map.clearMarkAndOverlays(); | ||
| 267 | 260 | ||
| 268 | - // 刷新树 | ||
| 269 | - fun.resjtreeDate(addLine.id,directionData); | 261 | + }else { |
| 270 | 262 | ||
| 271 | - // 查询上行路段信息 | ||
| 272 | - ajaxd.getSectionRouteInfo(addLine.id,directionData,function(data) { | ||
| 273 | - | ||
| 274 | - // 在地图上画出线路走向 | ||
| 275 | - fun.linePanlThree(data,directionData); | ||
| 276 | - | ||
| 277 | - }); | 263 | + // 获取公交线几何对象, 仅当结果自动添加到地图上时有效 |
| 264 | + var Polygon = BusLine.getPolyline(); | ||
| 278 | 265 | ||
| 279 | - }); | ||
| 280 | - | ||
| 281 | - }); | ||
| 282 | - | ||
| 283 | - }); | 266 | + // 返回多边型的点数组(自1.2新增) |
| 267 | + var polyGonArray = Polygon.getPath(); | ||
| 268 | + | ||
| 269 | + var jsonArray = [{sectionName:lineNameV+dirStr,points:polyGonArray}]; | ||
| 270 | + | ||
| 271 | + // 定义路段信息字符串 | ||
| 272 | + var sectionJSON = JSON.stringify(jsonArray); | ||
| 273 | + | ||
| 274 | + // 路段信息JSON字符串 | ||
| 275 | + params.sectionJSON = sectionJSON; | ||
| 276 | + | ||
| 277 | + addSave(params,addLine.id,directionData); | ||
| 278 | + | ||
| 279 | + } | ||
| 280 | + } | ||
| 281 | + }); | ||
| 284 | 282 | ||
| 285 | }); | 283 | }); |
| 286 | 284 | ||
| 287 | - }else { | ||
| 288 | - | 285 | + }); |
| 286 | + | ||
| 287 | + } | ||
| 288 | + | ||
| 289 | + }); | ||
| 290 | + | ||
| 291 | + function inputStationValueFormat(paramsStationsArray) { | ||
| 292 | + | ||
| 293 | + var stationList = []; | ||
| 294 | + | ||
| 295 | + var len = paramsStationsArray.length; | ||
| 296 | + | ||
| 297 | + for(var k =0;k<len;k++) { | ||
| 298 | + | ||
| 299 | + if(paramsStationsArray[k]=="") | ||
| 300 | + continue; | ||
| 301 | + | ||
| 302 | + var tempStr = paramsStationsArray[k].split('\t'); | ||
| 303 | + | ||
| 304 | + if(tempStr.length<2){ | ||
| 289 | 305 | ||
| 306 | + stationList.push({name:paramsStationsArray[k]+"公交车站",wgs:{x:'',y:''}}); | ||
| 307 | + | ||
| 308 | + }else { | ||
| 290 | 309 | ||
| 310 | + stationList.push({name:tempStr[0]+"公交车站",wgs:{x:tempStr[1], y:tempStr[2]}}); | ||
| 291 | 311 | ||
| 292 | } | 312 | } |
| 293 | - | ||
| 294 | - | ||
| 295 | - /* if(len>0) { | ||
| 296 | - | ||
| 297 | - for(var k =0;k<len;k++) { | ||
| 298 | - | ||
| 299 | - if(paramsStationsArray[k]=="") | ||
| 300 | - continue; | ||
| 301 | - | ||
| 302 | - var tempStr = paramsStationsArray[k].split('\t'); | ||
| 303 | 313 | ||
| 304 | - if(tempStr.length<2){ | ||
| 305 | - | ||
| 306 | - stationList.push({name:paramsStationsArray[k]+"公交车站",wgs:{x:'',y:''}}); | ||
| 307 | - | ||
| 308 | - }else { | ||
| 309 | - | ||
| 310 | - stationList.push({name:tempStr[0]+"公交车站",wgs:{x:tempStr[1], y:tempStr[2]}}); | ||
| 311 | - | ||
| 312 | - } | ||
| 313 | - | ||
| 314 | - } | 314 | + } |
| 315 | + | ||
| 316 | + return stationList; | ||
| 317 | + | ||
| 318 | + } | ||
| 319 | + | ||
| 320 | + function addSave(params,lineid,directionData) { | ||
| 321 | + | ||
| 322 | + // 保存 | ||
| 323 | + ajaxd.manualSave(params,function(rd) { | ||
| 324 | + | ||
| 325 | + if(rd.status='SUCCESS') { | ||
| 326 | + | ||
| 327 | + layer.msg('保存成功!'); | ||
| 315 | 328 | ||
| 316 | }else { | 329 | }else { |
| 317 | 330 | ||
| 318 | - layer.msg('请按说明规则输入站点!'); | 331 | + layer.msg('保存失败!'); |
| 319 | 332 | ||
| 320 | - return; | 333 | + } |
| 334 | + | ||
| 335 | + // 关闭弹出层 | ||
| 336 | + layer.closeAll(); | ||
| 337 | + | ||
| 338 | + // 清除地图覆盖物 | ||
| 339 | + map.clearMarkAndOverlays(); | ||
| 340 | + | ||
| 341 | + // 刷新树 | ||
| 342 | + fun.resjtreeDate(lineid,directionData); | ||
| 343 | + | ||
| 344 | + // 查询上行路段信息 | ||
| 345 | + ajaxd.getSectionRouteInfo(lineid,directionData,function(data) { | ||
| 346 | + | ||
| 347 | + // 在地图上画出线路走向 | ||
| 348 | + fun.linePanlThree(lineid,data,directionData); | ||
| 321 | 349 | ||
| 322 | - } */ | 350 | + }); |
| 323 | 351 | ||
| 324 | - } | 352 | + }); |
| 325 | 353 | ||
| 326 | - }); | 354 | + } |
| 327 | 355 | ||
| 328 | }); | 356 | }); |
| 329 | </script> | 357 | </script> |
| 330 | \ No newline at end of file | 358 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
| @@ -249,7 +249,9 @@ var PublicFunctions = function () { | @@ -249,7 +249,9 @@ var PublicFunctions = function () { | ||
| 249 | // 如果线路信息不为空 | 249 | // 如果线路信息不为空 |
| 250 | if(BusLine) { | 250 | if(BusLine) { |
| 251 | 251 | ||
| 252 | - if(BusLine.yB.length == 0){ | 252 | + console.log(BusLine); |
| 253 | + | ||
| 254 | + if(BusLine.zB.length == 0){ | ||
| 253 | 255 | ||
| 254 | layer.confirm('系统生成该线路【'+lineNameV+'】时获取站点与路段异常!请联系管理员或者检查网络连接是否异常!', { | 256 | layer.confirm('系统生成该线路【'+lineNameV+'】时获取站点与路段异常!请联系管理员或者检查网络连接是否异常!', { |
| 255 | btn : [ '确认' ] | 257 | btn : [ '确认' ] |
| @@ -307,8 +309,7 @@ var PublicFunctions = function () { | @@ -307,8 +309,7 @@ var PublicFunctions = function () { | ||
| 307 | stationInfo.push(tempM); | 309 | stationInfo.push(tempM); |
| 308 | 310 | ||
| 309 | } | 311 | } |
| 310 | - console.log(stationInfo); | ||
| 311 | - debugger; | 312 | + |
| 312 | // 获取站点之间的距离与时间 | 313 | // 获取站点之间的距离与时间 |
| 313 | WorldsBMap.getDistanceAndDuration(stationInfo,function(json) { | 314 | WorldsBMap.getDistanceAndDuration(stationInfo,function(json) { |
| 314 | 315 | ||
| @@ -359,6 +360,8 @@ var PublicFunctions = function () { | @@ -359,6 +360,8 @@ var PublicFunctions = function () { | ||
| 359 | // 限速 | 360 | // 限速 |
| 360 | params.speedLimit = '60'; | 361 | params.speedLimit = '60'; |
| 361 | 362 | ||
| 363 | + params.baseRes = 'No'; | ||
| 364 | + | ||
| 362 | // 保存 | 365 | // 保存 |
| 363 | GetAjaxData.collectionSave(params,function(rd) { | 366 | GetAjaxData.collectionSave(params,function(rd) { |
| 364 | 367 |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| @@ -711,8 +711,8 @@ var WorldsBMap = function () { | @@ -711,8 +711,8 @@ var WorldsBMap = function () { | ||
| 711 | if (index >= len) { | 711 | if (index >= len) { |
| 712 | 712 | ||
| 713 | callback && callback(stationList); | 713 | callback && callback(stationList); |
| 714 | - | ||
| 715 | - return; | 714 | + |
| 715 | + return ; | ||
| 716 | } | 716 | } |
| 717 | 717 | ||
| 718 | var f = arguments.callee; | 718 | var f = arguments.callee; |
| @@ -730,12 +730,12 @@ var WorldsBMap = function () { | @@ -730,12 +730,12 @@ var WorldsBMap = function () { | ||
| 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}}); | ||
| 734 | - | ||
| 735 | - f(); | 733 | + stationList.push({name:arra[index].name.replace('公交车站',''),wgs:arra[index].wgs,potion:{lng:poi.point.lng,lat:poi.point.lat}}); |
| 736 | 734 | ||
| 737 | } | 735 | } |
| 738 | 736 | ||
| 737 | + f(); | ||
| 738 | + | ||
| 739 | }); | 739 | }); |
| 740 | }else { | 740 | }else { |
| 741 | 741 |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -201,7 +201,8 @@ angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', | @@ -201,7 +201,8 @@ angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', | ||
| 201 | list: { | 201 | list: { |
| 202 | method: 'GET', | 202 | method: 'GET', |
| 203 | params: { | 203 | params: { |
| 204 | - page: 0 | 204 | + page: 0, |
| 205 | + isCancel_eq: 'false' | ||
| 205 | } | 206 | } |
| 206 | }, | 207 | }, |
| 207 | get: { | 208 | get: { |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/list.html
| @@ -70,14 +70,14 @@ | @@ -70,14 +70,14 @@ | ||
| 70 | class="btn default blue-stripe btn-sm"> 编辑 </a> | 70 | class="btn default blue-stripe btn-sm"> 编辑 </a> |
| 71 | <a ng-click="ctrl.importData($index)" class="btn default blue-stripe btn-sm"> 导入 </a> | 71 | <a ng-click="ctrl.importData($index)" class="btn default blue-stripe btn-sm"> 导入 </a> |
| 72 | <a href="javascript:" class="btn default blue-stripe btn-sm"> 导出 </a> | 72 | <a href="javascript:" class="btn default blue-stripe btn-sm"> 导出 </a> |
| 73 | - <a href="javascript:" class="btn default blue-stripe btn-sm"> 模版 </a> | 73 | + <a href="javascript:" class="btn default blue-stripe btn-sm"> 清空 </a> |
| 74 | </td> | 74 | </td> |
| 75 | <td> | 75 | <td> |
| 76 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> | 76 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 77 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | 77 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 78 | <a ui-sref="timeTableManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> | 78 | <a ui-sref="timeTableManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> |
| 79 | <a ui-sref="timeTableManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> | 79 | <a ui-sref="timeTableManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> |
| 80 | - <a ng-click="ctrl.deleteTTinfo(info.id)" class="btn default blue-stripe btn-sm"> 删除 </a> | 80 | + <a ng-click="ctrl.deleteTTinfo(info.id)" class="btn default blue-stripe btn-sm"> 作废 </a> |
| 81 | </td> | 81 | </td> |
| 82 | </tr> | 82 | </tr> |
| 83 | </tbody> | 83 | </tbody> |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/timeTableManage.js
| @@ -195,14 +195,14 @@ angular.module('ScheduleApp').controller('TimeTableManageListCtrl', ['TimeTableM | @@ -195,14 +195,14 @@ angular.module('ScheduleApp').controller('TimeTableManageListCtrl', ['TimeTableM | ||
| 195 | // TODO: | 195 | // TODO: |
| 196 | timeTableManageService.deleteDetail(id).then( | 196 | timeTableManageService.deleteDetail(id).then( |
| 197 | function(result) { | 197 | function(result) { |
| 198 | - alert("删除成功!"); | 198 | + alert("作废成功!"); |
| 199 | 199 | ||
| 200 | timeTableManageService.getPage().then( | 200 | timeTableManageService.getPage().then( |
| 201 | function(result) { | 201 | function(result) { |
| 202 | self.pageInfo.totalItems = result.totalElements; | 202 | self.pageInfo.totalItems = result.totalElements; |
| 203 | self.pageInfo.currentPage = result.number + 1; | 203 | self.pageInfo.currentPage = result.number + 1; |
| 204 | self.pageInfo.infos = result.content; | 204 | self.pageInfo.infos = result.content; |
| 205 | - schedulePlanManageService.setCurrentPageNo(result.number + 1); | 205 | + timeTableManageService.setCurrentPageNo(result.number + 1); |
| 206 | }, | 206 | }, |
| 207 | function(result) { | 207 | function(result) { |
| 208 | alert("出错啦!"); | 208 | alert("出错啦!"); |
src/test/java/com/bsth/service/schedule/rules/DroolsRulesTest.java
| @@ -65,7 +65,7 @@ public class DroolsRulesTest { | @@ -65,7 +65,7 @@ public class DroolsRulesTest { | ||
| 65 | 65 | ||
| 66 | ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input(); | 66 | ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input(); |
| 67 | scheduleCalcuParam_input.setFromDate(new DateTime(2016, 8, 1, 0, 0)); | 67 | scheduleCalcuParam_input.setFromDate(new DateTime(2016, 8, 1, 0, 0)); |
| 68 | - scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 2, 0, 0)); | 68 | + scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 10, 0, 0)); |
| 69 | scheduleCalcuParam_input.setTtinfoId(1L); | 69 | scheduleCalcuParam_input.setTtinfoId(1L); |
| 70 | 70 | ||
| 71 | ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input(); | 71 | ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input(); |