Commit c95559f3a0b2fdba1babec1f4b6251f7ab15c2cd

Authored by 游瑞烽
1 parent abb9a320

update

src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -172,11 +172,11 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int
172 172 void isRoadSpeedUpd(Integer isR,Integer line,Integer directions);
173 173  
174 174 @Modifying
175   - @Query(value="UPDATE bsth_c_sectionroute set sectionroute_code = (sectionroute_code+100) where line = ?1 and directions = ?2 and sectionroute_code >=?3 and destroy = 0", nativeQuery=true)
  175 + @Query(value="UPDATE bsth_c_sectionroute set sectionroute_code = (sectionroute_code+1) where line = ?1 and directions = ?2 and sectionroute_code >=?3 and destroy = 0", nativeQuery=true)
176 176 public void sectionUpdSectionRouteCode(Integer line,Integer dir,Integer routeCod);
177 177  
178 178 @Modifying
179   - @Query(value="UPDATE bsth_c_sectionroute set sectionroute_code = (sectionroute_code+100) where line_code = ?1 and directions = ?2 and sectionroute_code >=?3 and destroy = 0", nativeQuery=true)
  179 + @Query(value="UPDATE bsth_c_sectionroute set sectionroute_code = (sectionroute_code+1) where line_code = ?1 and directions = ?2 and sectionroute_code >=?3 and destroy = 0", nativeQuery=true)
180 180 public void sectionUpdSectionRouteCode(String lineCode,Integer dir,int routeCod);
181 181  
182 182 @Modifying
... ...
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
... ... @@ -235,7 +235,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ
235 235 lineVersions.setStartDate(new java.sql.Date(startDate.getTime()));
236 236 lineVersions.setEndDate(new java.sql.Date(endDate.getTime()));
237 237 lineVersions.setVersions(versions);
238   - lineVersions.setStatus(Integer.valueOf(map.get("status").toString()));
  238 + // 添加的线路版本默认为待更新的
  239 + lineVersions.setStatus(2);
239 240 lineVersions.setRemark(map.get("remark").toString());
240 241 repository.save(lineVersions);
241 242 // 更新上一版本时间
... ...
src/main/java/com/bsth/service/impl/SectionServiceImpl.java
... ... @@ -172,7 +172,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
172 172 SectionRoute route = new SectionRoute();
173 173 Line line = lineRepository.findOne(sectionRouteLine);
174 174 Section section = repository.findOne(sectionId);
175   - route.setSectionrouteCode(sectionrouteCode+i*100);
  175 + route.setSectionrouteCode(sectionrouteCode+i);
176 176 route.setLineCode(lineCode);
177 177 route.setSectionCode(sectionCode);
178 178 route.setDirections(directions);
... ... @@ -306,7 +306,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
306 306 LsSectionRoute route = new LsSectionRoute();
307 307 Line line = lineRepository.findOne(sectionRouteLine);
308 308 Section section = repository.findOne(sectionId);
309   - route.setSectionrouteCode(sectionrouteCode+i*100);
  309 + route.setSectionrouteCode(sectionrouteCode+i);
310 310 route.setLineCode(lineCode);
311 311 route.setSectionCode(sectionCode);
312 312 route.setDirections(directions);
... ... @@ -405,9 +405,9 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
405 405 Integer routeCode = 0;
406 406 if(!sectionrouteCode.equals("")){
407 407 String sectionrouteCodeArray[] = sectionrouteCode.split("_");
408   - routeCode = Integer.valueOf(sectionrouteCodeArray[0])+100;
  408 + routeCode = Integer.valueOf(sectionrouteCodeArray[0])+1;
409 409 }else {
410   - routeCode = 100;
  410 + routeCode = 1;
411 411 }
412 412 // 增加路段序号
413 413  
... ... @@ -455,11 +455,11 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
455 455 }
456 456 repository.systemSave(sectionCode, sectionName, "", "", "", "", gsectionVector, bsectionVectorS, "", "", "", 0, 0, "", 0, "", 1, sectionId);
457 457  
458   - routeRepository.sectionUpdSectionRouteCode(lineId, directions,routeCode+i*100);
  458 + routeRepository.sectionUpdSectionRouteCode(lineId, directions,routeCode+i);
