Commit b020e9c6d5445828f559b8bd464b0d85954bf791
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control
into pudong
Showing
24 changed files
with
426 additions
and
600 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -98,14 +98,14 @@ public class ExportController { | @@ -98,14 +98,14 @@ public class ExportController { | ||
| 98 | m.put("lpName", l.getLpName()); | 98 | m.put("lpName", l.getLpName()); |
| 99 | m.put("carPlate", l.getCarPlate()); | 99 | m.put("carPlate", l.getCarPlate()); |
| 100 | m.put("jhlc", l.getJhlc()); | 100 | m.put("jhlc", l.getJhlc()); |
| 101 | - // m.put("sjjhlc", l.getSjjhlc()); | 101 | + m.put("sjjhlc", l.getSjjhlc()); |
| 102 | m.put("yygl", l.getYygl()); | 102 | m.put("yygl", l.getYygl()); |
| 103 | m.put("emptMileage", l.getEmptMileage()); | 103 | m.put("emptMileage", l.getEmptMileage()); |
| 104 | m.put("remMileage", l.getRemMileage()); | 104 | m.put("remMileage", l.getRemMileage()); |
| 105 | m.put("addMileage", l.getAddMileage()); | 105 | m.put("addMileage", l.getAddMileage()); |
| 106 | m.put("totalm", l.getTotalm()); | 106 | m.put("totalm", l.getTotalm()); |
| 107 | m.put("jhbc", l.getJhbc()); | 107 | m.put("jhbc", l.getJhbc()); |
| 108 | - // m.put("sjjhbc", l.getSjjhbc()); | 108 | + m.put("sjjhbc", l.getSjjhbc()); |
| 109 | m.put("cjbc", l.getCjbc()); | 109 | m.put("cjbc", l.getCjbc()); |
| 110 | m.put("ljbc", l.getLjbc()); | 110 | m.put("ljbc", l.getLjbc()); |
| 111 | m.put("sjbc", l.getSjbc()); | 111 | m.put("sjbc", l.getSjbc()); |
src/main/java/com/bsth/data/LineVersionsData.java
| 1 | package com.bsth.data; | 1 | package com.bsth.data; |
| 2 | 2 | ||
| 3 | -import java.util.HashMap; | ||
| 4 | -import java.util.List; | ||
| 5 | -import java.util.Map; | ||
| 6 | - | 3 | +import com.bsth.entity.LineVersions; |
| 4 | +import com.bsth.service.LineVersionsService; | ||
| 5 | +import com.bsth.service.StationRouteService; | ||
| 7 | import org.slf4j.Logger; | 6 | import org.slf4j.Logger; |
| 8 | import org.slf4j.LoggerFactory; | 7 | import org.slf4j.LoggerFactory; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | -import org.springframework.boot.CommandLineRunner; | ||
| 11 | import org.springframework.core.annotation.Order; | 9 | import org.springframework.core.annotation.Order; |
| 12 | import org.springframework.stereotype.Component; | 10 | import org.springframework.stereotype.Component; |
| 13 | 11 | ||
| 14 | -import com.bsth.entity.LineVersions; | ||
| 15 | -import com.bsth.service.LineVersionsService; | ||
| 16 | -import com.bsth.service.StationRouteService; | 12 | +import java.util.HashMap; |
| 13 | +import java.util.List; | ||
| 14 | +import java.util.Map; | ||
| 17 | 15 | ||
| 18 | /** | 16 | /** |
| 19 | * @ClassName: LineVersionsData | 17 | * @ClassName: LineVersionsData |
| @@ -25,10 +23,9 @@ public class LineVersionsData extends Thread { | @@ -25,10 +23,9 @@ public class LineVersionsData extends Thread { | ||
| 25 | 23 | ||
| 26 | static Logger logger = LoggerFactory.getLogger(LineVersionsData.class); | 24 | static Logger logger = LoggerFactory.getLogger(LineVersionsData.class); |
| 27 | 25 | ||
| 28 | - | ||
| 29 | @Autowired | 26 | @Autowired |
| 30 | LineVersionsService lineVersionsService; | 27 | LineVersionsService lineVersionsService; |
| 31 | - | 28 | + |
| 32 | @Autowired | 29 | @Autowired |
| 33 | StationRouteService stationRouteService; | 30 | StationRouteService stationRouteService; |
| 34 | 31 |
src/main/java/com/bsth/entity/LineVersions.java
| @@ -73,7 +73,7 @@ public class LineVersions{ | @@ -73,7 +73,7 @@ public class LineVersions{ | ||
| 73 | * 是否发布 int length(1) | 73 | * 是否发布 int length(1) |
| 74 | * 0(没有),1(发布) | 74 | * 0(没有),1(发布) |
| 75 | */ | 75 | */ |
| 76 | - private int isupdate; | 76 | + private int isupdate = 0; |
| 77 | 77 | ||
| 78 | public Integer getId() { | 78 | public Integer getId() { |
| 79 | return id; | 79 | return id; |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -172,11 +172,11 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -172,11 +172,11 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 172 | void isRoadSpeedUpd(Integer isR,Integer line,Integer directions); | 172 | void isRoadSpeedUpd(Integer isR,Integer line,Integer directions); |
| 173 | 173 | ||
| 174 | @Modifying | 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 | public void sectionUpdSectionRouteCode(Integer line,Integer dir,Integer routeCod); | 176 | public void sectionUpdSectionRouteCode(Integer line,Integer dir,Integer routeCod); |
| 177 | 177 | ||
| 178 | @Modifying | 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 | public void sectionUpdSectionRouteCode(String lineCode,Integer dir,int routeCod); | 180 | public void sectionUpdSectionRouteCode(String lineCode,Integer dir,int routeCod); |
| 181 | 181 | ||
| 182 | @Modifying | 182 | @Modifying |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -1961,6 +1961,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1961,6 +1961,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1961 | tempMap.put("jhbc", jhbc); | 1961 | tempMap.put("jhbc", jhbc); |
| 1962 | tempMap.put("sjbc", sjbc); | 1962 | tempMap.put("sjbc", sjbc); |
| 1963 | tempMap.put("qz", qz); | 1963 | tempMap.put("qz", qz); |
| 1964 | + tempMap.put("sm", ""); | ||
| 1964 | if(jhcc != 0 && sjcc != 0){ | 1965 | if(jhcc != 0 && sjcc != 0){ |
| 1965 | tempMap.put("ccl", numberFormat.format(((float)sjcc / jhcc)*100)+"%"); | 1966 | tempMap.put("ccl", numberFormat.format(((float)sjcc / jhcc)*100)+"%"); |
| 1966 | }else{ | 1967 | }else{ |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -165,9 +165,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -165,9 +165,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 165 | schedule.setZdsjActual(null); | 165 | schedule.setZdsjActual(null); |
| 166 | } | 166 | } |
| 167 | String[] split1 = schedule.getFcsj().split(":"); | 167 | String[] split1 = schedule.getFcsj().split(":"); |
| 168 | - String[] split3 = schedule.getZdsj().split(":"); | ||
| 169 | long fcsj = Long.valueOf(split1[0]) * 60 + Long.valueOf(split1[1]); | 168 | long fcsj = Long.valueOf(split1[0]) * 60 + Long.valueOf(split1[1]); |
| 170 | - long zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]); | 169 | + long zdsj = 0l; |
| 170 | + if(schedule.getZdsj() == null){ | ||
| 171 | + zdsj = fcsj + schedule.getBcsj(); | ||
| 172 | + } else { | ||
| 173 | + String[] split3 = schedule.getZdsj().split(":"); | ||
| 174 | + zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]); | ||
| 175 | + } | ||
| 171 | if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){ | 176 | if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){ |
| 172 | if(fcsj<23*60) fcsj += 1440l; | 177 | if(fcsj<23*60) fcsj += 1440l; |
| 173 | if(zdsj<23*60) zdsj += 1440l; | 178 | if(zdsj<23*60) zdsj += 1440l; |
| @@ -904,7 +909,15 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -904,7 +909,15 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 904 | } | 909 | } |
| 905 | } | 910 | } |
| 906 | 911 | ||
| 907 | - sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task order by start_date"; | 912 | + long id1 = 0, id2 = 0; |
| 913 | + for(ScheduleRealInfo s : list){ | ||
| 914 | + if(s.getId() > id2) | ||
| 915 | + id2 = s.getId(); | ||
| 916 | + if(id1 == 0 || id1 > s.getId()) | ||
| 917 | + id1 = s.getId(); | ||
| 918 | + } | ||
| 919 | + sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task"; | ||
| 920 | + sql += " where id >= "+id1+" and id <= "+id2+" order by start_date"; | ||
| 908 | 921 | ||
| 909 | cList = jdbcTemplate.query(sql, | 922 | cList = jdbcTemplate.query(sql, |
| 910 | new RowMapper<ChildTaskPlan>(){ | 923 | new RowMapper<ChildTaskPlan>(){ |
| @@ -2162,9 +2175,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2162,9 +2175,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2162 | // tempMap.put("dxtz", dxtz); | 2175 | // tempMap.put("dxtz", dxtz); |
| 2163 | tempMap.put("lbtz", lbtz); | 2176 | tempMap.put("lbtz", lbtz); |
| 2164 | tempMap.put("correct", sddf + zddf + lbtz); | 2177 | tempMap.put("correct", sddf + zddf + lbtz); |
| 2165 | - tempMap.put("dfbl", sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0 + "%"); | 2178 | + tempMap.put("dfbl", (sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0) + "%"); |
| 2166 | // tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%"); | 2179 | // tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%"); |
| 2167 | - tempMap.put("lbbl", sjbc>0?df.format((double)(lbtz)/sjbc*100):0 + "%"); | 2180 | + tempMap.put("lbbl", (sjbc>0?df.format((double)(lbtz)/sjbc*100):0) + "%"); |
| 2168 | // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); | 2181 | // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); |
| 2169 | // tempMap.put("workList", tempList); | 2182 | // tempMap.put("workList", tempList); |
| 2170 | 2183 | ||
| @@ -2294,9 +2307,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2294,9 +2307,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2294 | // tempMap.put("dxtz", dxtz); | 2307 | // tempMap.put("dxtz", dxtz); |
| 2295 | tempMap.put("lbtz", lbtz); | 2308 | tempMap.put("lbtz", lbtz); |
| 2296 | tempMap.put("correct", sddf + zddf + lbtz); | 2309 | tempMap.put("correct", sddf + zddf + lbtz); |
| 2297 | - tempMap.put("dfbl", sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0 + "%"); | 2310 | + tempMap.put("dfbl", (sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0) + "%"); |
| 2298 | 2311 | ||
| 2299 | - tempMap.put("lbbl", sjbc>0?df.format((double)(lbtz)/sjbc*100):0 + "%"); | 2312 | + tempMap.put("lbbl", (sjbc>0?df.format((double)(lbtz)/sjbc*100):0) + "%"); |
| 2300 | // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); | 2313 | // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); |
| 2301 | resList.add(tempMap); | 2314 | resList.add(tempMap); |
| 2302 | } | 2315 | } |
| @@ -2319,11 +2332,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2319,11 +2332,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2319 | resMap.put("dxtz", dxtzz); | 2332 | resMap.put("dxtz", dxtzz); |
| 2320 | resMap.put("correct",correct+dxtzz); | 2333 | resMap.put("correct",correct+dxtzz); |
| 2321 | if(sjbc<=0){ | 2334 | if(sjbc<=0){ |
| 2322 | - resMap.put("dxbl", "0"); | ||
| 2323 | - resMap.put("correctbl", "0"); | 2335 | + resMap.put("dxbl", "0%"); |
| 2336 | + resMap.put("correctbl", "0%"); | ||
| 2324 | }else{ | 2337 | }else{ |
| 2325 | - resMap.put("dxbl", sjbc>0?df.format((double)(dxtzz)/sjbc*100):0 + "%"); | ||
| 2326 | - resMap.put("correctbl", sjbc>0?df.format((double)(correct+dxtzz)/sjbc*100):0 + "%"); | 2338 | + resMap.put("dxbl", (sjbc>0?df.format((double)(dxtzz)/sjbc*100):0) + "%"); |
| 2339 | + resMap.put("correctbl", (sjbc>0?df.format((double)(correct+dxtzz)/sjbc*100):0) + "%"); | ||
| 2327 | } | 2340 | } |
| 2328 | 2341 | ||
| 2329 | 2342 | ||
| @@ -2374,11 +2387,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2374,11 +2387,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2374 | resMap.put("dxtz", dxtzf); | 2387 | resMap.put("dxtz", dxtzf); |
| 2375 | resMap.put("correct",correct+dxtzf); | 2388 | resMap.put("correct",correct+dxtzf); |
| 2376 | if(sjbc<=0){ | 2389 | if(sjbc<=0){ |
| 2377 | - resMap.put("dxbl", "0"); | ||
| 2378 | - resMap.put("correctbl", "0"); | 2390 | + resMap.put("dxbl", "0%"); |
| 2391 | + resMap.put("correctbl", "0%"); | ||
| 2379 | }else{ | 2392 | }else{ |
| 2380 | - resMap.put("dxbl", sjbc>0?df.format((double)(dxtzf)/sjbc*100):0 + "%"); | ||
| 2381 | - resMap.put("correctbl", sjbc>0?df.format((double)(correct+dxtzf)/sjbc*100):0 + "%"); | 2393 | + resMap.put("dxbl", (sjbc>0?df.format((double)(dxtzf)/sjbc*100):0) + "%"); |
| 2394 | + resMap.put("correctbl", (sjbc>0?df.format((double)(correct+dxtzf)/sjbc*100):0) + "%"); | ||
| 2382 | } | 2395 | } |
| 2383 | resMap.put("xlname",BasicData.lineCode2NameMap.get(xlbm)); | 2396 | resMap.put("xlname",BasicData.lineCode2NameMap.get(xlbm)); |
| 2384 | } | 2397 | } |
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
| @@ -202,6 +202,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | @@ -202,6 +202,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | ||
| 202 | // 更新线路版本 | 202 | // 更新线路版本 |
| 203 | repository.updateOdlVersions(lineId, lineCode); | 203 | repository.updateOdlVersions(lineId, lineCode); |
| 204 | repository.updateNewVersions(lineId,lineCode,versions); | 204 | repository.updateNewVersions(lineId,lineCode,versions); |
| 205 | + // 记录版本更新日志 | ||
| 206 | + jdbcTemplate.update("INSERT into bsth_c_line_versions_enablog(line_code,`line_versions`,`t`) VALUES (?,?,?)",lineCode,versions, lineVersions.getStartDate().getTime()); | ||
| 205 | } | 207 | } |
| 206 | } | 208 | } |
| 207 | return list; | 209 | return list; |
| @@ -235,7 +237,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | @@ -235,7 +237,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | ||
| 235 | lineVersions.setStartDate(new java.sql.Date(startDate.getTime())); | 237 | lineVersions.setStartDate(new java.sql.Date(startDate.getTime())); |
| 236 | lineVersions.setEndDate(new java.sql.Date(endDate.getTime())); | 238 | lineVersions.setEndDate(new java.sql.Date(endDate.getTime())); |
| 237 | lineVersions.setVersions(versions); | 239 | lineVersions.setVersions(versions); |
| 238 | - lineVersions.setStatus(Integer.valueOf(map.get("status").toString())); | 240 | + // 添加的线路版本默认为待更新的 |
| 241 | + lineVersions.setStatus(2); | ||
| 239 | lineVersions.setRemark(map.get("remark").toString()); | 242 | lineVersions.setRemark(map.get("remark").toString()); |
| 240 | repository.save(lineVersions); | 243 | repository.save(lineVersions); |
| 241 | // 更新上一版本时间 | 244 | // 更新上一版本时间 |
src/main/java/com/bsth/service/impl/SectionServiceImpl.java
| @@ -172,7 +172,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -172,7 +172,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 172 | SectionRoute route = new SectionRoute(); | 172 | SectionRoute route = new SectionRoute(); |
| 173 | Line line = lineRepository.findOne(sectionRouteLine); | 173 | Line line = lineRepository.findOne(sectionRouteLine); |
| 174 | Section section = repository.findOne(sectionId); | 174 | Section section = repository.findOne(sectionId); |
| 175 | - route.setSectionrouteCode(sectionrouteCode+i*100); | 175 | + route.setSectionrouteCode(sectionrouteCode+i); |
| 176 | route.setLineCode(lineCode); | 176 | route.setLineCode(lineCode); |
| 177 | route.setSectionCode(sectionCode); | 177 | route.setSectionCode(sectionCode); |
| 178 | route.setDirections(directions); | 178 | route.setDirections(directions); |
| @@ -306,7 +306,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -306,7 +306,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 306 | LsSectionRoute route = new LsSectionRoute(); | 306 | LsSectionRoute route = new LsSectionRoute(); |
| 307 | Line line = lineRepository.findOne(sectionRouteLine); | 307 | Line line = lineRepository.findOne(sectionRouteLine); |
| 308 | Section section = repository.findOne(sectionId); | 308 | Section section = repository.findOne(sectionId); |
| 309 | - route.setSectionrouteCode(sectionrouteCode+i*100); | 309 | + route.setSectionrouteCode(sectionrouteCode+i); |
| 310 | route.setLineCode(lineCode); | 310 | route.setLineCode(lineCode); |
| 311 | route.setSectionCode(sectionCode); | 311 | route.setSectionCode(sectionCode); |
| 312 | route.setDirections(directions); | 312 | route.setDirections(directions); |
| @@ -405,9 +405,9 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -405,9 +405,9 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 405 | Integer routeCode = 0; | 405 | Integer routeCode = 0; |
| 406 | if(!sectionrouteCode.equals("")){ | 406 | if(!sectionrouteCode.equals("")){ |
| 407 | String sectionrouteCodeArray[] = sectionrouteCode.split("_"); | 407 | String sectionrouteCodeArray[] = sectionrouteCode.split("_"); |
| 408 | - routeCode = Integer.valueOf(sectionrouteCodeArray[0])+100; | 408 | + routeCode = Integer.valueOf(sectionrouteCodeArray[0])+1; |
| 409 | }else { | 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,11 +455,11 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 455 | } | 455 | } |
| 456 | repository.systemSave(sectionCode, sectionName, "", "", "", "", gsectionVector, bsectionVectorS, "", "", "", 0, 0, "", 0, "", 1, sectionId); | 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 | SectionRoute route = new SectionRoute(); | 459 | SectionRoute route = new SectionRoute(); |
| 460 | Line line = lineRepository.findOne(lineId); | 460 | Line line = lineRepository.findOne(lineId); |
| 461 | Section section = repository.findOne(sectionId); | 461 | Section section = repository.findOne(sectionId); |
| 462 | - route.setSectionrouteCode(routeCode+i*100); | 462 | + route.setSectionrouteCode(routeCode+i); |
| 463 | route.setLineCode(lineCode); | 463 | route.setLineCode(lineCode); |
| 464 | route.setSectionCode(sectionCode); | 464 | route.setSectionCode(sectionCode); |
| 465 | route.setDirections(directions); | 465 | route.setDirections(directions); |
| @@ -662,11 +662,12 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -662,11 +662,12 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 662 | // 路段路由 | 662 | // 路段路由 |
| 663 | Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); | 663 | Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); |
| 664 | SectionRoute resultS = routeRepository.findOne(sectionRouteId); | 664 | SectionRoute resultS = routeRepository.findOne(sectionRouteId); |
| 665 | - int old_code = resultS.getSectionrouteCode(); | 665 | +// int old_code = resultS.getSectionrouteCode(); |
| 666 | + // 如果为空,默认在第一个路段 | ||
| 666 | if(sectionrouteCode!=null) { | 667 | if(sectionrouteCode!=null) { |
| 667 | - sectionrouteCode += 100; | 668 | + sectionrouteCode += 1; |
| 668 | }else { | 669 | }else { |
| 669 | - sectionrouteCode = old_code; | 670 | + sectionrouteCode = 1; |
| 670 | } | 671 | } |
| 671 | routeRepository.sectionUpdSectionRouteCode(lineCode, directions,sectionrouteCode); | 672 | routeRepository.sectionUpdSectionRouteCode(lineCode, directions,sectionrouteCode); |
| 672 | // 限速 | 673 | // 限速 |
| @@ -784,18 +785,14 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -784,18 +785,14 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 784 | Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString()); | 785 | Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString()); |
| 785 | // 路段路由 | 786 | // 路段路由 |
| 786 | // Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); | 787 | // Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); |
| 787 | - Integer sectionrouteCode = 100; | 788 | + Integer sectionrouteCode = 1; |
| 788 | SectionRouteCache resultS = routeCacheRepository.findOne(sectionRouteId); | 789 | SectionRouteCache resultS = routeCacheRepository.findOne(sectionRouteId); |
| 789 | int old_code = resultS.getSectionrouteCode(); | 790 | int old_code = resultS.getSectionrouteCode(); |
| 790 | if(sectionrouteCode!=null) { | 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 | }else { | 794 | }else { |
| 798 | - sectionrouteCode = old_code; | 795 | + sectionrouteCode = 1; |
| 799 | } | 796 | } |
| 800 | routeRepository.sectionUpdSectionRouteCode(lineCode, directions,sectionrouteCode); | 797 | routeRepository.sectionUpdSectionRouteCode(lineCode, directions,sectionrouteCode); |
| 801 | // 限速 | 798 | // 限速 |
| @@ -959,9 +956,9 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -959,9 +956,9 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 959 | Integer routeCode = null; | 956 | Integer routeCode = null; |
| 960 | if(!sectionrouteCode.equals("")){ | 957 | if(!sectionrouteCode.equals("")){ |
| 961 | String sectionrouteCodeArray[] = sectionrouteCode.split("_"); | 958 | String sectionrouteCodeArray[] = sectionrouteCode.split("_"); |
| 962 | - routeCode = Integer.valueOf(sectionrouteCodeArray[0])+100; | 959 | + routeCode = Integer.valueOf(sectionrouteCodeArray[0])+1; |
| 963 | }else { | 960 | }else { |
| 964 | - routeCode = 100; | 961 | + routeCode = 1; |
| 965 | } | 962 | } |
| 966 | routeRepository.sectionUpdSectionRouteCode(lineId, directions, routeCode); | 963 | routeRepository.sectionUpdSectionRouteCode(lineId, directions, routeCode); |
| 967 | sectionRoute.setSectionrouteCode(routeCode); | 964 | sectionRoute.setSectionrouteCode(routeCode); |
src/main/resources/static/pages/base/carpark/list.html
| @@ -115,73 +115,9 @@ | @@ -115,73 +115,9 @@ | ||
| 115 | </td> | 115 | </td> |
| 116 | <td> | 116 | <td> |
| 117 | {{obj.gsmc}} | 117 | {{obj.gsmc}} |
| 118 | - <!--{{if obj.company == '55'}} | ||
| 119 | - 上南公司 | ||
| 120 | - {{else if obj.company == '22'}} | ||
| 121 | - 金高公司 | ||
| 122 | - {{else if obj.company == '05'}} | ||
| 123 | - 杨高公司 | ||
| 124 | - {{else if obj.company == '26'}} | ||
| 125 | - 南汇公司 | ||
| 126 | - {{else if obj.company == '77'}} | ||
| 127 | - 闵行公司 | ||
| 128 | - {{/if}}--> | ||
| 129 | </td> | 118 | </td> |
| 130 | <td> | 119 | <td> |
| 131 | {{obj.fgsmc}} | 120 | {{obj.fgsmc}} |
| 132 | - <!--{{if obj.company == '55'}} | ||
| 133 | - | ||
| 134 | - {{if obj.brancheCompany == '1'}} | ||
| 135 | - 上南二分公司 | ||
| 136 | - {{else if obj.brancheCompany == '2'}} | ||
| 137 | - 上南三分公司 | ||
| 138 | - {{else if obj.brancheCompany == '3'}} | ||
| 139 | - 上南六分公司 | ||
| 140 | - {{else if obj.brancheCompany == '4'}} | ||
| 141 | - 上南一分公司 | ||
| 142 | - {{/if}} | ||
| 143 | - | ||
| 144 | - {{else if obj.company == '22'}} | ||
| 145 | - | ||
| 146 | - {{if obj.brancheCompany == '1'}} | ||
| 147 | - 四分公司 | ||
| 148 | - {{else if obj.brancheCompany == '2'}} | ||
| 149 | - 二分公司 | ||
| 150 | - {{else if obj.brancheCompany == '3'}} | ||
| 151 | - 三分公司 | ||
| 152 | - {{else if obj.brancheCompany == '5'}} | ||
| 153 | - 一分公司 | ||
| 154 | - {{/if}} | ||
| 155 | - | ||
| 156 | - {{else if obj.company == '05'}} | ||
| 157 | - | ||
| 158 | - {{if obj.brancheCompany == '1'}} | ||
| 159 | - 川沙分公司 | ||
| 160 | - {{else if obj.brancheCompany == '2'}} | ||
| 161 | - 金桥分公司 | ||
| 162 | - {{else if obj.brancheCompany == '3'}} | ||
| 163 | - 芦潮港分公司 | ||
| 164 | - {{else if obj.brancheCompany == '5'}} | ||
| 165 | - 杨高分公司 | ||
| 166 | - {{else if obj.brancheCompany == '6'}} | ||
| 167 | - 周浦分公司 | ||
| 168 | - {{/if}} | ||
| 169 | - | ||
| 170 | - {{else if obj.company == '26'}} | ||
| 171 | - | ||
| 172 | - {{if obj.brancheCompany == '1'}} | ||
| 173 | - 南汇一分 | ||
| 174 | - {{else if obj.brancheCompany == '2'}} | ||
| 175 | - 南汇二分 | ||
| 176 | - {{else if obj.brancheCompany == '3'}} | ||
| 177 | - 南汇三分 | ||
| 178 | - {{else if obj.brancheCompany == '4'}} | ||
| 179 | - 南汇维修公司 | ||
| 180 | - {{else if obj.brancheCompany == '5'}} | ||
| 181 | - 南汇公司 | ||
| 182 | - {{/if}} | ||
| 183 | - | ||
| 184 | - {{/if}}--> | ||
| 185 | </td> | 121 | </td> |
| 186 | <td> | 122 | <td> |
| 187 | {{obj.versions}} | 123 | {{obj.versions}} |
src/main/resources/static/pages/base/line/list.html
| @@ -247,75 +247,9 @@ | @@ -247,75 +247,9 @@ | ||
| 247 | </td> | 247 | </td> |
| 248 | <td> | 248 | <td> |
| 249 | {{obj.gsmc}} | 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 | </td> | 250 | </td> |
| 262 | <td> | 251 | <td> |
| 263 | {{obj.fgsmc}} | 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 | </td> | 253 | </td> |
| 320 | <td> | 254 | <td> |
| 321 | {{if obj.nature == 'lj'}} | 255 | {{if obj.nature == 'lj'}} |
src/main/resources/static/pages/base/lineversions/add.html
| @@ -44,8 +44,7 @@ | @@ -44,8 +44,7 @@ | ||
| 44 | <div class="form-body"> | 44 | <div class="form-body"> |
| 45 | <input type="hidden" name="lineId" id="lineIdInput" /> | 45 | <input type="hidden" name="lineId" id="lineIdInput" /> |
| 46 | <input type="hidden" name="lineCode" id="lineCodeInput" /> | 46 | <input type="hidden" name="lineCode" id="lineCodeInput" /> |
| 47 | - <input type="hidden" name="lineCode" id="statusInput" /> | ||
| 48 | - | 47 | + |
| 49 | <!-- 表单分组组件 form-group START --> | 48 | <!-- 表单分组组件 form-group START --> |
| 50 | <div class="form-group"> | 49 | <div class="form-group"> |
| 51 | <label class="control-label col-md-5"> | 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,7 +198,7 @@ | ||
| 198 | // 防止用户多次提交 | 198 | // 防止用户多次提交 |
| 199 | $("#submintBtn").addClass("disabled"); | 199 | $("#submintBtn").addClass("disabled"); |
| 200 | // 添加数据 | 200 | // 添加数据 |
| 201 | - $post('/lineVersions/add', params, function(result) { | 201 | + $post('/lineVersions/add', params, function(result) { |
| 202 | // 如果返回结果不为空 | 202 | // 如果返回结果不为空 |
| 203 | if(result){ | 203 | if(result){ |
| 204 | // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败 | 204 | // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败 |
src/main/resources/static/pages/base/lineversions/js/lineversions-list-table.js
| 1 | /** | 1 | /** |
| 2 | - * | ||
| 3 | * @JSName : lineversions-list-table.js(线路版本信息list.html页面js) | 2 | * @JSName : lineversions-list-table.js(线路版本信息list.html页面js) |
| 4 | * @Description : TOOD(线路信息list.html页面js) | 3 | * @Description : TOOD(线路信息list.html页面js) |
| 5 | */ | 4 | */ |
| 5 | +(function () { | ||
| 6 | + // 关闭左侧栏 | ||
| 7 | + if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();} | ||
| 8 | + // 定义 page : 当前页;initPag ; icheckOptions:选择框 | ||
| 9 | + var page = 0, | ||
| 10 | + initPag, | ||
| 11 | + icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'}, | ||
| 12 | + storage = window.localStorage; | ||
| 13 | + if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') { | ||
| 14 | + $('.tipso-animation').children().remove(); | ||
| 15 | + // 延迟加载 | ||
| 16 | + setTimeout(function(){ | ||
| 17 | + $('.tipso-animation').tipso({ | ||
| 18 | + speed : 400, | ||
| 19 | + background : '#0ed0e8', | ||
| 20 | + color : '#ffffff', | ||
| 21 | + position :'bottom', | ||
| 22 | + width : 400, | ||
| 23 | + delay : 100, | ||
| 24 | + animationIn : 'fadeInDownBig', | ||
| 25 | + animationOut : 'fadeOut', | ||
| 26 | + offsetX : -50, | ||
| 27 | + offsetY : -195, | ||
| 28 | + content :'您可以通过点击重置按钮来清除对线路名称的记忆哦!', | ||
| 6 | 29 | ||
| 30 | + }); | ||
| 31 | + $('.tipso-animation').tipso('show'); | ||
| 32 | + setTimeout(function(){$('.tipso-animation').tipso('hide');},4000); | ||
| 33 | + },200); | ||
| 34 | + } | ||
| 35 | + // 营运公司Map[key(businessCode)] = 名字 | ||
| 36 | + var companyMap = new Map(); | ||
| 37 | + // 分公司Map[key(upCode+_+businessCode)] = 名字 | ||
| 38 | + var branchMap = new Map(); | ||
| 39 | + initCompanySelect2(function(array) { | ||
| 40 | + $.each(array, function() { | ||
| 41 | + companyMap[this.businessCode] = this.businessName; | ||
| 42 | + // companyMap.put(this.businessCode.toString(), this.businessName); | ||
| 43 | + if(this.businessCode != null || this.businessCode !=''){ | ||
| 44 | + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */ | ||
| 45 | + $get('/business/all', {upCode_eq: this.businessCode}, function(array){ | ||
| 46 | + // 遍历array | ||
| 47 | + $.each(array, function(i,d){ | ||
| 48 | + branchMap[this.upCode+"_"+this.businessCode] = this.businessName; | ||
| 49 | + // branchMap.put(this.upCode+"_"+this.businessCode, this.businessName); | ||
| 50 | + }); | ||
| 51 | + }); | ||
| 52 | + } | ||
| 53 | + }); | ||
| 54 | + // 公司下拉options属性值 | ||
| 55 | + var options = '<option value="">请选择...</option>'; | ||
| 56 | + // 遍历array | ||
| 57 | + $.each(array, function(i,d){ | ||
| 58 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 59 | + }); | ||
| 60 | + // 初始化公司下拉框并监听值改变事件. | ||
| 61 | + $('#companySelect').html(options).on('change', setBrancheCompanySelectOptions); | ||
| 62 | + // 初始化分公司下拉框. | ||
| 63 | + setBrancheCompanySelectOptions(); | ||
| 64 | + initLineSelect2(array); | ||
| 65 | + /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */ | ||
| 66 | + loadTableDate({'line.name_like':splitxlName(storage.xlName_AgursData)},true); | ||
| 67 | + }); | ||
| 68 | + | ||
| 69 | + function initLineSelect2(compD) { | ||
| 70 | + getComp(function(rs) { | ||
| 71 | + var params = {}; | ||
| 72 | + if(rs.length>0) { | ||
| 73 | + var compA = new Array(); | ||
| 74 | + for(var c = 0 ; c<rs.length;c++) { | ||
| 75 | + var comC = rs[c].companyCode; | ||
| 76 | + var child = rs[c].children; | ||
| 77 | + if(child.length>0) { | ||
| 78 | + for(var d = 0 ;d< child.length;d++) { | ||
| 79 | + compA.push(comC + '_' + child[d].code); | ||
| 80 | + } | ||
| 81 | + }else { | ||
| 82 | + compA.push(comC); | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + params.cgsbm_in = compA.toString(); | ||
| 86 | + } | ||
| 87 | + // 填充线路拉框选择值 | ||
| 88 | + $get('/line/all', params, function(array){ | ||
| 89 | + var len_ = array.length,paramsD = new Array(); | ||
| 90 | + if(len_>0) { | ||
| 91 | + $.each(array, function(i, g){ | ||
| 92 | + if(g.name!='' || g.name != null) { | ||
| 93 | + paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)}); | ||
| 94 | + } | ||
| 95 | + }); | ||
| 96 | + if($('span').hasClass('select2-selection')) | ||
| 97 | + $('span .select2-selection').remove(); | ||
| 98 | + initPinYinSelect2($('#lineSelect'),paramsD,function(selector) { | ||
| 99 | + selector.select2("val", storage.xlName_AgursData); | ||
| 100 | + }); | ||
| 101 | + } | ||
| 102 | + }); | ||
| 103 | + }); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + $('#lineSelect').on('change',function() { | ||
| 107 | + var text = $('#lineSelect').val(); | ||
| 108 | + if(text){ | ||
| 109 | + var linecode = text.split("_"); | ||
| 110 | + $("#lineCodeInput").val(linecode[2]); | ||
| 111 | + } | ||
| 112 | + }); | ||
| 113 | + | ||
| 114 | + function gsdmTogsName(gsD,code) { | ||
| 115 | + var rsStr = ''; | ||
| 116 | + for(var s = 0 ; s < gsD.length; s++) { | ||
| 117 | + if(gsD[s].businessCode == code) { | ||
| 118 | + rsStr = rsStr + '(' + gsD[s].businessName.replace('公司','') + ')'; | ||
| 119 | + break; | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + return rsStr; | ||
| 123 | + } | ||
| 7 | 124 | ||
| 8 | - // 关闭左侧栏 | ||
| 9 | - if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();} | ||
| 10 | - // 定义 page : 当前页;initPag ; icheckOptions:选择框 | ||
| 11 | - var page = 0, | ||
| 12 | - initPag, | ||
| 13 | - icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'}, | ||
| 14 | - storage = window.localStorage; | ||
| 15 | - if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') { | ||
| 16 | - $('.tipso-animation').children().remove(); | ||
| 17 | - // 延迟加载 | ||
| 18 | - setTimeout(function(){ | ||
| 19 | - $('.tipso-animation').tipso({ | ||
| 20 | - speed : 400, | ||
| 21 | - background : '#0ed0e8', | ||
| 22 | - color : '#ffffff', | ||
| 23 | - position :'bottom', | ||
| 24 | - width : 400, | ||
| 25 | - delay : 100, | ||
| 26 | - animationIn : 'fadeInDownBig', | ||
| 27 | - animationOut : 'fadeOut', | ||
| 28 | - offsetX : -50, | ||
| 29 | - offsetY : -195, | ||
| 30 | - content :'您可以通过点击重置按钮来清除对线路名称的记忆哦!', | ||
| 31 | - | ||
| 32 | - }); | ||
| 33 | - $('.tipso-animation').tipso('show'); | ||
| 34 | - setTimeout(function(){$('.tipso-animation').tipso('hide');},4000); | ||
| 35 | - },200); | ||
| 36 | - } | ||
| 37 | - // 营运公司Map[key(businessCode)] = 名字 | ||
| 38 | - var companyMap = new Map(); | ||
| 39 | - // 分公司Map[key(upCode+_+businessCode)] = 名字 | ||
| 40 | - var branchMap = new Map(); | ||
| 41 | - initCompanySelect2(function(array) { | ||
| 42 | - $.each(array, function() { | ||
| 43 | - companyMap[this.businessCode] = this.businessName; | ||
| 44 | - // companyMap.put(this.businessCode.toString(), this.businessName); | ||
| 45 | - if(this.businessCode != null || this.businessCode !=''){ | ||
| 46 | - /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */ | ||
| 47 | - $get('/business/all', {upCode_eq: this.businessCode}, function(array){ | ||
| 48 | - // 遍历array | ||
| 49 | - $.each(array, function(i,d){ | ||
| 50 | - branchMap[this.upCode+"_"+this.businessCode] = this.businessName; | ||
| 51 | - // branchMap.put(this.upCode+"_"+this.businessCode, this.businessName); | ||
| 52 | - }); | ||
| 53 | - }); | ||
| 54 | - } | ||
| 55 | - }); | ||
| 56 | - // 公司下拉options属性值 | ||
| 57 | - var options = '<option value="">请选择...</option>'; | ||
| 58 | - // 遍历array | ||
| 59 | - $.each(array, function(i,d){ | ||
| 60 | - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 61 | - }); | ||
| 62 | - // 初始化公司下拉框并监听值改变事件. | ||
| 63 | - $('#companySelect').html(options).on('change', setBrancheCompanySelectOptions); | ||
| 64 | - // 初始化分公司下拉框. | ||
| 65 | - setBrancheCompanySelectOptions(); | ||
| 66 | - initLineSelect2(array); | ||
| 67 | - /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */ | ||
| 68 | - loadTableDate({'line.name_like':splitxlName(storage.xlName_AgursData)},true); | ||
| 69 | - }); | ||
| 70 | - | ||
| 71 | - function initLineSelect2(compD) { | ||
| 72 | - getComp(function(rs) { | ||
| 73 | - var params = {}; | ||
| 74 | - if(rs.length>0) { | ||
| 75 | - var compA = new Array(); | ||
| 76 | - for(var c = 0 ; c<rs.length;c++) { | ||
| 77 | - var comC = rs[c].companyCode; | ||
| 78 | - var child = rs[c].children; | ||
| 79 | - if(child.length>0) { | ||
| 80 | - for(var d = 0 ;d< child.length;d++) { | ||
| 81 | - compA.push(comC + '_' + child[d].code); | ||
| 82 | - } | ||
| 83 | - }else { | ||
| 84 | - compA.push(comC); | ||
| 85 | - } | ||
| 86 | - } | ||
| 87 | - params.cgsbm_in = compA.toString(); | ||
| 88 | - } | ||
| 89 | - // 填充线路拉框选择值 | ||
| 90 | - $get('/line/all', params, function(array){ | ||
| 91 | - var len_ = array.length,paramsD = new Array(); | ||
| 92 | - if(len_>0) { | ||
| 93 | - $.each(array, function(i, g){ | ||
| 94 | - if(g.name!='' || g.name != null) { | ||
| 95 | - paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)}); | ||
| 96 | - } | ||
| 97 | - }); | ||
| 98 | - if($('span').hasClass('select2-selection')) | ||
| 99 | - $('span .select2-selection').remove(); | ||
| 100 | - initPinYinSelect2($('#lineSelect'),paramsD,function(selector) { | ||
| 101 | - selector.select2("val", storage.xlName_AgursData); | ||
| 102 | - }); | ||
| 103 | - } | ||
| 104 | - }); | ||
| 105 | - }); | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - $('#lineSelect').on('change',function() { | ||
| 109 | - var text = $('#lineSelect').val(); | ||
| 110 | - if(text){ | ||
| 111 | - var linecode = text.split("_"); | ||
| 112 | - $("#lineCodeInput").val(linecode[2]); | ||
| 113 | - } | ||
| 114 | - }); | ||
| 115 | - | ||
| 116 | - function gsdmTogsName(gsD,code) { | ||
| 117 | - var rsStr = ''; | ||
| 118 | - for(var s = 0 ; s < gsD.length; s++) { | ||
| 119 | - if(gsD[s].businessCode == code) { | ||
| 120 | - rsStr = rsStr + '(' + gsD[s].businessName.replace('公司','') + ')'; | ||
| 121 | - break; | ||
| 122 | - } | ||
| 123 | - } | ||
| 124 | - return rsStr; | ||
| 125 | - } | ||
| 126 | - | ||
| 127 | function initCompanySelect2(cb) { | 125 | function initCompanySelect2(cb) { |
| 128 | - // get请求获取公司 | ||
| 129 | - $get('/business/all', {upCode_eq: '88'}, function(gs_d){ | ||
| 130 | - return cb && cb(gs_d); | ||
| 131 | - }); | ||
| 132 | - } | ||
| 133 | - function getComp(cb) { | ||
| 134 | - $.get('/user/companyData',null,function(rs) { | ||
| 135 | - return cb && cb(rs); | ||
| 136 | - }); | ||
| 137 | - } | ||
| 138 | - function getParams() { | ||
| 139 | - // cells 集合返回表格中所有(列)单元格的一个数组 | ||
| 140 | - var cells = $('tr.filter')[0].cells; | ||
| 141 | - // 搜索参数集合 | ||
| 142 | - var params = {}; | ||
| 143 | - // 搜索字段名称 | ||
| 144 | - var name; | ||
| 145 | - // 遍历cells数组 | ||
| 146 | - $.each(cells, function(i, cell){ | ||
| 147 | - // 获取第i列的input或者select集合 | ||
| 148 | - var items = $('input,select', cell); | ||
| 149 | - // 遍历items集合 | ||
| 150 | - for(var j = 0, item; item = items[j++];){ | ||
| 151 | - // 获取字段名称 | ||
| 152 | - name = $(item).attr('name'); | ||
| 153 | - if(name){ | ||
| 154 | - // 赋取相对应的值 | ||
| 155 | - params[name] = $(item).val(); | ||
| 156 | - } | ||
| 157 | - } | ||
| 158 | - }); | ||
| 159 | - return params; | ||
| 160 | - } | ||
| 161 | - | ||
| 162 | - /** 表格数据分页加载事件 @param:<param : 查询参数;isPon : 是否重新分页> */ | ||
| 163 | - function loadTableDate(param,isPon){ | ||
| 164 | - // 搜索参数 | ||
| 165 | - var params = {}; | ||
| 166 | - if(param) { | ||
| 167 | - params = param; | ||
| 168 | - } | ||
| 169 | - // 排序(按方向与序号) | ||
| 170 | - params['order'] = 'lineCode,versions'; | ||
| 171 | - // 排序方向. | ||
| 172 | - params['direction'] = 'ASC,ASC'; | ||
| 173 | - // 记录当前页数 | ||
| 174 | - params['page'] = page; | ||
| 175 | - // 弹出正在加载层 | ||
| 176 | - var i = layer.load(2); | ||
| 177 | - // 异步请求获取表格数据 | ||
| 178 | - $.get('/lineVersions',params,function(result){ | ||
| 179 | - // 添加序号 | ||
| 180 | - result.content.page = page; | ||
| 181 | - // 把数据填充到模版中 | 126 | + // get请求获取公司 |
| 127 | + $get('/business/all', {upCode_eq: '88'}, function(gs_d){ | ||
| 128 | + return cb && cb(gs_d); | ||
| 129 | + }); | ||
| 130 | + } | ||
| 131 | + function getComp(cb) { | ||
| 132 | + $.get('/user/companyData',null,function(rs) { | ||
| 133 | + return cb && cb(rs); | ||
| 134 | + }); | ||
| 135 | + } | ||
| 136 | + function getParams() { | ||
| 137 | + // cells 集合返回表格中所有(列)单元格的一个数组 | ||
| 138 | + var cells = $('tr.filter')[0].cells; | ||
| 139 | + // 搜索参数集合 | ||
| 140 | + var params = {}; | ||
| 141 | + // 搜索字段名称 | ||
| 142 | + var name; | ||
| 143 | + // 遍历cells数组 | ||
| 144 | + $.each(cells, function(i, cell){ | ||
| 145 | + // 获取第i列的input或者select集合 | ||
| 146 | + var items = $('input,select', cell); | ||
| 147 | + // 遍历items集合 | ||
| 148 | + for(var j = 0, item; item = items[j++];){ | ||
| 149 | + // 获取字段名称 | ||
| 150 | + name = $(item).attr('name'); | ||
| 151 | + if(name){ | ||
| 152 | + // 赋取相对应的值 | ||
| 153 | + params[name] = $(item).val(); | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | + }); | ||
| 157 | + return params; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + /** 表格数据分页加载事件 @param:<param : 查询参数;isPon : 是否重新分页> */ | ||
| 161 | + function loadTableDate(param,isPon){ | ||
| 162 | + // 搜索参数 | ||
| 163 | + var params = {}; | ||
| 164 | + if(param) { | ||
| 165 | + params = param; | ||
| 166 | + } | ||
| 167 | + // 排序(按方向与序号) | ||
| 168 | + params['order'] = 'lineCode,versions'; | ||
| 169 | + // 排序方向. | ||
| 170 | + params['direction'] = 'ASC,ASC'; | ||
| 171 | + // 记录当前页数 | ||
| 172 | + params['page'] = page; | ||
| 173 | + // 弹出正在加载层 | ||
| 174 | + var i = layer.load(2); | ||
| 175 | + // 异步请求获取表格数据 | ||
| 176 | + $.get('/lineVersions',params,function(result){ | ||
| 177 | + // 添加序号 | ||
| 178 | + result.content.page = page; | ||
| 179 | + // 把数据填充到模版中 | ||
| 182 | $.each(result.content, function(i, data) { | 180 | $.each(result.content, function(i, data) { |
| 183 | result.content[i].gsmc = companyMap[data.line.company]; | 181 | result.content[i].gsmc = companyMap[data.line.company]; |
| 184 | result.content[i].fgsmc = branchMap[data.line.cgsbm]; | 182 | result.content[i].fgsmc = branchMap[data.line.cgsbm]; |
| @@ -186,169 +184,172 @@ | @@ -186,169 +184,172 @@ | ||
| 186 | data.endDateStr=moment(data.endDate).format('YYYY-MM-DD HH:mm:ss'); | 184 | data.endDateStr=moment(data.endDate).format('YYYY-MM-DD HH:mm:ss'); |
| 187 | }); | 185 | }); |
| 188 | 186 | ||
| 189 | - var tbodyHtml = template('lineversions_list_temp',{list:result.content}); | ||
| 190 | - $('#datatable_lineversions tbody').html(tbodyHtml); | ||
| 191 | - // 是重新分页且返回数据长度大于0 | ||
| 192 | - if(isPon && result.content.length > 0){ | ||
| 193 | - // 重新分页 | ||
| 194 | - initPag = true; | ||
| 195 | - // 分页栏 | ||
| 196 | - showPagination(result); | ||
| 197 | - } | ||
| 198 | - // 关闭弹出加载层 | ||
| 199 | - layer.close(i); | ||
| 200 | - }); | ||
| 201 | - } | 187 | + var tbodyHtml = template('lineversions_list_temp',{list:result.content}); |
| 188 | + $('#datatable_lineversions tbody').html(tbodyHtml); | ||
| 189 | + // 是重新分页且返回数据长度大于0 | ||
| 190 | + if(isPon && result.content.length > 0){ | ||
| 191 | + // 重新分页 | ||
| 192 | + initPag = true; | ||
| 193 | + // 分页栏 | ||
| 194 | + showPagination(result); | ||
| 195 | + } | ||
| 196 | + // 关闭弹出加载层 | ||
| 197 | + layer.close(i); | ||
| 198 | + }); | ||
| 199 | + } | ||
| 200 | + | ||
| 202 | 201 | ||
| 202 | + function toDate(timestamp){ | ||
| 203 | + var date = new Date(parseInt(timestamp).toLocaleString()); | ||
| 204 | + return date; | ||
| 205 | + } | ||
| 203 | 206 | ||
| 204 | - function toDate(timestamp){ | ||
| 205 | - var date = new Date(parseInt(timestamp).toLocaleString()); | ||
| 206 | - return date; | ||
| 207 | - } | ||
| 208 | - | ||
| 209 | - /** 复选框组件 */ | ||
| 210 | - function iCheckChange(){ | ||
| 211 | - // 获取当前的父节点tr | ||
| 212 | - var tr = $(this).parents('tr'); | ||
| 213 | - // 判断当前是否选中 | ||
| 214 | - if(this.checked) { | ||
| 215 | - // 选中,则增添父节点tr的样式 | ||
| 216 | - tr.addClass('row-active'); | ||
| 217 | - }else { | ||
| 218 | - // 未选中,则删除父节点tr的样式 | ||
| 219 | - tr.removeClass('row-active'); | ||
| 220 | - } | ||
| 221 | - } | ||
| 222 | - | ||
| 223 | - /** 分页栏组件 */ | ||
| 224 | - function showPagination(data){ | ||
| 225 | - // 分页组件 | ||
| 226 | - $('#pagination').jqPaginator({ | ||
| 227 | - // 总页数 | ||
| 228 | - totalPages: data.totalPages, | ||
| 229 | - // 中间显示页数 | ||
| 230 | - visiblePages: 6, | ||
| 231 | - // 当前页 | ||
| 232 | - currentPage: page + 1, | ||
| 233 | - first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | 207 | + /** 复选框组件 */ |
| 208 | + function iCheckChange(){ | ||
| 209 | + // 获取当前的父节点tr | ||
| 210 | + var tr = $(this).parents('tr'); | ||
| 211 | + // 判断当前是否选中 | ||
| 212 | + if(this.checked) { | ||
| 213 | + // 选中,则增添父节点tr的样式 | ||
| 214 | + tr.addClass('row-active'); | ||
| 215 | + }else { | ||
| 216 | + // 未选中,则删除父节点tr的样式 | ||
| 217 | + tr.removeClass('row-active'); | ||
| 218 | + } | ||
| 219 | + } | ||
| 220 | + | ||
| 221 | + /** 分页栏组件 */ | ||
| 222 | + function showPagination(data){ | ||
| 223 | + // 分页组件 | ||
| 224 | + $('#pagination').jqPaginator({ | ||
| 225 | + // 总页数 | ||
| 226 | + totalPages: data.totalPages, | ||
| 227 | + // 中间显示页数 | ||
| 228 | + visiblePages: 6, | ||
| 229 | + // 当前页 | ||
| 230 | + currentPage: page + 1, | ||
| 231 | + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | ||
| 234 | prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', | 232 | prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', |
| 235 | next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', | 233 | next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', |
| 236 | last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', | 234 | last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', |
| 237 | page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', | 235 | page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', |
| 238 | - onPageChange: function (num, type) { | ||
| 239 | - if(initPag){ | ||
| 240 | - initPag = false; | ||
| 241 | - return; | ||
| 242 | - } | ||
| 243 | - var pData = getParams(); | ||
| 244 | - pData['line.name_like'] = splitxlName(pData['line.name_like']); | ||
| 245 | - page = num - 1; | ||
| 246 | - loadTableDate(pData, false); | ||
| 247 | - } | ||
| 248 | - }); | ||
| 249 | - } | ||
| 250 | - /** 填充分公司下拉框选择值 */ | ||
| 251 | - function setBrancheCompanySelectOptions(){ | ||
| 252 | - // 获取公司下拉框选择值 | ||
| 253 | - var businessCode = $('#companySelect').val(); | ||
| 254 | - // 分公司下拉框options属性值 | ||
| 255 | - var options = '<option value="">请选择...</option>'; | ||
| 256 | - // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 257 | - if(businessCode == null || businessCode ==''){ | ||
| 258 | - // 填充分公司下拉框options | ||
| 259 | - $('#brancheCompanySelect').html(options); | ||
| 260 | - } else { | ||
| 261 | - /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */ | ||
| 262 | - $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 263 | - // 遍历array | ||
| 264 | - $.each(array, function(i,d){ | ||
| 265 | - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 266 | - // 填充分公司下拉框options | ||
| 267 | - $('#brancheCompanySelect').html(options); | ||
| 268 | - }); | ||
| 269 | - }); | ||
| 270 | - } | ||
| 271 | - } | ||
| 272 | - | ||
| 273 | - /** 重置按钮事件 */ | ||
| 274 | - $('tr.filter .filter-cancel').on('click',function() { | ||
| 275 | - // 清空搜索框值 | ||
| 276 | - $('tr.filter input,select').val('').change(); | ||
| 277 | - $('.tipso-animation').tipso('hide'); | ||
| 278 | - storage.setItem('xlName_AgursData',''); | ||
| 279 | - /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */ | ||
| 280 | - loadTableDate(null,true); | ||
| 281 | - }); | ||
| 282 | - | ||
| 283 | - function splitxlName(str) { | ||
| 284 | - var rsStr = ''; | ||
| 285 | - if(str) { | ||
| 286 | - var strArray = str.split('_'); | ||
| 287 | - rsStr = strArray[0]; | ||
| 288 | - } | ||
| 289 | - return rsStr; | ||
| 290 | - } | ||
| 291 | - | ||
| 292 | - | ||
| 293 | - /** 搜索按钮事件 */ | ||
| 294 | - $('tr.filter .filter-submit').on('click',function(){ | ||
| 295 | - var params = getParams(); | ||
| 296 | - if(params['line.name_like']!='' && params['line.name_like'] != null) { | ||
| 297 | - storage.setItem('xlName_AgursData',params['line.name_like']); | ||
| 298 | - } | ||
| 299 | - params['line.name_like'] = splitxlName(params['line.name_like']); | ||
| 300 | - page = 0; | ||
| 301 | - /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */ | ||
| 302 | - loadTableDate(params,true); | ||
| 303 | - }); | ||
| 304 | - | 236 | + onPageChange: function (num, type) { |
| 237 | + if(initPag){ | ||
| 238 | + initPag = false; | ||
| 239 | + return; | ||
| 240 | + } | ||
| 241 | + var pData = getParams(); | ||
| 242 | + pData['line.name_like'] = splitxlName(pData['line.name_like']); | ||
| 243 | + page = num - 1; | ||
| 244 | + loadTableDate(pData, false); | ||
| 245 | + } | ||
| 246 | + }); | ||
| 247 | + } | ||
| 248 | + /** 填充分公司下拉框选择值 */ | ||
| 249 | + function setBrancheCompanySelectOptions(){ | ||
| 250 | + // 获取公司下拉框选择值 | ||
| 251 | + var businessCode = $('#companySelect').val(); | ||
| 252 | + // 分公司下拉框options属性值 | ||
| 253 | + var options = '<option value="">请选择...</option>'; | ||
| 254 | + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 255 | + if(businessCode == null || businessCode ==''){ | ||
| 256 | + // 填充分公司下拉框options | ||
| 257 | + $('#brancheCompanySelect').html(options); | ||
| 258 | + } else { | ||
| 259 | + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */ | ||
| 260 | + $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 261 | + // 遍历array | ||
| 262 | + $.each(array, function(i,d){ | ||
| 263 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 264 | + // 填充分公司下拉框options | ||
| 265 | + $('#brancheCompanySelect').html(options); | ||
| 266 | + }); | ||
| 267 | + }); | ||
| 268 | + } | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + /** 重置按钮事件 */ | ||
| 272 | + $('tr.filter .filter-cancel').on('click',function() { | ||
| 273 | + // 清空搜索框值 | ||
| 274 | + $('tr.filter input,select').val('').change(); | ||
| 275 | + $('.tipso-animation').tipso('hide'); | ||
| 276 | + storage.setItem('xlName_AgursData',''); | ||
| 277 | + /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */ | ||
| 278 | + loadTableDate(null,true); | ||
| 279 | + }); | ||
| 305 | 280 | ||
| 306 | -function updateVersionsRoute(obj){ | ||
| 307 | - var lineId = obj.dataset.lineid; | ||
| 308 | - swal({ | ||
| 309 | - title: "操作须知", | ||
| 310 | - text: "每周会更新数据,请在本周内做完线路走向并发布,不然您做的走向有可能会被覆盖!", | ||
| 311 | - type: "warning", | ||
| 312 | - showCancelButton: true, | ||
| 313 | - confirmButtonColor: "#DD6B55", | ||
| 314 | - confirmButtonText: "知道了!", | ||
| 315 | - cancelButtonText: "不懂!", | ||
| 316 | - closeOnConfirm: false }, | ||
| 317 | - function(isConfirm){ | ||
| 318 | - if(isConfirm){ | ||
| 319 | - var win1 = window.open("http://114.80.178.12:29088/login2.html","线路信息编辑","false"); | ||
| 320 | - setTimeout(function(){ | ||
| 321 | - window.open("http://114.80.178.12:29088/pages/base/stationroute/list.html?no="+lineId,"线路信息编辑","false"); | ||
| 322 | - },1500); | ||
| 323 | - swal.close(); | ||
| 324 | - } | ||
| 325 | - }); | ||
| 326 | -} | 281 | + function splitxlName(str) { |
| 282 | + var rsStr = ''; | ||
| 283 | + if(str) { | ||
| 284 | + var strArray = str.split('_'); | ||
| 285 | + rsStr = strArray[0]; | ||
| 286 | + } | ||
| 287 | + return rsStr; | ||
| 288 | + } | ||
| 327 | 289 | ||
| 328 | -function issueBnt(id){ | ||
| 329 | - swal({ | ||
| 330 | - title: "发布说明", | ||
| 331 | - text: "重复发布会覆盖已有的数据,请确认线路信息正确后发布,发布后需要几分钟后才能再次发布!", | ||
| 332 | - type: "warning", | ||
| 333 | - showCancelButton: true, | ||
| 334 | - confirmButtonColor: "#DD6B55", | ||
| 335 | - confirmButtonText: "确定发布!", | ||
| 336 | - cancelButtonText: "取消发布!", | ||
| 337 | - closeOnConfirm: false }, | ||
| 338 | - function(){ | ||
| 339 | - $.post('/lineVersions/issueVersion',{'id':id},function(result){ | ||
| 340 | - if(result.status=='SUCCESS') { | ||
| 341 | - // 弹出添加成功提示消息 | ||
| 342 | - swal("发布!", "线路站点及走向已发布至历史库,待到版本启用时间自动更新。", "success"); | ||
| 343 | - } else if(result.status=='ERROR') { | ||
| 344 | - // 弹出添加失败提示消息 | ||
| 345 | - swal("发布失败!", "您发布的信息可能有误,请检查!", "ERROR"); | ||
| 346 | - } | ||
| 347 | -// loadPage('list.html'); | ||
| 348 | - // 发布后刷新页面 | ||
| 349 | - var pData = getParams(); | ||
| 350 | - pData['line.name_like'] = splitxlName(pData['line.name_like']); | ||
| 351 | - loadTableDate(pData, false); | ||
| 352 | - }); | ||
| 353 | - }); | ||
| 354 | -} | ||
| 355 | \ No newline at end of file | 290 | \ No newline at end of file |
| 291 | + | ||
| 292 | + /** 搜索按钮事件 */ | ||
| 293 | + $('tr.filter .filter-submit').on('click',function(){ | ||
| 294 | + var params = getParams(); | ||
| 295 | + if(params['line.name_like']!='' && params['line.name_like'] != null) { | ||
| 296 | + storage.setItem('xlName_AgursData',params['line.name_like']); | ||
| 297 | + } | ||
| 298 | + params['line.name_like'] = splitxlName(params['line.name_like']); | ||
| 299 | + page = 0; | ||
| 300 | + /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */ | ||
| 301 | + loadTableDate(params,true); | ||
| 302 | + }); | ||
| 303 | + // 线路版本编辑 | ||
| 304 | + $(document).on('click', 'a.update_versions_route_btn', function () { | ||
| 305 | + debugger | ||
| 306 | + var lineId = $(this).data('lineid'); | ||
| 307 | + swal({ | ||
| 308 | + title: "操作须知", | ||
| 309 | + text: "每周会更新数据,请在本周内做完线路走向并发布,不然您做的走向有可能会被覆盖!", | ||
| 310 | + type: "warning", | ||
| 311 | + showCancelButton: true, | ||
| 312 | + confirmButtonColor: "#DD6B55", | ||
| 313 | + confirmButtonText: "知道了!", | ||
| 314 | + cancelButtonText: "不懂!", | ||
| 315 | + closeOnConfirm: false }, | ||
| 316 | + function(isConfirm){ | ||
| 317 | + if(isConfirm){ | ||
| 318 | + var win1 = window.open("http://114.80.178.12:29088/login2.html","线路信息编辑","false"); | ||
| 319 | + setTimeout(function(){ | ||
| 320 | + window.open("http://114.80.178.12:29088/pages/base/stationroute/list.html?no="+lineId,"线路信息编辑","false"); | ||
| 321 | + },1500); | ||
| 322 | + swal.close(); | ||
| 323 | + } | ||
| 324 | + }); | ||
| 325 | + }); | ||
| 326 | + // 版本发布 | ||
| 327 | + $(document).on('click', 'a.issue_btn', function () { | ||
| 328 | + debugger | ||
| 329 | + var id = $(this).data('id'); | ||
| 330 | + swal({ | ||
| 331 | + title: "发布说明", | ||
| 332 | + text: "重复发布会覆盖已有的数据,请确认线路信息正确后发布,发布后需要几分钟后才能再次发布!", | ||
| 333 | + type: "warning", | ||
| 334 | + showCancelButton: true, | ||
| 335 | + confirmButtonColor: "#DD6B55", | ||
| 336 | + confirmButtonText: "确定发布!", | ||
| 337 | + cancelButtonText: "取消发布!", | ||
| 338 | + closeOnConfirm: false }, | ||
| 339 | + function(){ | ||
| 340 | + $.post('/lineVersions/issueVersion',{'id':id},function(result){ | ||
| 341 | + if(result.status=='SUCCESS') { | ||
| 342 | + // 弹出添加成功提示消息 | ||
| 343 | + swal("发布!", "线路站点及走向已发布至历史库,待到版本启用时间自动更新。", "success"); | ||
| 344 | + } else if(result.status=='ERROR') { | ||
| 345 | + // 弹出添加失败提示消息 | ||
| 346 | + swal("发布失败!", "您发布的信息可能有误,请检查!", "ERROR"); | ||
| 347 | + } | ||
| 348 | + // loadPage('list.html'); | ||
| 349 | + // 发布后刷新页面 | ||
| 350 | + var pData = getParams(); | ||
| 351 | + pData['line.name_like'] = splitxlName(pData['line.name_like']); | ||
| 352 | + loadTableDate(pData, false); | ||
| 353 | + }); | ||
| 354 | + }); | ||
| 355 | + }); | ||
| 356 | +})(); | ||
| 356 | \ No newline at end of file | 357 | \ No newline at end of file |
src/main/resources/static/pages/base/lineversions/list.html
| @@ -119,75 +119,9 @@ | @@ -119,75 +119,9 @@ | ||
| 119 | </td> | 119 | </td> |
| 120 | <td> | 120 | <td> |
| 121 | {{obj.gsmc}} | 121 | {{obj.gsmc}} |
| 122 | - <!--{{if obj.line.company == '55'}} | ||
| 123 | - 上南公司 | ||
| 124 | - {{else if obj.line.company == '22'}} | ||
| 125 | - 金高公司 | ||
| 126 | - {{else if obj.line.company == '05'}} | ||
| 127 | - 杨高公司 | ||
| 128 | - {{else if obj.line.company == '26'}} | ||
| 129 | - 南汇公司 | ||
| 130 | - {{else if obj.line.company == '77'}} | ||
| 131 | - 闵行公司 | ||
| 132 | - {{/if}}--> | ||
| 133 | </td> | 122 | </td> |
| 134 | <td> | 123 | <td> |
| 135 | {{obj.fgsmc}} | 124 | {{obj.fgsmc}} |
| 136 | - <!--{{if obj.line.company == '55'}} | ||
| 137 | - | ||
| 138 | - {{if obj.line.brancheCompany == '1'}} | ||
| 139 | - 上南二分公司 | ||
| 140 | - {{else if obj.line.brancheCompany == '2'}} | ||
| 141 | - 上南三分公司 | ||
| 142 | - {{else if obj.line.brancheCompany == '3'}} | ||
| 143 | - 上南六分公司 | ||
| 144 | - {{else if obj.line.brancheCompany == '4'}} | ||
| 145 | - 上南一分公司 | ||
| 146 | - {{/if}} | ||
| 147 | - | ||
| 148 | - {{else if obj.company == '22'}} | ||
| 149 | - | ||
| 150 | - {{if obj.line.brancheCompany == '1'}} | ||
| 151 | - 四分公司 | ||
| 152 | - {{else if obj.line.brancheCompany == '2'}} | ||
| 153 | - 二分公司 | ||
| 154 | - {{else if obj.line.brancheCompany == '3'}} | ||
| 155 | - 三分公司 | ||
| 156 | - {{else if obj.line.brancheCompany == '5'}} | ||
| 157 | - 一分公司 | ||
| 158 | - {{/if}} | ||
| 159 | - | ||
| 160 | - {{else if obj.line.company == '05'}} | ||
| 161 | - | ||
| 162 | - {{if obj.line.brancheCompany == '1'}} | ||
| 163 | - 川沙分公司 | ||
| 164 | - {{else if obj.line.brancheCompany == '2'}} | ||
| 165 | - 金桥分公司 | ||
| 166 | - {{else if obj.line.brancheCompany == '3'}} | ||
| 167 | - 芦潮港分公司 | ||
| 168 | - {{else if obj.line.brancheCompany == '5'}} | ||
| 169 | - 杨高分公司 | ||
| 170 | - {{else if obj.line.brancheCompany == '6'}} | ||
| 171 | - 周浦分公司 | ||
| 172 | - {{/if}} | ||
| 173 | - | ||
| 174 | - {{else if obj.line.company == '26'}} | ||
| 175 | - | ||
| 176 | - {{if obj.line.brancheCompany == '1'}} | ||
| 177 | - 南汇一分 | ||
| 178 | - {{else if obj.line.brancheCompany == '2'}} | ||
| 179 | - 南汇二分 | ||
| 180 | - {{else if obj.line.brancheCompany == '3'}} | ||
| 181 | - 南汇三分 | ||
| 182 | - {{else if obj.line.brancheCompany == '4'}} | ||
| 183 | - 南汇维修公司 | ||
| 184 | - {{else if obj.line.brancheCompany == '5'}} | ||
| 185 | - 南汇公司 | ||
| 186 | - {{else if obj.brancheCompany == '6'}} | ||
| 187 | - 航头枢纽站 | ||
| 188 | - {{/if}} | ||
| 189 | - | ||
| 190 | - {{/if}}--> | ||
| 191 | </td> | 125 | </td> |
| 192 | <td> | 126 | <td> |
| 193 | {{obj.startDateStr}} | 127 | {{obj.startDateStr}} |
| @@ -213,10 +147,10 @@ | @@ -213,10 +147,10 @@ | ||
| 213 | <td> | 147 | <td> |
| 214 | <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> | 148 | <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> |
| 215 | {{if obj.status == '2'}} | 149 | {{if obj.status == '2'}} |
| 216 | - <a class="btn default blue-stripe btn-sm" data-lineid="{{obj.line.id}}" onclick="updateVersionsRoute(this)" data-pjax> 编辑版本路线 </a> | 150 | + <a class="update_versions_route_btn btn default blue-stripe btn-sm" data-lineid="{{obj.line.id}}" data-pjax> 编辑版本路线 </a> |
| 217 | {{/if}} | 151 | {{/if}} |
| 218 | {{if obj.status == '2' && obj.isupdate!=1}} | 152 | {{if obj.status == '2' && obj.isupdate!=1}} |
| 219 | - <a class="btn btn-danger btn-sm" onclick = "issueBnt({{obj.id}})" data-pjax>发布</a> | 153 | + <a class="issue_btn btn btn-danger btn-sm" data-id="{{obj.id}}" data-pjax>发布</a> |
| 220 | {{else if obj.status == '2' && obj.isupdate==1}} | 154 | {{else if obj.status == '2' && obj.isupdate==1}} |
| 221 | <a class="btn btn-danger btn-sm disabled">数据同步中</a> | 155 | <a class="btn btn-danger btn-sm disabled">数据同步中</a> |
| 222 | {{/if}} | 156 | {{/if}} |
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,7 +184,7 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 184 | }); */ | 184 | }); */ |
| 185 | var array = treeData[0].children[1].children,paramsD =new Array(); | 185 | var array = treeData[0].children[1].children,paramsD =new Array(); |
| 186 | var eq_scetionRouteCode = Section.sectionRouteCode; | 186 | var eq_scetionRouteCode = Section.sectionRouteCode; |
| 187 | - paramsD.push({'id':'请选择...','text':'请选择...'}); | 187 | + paramsD.push({'id':'请选择...','text':'将此路段设置位第一个路段'}); |
| 188 | // 遍历. | 188 | // 遍历. |
| 189 | $.each(array, function(i, g){ | 189 | $.each(array, function(i, g){ |
| 190 | // 判断. | 190 | // 判断. |
| @@ -300,5 +300,5 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -300,5 +300,5 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 300 | }); | 300 | }); |
| 301 | } | 301 | } |
| 302 | }); | 302 | }); |
| 303 | -}); | 303 | +}); |
| 304 | </script> | 304 | </script> |
| 305 | \ No newline at end of file | 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,7 +168,7 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 168 | + ' --' + fun.dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ; | 168 | + ' --' + fun.dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ; |
| 169 | } | 169 | } |
| 170 | $('#sectionrouteCodeSelect').html(options); */ | 170 | $('#sectionrouteCodeSelect').html(options); */ |
| 171 | - paramsD.push({'id':'请选择...','text':'请选择...'}); | 171 | + paramsD.push({'id':'请选择...','text':'将此路段设置位第一个路段'}); |
| 172 | // 遍历. | 172 | // 遍历. |
| 173 | $.each(array, function(i, g){ | 173 | $.each(array, function(i, g){ |
| 174 | // 判断. | 174 | // 判断. |
| @@ -270,5 +270,5 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -270,5 +270,5 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 270 | }); | 270 | }); |
| 271 | } | 271 | } |
| 272 | }); | 272 | }); |
| 273 | -}); | 273 | +}); |
| 274 | </script> | 274 | </script> |
| 275 | \ No newline at end of file | 275 | \ No newline at end of file |
src/main/resources/static/pages/forms/mould/shifday.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanth.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanthclzbh.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanthspy.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/timeAndSpeed.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
| @@ -170,14 +170,6 @@ | @@ -170,14 +170,6 @@ | ||
| 170 | if (!$('body').hasClass('page-sidebar-closed')) | 170 | if (!$('body').hasClass('page-sidebar-closed')) |
| 171 | $('.menu-toggler.sidebar-toggler').click(); | 171 | $('.menu-toggler.sidebar-toggler').click(); |
| 172 | 172 | ||
| 173 | - $("#startDate").datetimepicker({ | ||
| 174 | - format : 'YYYY-MM-DD', | ||
| 175 | - locale : 'zh-cn' | ||
| 176 | - }); | ||
| 177 | - $("#endDate").datetimepicker({ | ||
| 178 | - format : 'YYYY-MM-DD', | ||
| 179 | - locale : 'zh-cn' | ||
| 180 | - }); | ||
| 181 | 173 | ||
| 182 | $("#times1").datetimepicker({ | 174 | $("#times1").datetimepicker({ |
| 183 | format : 'HH:mm', | 175 | format : 'HH:mm', |
| @@ -189,6 +181,7 @@ | @@ -189,6 +181,7 @@ | ||
| 189 | }); | 181 | }); |
| 190 | 182 | ||
| 191 | var d = new Date(); | 183 | var d = new Date(); |
| 184 | + d.setTime(d.getTime() - 1*1000*60*60*24); | ||
| 192 | var year = d.getFullYear(); | 185 | var year = d.getFullYear(); |
| 193 | var month = d.getMonth() + 1; | 186 | var month = d.getMonth() + 1; |
| 194 | var day = d.getDate(); | 187 | var day = d.getDate(); |
| @@ -196,8 +189,19 @@ | @@ -196,8 +189,19 @@ | ||
| 196 | month = "0" + month; | 189 | month = "0" + month; |
| 197 | if(day < 10) | 190 | if(day < 10) |
| 198 | day = "0" + day; | 191 | day = "0" + day; |
| 199 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 200 | - $("#endDate").val(year + "-" + month + "-" + day); | 192 | + var dateTime = year + "-" + month + "-" + day; |
| 193 | + $("#startDate").datetimepicker({ | ||
| 194 | + format : 'YYYY-MM-DD', | ||
| 195 | + locale : 'zh-cn', | ||
| 196 | + maxDate : dateTime | ||
| 197 | + }); | ||
| 198 | + $("#endDate").datetimepicker({ | ||
| 199 | + format : 'YYYY-MM-DD', | ||
| 200 | + locale : 'zh-cn', | ||
| 201 | + maxDate : dateTime | ||
| 202 | + }); | ||
| 203 | + $("#startDate").val(dateTime); | ||
| 204 | + $("#endDate").val(dateTime); | ||
| 201 | 205 | ||
| 202 | $("#times1").val("05:00"); | 206 | $("#times1").val("05:00"); |
| 203 | $("#times2").val("23:00"); | 207 | $("#times2").val("23:00"); |
| @@ -391,7 +395,8 @@ | @@ -391,7 +395,8 @@ | ||
| 391 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); | 395 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); |
| 392 | // 把渲染好的模版html文本追加到表格中 | 396 | // 把渲染好的模版html文本追加到表格中 |
| 393 | $('#forms tbody').html(tbodyHtml); | 397 | $('#forms tbody').html(tbodyHtml); |
| 394 | - | 398 | + $("#works_hidden").addClass("hidden"); |
| 399 | + $("#printArea").addClass("hidden"); | ||
| 395 | list = result; | 400 | list = result; |
| 396 | }); | 401 | }); |
| 397 | 402 | ||
| @@ -413,6 +418,7 @@ | @@ -413,6 +418,7 @@ | ||
| 413 | $('#works tbody').html(tbodyHtml); | 418 | $('#works tbody').html(tbodyHtml); |
| 414 | $("#works_hidden").removeClass("hidden"); | 419 | $("#works_hidden").removeClass("hidden"); |
| 415 | $("#works .hidden").removeClass("hidden"); | 420 | $("#works .hidden").removeClass("hidden"); |
| 421 | + $("#printArea").removeClass("hidden"); | ||
| 416 | $("#date1").html(g.dates); | 422 | $("#date1").html(g.dates); |
| 417 | $("#line1").html(g.line); | 423 | $("#line1").html(g.line); |
| 418 | $("#lp1").html(g.lp); | 424 | $("#lp1").html(g.lp); |
src/main/resources/static/pages/home.html
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | height: calc(100% + 10px); | 6 | height: calc(100% + 10px); |
| 7 | margin-top: -10px; | 7 | margin-top: -10px; |
| 8 | font-size: 14px; | 8 | font-size: 14px; |
| 9 | - padding: 20px 0 0 15px; | 9 | + padding: 10px 0 0 15px; |
| 10 | overflow: auto; | 10 | overflow: auto; |
| 11 | } | 11 | } |
| 12 | .system_change_log>ul{ | 12 | .system_change_log>ul{ |
| @@ -22,6 +22,8 @@ | @@ -22,6 +22,8 @@ | ||
| 22 | font-size: 12px; | 22 | font-size: 12px; |
| 23 | font-family: 微软雅黑; | 23 | font-family: 微软雅黑; |
| 24 | color: #000; | 24 | color: #000; |
| 25 | + margin-top: 8px; | ||
| 26 | + margin-bottom: 8px; | ||
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | .system_change_log>ul>li{ | 29 | .system_change_log>ul>li{ |
| @@ -87,5 +89,8 @@ | @@ -87,5 +89,8 @@ | ||
| 87 | <li><span class="label s_c_remove">删除</span>22、移除了表格渐变色。</li> | 89 | <li><span class="label s_c_remove">删除</span>22、移除了表格渐变色。</li> |
| 88 | <li><span class="label s_c_add">新增</span>23、模拟图车辆展开的tip上,显示司售信息。</li> | 90 | <li><span class="label s_c_add">新增</span>23、模拟图车辆展开的tip上,显示司售信息。</li> |
| 89 | <li><span class="label s_c_add">新增</span>24、轨迹回放窗口打开时,点击班次,会自动将班次车辆时间写入轨迹搜索表单。</li> | 91 | <li><span class="label s_c_add">新增</span>24、轨迹回放窗口打开时,点击班次,会自动将班次车辆时间写入轨迹搜索表单。</li> |
| 92 | + <li><span class="label s_c_add">新增</span>25、已撤销的线路也可以进入线调(线路授权、选择线路、线调tab 等页面均以红色区分撤销的线路)。</li> | ||
| 93 | + <li><span class="label s_c_add">新增</span>26、轨迹回放点击搜索后,车辆输入框后面会显示设备号,悬停展示该设备号的更换时间。</li> | ||
| 94 | + <li><span class="label s_c_add">新增</span>27、轨迹回放的停车场下拉列表新增搜索功能。</li> | ||
| 90 | </ul> | 95 | </ul> |
| 91 | </div> | 96 | </div> |
src/main/resources/static/pages/report/countInterval/countInterval.html
| @@ -314,7 +314,7 @@ | @@ -314,7 +314,7 @@ | ||
| 314 | {{/each}} | 314 | {{/each}} |
| 315 | {{if list.length == 0}} | 315 | {{if list.length == 0}} |
| 316 | <tr> | 316 | <tr> |
| 317 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 317 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 318 | </tr> | 318 | </tr> |
| 319 | {{/if}} | 319 | {{/if}} |
| 320 | </script> | 320 | </script> |