Commit a2b7be319dfbce5876c83d5ae5f28881c9098f5b
1.线路路由中也可编辑路段(使用体验)
Showing
2 changed files
with
8 additions
and
0 deletions
src/main/java/com/bsth/service/impl/LsSectionRouteServiceImpl.java
| ... | ... | @@ -126,11 +126,18 @@ public class LsSectionRouteServiceImpl extends BaseServiceImpl<LsSectionRoute, I |
| 126 | 126 | @Override |
| 127 | 127 | public void modify(LsSectionRoute sectionRoute) { |
| 128 | 128 | LsSectionRoute sectionRoute1 = lsSectionRouteRepository.findById(sectionRoute.getId()).get(); |
| 129 | + Section section = sectionRoute.getSection(); | |
| 129 | 130 | Integer version = lineVersionsRepository.findCurrentVersion(sectionRoute1.getLine().getId()); |
| 130 | 131 | if (sectionRoute1.getVersions() < version) { |
| 131 | 132 | throw new IllegalArgumentException("历史版本不可变更"); |
| 132 | 133 | } |
| 133 | 134 | |
| 135 | + // 路段走向在线路路由中编辑更方便 | |
| 136 | + SectionServiceImpl.centerLine(section); | |
| 137 | + Section section1 = sectionRepository.findById(section.getId()).get(); | |
| 138 | + CustomBeanUtils.copyPropertiesIgnoredNull(section, section1); | |
| 139 | + sectionRepository.save(section1); | |
| 140 | + | |
| 134 | 141 | lsSectionRouteRepository.updateSectiouRouteCode(sectionRoute); |
| 135 | 142 | CustomBeanUtils.copyPropertiesIgnoredNull(sectionRoute, sectionRoute1); |
| 136 | 143 | lsSectionRouteRepository.save(sectionRoute1); | ... | ... |
src/main/resources/static/pages/base/stationroute/edit_sectionroute.html
| ... | ... | @@ -136,6 +136,7 @@ $('#edit_sectionroute_modal').on('modal.show', function(e, polyline){ |
| 136 | 136 | params.destroy=0; |
| 137 | 137 | params.sectionDistance=0; |
| 138 | 138 | params.sectionTime = 0; |
| 139 | + params['section.bsectionVectorWkt'] = RoutesOperation.polyline2Wkt(polyline); | |
| 139 | 140 | |
| 140 | 141 | if(params.sectionrouteCode == '请选择...') { |
| 141 | 142 | params.sectionrouteCode = 100; | ... | ... |