459 459 SectionRoute route = new SectionRoute();
460 460 Line line = lineRepository.findOne(lineId);
461 461 Section section = repository.findOne(sectionId);
462   - route.setSectionrouteCode(routeCode+i*100);
  462 + route.setSectionrouteCode(routeCode+i);
463 463 route.setLineCode(lineCode);
464 464 route.setSectionCode(sectionCode);
465 465 route.setDirections(directions);
... ... @@ -662,11 +662,12 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
662 662 // 路段路由
663 663 Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString());
664 664 SectionRoute resultS = routeRepository.findOne(sectionRouteId);
665   - int old_code = resultS.getSectionrouteCode();
  665 +// int old_code = resultS.getSectionrouteCode();
  666 + // 如果为空,默认在第一个路段
666 667 if(sectionrouteCode!=null) {
667   - sectionrouteCode += 100;
  668 + sectionrouteCode += 1;
668 669 }else {
669   - sectionrouteCode = old_code;
  670 + sectionrouteCode = 1;
670 671 }
671 672 routeRepository.sectionUpdSectionRouteCode(lineCode, directions,sectionrouteCode);
672 673 // 限速
... ... @@ -784,18 +785,14 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
784 785 Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString());
785 786 // 路段路由
786 787 // Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString());
787   - Integer sectionrouteCode = 100;
  788 + Integer sectionrouteCode = 1;
788 789 SectionRouteCache resultS = routeCacheRepository.findOne(sectionRouteId);
789 790 int old_code = resultS.getSectionrouteCode();
790 791 if(sectionrouteCode!=null) {
791   - int new_code = sectionrouteCode+100;
792   - if(new_code==old_code){
793   - sectionrouteCode = new_code;
794   - }else {
795   - sectionrouteCode = new_code-100+1;
796   - }
  792 + sectionrouteCode += 1;
  793 + // 默认是最前面路段
797 794 }else {
798   - sectionrouteCode = old_code;
  795 + sectionrouteCode = 1;
799 796 }
800 797 routeRepository.sectionUpdSectionRouteCode(lineCode, directions,sectionrouteCode);
801 798 // 限速
... ... @@ -959,9 +956,9 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem
959 956 Integer routeCode = null;
960 957 if(!sectionrouteCode.equals("")){
961 958 String sectionrouteCodeArray[] = sectionrouteCode.split("_");
962   - routeCode = Integer.valueOf(sectionrouteCodeArray[0])+100;
  959 + routeCode = Integer.valueOf(sectionrouteCodeArray[0])+1;
963 960 }else {
964   - routeCode = 100;
  961 + routeCode = 1;
965 962 }
966 963 routeRepository.sectionUpdSectionRouteCode(lineId, directions, routeCode);
967 964 sectionRoute.setSectionrouteCode(routeCode);
... ...
src/main/resources/static/pages/base/line/list.html
... ... @@ -247,75 +247,9 @@
247 247 </td>
248 248 <td>
249 249 {{obj.gsmc}}
250   - <!--{{if obj.company == '55'}}
251   - 上南公司
252   - {{else if obj.company == '22'}}
253   - 金高公司
254   - {{else if obj.company == '05'}}
255   - 杨高公司
256   - {{else if obj.company == '26'}}
257   - 南汇公司
258   - {{else if obj.company == '77'}}
259   - 闵行公司
260   - {{/if}}-->
261 250 </td>
262 251 <td>
263 252 {{obj.fgsmc}}
264   - <!--{{if obj.company == '55'}}
265   -
266   - {{if obj.brancheCompany == '1'}}
267   - 上南二分公司
268   - {{else if obj.brancheCompany == '2'}}
269   - 上南三分公司
270   - {{else if obj.brancheCompany == '3'}}
271   - 上南六分公司
272   - {{else if obj.brancheCompany == '4'}}
273   - 上南一分公司
274   - {{/if}}
275   -
276   - {{else if obj.company == '22'}}
277   -
278   - {{if obj.brancheCompany == '1'}}
279   - 四分公司
280   - {{else if obj.brancheCompany == '2'}}
281   - 二分公司
282   - {{else if obj.brancheCompany == '3'}}
283   - 三分公司
284   - {{else if obj.brancheCompany == '5'}}
285   - 一分公司
286   - {{/if}}
287   -
288   - {{else if obj.company == '05'}}
289   -
290   - {{if obj.brancheCompany == '1'}}
291   - 川沙分公司
292   - {{else if obj.brancheCompany == '2'}}
293   - 金桥分公司
294   - {{else if obj.brancheCompany == '3'}}
295   - 芦潮港分公司
296   - {{else if obj.brancheCompany == '5'}}
297   - 杨高分公司
298   - {{else if obj.brancheCompany == '6'}}
299   - 周浦分公司
300   - {{/if}}
301   -
302   - {{else if obj.company == '26'}}
303   -
304   - {{if obj.brancheCompany == '1'}}
305   - 南汇一分
306   - {{else if obj.brancheCompany == '2'}}
307   - 南汇二分
308   - {{else if obj.brancheCompany == '3'}}
309   - 南汇三分
310   - {{else if obj.brancheCompany == '4'}}
311   - 南汇维修公司
312   - {{else if obj.brancheCompany == '5'}}
313   - 南汇公司
314   - {{else if obj.brancheCompany == '6'}}
315   - 航头枢纽站
316   - {{/if}}
317   -
318   - {{/if}}-->
319 253 </td>
320 254 <td>
321 255 {{if obj.nature == 'lj'}}
... ...
src/main/resources/static/pages/base/lineversions/add.html
... ... @@ -44,8 +44,7 @@
44 44 <div class="form-body">
45 45 <input type="hidden" name="lineId" id="lineIdInput" />
46 46 <input type="hidden" name="lineCode" id="lineCodeInput" />
47   - <input type="hidden" name="lineCode" id="statusInput" />
48   -
  47 +
