Commit aed4db70aba44fd7b979ecef05cdfd20b3fa286b
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong
Showing
11 changed files
with
83 additions
and
145 deletions
src/main/java/com/bsth/controller/realcontrol/calc/ReCalcDataController.java
| 1 | -package com.bsth.controller.realcontrol.calc; | |
| 2 | - | |
| 3 | -import com.bsth.common.ResponseCode; | |
| 4 | -import com.bsth.util.HttpClientUtils; | |
| 5 | -import org.slf4j.Logger; | |
| 6 | -import org.slf4j.LoggerFactory; | |
| 7 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 9 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 10 | -import org.springframework.web.bind.annotation.RestController; | |
| 11 | - | |
| 12 | -import java.util.HashMap; | |
| 13 | -import java.util.Map; | |
| 14 | - | |
| 15 | -/** | |
| 16 | - * 重新统计(数据汇总) | |
| 17 | - * Created by panzhao on 2018/1/25. | |
| 18 | - */ | |
| 19 | -@RestController | |
| 20 | -@RequestMapping("/sch/reCalc") | |
| 21 | -public class ReCalcDataController { | |
| 22 | - | |
| 23 | - private static String reCalcUrl = "http://10.10.150.24:30571/reCalc/scheduleDetail"; | |
| 24 | - | |
| 25 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 重新统计班次明细 | |
| 29 | - * @param date | |
| 30 | - * @param line | |
| 31 | - * @return | |
| 32 | - */ | |
| 33 | - @RequestMapping(value = "/scheduleDetail", method = RequestMethod.POST) | |
| 34 | - public Map<String, Object> reCalcScheduleDetail(@RequestParam String date, @RequestParam String line){ | |
| 35 | - Map<String, Object> rs = new HashMap(); | |
| 36 | - try{ | |
| 37 | - HttpClientUtils.post(reCalcUrl + "?rq=" + date + "&lineCode=" + line, ""); | |
| 38 | - }catch (Exception e){ | |
| 39 | - logger.error("", e); | |
| 40 | - rs.put("status", ResponseCode.ERROR); | |
| 41 | - rs.put("msg", e.getMessage()); | |
| 42 | - } | |
| 43 | - return rs; | |
| 44 | - } | |
| 45 | -} | |
| 1 | +package com.bsth.controller.realcontrol.calc; | |
| 2 | + | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 4 | +import com.bsth.util.HttpClientUtils; | |
| 5 | +import org.slf4j.Logger; | |
| 6 | +import org.slf4j.LoggerFactory; | |
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 9 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 10 | +import org.springframework.web.bind.annotation.RestController; | |
| 11 | + | |
| 12 | +import java.util.HashMap; | |
| 13 | +import java.util.Map; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * 重新统计(数据汇总) | |
| 17 | + * Created by panzhao on 2018/1/25. | |
| 18 | + */ | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("/sch/reCalc") | |
| 21 | +public class ReCalcDataController { | |
| 22 | + | |
| 23 | + private static String reCalcUrl = "http://10.10.150.24:30571/reCalc/scheduleDetail"; | |
| 24 | + | |
| 25 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 重新统计班次明细 | |
| 29 | + * @param date | |
| 30 | + * @param line | |
| 31 | + * @return | |
| 32 | + */ | |
| 33 | + @RequestMapping(value = "/scheduleDetail", method = RequestMethod.POST) | |
| 34 | + public Map<String, Object> reCalcScheduleDetail(@RequestParam String date, @RequestParam String line){ | |
| 35 | + Map<String, Object> rs = new HashMap(); | |
| 36 | + try{ | |
| 37 | + HttpClientUtils.post(reCalcUrl + "?rq=" + date + "&lineCode=" + line, ""); | |
| 38 | + }catch (Exception e){ | |
| 39 | + logger.error("", e); | |
| 40 | + rs.put("status", ResponseCode.ERROR); | |
| 41 | + rs.put("msg", e.getMessage()); | |
| 42 | + } | |
| 43 | + return rs; | |
| 44 | + } | |
| 45 | +} | ... | ... |
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 @@ $('#edit_section_mobal').on('editSectionMobal_show', 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 @@ $('#edit_section_mobal').on('editSectionMobal_show', 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 @@ $('#edit_section_mobal').on('editSectionMobal_show', 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 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect |
| 270 | 270 | }); |
| 271 | 271 | } |
| 272 | 272 | }); |
| 273 | -}); | |
| 273 | +}); | |
| 274 | 274 | </script> |
| 275 | 275 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/forms/statement/account.html
src/main/resources/static/pages/report/sheet/list.html
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | </div> |
| 50 | 50 | </div> |
| 51 | 51 | </div> |
| 52 | - | |
| 52 | +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script> | |
| 53 | 53 | <script> |
| 54 | 54 | $(function(){ |
| 55 | 55 | // 关闭左侧栏 |
| ... | ... | @@ -64,10 +64,17 @@ |
| 64 | 64 | }); |
| 65 | 65 | }) |
| 66 | 66 | $("#exportList").on('click',function(){ |
| 67 | - | |
| 68 | - $get('/sheet/exportList',params,function(result){ | |
| 69 | - window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD")); | |
| 67 | + $("#forms_2").table2excel({ | |
| 68 | + // 不被导出的表格行的CSS class类 | |
| 69 | + exclude: ".noExl", | |
| 70 | + // 导出的Excel文档的名称,(没看到作用) | |
| 71 | + name: "Excel Document Name.xlsx", | |
| 72 | + // Excel文件的名称 | |
| 73 | + filename: "班次准点率" | |
| 70 | 74 | }); |
| 75 | +// $get('/sheet/exportList',params,function(result){ | |
| 76 | +// window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD")); | |
| 77 | +// }); | |
| 71 | 78 | }); |
| 72 | 79 | |
| 73 | 80 | ... | ... |