49 48 <!-- 表单分组组件 form-group START -->
50 49 <div class="form-group">
51 50 <label class="control-label col-md-5">
... ...
src/main/resources/static/pages/base/lineversions/js/lineversions-add-from.js
... ... @@ -198,7 +198,7 @@
198 198 // 防止用户多次提交
199 199 $("#submintBtn").addClass("disabled");
200 200 // 添加数据
201   - $post('/lineVersions/add', params, function(result) {
  201 + $post('/lineVersions/add', params, function(result) {
202 202 // 如果返回结果不为空
203 203 if(result){
204 204 // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败
... ...
src/main/resources/static/pages/base/section/editsection.html
... ... @@ -184,7 +184,7 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
184 184 }); */
185 185 var array = treeData[0].children[1].children,paramsD =new Array();
186 186 var eq_scetionRouteCode = Section.sectionRouteCode;
187   - paramsD.push({'id':'请选择...','text':'请选择...'});
  187 + paramsD.push({'id':'请选择...','text':'将此路段设置位第一个路段'});
188 188 // 遍历.
189 189 $.each(array, function(i, g){
190 190 // 判断.
... ... @@ -300,5 +300,5 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
300 300 });
301 301 }
302 302 });
303   -});
  303 +});
304 304 </script>
305 305 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/editsection.html
... ... @@ -168,7 +168,7 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
168 168 + ' --' + fun.dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ;
169 169 }
170 170 $('#sectionrouteCodeSelect').html(options); */
171   - paramsD.push({'id':'请选择...','text':'请选择...'});
  171 + paramsD.push({'id':'请选择...','text':'将此路段设置位第一个路段'});
172 172 // 遍历.
173 173 $.each(array, function(i, g){
174 174 // 判断.
... ... @@ -270,5 +270,5 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
270 270 });
271 271 }
272 272 });
273   -});
  273 +});
274 274 </script>
275 275 \ No newline at end of file
... ...