Commit 3c5c09aad19d438c7f8bb5064e196190d43e59cc
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
64 changed files
with
2543 additions
and
568 deletions
src/main/java/com/bsth/controller/SectionRouteController.java
| @@ -35,6 +35,16 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | @@ -35,6 +35,16 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | ||
| 35 | @Autowired | 35 | @Autowired |
| 36 | SectionRouteService routeService; | 36 | SectionRouteService routeService; |
| 37 | 37 | ||
| 38 | + /** | ||
| 39 | + * @param String | ||
| 40 | + * @throws | ||
| 41 | + * @Description: TODO(批量撤销路段) | ||
| 42 | + */ | ||
| 43 | + @RequestMapping(value = "/batchDestroy", method = RequestMethod.GET) | ||
| 44 | + public Map<String, Object> updateBatch(@RequestParam Map<String, Object> map) { | ||
| 45 | + return routeService.updateSectionRouteInfoFormId(map); | ||
| 46 | + } | ||
| 47 | + | ||
| 38 | /** | 48 | /** |
| 39 | * @param @param map | 49 | * @param @param map |
| 40 | * @throws | 50 | * @throws |
src/main/java/com/bsth/controller/StationRouteController.java
| @@ -47,6 +47,16 @@ public class StationRouteController extends BaseController<StationRoute, Integer | @@ -47,6 +47,16 @@ public class StationRouteController extends BaseController<StationRoute, Integer | ||
| 47 | return service.list(map); | 47 | return service.list(map); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | + /** | ||
| 51 | + * @param String | ||
| 52 | + * @throws | ||
| 53 | + * @Description: TODO(批量撤销站点) | ||
| 54 | + */ | ||
| 55 | + @RequestMapping(value = "/batchDestroy", method = RequestMethod.GET) | ||
| 56 | + public Map<String, Object> updateBatch(@RequestParam Map<String, Object> map) { | ||
| 57 | + return service.updateStationRouteInfoFormId(map); | ||
| 58 | + } | ||
| 59 | + | ||
| 50 | /** | 60 | /** |
| 51 | * @Description :TODO(查询树站点与路段数据) | 61 | * @Description :TODO(查询树站点与路段数据) |
| 52 | * | 62 | * |
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -87,6 +87,7 @@ public class ExportController { | @@ -87,6 +87,7 @@ public class ExportController { | ||
| 87 | public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { | 87 | public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { |
| 88 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 88 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 89 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 89 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 90 | + Map<String, Object> map2 = new HashMap<String, Object>(); | ||
| 90 | ReportUtils ee = new ReportUtils(); | 91 | ReportUtils ee = new ReportUtils(); |
| 91 | List<Shifday> shifday = formsService.shifday(map); | 92 | List<Shifday> shifday = formsService.shifday(map); |
| 92 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 93 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| @@ -110,11 +111,15 @@ public class ExportController { | @@ -110,11 +111,15 @@ public class ExportController { | ||
| 110 | m.put("sjbc", l.getSjbc()); | 111 | m.put("sjbc", l.getSjbc()); |
| 111 | resList.add(m); | 112 | resList.add(m); |
| 112 | } | 113 | } |
| 114 | + if(resList.size() > 0){ | ||
| 115 | + map2 = resList.get(resList.size() - 1); | ||
| 116 | + resList.remove(map2); | ||
| 117 | + } | ||
| 113 | 118 | ||
| 114 | try { | 119 | try { |
| 115 | listI.add(resList.iterator()); | 120 | listI.add(resList.iterator()); |
| 116 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | 121 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; |
| 117 | - ee.excelReplace(listI, new Object[] { map }, path + "mould/shifday.xls", | 122 | + ee.excelReplace(listI, new Object[] { map2 }, path + "mould/shifday.xls", |
| 118 | path + "export/班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | 123 | path + "export/班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); |
| 119 | } catch (Exception e) { | 124 | } catch (Exception e) { |
| 120 | e.printStackTrace(); | 125 | e.printStackTrace(); |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -319,8 +319,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -319,8 +319,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 319 | 319 | ||
| 320 | @RequestMapping(value = "/correctForm") | 320 | @RequestMapping(value = "/correctForm") |
| 321 | public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, | 321 | public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, |
| 322 | + @RequestParam String endDate, | ||
| 322 | @RequestParam String lpName, @RequestParam String code, @RequestParam String type) { | 323 | @RequestParam String lpName, @RequestParam String code, @RequestParam String type) { |
| 323 | - return scheduleRealInfoService.correctForm(line, date, lpName, code, type); | 324 | + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type); |
| 324 | } | 325 | } |
| 325 | /** | 326 | /** |
| 326 | * @Title queryListWaybill | 327 | * @Title queryListWaybill |
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -110,6 +110,7 @@ public class ReportController { | @@ -110,6 +110,7 @@ public class ReportController { | ||
| 110 | Map<String, Object> m = new HashMap<String, Object>(); | 110 | Map<String, Object> m = new HashMap<String, Object>(); |
| 111 | m.put("i", i); | 111 | m.put("i", i); |
| 112 | m.put("nbbm", a.getNbbm()); | 112 | m.put("nbbm", a.getNbbm()); |
| 113 | + m.put("pzh", a.getPzh()); | ||
| 113 | m.put("stopName", a.getStopName()); | 114 | m.put("stopName", a.getStopName()); |
| 114 | m.put("jzsj", a.getJzsj()); | 115 | m.put("jzsj", a.getJzsj()); |
| 115 | m.put("czsj", a.getCzsj()); | 116 | m.put("czsj", a.getCzsj()); |
src/main/java/com/bsth/controller/report/SheetController.java
| @@ -36,9 +36,21 @@ public class SheetController extends BaseController<Sheet, Integer>{ | @@ -36,9 +36,21 @@ public class SheetController extends BaseController<Sheet, Integer>{ | ||
| 36 | List<Sheet> list=sheetService.sheetList(id); | 36 | List<Sheet> list=sheetService.sheetList(id); |
| 37 | return list; | 37 | return list; |
| 38 | } | 38 | } |
| 39 | + @RequestMapping(value = "/exportList",method = RequestMethod.GET) | ||
| 40 | + public List<Sheet> exportList(@RequestParam Integer id){ | ||
| 41 | + List<Sheet> list=sheetService.exportList(id); | ||
| 42 | + return list; | ||
| 43 | + } | ||
| 44 | + | ||
| 39 | @RequestMapping(value = "/countList",method = RequestMethod.GET) | 45 | @RequestMapping(value = "/countList",method = RequestMethod.GET) |
| 40 | public List<Map<String, Object>> countList(@RequestParam Map<String, Object> map){ | 46 | public List<Map<String, Object>> countList(@RequestParam Map<String, Object> map){ |
| 41 | List<Map<String, Object>> list=sheetService.countList(map); | 47 | List<Map<String, Object>> list=sheetService.countList(map); |
| 42 | return list; | 48 | return list; |
| 43 | } | 49 | } |
| 50 | + | ||
| 51 | + @RequestMapping(value = "/listSheet",method = RequestMethod.GET) | ||
| 52 | + public List<Map<String, Object>> listSheet(@RequestParam Map<String, Object> map){ | ||
| 53 | + List<Map<String, Object>> list=sheetService.listSheet(map); | ||
| 54 | + return list; | ||
| 55 | + } | ||
| 44 | } | 56 | } |
src/main/java/com/bsth/entity/Line.java
| @@ -94,6 +94,9 @@ public class Line implements Serializable { | @@ -94,6 +94,9 @@ public class Line implements Serializable { | ||
| 94 | 94 | ||
| 95 | /** 是否夜宵线 <1:是;0:否> bit length(50)*/ | 95 | /** 是否夜宵线 <1:是;0:否> bit length(50)*/ |
| 96 | private Integer supperLine; | 96 | private Integer supperLine; |
| 97 | + | ||
| 98 | + /** 是否营运 <1:是;0:否> bit length(50)*/ | ||
| 99 | + private Integer sfyy; | ||
| 97 | 100 | ||
| 98 | /** 起始调度电话 varchar length(50) */ | 101 | /** 起始调度电话 varchar length(50) */ |
| 99 | private String startPhone; | 102 | private String startPhone; |
| @@ -481,4 +484,14 @@ public class Line implements Serializable { | @@ -481,4 +484,14 @@ public class Line implements Serializable { | ||
| 481 | public void setCgsbm(String cgsbm) { | 484 | public void setCgsbm(String cgsbm) { |
| 482 | this.cgsbm = cgsbm; | 485 | this.cgsbm = cgsbm; |
| 483 | } | 486 | } |
| 487 | + | ||
| 488 | + public Integer getSfyy() { | ||
| 489 | + return sfyy; | ||
| 490 | + } | ||
| 491 | + | ||
| 492 | + public void setSfyy(Integer sfyy) { | ||
| 493 | + this.sfyy = sfyy; | ||
| 494 | + } | ||
| 495 | + | ||
| 496 | + | ||
| 484 | } | 497 | } |
src/main/java/com/bsth/entity/excep/ArrivalInfo.java
| @@ -20,6 +20,8 @@ public class ArrivalInfo { | @@ -20,6 +20,8 @@ public class ArrivalInfo { | ||
| 20 | 20 | ||
| 21 | private String nbbm; | 21 | private String nbbm; |
| 22 | 22 | ||
| 23 | + | ||
| 24 | + private String pzh; | ||
| 23 | /** 站点名称 */ | 25 | /** 站点名称 */ |
| 24 | private String stopName; | 26 | private String stopName; |
| 25 | 27 | ||
| @@ -243,6 +245,14 @@ public class ArrivalInfo { | @@ -243,6 +245,14 @@ public class ArrivalInfo { | ||
| 243 | public void setJzsj(String jzsj) { | 245 | public void setJzsj(String jzsj) { |
| 244 | this.jzsj = jzsj; | 246 | this.jzsj = jzsj; |
| 245 | } | 247 | } |
| 248 | + | ||
| 249 | + public String getPzh() { | ||
| 250 | + return pzh; | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + public void setPzh(String pzh) { | ||
| 254 | + this.pzh = pzh; | ||
| 255 | + } | ||
| 246 | 256 | ||
| 247 | 257 | ||
| 248 | 258 |
src/main/java/com/bsth/entity/mcy_forms/Changetochange.java
| @@ -12,6 +12,8 @@ public class Changetochange { | @@ -12,6 +12,8 @@ public class Changetochange { | ||
| 12 | @GeneratedValue | 12 | @GeneratedValue |
| 13 | private Integer id; | 13 | private Integer id; |
| 14 | 14 | ||
| 15 | + private Long sId; | ||
| 16 | + | ||
| 15 | private String rq;//日期 | 17 | private String rq;//日期 |
| 16 | 18 | ||
| 17 | private String gs;//公司 | 19 | private String gs;//公司 |
| @@ -171,7 +173,15 @@ public class Changetochange { | @@ -171,7 +173,15 @@ public class Changetochange { | ||
| 171 | public void setXgr(String xgr) { | 173 | public void setXgr(String xgr) { |
| 172 | this.xgr = xgr; | 174 | this.xgr = xgr; |
| 173 | } | 175 | } |
| 174 | - | ||
| 175 | 176 | ||
| 177 | + public Long getsId() { | ||
| 178 | + return sId; | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | + public void setsId(Long sId) { | ||
| 182 | + this.sId = sId; | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + | ||
| 176 | 186 | ||
| 177 | } | 187 | } |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -175,6 +175,10 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -175,6 +175,10 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 175 | @Query(value="UPDATE bsth_c_sectionroute set sectionroute_code = (sectionroute_code+10) 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+10) 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 | ||
| 179 | + @Query(value="UPDATE bsth_c_sectionroute set destroy = 1 where id = ?1", nativeQuery=true) | ||
| 180 | + public void sectionRouteIsDestroyUpdBatch(Integer ids); | ||
| 181 | + | ||
| 178 | @Modifying | 182 | @Modifying |
| 179 | @Query(value="update bsth_c_sectionroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true) | 183 | @Query(value="update bsth_c_sectionroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true) |
| 180 | public void sectionRouteDir(Integer line); | 184 | public void sectionRouteDir(Integer line); |
src/main/java/com/bsth/repository/StationRouteRepository.java
| @@ -282,4 +282,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -282,4 +282,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 282 | @Modifying | 282 | @Modifying |
| 283 | @Query(value="UPDATE bsth_c_stationroute set station_route_code = (station_route_code+10) where line = ?1 and directions = ?2 and station_route_code >=?3 and destroy = 0", nativeQuery=true) | 283 | @Query(value="UPDATE bsth_c_stationroute set station_route_code = (station_route_code+10) where line = ?1 and directions = ?2 and station_route_code >=?3 and destroy = 0", nativeQuery=true) |
| 284 | public void stationUpdStationRouteCode(Integer line,Integer dir,Integer routeCod); | 284 | public void stationUpdStationRouteCode(Integer line,Integer dir,Integer routeCod); |
| 285 | + | ||
| 286 | + @Modifying | ||
| 287 | + @Query(value="UPDATE bsth_c_stationroute set destroy = 1 where id = ?1", nativeQuery=true) | ||
| 288 | + public void stationRouteIsDestroyUpdBatch(Integer ids); | ||
| 285 | } | 289 | } |
src/main/java/com/bsth/service/SectionRouteService.java
| @@ -33,6 +33,15 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> | @@ -33,6 +33,15 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> | ||
| 33 | List<Map<String, Object>> getSectionRoute(Map<String, Object> map); | 33 | List<Map<String, Object>> getSectionRoute(Map<String, Object> map); |
| 34 | 34 | ||
| 35 | /** | 35 | /** |
| 36 | + * @Description : TODO(根据路段路由Id批量撤销路段) | ||
| 37 | + * | ||
| 38 | + * @param map <id:路段路由ID> | ||
| 39 | + * | ||
| 40 | + * @return List<Map<String, Object>> | ||
| 41 | + */ | ||
| 42 | + Map<String, Object> updateSectionRouteInfoFormId(Map<String, Object> map); | ||
| 43 | + | ||
| 44 | + /** | ||
| 36 | * @Description : TODO(根据路段路由Id查询详情) | 45 | * @Description : TODO(根据路段路由Id查询详情) |
| 37 | * | 46 | * |
| 38 | * @param map <id:路段路由ID> | 47 | * @param map <id:路段路由ID> |
src/main/java/com/bsth/service/StationRouteService.java
| @@ -31,6 +31,15 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> | @@ -31,6 +31,15 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> | ||
| 31 | Iterable<StationRoute> list(Map<String, Object> map); | 31 | Iterable<StationRoute> list(Map<String, Object> map); |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | + * @Description : TODO(根据路段站点Id批量撤销站点) | ||
| 35 | + * | ||
| 36 | + * @param map <id:站点路由ID> | ||
| 37 | + * | ||
| 38 | + * @return List<Map<String, Object>> | ||
| 39 | + */ | ||
| 40 | + Map<String, Object> updateStationRouteInfoFormId(Map<String, Object> map); | ||
| 41 | + | ||
| 42 | + /** | ||
| 34 | * @Description :TODO(查询树站点与路段数据) | 43 | * @Description :TODO(查询树站点与路段数据) |
| 35 | * | 44 | * |
| 36 | * @param map <line.id_eq:线路ID; directions_eq:方向> | 45 | * @param map <line.id_eq:线路ID; directions_eq:方向> |
| @@ -92,4 +101,5 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> | @@ -92,4 +101,5 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> | ||
| 92 | Map<String, Object> updSwitchDir(String lineIds); | 101 | Map<String, Object> updSwitchDir(String lineIds); |
| 93 | 102 | ||
| 94 | Map<String, Object> upddis(Map<String, Object> map); | 103 | Map<String, Object> upddis(Map<String, Object> map); |
| 104 | + | ||
| 95 | } | 105 | } |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -806,23 +806,38 @@ public class FormsServiceImpl implements FormsService { | @@ -806,23 +806,38 @@ public class FormsServiceImpl implements FormsService { | ||
| 806 | return d; | 806 | return d; |
| 807 | } | 807 | } |
| 808 | }); | 808 | }); |
| 809 | + | ||
| 810 | + Set<String> lineSet = new HashSet<String>(); | ||
| 811 | + List<String> strList = new ArrayList<>(); | ||
| 812 | + sql = "select name from bsth_c_line where sfyy = 0"; | ||
| 813 | + strList = jdbcTemplate.query(sql, | ||
| 814 | + new RowMapper<String>(){ | ||
| 815 | + @Override | ||
| 816 | + public String mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 817 | + return rs.getString("name"); | ||
| 818 | + } | ||
| 819 | + }); | ||
| 820 | + lineSet.addAll(strList); | ||
| 821 | + | ||
| 809 | List<ScheduleRealInfo> listReal; | 822 | List<ScheduleRealInfo> listReal; |
| 810 | if(xlbm.equals("")){ | 823 | if(xlbm.equals("")){ |
| 811 | listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj(xlbm, startDate, endDate, gsdm, fgsdm); | 824 | listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj(xlbm, startDate, endDate, gsdm, fgsdm); |
| 812 | }else{ | 825 | }else{ |
| 813 | listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj2(xlbm, startDate, endDate); | 826 | listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj2(xlbm, startDate, endDate); |
| 814 | } | 827 | } |
| 815 | - | 828 | + List<Operationservice> resList = new ArrayList<Operationservice>(); |
| 816 | for (int i = 0; i < list.size(); i++) { | 829 | for (int i = 0; i < list.size(); i++) { |
| 817 | Operationservice o=list.get(i); | 830 | Operationservice o=list.get(i); |
| 818 | String line=o.getXlBm(); | 831 | String line=o.getXlBm(); |
| 819 | String xlname=BasicData.lineCode2NameMap.get(line); | 832 | String xlname=BasicData.lineCode2NameMap.get(line); |
| 833 | + if(lineSet.contains(xlname)) | ||
| 834 | + continue; | ||
| 820 | o.setXlName(xlname); | 835 | o.setXlName(xlname); |
| 821 | 836 | ||
| 822 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | 837 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 823 | for (int j = 0; j < listReal.size(); j++) { | 838 | for (int j = 0; j < listReal.size(); j++) { |
| 824 | ScheduleRealInfo s=listReal.get(j); | 839 | ScheduleRealInfo s=listReal.get(j); |
| 825 | - if(s.getXlBm().equals(line)){ | 840 | + if(s.getXlBm().equals(line) && !lineSet.contains(s.getXlName())){ |
| 826 | newList.add(s); | 841 | newList.add(s); |
| 827 | } | 842 | } |
| 828 | } | 843 | } |
| @@ -858,8 +873,10 @@ public class FormsServiceImpl implements FormsService { | @@ -858,8 +873,10 @@ public class FormsServiceImpl implements FormsService { | ||
| 858 | 873 | ||
| 859 | o.setJzl(String.valueOf(jzl)); | 874 | o.setJzl(String.valueOf(jzl)); |
| 860 | o.setXhl(String.valueOf(xhl)); | 875 | o.setXhl(String.valueOf(xhl)); |
| 876 | + | ||
| 877 | + resList.add(o); | ||
| 861 | } | 878 | } |
| 862 | - return list; | 879 | + return resList; |
| 863 | } | 880 | } |
| 864 | 881 | ||
| 865 | 882 | ||
| @@ -949,6 +966,7 @@ public class FormsServiceImpl implements FormsService { | @@ -949,6 +966,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 949 | 966 | ||
| 950 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | 967 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); |
| 951 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 968 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 969 | + Set<String> lineSet = new HashSet<String>(); | ||
| 952 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 970 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 953 | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | 971 | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); |
| 954 | NumberFormat numberFormat = NumberFormat.getInstance(); | 972 | NumberFormat numberFormat = NumberFormat.getInstance(); |
| @@ -1002,9 +1020,21 @@ public class FormsServiceImpl implements FormsService { | @@ -1002,9 +1020,21 @@ public class FormsServiceImpl implements FormsService { | ||
| 1002 | } | 1020 | } |
| 1003 | 1021 | ||
| 1004 | }); | 1022 | }); |
| 1005 | - | 1023 | + sql = "select name from bsth_c_line where sfyy = 0"; |
| 1024 | + List<String> strList = new ArrayList<>(); | ||
| 1025 | + strList = jdbcTemplate.query(sql, | ||
| 1026 | + new RowMapper<String>(){ | ||
| 1027 | + @Override | ||
| 1028 | + public String mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 1029 | + return rs.getString("name"); | ||
| 1030 | + } | ||
| 1031 | + }); | ||
| 1032 | + lineSet.addAll(strList); | ||
| 1006 | 1033 | ||
| 1007 | for(Line line1 : lineList){ | 1034 | for(Line line1 : lineList){ |
| 1035 | + if(lineSet.contains(line1.getName())){ | ||
| 1036 | + continue; | ||
| 1037 | + } | ||
| 1008 | if(line.trim().length() == 0 || line1.getLineCode().equals(line)){ | 1038 | if(line.trim().length() == 0 || line1.getLineCode().equals(line)){ |
| 1009 | Map<String, Object> m = new HashMap<String, Object>(); | 1039 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1010 | m.put("rq", rq); | 1040 | m.put("rq", rq); |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -460,7 +460,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -460,7 +460,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 460 | if(!keyList.contains(key)) | 460 | if(!keyList.contains(key)) |
| 461 | keyList.add(key); | 461 | keyList.add(key); |
| 462 | } | 462 | } |
| 463 | - System.out.println("key:"+key+" fcsj2:"+fcsj2+" fcsj1:"+fcsj2+" temp1:"+temp1.get(key)+" tem0:"+temp0.get(key)); | ||
| 464 | temp1.get(key).add(fcsj2 - fcsj1); | 463 | temp1.get(key).add(fcsj2 - fcsj1); |
| 465 | } | 464 | } |
| 466 | } | 465 | } |
| @@ -562,7 +561,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -562,7 +561,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 562 | if(l < 90) | 561 | if(l < 90) |
| 563 | fcsjs.add(l); | 562 | fcsjs.add(l); |
| 564 | } | 563 | } |
| 565 | - if(temp0.containsKey(key)) | 564 | + if(temp1.containsKey(key)) |
| 566 | for(Long l : temp1.get(key)){ | 565 | for(Long l : temp1.get(key)){ |
| 567 | if(l < 90) | 566 | if(l < 90) |
| 568 | fcsjAs.add(l); | 567 | fcsjAs.add(l); |
| @@ -1701,8 +1700,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -1701,8 +1700,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 1701 | lc = schedule.getJhlc(); | 1700 | lc = schedule.getJhlc(); |
| 1702 | } | 1701 | } |
| 1703 | 1702 | ||
| 1704 | - jhbc++; | ||
| 1705 | - jhlc += lc; | 1703 | + if(!schedule.isSflj()){ |
| 1704 | + jhbc++; | ||
| 1705 | + jhlc += lc; | ||
| 1706 | + } | ||
| 1706 | if(schedule.getStatus() != -1){ | 1707 | if(schedule.getStatus() != -1){ |
| 1707 | sjbc++; | 1708 | sjbc++; |
| 1708 | sjlc += lc; | 1709 | sjlc += lc; |
| @@ -1928,7 +1929,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -1928,7 +1929,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 1928 | int sjbc = 0, sddf = 0, zddf = 0, | 1929 | int sjbc = 0, sddf = 0, zddf = 0, |
| 1929 | dxtz = 0, lbtz = 0; | 1930 | dxtz = 0, lbtz = 0; |
| 1930 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 1931 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 1931 | - if(schedule.getFcsjActual() != null){ | 1932 | + if(schedule.getFcsjActual() != null && schedule.getStatus() != -1){ |
| 1932 | boolean flag = false; | 1933 | boolean flag = false; |
| 1933 | sjbc++; | 1934 | sjbc++; |
| 1934 | if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){ | 1935 | if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){ |
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
| @@ -5,10 +5,15 @@ import java.util.HashMap; | @@ -5,10 +5,15 @@ import java.util.HashMap; | ||
| 5 | import java.util.List; | 5 | import java.util.List; |
| 6 | import java.util.Map; | 6 | import java.util.Map; |
| 7 | 7 | ||
| 8 | +import javax.persistence.EntityManager; | ||
| 9 | +import javax.transaction.Transactional; | ||
| 10 | + | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 12 | +import org.springframework.beans.factory.annotation.Value; | ||
| 9 | import org.springframework.data.domain.Sort; | 13 | import org.springframework.data.domain.Sort; |
| 10 | import org.springframework.data.domain.Sort.Direction; | 14 | import org.springframework.data.domain.Sort.Direction; |
| 11 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
| 16 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | 17 | ||
| 13 | import com.bsth.common.ResponseCode; | 18 | import com.bsth.common.ResponseCode; |
| 14 | import com.bsth.entity.Line; | 19 | import com.bsth.entity.Line; |
| @@ -49,6 +54,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -49,6 +54,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 49 | @Autowired | 54 | @Autowired |
| 50 | LineRepository lineRepository; | 55 | LineRepository lineRepository; |
| 51 | 56 | ||
| 57 | + @Autowired | ||
| 58 | + private EntityManager entityManager; | ||
| 59 | + | ||
| 60 | + @Value("${hibernate.jdbc.batch_size}") | ||
| 61 | + private int batchSize; | ||
| 62 | + | ||
| 52 | @Override | 63 | @Override |
| 53 | public Iterable<SectionRoute> list(Map<String, Object> map) { | 64 | public Iterable<SectionRoute> list(Map<String, Object> map) { |
| 54 | List<Sort.Order> orderList = new ArrayList<>(); | 65 | List<Sort.Order> orderList = new ArrayList<>(); |
| @@ -106,6 +117,9 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -106,6 +117,9 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 106 | return resultList; | 117 | return resultList; |
| 107 | } | 118 | } |
| 108 | 119 | ||
| 120 | + | ||
| 121 | + | ||
| 122 | + | ||
| 109 | /** | 123 | /** |
| 110 | * @Description : TODO(根据路段路由Id查询详情) | 124 | * @Description : TODO(根据路段路由Id查询详情) |
| 111 | * | 125 | * |
| @@ -297,4 +311,33 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -297,4 +311,33 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 297 | } | 311 | } |
| 298 | return resultMap; | 312 | return resultMap; |
| 299 | } | 313 | } |
| 314 | + | ||
| 315 | + /** | ||
| 316 | + * @Description : TODO(根据路段路由Id批量撤销路段) | ||
| 317 | + * | ||
| 318 | + * @param map <id:路段路由ID> | ||
| 319 | + */ | ||
| 320 | + @Override | ||
| 321 | + @Transactional | ||
| 322 | + public Map<String, Object> updateSectionRouteInfoFormId(Map<String, Object> map) { | ||
| 323 | + Map<String, Object> resultMap = new HashMap<String, Object>(); | ||
| 324 | + try { | ||
| 325 | + //int i = 0; | ||
| 326 | + String[] idsStr = map.get("ids").toString().split(",") ; | ||
| 327 | + for (String id : idsStr) { | ||
| 328 | + /* entityManager.persist(Integer.parseInt(id));*/ | ||
| 329 | + repository.sectionRouteIsDestroyUpdBatch(Integer.parseInt(id)); | ||
| 330 | +/* i++; | ||
| 331 | + if (i % batchSize == 0) { | ||
| 332 | + entityManager.flush(); | ||
| 333 | + entityManager.clear(); | ||
| 334 | + }*/ | ||
| 335 | + } | ||
| 336 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 337 | + } catch (Exception e) { | ||
| 338 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 339 | + logger.error("save erro.", e); | ||
| 340 | + } | ||
| 341 | + return resultMap; | ||
| 342 | + } | ||
| 300 | } | 343 | } |
| 301 | \ No newline at end of file | 344 | \ No newline at end of file |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -24,7 +24,6 @@ import org.springframework.transaction.annotation.Transactional; | @@ -24,7 +24,6 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 24 | 24 | ||
| 25 | import java.io.ByteArrayInputStream; | 25 | import java.io.ByteArrayInputStream; |
| 26 | import java.io.File; | 26 | import java.io.File; |
| 27 | -import java.io.FileOutputStream; | ||
| 28 | import java.io.InputStream; | 27 | import java.io.InputStream; |
| 29 | import java.text.DecimalFormat; | 28 | import java.text.DecimalFormat; |
| 30 | import java.util.*; | 29 | import java.util.*; |
| @@ -68,6 +67,29 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -68,6 +67,29 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 68 | return repository.findAll(new CustomerSpecs<StationRoute>(map), new Sort(orderList)); | 67 | return repository.findAll(new CustomerSpecs<StationRoute>(map), new Sort(orderList)); |
| 69 | } | 68 | } |
| 70 | 69 | ||
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * @Description : TODO(根据路段路由Id批量撤销路段) | ||
| 73 | + * | ||
| 74 | + * @param map <id:路段路由ID> | ||
| 75 | + */ | ||
| 76 | + @Override | ||
| 77 | + @Transactional | ||
| 78 | + public Map<String, Object> updateStationRouteInfoFormId(Map<String, Object> map) { | ||
| 79 | + Map<String, Object> resultMap = new HashMap<String, Object>(); | ||
| 80 | + try { | ||
| 81 | + String[] idsStr = map.get("ids").toString().split(",") ; | ||
| 82 | + for (String id : idsStr) { | ||
| 83 | + repository.stationRouteIsDestroyUpdBatch(Integer.parseInt(id)); | ||
| 84 | + } | ||
| 85 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 86 | + } catch (Exception e) { | ||
| 87 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 88 | + logger.error("save erro.", e); | ||
| 89 | + } | ||
| 90 | + return resultMap; | ||
| 91 | + } | ||
| 92 | + | ||
| 71 | /** | 93 | /** |
| 72 | * @Description :TODO(查询树站点与路段数据) | 94 | * @Description :TODO(查询树站点与路段数据) |
| 73 | * | 95 | * |
| @@ -512,38 +534,57 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -512,38 +534,57 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 512 | */ | 534 | */ |
| 513 | @Override | 535 | @Override |
| 514 | public Map<String, Object> usingSingle(Map<String, Object> map) { | 536 | public Map<String, Object> usingSingle(Map<String, Object> map) { |
| 537 | + | ||
| 515 | // 返回值map | 538 | // 返回值map |
| 516 | Map<String, Object> resultMap = new HashMap<String,Object>(); | 539 | Map<String, Object> resultMap = new HashMap<String,Object>(); |
| 540 | + | ||
| 517 | try { | 541 | try { |
| 542 | + | ||
| 518 | // 获取线路ID | 543 | // 获取线路ID |
| 519 | Integer lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); | 544 | Integer lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); |
| 545 | + | ||
| 520 | /** 查询线路信息 @param:<lineId:线路ID> */ | 546 | /** 查询线路信息 @param:<lineId:线路ID> */ |
| 521 | Line line = lineRepository.findOne(lineId); | 547 | Line line = lineRepository.findOne(lineId); |
| 548 | + | ||
| 522 | /** 查询线路信息下的站点路由信息 @param:<lineId:线路ID> */ | 549 | /** 查询线路信息下的站点路由信息 @param:<lineId:线路ID> */ |
| 523 | List<Object[]> objects = repository.usingSingle(lineId); | 550 | List<Object[]> objects = repository.usingSingle(lineId); |
| 551 | + | ||
| 524 | if (objects.size()>0) { | 552 | if (objects.size()>0) { |
| 553 | + | ||
| 525 | /** 获取配置文件里的ftp登录参数 */ | 554 | /** 获取配置文件里的ftp登录参数 */ |
| 526 | Map<String, Object> FTPParamMap = readPropertiesGetFTPParam(); | 555 | Map<String, Object> FTPParamMap = readPropertiesGetFTPParam(); |
| 556 | + | ||
| 527 | // 压缩文件名 | 557 | // 压缩文件名 |
| 528 | String odlGzFileName = line.getLineCode() + ".txt.gz"; | 558 | String odlGzFileName = line.getLineCode() + ".txt.gz"; |
| 559 | + | ||
| 529 | // txt文件名 | 560 | // txt文件名 |
| 530 | String textFileName = line.getLineCode() + ".txt"; | 561 | String textFileName = line.getLineCode() + ".txt"; |
| 562 | + | ||
| 531 | // 创建一个ftp上传实例 | 563 | // 创建一个ftp上传实例 |
| 532 | FTPClientUtils clientUtils = new FTPClientUtils(); | 564 | FTPClientUtils clientUtils = new FTPClientUtils(); |
| 565 | + | ||
| 533 | // IP | 566 | // IP |
| 534 | String url = FTPParamMap.get("url").toString(); | 567 | String url = FTPParamMap.get("url").toString(); |
| 568 | + | ||
| 535 | // 端口 | 569 | // 端口 |
| 536 | int port = Integer.valueOf(FTPParamMap.get("port").toString()); | 570 | int port = Integer.valueOf(FTPParamMap.get("port").toString()); |
| 571 | + | ||
| 537 | // 用户名 | 572 | // 用户名 |
| 538 | String username = FTPParamMap.get("username").toString(); | 573 | String username = FTPParamMap.get("username").toString(); |
| 574 | + | ||
| 539 | // 密码 | 575 | // 密码 |
| 540 | String password = FTPParamMap.get("password").toString(); | 576 | String password = FTPParamMap.get("password").toString(); |
| 577 | + | ||
| 541 | // 相对路径 | 578 | // 相对路径 |
| 542 | String remotePath = FTPParamMap.get("remotePath").toString(); | 579 | String remotePath = FTPParamMap.get("remotePath").toString(); |
| 580 | + | ||
| 543 | /** 如果已存在相同行单文件名则先删除 */ | 581 | /** 如果已存在相同行单文件名则先删除 */ |
| 544 | clientUtils.deleteFtpFile(url, port, username, password, remotePath, odlGzFileName); | 582 | clientUtils.deleteFtpFile(url, port, username, password, remotePath, odlGzFileName); |
| 583 | + | ||
| 545 | clientUtils.deleteFtpFile(url, port, username, password, remotePath, textFileName); | 584 | clientUtils.deleteFtpFile(url, port, username, password, remotePath, textFileName); |
| 585 | + | ||
| 546 | String textStr = ""; | 586 | String textStr = ""; |
| 587 | + | ||
| 547 | boolean tempTag = ishxType(objects); | 588 | boolean tempTag = ishxType(objects); |
| 548 | 589 | ||
| 549 | if(tempTag) | 590 | if(tempTag) |
| @@ -557,12 +598,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -557,12 +598,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 557 | 598 | ||
| 558 | InputStream input = new ByteArrayInputStream(textStr.getBytes("gbk")); | 599 | InputStream input = new ByteArrayInputStream(textStr.getBytes("gbk")); |
| 559 | 600 | ||
| 560 | - // FileOutputStream fos = new FileOutputStream("test.txt"); | ||
| 561 | - /*int len = 0 ; | ||
| 562 | - byte[] cbuf = new byte[1024]; | ||
| 563 | - while((len = input.read(cbuf)) != -1) { | ||
| 564 | - fos.write(cbuf, 0, len); | ||
| 565 | - }*/ | ||
| 566 | /** 生成txt文件,上传ftp */ | 601 | /** 生成txt文件,上传ftp */ |
| 567 | clientUtils.uploadFile(url, port, username, password, remotePath, textFileName, input); | 602 | clientUtils.uploadFile(url, port, username, password, remotePath, textFileName, input); |
| 568 | 603 | ||
| @@ -633,23 +668,25 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -633,23 +668,25 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 633 | * @return String | 668 | * @return String |
| 634 | */ | 669 | */ |
| 635 | public String newTextFileToFTP(List<Object[]> objects,Integer lineId) { | 670 | public String newTextFileToFTP(List<Object[]> objects,Integer lineId) { |
| 671 | + | ||
| 636 | // 返回值String | 672 | // 返回值String |
| 637 | String stationRStr = ""; | 673 | String stationRStr = ""; |
| 674 | + | ||
| 638 | // windows下的文本文件换行符 | 675 | // windows下的文本文件换行符 |
| 639 | //String enterStr = "\r\n"; | 676 | //String enterStr = "\r\n"; |
| 677 | + | ||
| 640 | // linux/unix下的文本文件换行符 | 678 | // linux/unix下的文本文件换行符 |
| 641 | String enterStr = "\r"; | 679 | String enterStr = "\r"; |
| 642 | - int defaultZdxh = 0; | 680 | + |
| 643 | if(objects.size()>0) { | 681 | if(objects.size()>0) { |
| 682 | + | ||
| 644 | for(int i = 0; i<objects.size();i++) { | 683 | for(int i = 0; i<objects.size();i++) { |
| 645 | - defaultZdxh ++ ; | 684 | + |
| 646 | // 经度 | 685 | // 经度 |
| 647 | - String lng = objects.get(i)[0].equals("") ? "0" : objects.get(i)[0].toString(); | 686 | + String lng = objects.get(i)[0].equals("") ? "" : objects.get(i)[0].toString(); |
| 648 | 687 | ||
| 649 | // 纬度 | 688 | // 纬度 |
| 650 | - String lat = objects.get(i)[1].equals("") ? "0" : objects.get(i)[1].toString(); | ||
| 651 | - | ||
| 652 | - Point point = new Point(Double.valueOf(lng), Double.valueOf(lat)); | 689 | + String lat = objects.get(i)[1].equals("") ? "" : objects.get(i)[1].toString(); |
| 653 | 690 | ||
| 654 | lat = "\t" + lat; | 691 | lat = "\t" + lat; |
| 655 | 692 | ||
| @@ -659,32 +696,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -659,32 +696,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 659 | String stationMake = ""; | 696 | String stationMake = ""; |
| 660 | 697 | ||
| 661 | if(stationMakeStr.equals("E")) { | 698 | if(stationMakeStr.equals("E")) { |
| 699 | + | ||
| 662 | stationMake = "\t2"; | 700 | stationMake = "\t2"; |
| 701 | + | ||
| 663 | }else { | 702 | }else { |
| 703 | + | ||
| 664 | stationMake ="\t1"; | 704 | stationMake ="\t1"; |
| 705 | + | ||
| 665 | } | 706 | } |
| 666 | 707 | ||
| 667 | // 站点序号 | 708 | // 站点序号 |
| 668 | - // String stationNo = objects.get(i)[4].equals("") ? "" : objects.get(i)[4].toString(); | ||
| 669 | - String stationNo = String.valueOf(defaultZdxh); | 709 | + String stationNo = objects.get(i)[4].equals("") ? "" : objects.get(i)[4].toString(); |
| 670 | 710 | ||
| 671 | stationNo = "\t" + stationNo; | 711 | stationNo = "\t" + stationNo; |
| 672 | 712 | ||
| 673 | // 站点编码 | 713 | // 站点编码 |
| 674 | String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString(); | 714 | String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString(); |
| 675 | 715 | ||
| 676 | - int len = stationCode.length(); | ||
| 677 | - if(len<8) { | ||
| 678 | - int dx = 8 - len; | ||
| 679 | - String addStr = ""; | ||
| 680 | - for(int p =0;p<dx;p++) { | ||
| 681 | - addStr = addStr + "0"; | ||
| 682 | - } | ||
| 683 | - stationCode = addStr + stationCode; | ||
| 684 | - }else if(len>8){ | ||
| 685 | - stationCode = stationCode.substring(8); | ||
| 686 | - } | ||
| 687 | - | ||
| 688 | stationCode = "\t" +stationCode; | 716 | stationCode = "\t" +stationCode; |
| 689 | 717 | ||
| 690 | double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000; | 718 | double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000; |
| @@ -704,33 +732,41 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -704,33 +732,41 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 704 | 732 | ||
| 705 | // 限速 | 733 | // 限速 |
| 706 | String sleepStr = ""; | 734 | String sleepStr = ""; |
| 735 | + | ||
| 707 | // 方向 | 736 | // 方向 |
| 708 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 737 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 738 | + | ||
| 709 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 739 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 710 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); | 740 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); |
| 741 | + | ||
| 711 | if(sobje.size()==1) { | 742 | if(sobje.size()==1) { |
| 712 | - int dsleepStr = sobje.get(0)[2] == null || sobje.get(0)[2].equals("") ? 60 : Integer.valueOf(sobje.get(0)[2].toString()); | ||
| 713 | - sleepStr = "\t" + String.valueOf(dsleepStr); | 743 | + |
| 744 | + double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString()); | ||
| 745 | + | ||
| 746 | + sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr); | ||
| 747 | + | ||
| 714 | }else if(sobje.size()>1){ | 748 | }else if(sobje.size()>1){ |
| 749 | + | ||
| 750 | + /** 这里暂时只根据站点名称去匹配所在路段的限速值 ,如果路段名称"至"之前的地名与站点名称等同,就认为站点在路段上。 */ | ||
| 715 | for(int j =0;j<sobje.size();j++) { | 751 | for(int j =0;j<sobje.size();j++) { |
| 716 | - double dsleepStrt = sobje.get(j)[2] == null || sobje.get(j)[2].equals("") ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | ||
| 717 | - String pointsStr = sobje.get(j)[1]==null || sobje.get(j)[1].equals("") ? null : sobje.get(j)[1].toString(); | ||
| 718 | - pointsStr = pointsStr.substring(11, pointsStr.length()-1); | ||
| 719 | - List<Point> ps = new ArrayList<>(); | ||
| 720 | - String[] pArray = pointsStr.split(","); | ||
| 721 | - for(int a = 0; a <pArray.length; a++) { | ||
| 722 | - String[] tmepA = pArray[a].split(" "); | ||
| 723 | - Point temp = new Point(Double.valueOf(tmepA[0]), Double.valueOf(tmepA[1])); | ||
| 724 | - ps.add(temp); | ||
| 725 | - } | ||
| 726 | - if(GeoUtils.isInSection(ps, point)) { | ||
| 727 | - sleepStr = "\t" + String.valueOf((int)dsleepStrt); | ||
| 728 | - break; | 752 | + |
| 753 | + String sectionName = sobje.get(j)[3].toString(); | ||
| 754 | + | ||
| 755 | + String sectionNameA[] = sectionName.split("至"); | ||
| 756 | + | ||
| 757 | + if(stationName.equals(sectionNameA[0])){ | ||
| 758 | + | ||
| 759 | + /*sleepStr = sobje.get(j)[2].toString();*/ | ||
| 760 | + | ||
| 761 | + double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | ||
| 762 | + | ||
| 763 | + sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt); | ||
| 764 | + | ||
| 729 | } | 765 | } |
| 766 | + | ||
| 730 | } | 767 | } |
| 731 | } | 768 | } |
| 732 | - if(sleepStr.equals("")) | ||
| 733 | - sleepStr = "\t" + "60"; | 769 | + |
| 734 | stationRStr = stationRStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr; | 770 | stationRStr = stationRStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr; |
| 735 | } | 771 | } |
| 736 | 772 | ||
| @@ -749,12 +785,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -749,12 +785,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 749 | for(int i = 0; i<objects.size();i++) { | 785 | for(int i = 0; i<objects.size();i++) { |
| 750 | if(Integer.valueOf(objects.get(i)[8].toString())==0) { | 786 | if(Integer.valueOf(objects.get(i)[8].toString())==0) { |
| 751 | // 经度 | 787 | // 经度 |
| 752 | - String lng = objects.get(i)[0].equals("") ? "0" : objects.get(i)[0].toString(); | ||
| 753 | - | 788 | + String lng = objects.get(i)[0].equals("") ? "" : objects.get(i)[0].toString(); |
| 754 | // 纬度 | 789 | // 纬度 |
| 755 | - String lat = objects.get(i)[1].equals("") ? "0" : objects.get(i)[1].toString(); | ||
| 756 | - | ||
| 757 | - Point point = new Point(Double.valueOf(lng), Double.valueOf(lat)); | 790 | + String lat = objects.get(i)[1].equals("") ? "" : objects.get(i)[1].toString(); |
| 758 | lat = "\t" + lat; | 791 | lat = "\t" + lat; |
| 759 | // 站点类型 | 792 | // 站点类型 |
| 760 | String stationMakeStr = objects.get(i)[3].equals("") ? "" : objects.get(i)[3].toString(); | 793 | String stationMakeStr = objects.get(i)[3].equals("") ? "" : objects.get(i)[3].toString(); |
| @@ -769,17 +802,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -769,17 +802,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 769 | String stationNo = "\t" + xh; | 802 | String stationNo = "\t" + xh; |
| 770 | // 站点编码 | 803 | // 站点编码 |
| 771 | String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString(); | 804 | String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString(); |
| 772 | - int len = stationCode.length(); | ||
| 773 | - if(len<8) { | ||
| 774 | - int dx = 8 - len; | ||
| 775 | - String addStr = ""; | ||
| 776 | - for(int p =0;p<dx;p++) { | ||
| 777 | - addStr = addStr + "0"; | ||
| 778 | - } | ||
| 779 | - stationCode = addStr + stationCode; | ||
| 780 | - }else if(len>8){ | ||
| 781 | - stationCode = stationCode.substring(8); | ||
| 782 | - } | ||
| 783 | stationCode = "\t" +stationCode; | 805 | stationCode = "\t" +stationCode; |
| 784 | double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000; | 806 | double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000; |
| 785 | String tempDistc = String.valueOf((int) dis); | 807 | String tempDistc = String.valueOf((int) dis); |
| @@ -795,28 +817,20 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -795,28 +817,20 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 795 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 817 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 796 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); | 818 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); |
| 797 | if(sobje.size()==1) { | 819 | if(sobje.size()==1) { |
| 798 | - int dsleepStr = sobje.get(0)[2] == null || sobje.get(0)[2].equals("") ? 60 : Integer.valueOf(sobje.get(0)[2].toString()); | ||
| 799 | - sleepStr = "\t" + String.valueOf(dsleepStr); | 820 | + double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString()); |
| 821 | + sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr); | ||
| 800 | }else if(sobje.size()>1){ | 822 | }else if(sobje.size()>1){ |
| 823 | + /** 这里暂时只根据站点名称去匹配所在路段的限速值 ,如果路段名称"至"之前的地名与站点名称等同,就认为站点在路段上。 */ | ||
| 801 | for(int j =0;j<sobje.size();j++) { | 824 | for(int j =0;j<sobje.size();j++) { |
| 802 | - double dsleepStrt = sobje.get(j)[2] == null || sobje.get(j)[2].equals("") ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | ||
| 803 | - String pointsStr = sobje.get(j)[1]==null || sobje.get(j)[1].equals("") ? null : sobje.get(j)[1].toString(); | ||
| 804 | - pointsStr = pointsStr.substring(11, pointsStr.length()-1); | ||
| 805 | - List<Point> ps = new ArrayList<>(); | ||
| 806 | - String[] pArray = pointsStr.split(","); | ||
| 807 | - for(int a = 0; a <pArray.length; a++) { | ||
| 808 | - String[] tmepA = pArray[a].split(" "); | ||
| 809 | - Point temp = new Point(Double.valueOf(tmepA[0]), Double.valueOf(tmepA[1])); | ||
| 810 | - ps.add(temp); | ||
| 811 | - } | ||
| 812 | - if(GeoUtils.isInSection(ps, point)) { | ||
| 813 | - sleepStr = "\t" + String.valueOf((int)dsleepStrt); | ||
| 814 | - break; | 825 | + String sectionName = sobje.get(j)[3].toString(); |
| 826 | + String sectionNameA[] = sectionName.split("至"); | ||
| 827 | + if(stationName.equals(sectionNameA[0])){ | ||
| 828 | + /*sleepStr = sobje.get(j)[2].toString();*/ | ||
| 829 | + double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | ||
| 830 | + sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt); | ||
| 815 | } | 831 | } |
| 816 | } | 832 | } |
| 817 | } | 833 | } |
| 818 | - if(sleepStr.equals("")) | ||
| 819 | - sleepStr = "\t" + "60"; | ||
| 820 | xh++; | 834 | xh++; |
| 821 | restStr = restStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr; | 835 | restStr = restStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr; |
| 822 | } | 836 | } |
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| @@ -316,6 +316,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -316,6 +316,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 316 | // 取昨天 的日期 | 316 | // 取昨天 的日期 |
| 317 | String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); | 317 | String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); |
| 318 | StringBuffer sf = new StringBuffer(); | 318 | StringBuffer sf = new StringBuffer(); |
| 319 | + String str; | ||
| 319 | try { | 320 | try { |
| 320 | int counter = 0; // 计数器 | 321 | int counter = 0; // 计数器 |
| 321 | int per = 10; // 每几条线路上传一次路单 | 322 | int per = 10; // 每几条线路上传一次路单 |
| @@ -400,26 +401,28 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -400,26 +401,28 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 400 | if(counter % per == per - 1){ | 401 | if(counter % per == per - 1){ |
| 401 | counter = 0; | 402 | counter = 0; |
| 402 | sf.append("</DLDS>"); | 403 | sf.append("</DLDS>"); |
| 403 | - Results results = ssop.setLD(userNameOther, passwordOther, sf.toString()); | 404 | + str = sf.toString().replace("'","");// 去掉'号 |
| 405 | + Results results = ssop.setLD(userNameOther, passwordOther, str); | ||
| 404 | if(results.isSuccess()){ | 406 | if(results.isSuccess()){ |
| 405 | result = "success"; | 407 | result = "success"; |
| 406 | }else{ | 408 | }else{ |
| 407 | result = "failure"; | 409 | result = "failure"; |
| 408 | } | 410 | } |
| 409 | - logger.info("setLD:"+sf.toString()); | 411 | + logger.info("setLD:"+str); |
| 410 | logger.info("setLD:"+result); | 412 | logger.info("setLD:"+result); |
| 411 | } | 413 | } |
| 412 | } | 414 | } |
| 413 | // 每per条线路上传后剩下的数据再上传 | 415 | // 每per条线路上传后剩下的数据再上传 |
| 414 | if(counter > 0){ | 416 | if(counter > 0){ |
| 415 | sf.append("</DLDS>"); | 417 | sf.append("</DLDS>"); |
| 416 | - Results results = ssop.setLD(userNameOther, passwordOther, sf.toString()); | 418 | + str = sf.toString().replace("'","");// 去掉'号 |
| 419 | + Results results = ssop.setLD(userNameOther, passwordOther, str); | ||
| 417 | if(results.isSuccess()){ | 420 | if(results.isSuccess()){ |
| 418 | result = "success"; | 421 | result = "success"; |
| 419 | }else{ | 422 | }else{ |
| 420 | result = "failure"; | 423 | result = "failure"; |
| 421 | } | 424 | } |
| 422 | - logger.info("setLD:"+sf.toString()); | 425 | + logger.info("setLD:"+str); |
| 423 | logger.info("setLD:"+result); | 426 | logger.info("setLD:"+result); |
| 424 | } | 427 | } |
| 425 | } catch (Exception e) { | 428 | } catch (Exception e) { |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -105,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -105,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 105 | List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px); | 105 | List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px); |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | - List<SchEditInfoDto> correctForm(String line,String date,String lpName,String code, String type); | 108 | + List<SchEditInfoDto> correctForm(String line,String date,String endDate,String lpName,String code, String type); |
| 109 | 109 | ||
| 110 | List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line); | 110 | List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line); |
| 111 | 111 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1964,7 +1964,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1964,7 +1964,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1964 | }*/ | 1964 | }*/ |
| 1965 | 1965 | ||
| 1966 | @Override | 1966 | @Override |
| 1967 | - public List<SchEditInfoDto> correctForm(String line,String date, | 1967 | + public List<SchEditInfoDto> correctForm(String line,String date,String endDate, |
| 1968 | String lpName,String code, String type) { | 1968 | String lpName,String code, String type) { |
| 1969 | 1969 | ||
| 1970 | // var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', | 1970 | // var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', |
| @@ -1990,17 +1990,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1990,17 +1990,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1990 | String sql = "select t1.*, " | 1990 | String sql = "select t1.*, " |
| 1991 | + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name," | 1991 | + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name," |
| 1992 | + "t2.xl_dir,t2.real_exec_date from (select * from " | 1992 | + "t2.xl_dir,t2.real_exec_date from (select * from " |
| 1993 | - + "logger_sch_modify where rq=? and line_code=? )" | 1993 | + + "logger_sch_modify where rq BETWEEN ? and ? and line_code=? )" |
| 1994 | + " t1 INNER JOIN bsth_c_s_sp_info_real t2 on " | 1994 | + " t1 INNER JOIN bsth_c_s_sp_info_real t2 on " |
| 1995 | + "t1.sch_id=t2.id where 1=1 " + cont; | 1995 | + "t1.sch_id=t2.id where 1=1 " + cont; |
| 1996 | 1996 | ||
| 1997 | List<SchEditInfoDto> list = jdbcTemplate.query(sql, | 1997 | List<SchEditInfoDto> list = jdbcTemplate.query(sql, |
| 1998 | - new BeanPropertyRowMapper(SchEditInfoDto.class),date, line); | 1998 | + new BeanPropertyRowMapper(SchEditInfoDto.class),date,endDate, line); |
| 1999 | List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>(); | 1999 | List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>(); |
| 2000 | for (int i = 0; i < list.size(); i++) { | 2000 | for (int i = 0; i < list.size(); i++) { |
| 2001 | SchEditInfoDto t=list.get(i); | 2001 | SchEditInfoDto t=list.get(i); |
| 2002 | if(map.get(t.getType())!=null){ | 2002 | if(map.get(t.getType())!=null){ |
| 2003 | - t.setType2(t.getTimeStr()+":"+map.get(t.getType()).toString()); | 2003 | + t.setType2(t.getUser()+"于"+t.getTimeStr()+"进行"+map.get(t.getType()).toString()+";"); |
| 2004 | }else{ | 2004 | }else{ |
| 2005 | t.setType2(""); | 2005 | t.setType2(""); |
| 2006 | } | 2006 | } |
| @@ -2012,6 +2012,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2012,6 +2012,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2012 | fage=false; | 2012 | fage=false; |
| 2013 | } | 2013 | } |
| 2014 | } | 2014 | } |
| 2015 | + | ||
| 2015 | if(fage){ | 2016 | if(fage){ |
| 2016 | lists.add(t); | 2017 | lists.add(t); |
| 2017 | } | 2018 | } |
| @@ -2029,6 +2030,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2029,6 +2030,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2029 | for (SchEditInfoDto d : lists) { | 2030 | for (SchEditInfoDto d : lists) { |
| 2030 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 2031 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 2031 | tempMap.put("lpName", d.getLpName()); | 2032 | tempMap.put("lpName", d.getLpName()); |
| 2033 | + tempMap.put("rq", d.getRq()); | ||
| 2032 | tempMap.put("clZbh", d.getClZbh()); | 2034 | tempMap.put("clZbh", d.getClZbh()); |
| 2033 | tempMap.put("jName", d.getjName()+"/"+d.getjGh()); | 2035 | tempMap.put("jName", d.getjName()+"/"+d.getjGh()); |
| 2034 | tempMap.put("fcsj", d.getFcsj()); | 2036 | tempMap.put("fcsj", d.getFcsj()); |
src/main/java/com/bsth/service/report/SheetService.java
| @@ -10,6 +10,7 @@ public interface SheetService extends BaseService<Sheet, Integer>{ | @@ -10,6 +10,7 @@ public interface SheetService extends BaseService<Sheet, Integer>{ | ||
| 10 | public List<Map<String, Object>> bcPunctual(Map<String, Object> map); | 10 | public List<Map<String, Object>> bcPunctual(Map<String, Object> map); |
| 11 | public String saveSheetList(String date) throws Exception; | 11 | public String saveSheetList(String date) throws Exception; |
| 12 | public List<Map<String, Object>> countList(Map<String, Object> map); | 12 | public List<Map<String, Object>> countList(Map<String, Object> map); |
| 13 | - | 13 | + public List<Map<String, Object>> listSheet(Map<String, Object> map); |
| 14 | public List<Sheet> sheetList(Integer id); | 14 | public List<Sheet> sheetList(Integer id); |
| 15 | + public List<Sheet> exportList(Integer id); | ||
| 15 | } | 16 | } |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -157,7 +157,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -157,7 +157,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 157 | if(scheduleRealInfo.getStatus() == -1){ | 157 | if(scheduleRealInfo.getStatus() == -1){ |
| 158 | lbbc++; | 158 | lbbc++; |
| 159 | } | 159 | } |
| 160 | - }else{ | 160 | + } |
| 161 | + /*else{ | ||
| 161 | if(scheduleRealInfo.getStatus() == -1){ | 162 | if(scheduleRealInfo.getStatus() == -1){ |
| 162 | boolean fage=true; | 163 | boolean fage=true; |
| 163 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 164 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| @@ -174,7 +175,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -174,7 +175,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 174 | lbbc++; | 175 | lbbc++; |
| 175 | } | 176 | } |
| 176 | } | 177 | } |
| 177 | - } | 178 | + }*/ |
| 178 | } | 179 | } |
| 179 | } | 180 | } |
| 180 | return lbbc; | 181 | return lbbc; |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -156,7 +156,9 @@ public class ReportServiceImpl implements ReportService{ | @@ -156,7 +156,9 @@ public class ReportServiceImpl implements ReportService{ | ||
| 156 | while(rs.next()){ | 156 | while(rs.next()){ |
| 157 | arr = new ArrivalInfo(); | 157 | arr = new ArrivalInfo(); |
| 158 | arr.setDeviceId(rs.getString("device_id")); | 158 | arr.setDeviceId(rs.getString("device_id")); |
| 159 | - arr.setNbbm(BasicData.deviceId2NbbmMap.get(arr.getDeviceId())); | 159 | + String nbbm=BasicData.deviceId2NbbmMap.get(arr.getDeviceId()); |
| 160 | + arr.setNbbm(nbbm); | ||
| 161 | + arr.setPzh(BasicData.nbbmCompanyPlateMap.get(nbbm)); | ||
| 160 | if(null == arr.getNbbm()){ | 162 | if(null == arr.getNbbm()){ |
| 161 | logger.warn("未注册的设备号," + arr.getDeviceId()); | 163 | logger.warn("未注册的设备号," + arr.getDeviceId()); |
| 162 | continue; | 164 | continue; |
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java
| 1 | package com.bsth.service.report.impl; | 1 | package com.bsth.service.report.impl; |
| 2 | 2 | ||
| 3 | +import java.lang.reflect.InvocationTargetException; | ||
| 3 | import java.sql.ResultSet; | 4 | import java.sql.ResultSet; |
| 4 | import java.sql.SQLException; | 5 | import java.sql.SQLException; |
| 5 | import java.text.DecimalFormat; | 6 | import java.text.DecimalFormat; |
| @@ -42,6 +43,7 @@ import com.bsth.service.report.SheetService; | @@ -42,6 +43,7 @@ import com.bsth.service.report.SheetService; | ||
| 42 | import com.bsth.util.BatchSaveUtils; | 43 | import com.bsth.util.BatchSaveUtils; |
| 43 | import com.bsth.util.ComparableChild; | 44 | import com.bsth.util.ComparableChild; |
| 44 | import com.bsth.util.ComparableReal; | 45 | import com.bsth.util.ComparableReal; |
| 46 | +import com.bsth.util.ReportRelatedUtils; | ||
| 45 | import com.google.common.util.concurrent.AbstractScheduledService.Scheduler; | 47 | import com.google.common.util.concurrent.AbstractScheduledService.Scheduler; |
| 46 | 48 | ||
| 47 | @Service | 49 | @Service |
| @@ -658,7 +660,8 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -658,7 +660,8 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 658 | fgs=map.get("fgs").toString(); | 660 | fgs=map.get("fgs").toString(); |
| 659 | } | 661 | } |
| 660 | String date=map.get("date").toString(); | 662 | String date=map.get("date").toString(); |
| 661 | - String sql="select * from bsth_c_sheet where date='"+date+"'"; | 663 | + String endDate=map.get("endDate").toString(); |
| 664 | + String sql="select * from bsth_c_sheet where date BETWEEN '"+date+"' and '"+endDate+"'"; | ||
| 662 | if(line.trim().equals("")){ | 665 | if(line.trim().equals("")){ |
| 663 | sql +=" and gs like '%"+gs+"%' and fgs like '%"+fgs+"%'"; | 666 | sql +=" and gs like '%"+gs+"%' and fgs like '%"+fgs+"%'"; |
| 664 | }else{ | 667 | }else{ |
| @@ -721,6 +724,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -721,6 +724,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 721 | String gs=BasicData.businessCodeNameMap.get(list.get(0).getGs()); | 724 | String gs=BasicData.businessCodeNameMap.get(list.get(0).getGs()); |
| 722 | String fgs=BasicData.businessFgsCodeNameMap.get(list.get(0).getFgs()+"_"+list.get(0).getGs()); | 725 | String fgs=BasicData.businessFgsCodeNameMap.get(list.get(0).getFgs()+"_"+list.get(0).getGs()); |
| 723 | String line=BasicData.lineCode2NameMap.get(list.get(0).getLine()); | 726 | String line=BasicData.lineCode2NameMap.get(list.get(0).getLine()); |
| 727 | + String date=list.get(0).getDate(); | ||
| 724 | Integer id=list.get(0).getId(); | 728 | Integer id=list.get(0).getId(); |
| 725 | int bcs=list.size(); | 729 | int bcs=list.size(); |
| 726 | int zdbcs=0; | 730 | int zdbcs=0; |
| @@ -740,6 +744,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -740,6 +744,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 740 | map.put("zdbcs", zdbcs); | 744 | map.put("zdbcs", zdbcs); |
| 741 | map.put("zdlv", df.format(zdlv)+"%"); | 745 | map.put("zdlv", df.format(zdlv)+"%"); |
| 742 | map.put("id", id); | 746 | map.put("id", id); |
| 747 | + map.put("date", date); | ||
| 743 | return map; | 748 | return map; |
| 744 | } | 749 | } |
| 745 | @Override | 750 | @Override |
| @@ -781,6 +786,128 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -781,6 +786,128 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 781 | return list; | 786 | return list; |
| 782 | } | 787 | } |
| 783 | 788 | ||
| 789 | + @Override | ||
| 790 | + public List<Sheet> exportList(Integer id) { | ||
| 791 | + // TODO Auto-generated method stub | ||
| 792 | + ReportRelatedUtils rru = new ReportRelatedUtils(); | ||
| 793 | + Sheet sheet=sheetRepository.findOne(id); | ||
| 794 | + String sql="select * from bsth_c_sheet where date='"+sheet.getDate()+"' and line = '"+sheet.getLine()+"'" | ||
| 795 | + + " order by xl_dir,jhsj"; | ||
| 796 | + | ||
| 797 | + List<Sheet> list=jdbcTemplate.query(sql, | ||
| 798 | + new RowMapper<Sheet>(){ | ||
| 799 | + @Override | ||
| 800 | + public Sheet mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 801 | + Sheet s=new Sheet(); | ||
| 802 | + s.setId(rs.getInt("id")); | ||
| 803 | + s.setGs(rs.getString("gs")); | ||
| 804 | + s.setFgs(rs.getString("fgs")); | ||
| 805 | + s.setLine(rs.getString("line")); | ||
| 806 | + s.setDate(rs.getString("date")); | ||
| 807 | + s.setJhsj(rs.getString("jhsj")); | ||
| 808 | + s.setJhsjt(rs.getLong("jhsjt")); | ||
| 809 | + s.setSjsj(rs.getString("sjsj")); | ||
| 810 | + s.setSjsjt(rs.getLong("sjsjt")); | ||
| 811 | + s.setZdname(rs.getString("zdname")); | ||
| 812 | + return s; | ||
| 813 | + } | ||
| 814 | + }); | ||
| 815 | + | ||
| 816 | + List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>(); | ||
| 817 | + for (int i = 0; i < list.size(); i++) { | ||
| 818 | + Sheet t=list.get(i); | ||
| 819 | + t.setLine(BasicData.lineCode2NameMap.get(t.getLine())); | ||
| 820 | + Long sjc=t.getJhsjt()-t.getSjsjt(); | ||
| 821 | + if(sjc>= 3*60*1000*-1 && sjc <=1*60*1000){ | ||
| 822 | + t.setSfzd("准点"); | ||
| 823 | + }else{ | ||
| 824 | + t.setSfzd("不准点"); | ||
| 825 | + } | ||
| 826 | + | ||
| 827 | + try { | ||
| 828 | + Map<String, Object> map = rru.getMapValue(t); | ||
| 829 | + listMap.add(map); | ||
| 830 | + } catch (ClassNotFoundException e) { | ||
| 831 | + // TODO Auto-generated catch block | ||
| 832 | + e.printStackTrace(); | ||
| 833 | + } catch (IllegalAccessException e) { | ||
| 834 | + // TODO Auto-generated catch block | ||
| 835 | + e.printStackTrace(); | ||
| 836 | + } catch (InvocationTargetException e) { | ||
| 837 | + // TODO Auto-generated catch block | ||
| 838 | + e.printStackTrace(); | ||
| 839 | + } catch (NoSuchMethodException e) { | ||
| 840 | + // TODO Auto-generated catch block | ||
| 841 | + e.printStackTrace(); | ||
| 842 | + } catch (NoSuchFieldException e) { | ||
| 843 | + // TODO Auto-generated catch block | ||
| 844 | + e.printStackTrace(); | ||
| 845 | + } | ||
| 846 | + | ||
| 847 | + } | ||
| 848 | + | ||
| 849 | + return list; | ||
| 850 | + } | ||
| 851 | + @Override | ||
| 852 | + public List<Map<String, Object>> listSheet(Map<String, Object> map) { | ||
| 853 | + // TODO Auto-generated method stub | ||
| 854 | + List<Map<String, Object>> listmap=new ArrayList<Map<String,Object>>(); | ||
| 855 | + Integer id=Integer.parseInt(map.get("id").toString()); | ||
| 856 | + Sheet sheet=sheetRepository.findOne(id); | ||
| 857 | + String date=map.get("date").toString(); | ||
| 858 | + String endDate=map.get("endDate").toString(); | ||
| 859 | + | ||
| 860 | + String sqlByDate="select date from bsth_c_sheet where date BETWEEN '"+date+"' and '"+endDate+"'" | ||
| 861 | + + "and line = '"+sheet.getLine()+"' group by date order by date"; | ||
| 862 | + | ||
| 863 | + List<String> dateList=jdbcTemplate.query(sqlByDate, | ||
| 864 | + new RowMapper<String>(){ | ||
| 865 | + @Override | ||
| 866 | + public String mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 867 | + String date=rs.getString("date"); | ||
| 868 | + | ||
| 869 | + return date; | ||
| 870 | + } | ||
| 871 | + }); | ||
| 872 | + | ||
| 873 | + String sql="select * from bsth_c_sheet where date BETWEEN '"+date+"' and '"+endDate+"'" | ||
| 874 | + + " and line ='"+sheet.getLine()+"' order by date"; | ||
| 875 | + | ||
| 876 | + List<Sheet> list=jdbcTemplate.query(sql, | ||
| 877 | + new RowMapper<Sheet>(){ | ||
| 878 | + @Override | ||
| 879 | + public Sheet mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 880 | + Sheet s=new Sheet(); | ||
| 881 | + s.setGs(rs.getString("gs")); | ||
| 882 | + s.setFgs(rs.getString("fgs")); | ||
| 883 | + s.setLine(rs.getString("line")); | ||
| 884 | + s.setDate(rs.getString("date")); | ||
| 885 | + s.setJhsj(rs.getString("jhsj")); | ||
| 886 | + s.setJhsjt(rs.getLong("jhsjt")); | ||
| 887 | + s.setSjsj(rs.getString("sjsj")); | ||
| 888 | + s.setSjsjt(rs.getLong("sjsjt")); | ||
| 889 | + s.setId(rs.getInt("id")); | ||
| 890 | + return s; | ||
| 891 | + } | ||
| 892 | + }); | ||
| 893 | + for (int i = 0; i < dateList.size(); i++) { | ||
| 894 | + String s=dateList.get(i); | ||
| 895 | + List<Sheet> newList=new ArrayList<Sheet>(); | ||
| 896 | + for (int j = 0; j < list.size(); j++) { | ||
| 897 | + Sheet t=list.get(j); | ||
| 898 | + if(t.getDate().equals(s)){ | ||
| 899 | + newList.add(t); | ||
| 900 | + } | ||
| 901 | + } | ||
| 902 | + | ||
| 903 | + if(newList.size()>0){ | ||
| 904 | + Map<String, Object> newmap=culateByLine(newList); | ||
| 905 | + listmap.add(newmap); | ||
| 906 | + } | ||
| 907 | + } | ||
| 908 | + return listmap; | ||
| 909 | + } | ||
| 910 | + | ||
| 784 | 911 | ||
| 785 | } | 912 | } |
| 786 | class ComparableAcual implements Comparator<ScheduleRealInfo>{ | 913 | class ComparableAcual implements Comparator<ScheduleRealInfo>{ |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| 1 | package com.bsth.service.schedule.impl; | 1 | package com.bsth.service.schedule.impl; |
| 2 | 2 | ||
| 3 | import java.math.BigDecimal; | 3 | import java.math.BigDecimal; |
| 4 | -import java.net.URLEncoder; | ||
| 5 | import java.sql.ResultSet; | 4 | import java.sql.ResultSet; |
| 6 | import java.sql.SQLException; | 5 | import java.sql.SQLException; |
| 7 | import java.text.DecimalFormat; | 6 | import java.text.DecimalFormat; |
| @@ -140,6 +139,26 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -140,6 +139,26 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 140 | return list; | 139 | return list; |
| 141 | } | 140 | } |
| 142 | 141 | ||
| 142 | + public Set<String> getNotOperation(){ | ||
| 143 | + Set<String> lineSet = new HashSet<String>(); | ||
| 144 | + try { | ||
| 145 | + String sql = "select name from bsth_c_line where sfyy = 0"; | ||
| 146 | + List<String> lineList = new ArrayList<>(); | ||
| 147 | + lineList = jdbcTemplate.query(sql, | ||
| 148 | + new RowMapper<String>(){ | ||
| 149 | + @Override | ||
| 150 | + public String mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 151 | + return rs.getString("name"); | ||
| 152 | + } | ||
| 153 | + }); | ||
| 154 | + lineSet.addAll(lineList); | ||
| 155 | + } catch (Exception e) { | ||
| 156 | + // TODO: handle exception | ||
| 157 | + e.printStackTrace(); | ||
| 158 | + } | ||
| 159 | + return lineSet; | ||
| 160 | + } | ||
| 161 | + | ||
| 143 | @Override | 162 | @Override |
| 144 | public List<Map<String, Object>> queryPeopleCar(Map<String, Object> map) { | 163 | public List<Map<String, Object>> queryPeopleCar(Map<String, Object> map) { |
| 145 | Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); | 164 | Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); |
| @@ -288,6 +307,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -288,6 +307,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 288 | @Override | 307 | @Override |
| 289 | public List<Map<String, Object>> workDaily(Map<String, Object> map) { | 308 | public List<Map<String, Object>> workDaily(Map<String, Object> map) { |
| 290 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 309 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 310 | + Set<String> lineSet = getNotOperation(); | ||
| 291 | DecimalFormat df = new DecimalFormat("###0.##"); | 311 | DecimalFormat df = new DecimalFormat("###0.##"); |
| 292 | 312 | ||
| 293 | String company = map.get("company").toString(); | 313 | String company = map.get("company").toString(); |
| @@ -305,7 +325,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -305,7 +325,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 305 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 325 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 306 | for(ScheduleRealInfo schedule : list){ | 326 | for(ScheduleRealInfo schedule : list){ |
| 307 | String key = schedule.getXlName(); | 327 | String key = schedule.getXlName(); |
| 308 | - if(key == null || key.trim().equals("")) | 328 | + if(key == null || key.trim().equals("") || lineSet.contains(key)) |
| 309 | continue; | 329 | continue; |
| 310 | if(!keyMap.containsKey(key)){ | 330 | if(!keyMap.containsKey(key)){ |
| 311 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | 331 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| @@ -457,8 +477,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -457,8 +477,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 457 | tempMap.put("line", key); | 477 | tempMap.put("line", key); |
| 458 | tempMap.put("jhbc", jhbc); | 478 | tempMap.put("jhbc", jhbc); |
| 459 | tempMap.put("dftz", dftz); | 479 | tempMap.put("dftz", dftz); |
| 460 | - tempMap.put("dftzl", df.format(((float)dftz/jhbc)*100) + "%"); | ||
| 461 | - tempMap.put("ccl", df.format(((float)sjcc/jhcc)*100) + "%"); | 480 | + tempMap.put("dftzl", jhbc==0?"0%":(df.format(((float)dftz/jhbc)*100) + "%")); |
| 481 | + tempMap.put("ccl", jhcc==0?"100%":(df.format(((float)sjcc/jhcc)*100) + "%")); | ||
| 462 | tempMap.put("upfk", upfk); | 482 | tempMap.put("upfk", upfk); |
| 463 | tempMap.put("updk", updk); | 483 | tempMap.put("updk", updk); |
| 464 | tempMap.put("dnfk", dnfk); | 484 | tempMap.put("dnfk", dnfk); |
| @@ -1197,6 +1217,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1197,6 +1217,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1197 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 1217 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1198 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 1218 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1199 | 1219 | ||
| 1220 | + Set<String> lineSet = getNotOperation(); | ||
| 1221 | + | ||
| 1200 | String company = map.get("company").toString(); | 1222 | String company = map.get("company").toString(); |
| 1201 | String subCompany = map.get("subCompany").toString(); | 1223 | String subCompany = map.get("subCompany").toString(); |
| 1202 | String line = map.get("line").toString(); | 1224 | String line = map.get("line").toString(); |
| @@ -1210,10 +1232,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1210,10 +1232,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1210 | String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," | 1232 | String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," |
| 1211 | + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" | 1233 | + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" |
| 1212 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'" | 1234 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'" |
| 1213 | - + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | ||
| 1214 | - if(line.length() != 0) | 1235 | + + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| 1236 | + if(line.trim().length() != 0) | ||
| 1215 | sql += " and xl_bm = '"+line+"'"; | 1237 | sql += " and xl_bm = '"+line+"'"; |
| 1216 | - if(company.length() != 0) | 1238 | + else if(company.length() != 0) |
| 1217 | sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | 1239 | sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; |
| 1218 | 1240 | ||
| 1219 | list = jdbcTemplate.query(sql, | 1241 | list = jdbcTemplate.query(sql, |
| @@ -1275,6 +1297,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1275,6 +1297,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1275 | String companyName = "", subCompanyName = ""; | 1297 | String companyName = "", subCompanyName = ""; |
| 1276 | 1298 | ||
| 1277 | for(ScheduleRealInfo s : list){ | 1299 | for(ScheduleRealInfo s : list){ |
| 1300 | + if(lineSet.contains(s.getXlName())){ | ||
| 1301 | + continue; | ||
| 1302 | + } | ||
| 1278 | String xlName = s.getXlName(); | 1303 | String xlName = s.getXlName(); |
| 1279 | if(!keyMap.containsKey(xlName)) | 1304 | if(!keyMap.containsKey(xlName)) |
| 1280 | keyMap.put(xlName, new ArrayList<ScheduleRealInfo>()); | 1305 | keyMap.put(xlName, new ArrayList<ScheduleRealInfo>()); |
| @@ -1398,6 +1423,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1398,6 +1423,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1398 | nf.setMinimumFractionDigits(2); | 1423 | nf.setMinimumFractionDigits(2); |
| 1399 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 1424 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1400 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 1425 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1426 | + | ||
| 1427 | + Set<String> lineSet = getNotOperation(); | ||
| 1401 | 1428 | ||
| 1402 | String company = map.get("company").toString(); | 1429 | String company = map.get("company").toString(); |
| 1403 | String subCompany = map.get("subCompany").toString(); | 1430 | String subCompany = map.get("subCompany").toString(); |
| @@ -1427,7 +1454,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1427,7 +1454,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1427 | String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," | 1454 | String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," |
| 1428 | + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" | 1455 | + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" |
| 1429 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'" | 1456 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'" |
| 1430 | - + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | 1457 | + + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| 1431 | if(line.length() != 0) | 1458 | if(line.length() != 0) |
| 1432 | sql += " and xl_bm = '"+line+"'"; | 1459 | sql += " and xl_bm = '"+line+"'"; |
| 1433 | if(company.length() != 0) | 1460 | if(company.length() != 0) |
| @@ -1492,6 +1519,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1492,6 +1519,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1492 | String companyName = "", subCompanyName = ""; | 1519 | String companyName = "", subCompanyName = ""; |
| 1493 | 1520 | ||
| 1494 | for(ScheduleRealInfo s : list){ | 1521 | for(ScheduleRealInfo s : list){ |
| 1522 | + if(lineSet.contains(s.getXlName())){ | ||
| 1523 | + continue; | ||
| 1524 | + } | ||
| 1495 | String xlName = s.getXlName(); | 1525 | String xlName = s.getXlName(); |
| 1496 | String date = s.getScheduleDateStr(); | 1526 | String date = s.getScheduleDateStr(); |
| 1497 | if(!keyMap.containsKey(xlName)) | 1527 | if(!keyMap.containsKey(xlName)) |
src/main/java/com/bsth/service/traffic/YgcBasicDataService.java
| 1 | -package com.bsth.service.traffic; | ||
| 2 | - | ||
| 3 | -/** | ||
| 4 | - * 运管处基础数据操作接口类 | ||
| 5 | - * Created by zlz on 2017/6/16. | ||
| 6 | - */ | ||
| 7 | -public interface YgcBasicDataService { | ||
| 8 | - /** | ||
| 9 | - * 更新运管处基础数据 | ||
| 10 | - */ | ||
| 11 | - void updateYgcBasicData(); | ||
| 12 | -} | ||
| 13 | - | 1 | +package com.bsth.service.traffic; |
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 运管处基础数据操作接口类 | ||
| 5 | + * Created by zlz on 2017/6/16. | ||
| 6 | + */ | ||
| 7 | +public interface YgcBasicDataService { | ||
| 8 | + /** | ||
| 9 | + * 更新运管处基础数据 | ||
| 10 | + */ | ||
| 11 | + void updateYgcBasicData(); | ||
| 12 | +} | ||
| 13 | + |
src/main/java/com/bsth/service/traffic/impl/YgcBasicDataServiceImpl.java
| 1 | -package com.bsth.service.traffic.impl; | ||
| 2 | - | ||
| 3 | -import com.bsth.service.impl.TrafficManageServiceImpl; | ||
| 4 | -import com.bsth.service.traffic.YgcBasicDataService; | ||
| 5 | -import com.bsth.util.db.DBUtils_oldSystem; | ||
| 6 | -import org.apache.axiom.om.*; | ||
| 7 | -import org.apache.axis2.addressing.EndpointReference; | ||
| 8 | -import org.apache.axis2.client.Options; | ||
| 9 | -import org.apache.axis2.client.ServiceClient; | ||
| 10 | -import org.apache.commons.codec.digest.DigestUtils; | ||
| 11 | -import org.slf4j.Logger; | ||
| 12 | -import org.slf4j.LoggerFactory; | ||
| 13 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | -import org.springframework.jdbc.core.BatchPreparedStatementSetter; | ||
| 15 | -import org.springframework.jdbc.core.JdbcTemplate; | ||
| 16 | -import org.springframework.stereotype.Service; | ||
| 17 | -import org.w3c.dom.Document; | ||
| 18 | -import org.w3c.dom.NodeList; | ||
| 19 | - | ||
| 20 | -import javax.activation.DataHandler; | ||
| 21 | -import javax.xml.parsers.DocumentBuilder; | ||
| 22 | -import javax.xml.parsers.DocumentBuilderFactory; | ||
| 23 | -import java.io.*; | ||
| 24 | -import java.sql.PreparedStatement; | ||
| 25 | -import java.sql.SQLException; | ||
| 26 | -import java.util.ArrayList; | ||
| 27 | -import java.util.HashMap; | ||
| 28 | -import java.util.List; | ||
| 29 | -import java.util.zip.ZipEntry; | ||
| 30 | -import java.util.zip.ZipFile; | ||
| 31 | -import java.util.zip.ZipInputStream; | ||
| 32 | - | ||
| 33 | -/** | ||
| 34 | - * 运管处基础数据操作类 | ||
| 35 | - * Created by zq on 2017/6/15. | ||
| 36 | - */ | ||
| 37 | -@Service | ||
| 38 | -public class YgcBasicDataServiceImpl implements YgcBasicDataService{ | ||
| 39 | - Logger logger = LoggerFactory.getLogger(TrafficManageServiceImpl.class); | ||
| 40 | - | ||
| 41 | - @Autowired | ||
| 42 | - JdbcTemplate jdbcTemplate; | ||
| 43 | - | ||
| 44 | - private static String IP = "218.242.195.76:9091"; | ||
| 45 | - private static String targetEndpoint = "http://" + IP +"/ygc.TransManager.Basicdown?wsdl"; | ||
| 46 | - private static String namespace = "http://service.shygc.com"; | ||
| 47 | - private static String userName = "admin"; | ||
| 48 | - private static String passWord = "000000"; | ||
| 49 | - private static EndpointReference targetEPR; | ||
| 50 | - { | ||
| 51 | - try { | ||
| 52 | - targetEPR = new EndpointReference(targetEndpoint); | ||
| 53 | - } catch (Exception e) { | ||
| 54 | - e.printStackTrace(); | ||
| 55 | - } | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - /** | ||
| 59 | - * 更新运管处基础数据 | ||
| 60 | - */ | ||
| 61 | - public void updateYgcBasicData(){ | ||
| 62 | - String saveFile = "ygcBasicData.zip"; | ||
| 63 | - String flag = "failure"; | ||
| 64 | - try { | ||
| 65 | - // 调用接口下载基础数据 | ||
| 66 | - if(download(userName, DigestUtils.md5Hex(passWord), saveFile)){ | ||
| 67 | - // 读取基础数据zip | ||
| 68 | - StringBuffer sb = readZipFile(saveFile); | ||
| 69 | - // 解析xml | ||
| 70 | - List<HashMap<String,String>> result = parseXml(sb); | ||
| 71 | - // 插入数据库 | ||
| 72 | - if(result != null && result.size() > 0){ | ||
| 73 | - insertRecord(result); | ||
| 74 | - } | ||
| 75 | - } | ||
| 76 | - flag = "success"; | ||
| 77 | - }catch (Exception e){ | ||
| 78 | - e.printStackTrace(); | ||
| 79 | - } | ||
| 80 | - finally { | ||
| 81 | - // 删除文件 | ||
| 82 | - File fill = new File(saveFile); | ||
| 83 | - logger.info("updateYgcBasicData:"+fill.getAbsolutePath()); | ||
| 84 | - logger.info("updateYgcBasicData:"+flag); | ||
| 85 | - if(fill.exists()){ | ||
| 86 | - fill.delete(); | ||
| 87 | - } | ||
| 88 | - } | ||
| 89 | - } | ||
| 90 | - /** | ||
| 91 | - * 下载基础数据,并生成rar文件 | ||
| 92 | - * @param userName | ||
| 93 | - * @param password | ||
| 94 | - * @param saveFile | ||
| 95 | - * @return | ||
| 96 | - */ | ||
| 97 | - private boolean download(String userName, String password, String saveFile) | ||
| 98 | - { | ||
| 99 | - try | ||
| 100 | - { | ||
| 101 | - OMElement data = buildDownloadEnvelope(userName, password); | ||
| 102 | - ServiceClient sender = new ServiceClient(); | ||
| 103 | - Options options = sender.getOptions(); | ||
| 104 | - options.setProperty("SO_TIMEOUT", Integer.valueOf(1800000)); | ||
| 105 | - options.setTo(targetEPR); | ||
| 106 | - sender.setOptions(options); | ||
| 107 | - System.out.println("The data in method download: " + data); | ||
| 108 | - data.build(); | ||
| 109 | - OMElement ome = sender.sendReceive(data); | ||
| 110 | - | ||
| 111 | - OMText binaryNode = (OMText)ome.getFirstOMChild(); | ||
| 112 | - binaryNode.setOptimize(true); | ||
| 113 | - DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); | ||
| 114 | - FileOutputStream imageOutStream = new FileOutputStream(saveFile); | ||
| 115 | - InputStream is = actualDH.getInputStream(); | ||
| 116 | - int read ; | ||
| 117 | - byte[] buffer = new byte[1024]; | ||
| 118 | - while ((read = is.read(buffer)) != -1) { | ||
| 119 | - imageOutStream.write(buffer, 0, read); | ||
| 120 | - } | ||
| 121 | - return true; | ||
| 122 | - } catch (Exception e) { | ||
| 123 | - e.printStackTrace(); | ||
| 124 | - }return false; | ||
| 125 | - } | ||
| 126 | - | ||
| 127 | - /** | ||
| 128 | - * 构建webservice接口参数 | ||
| 129 | - * @param userName | ||
| 130 | - * @param password | ||
| 131 | - * @return | ||
| 132 | - */ | ||
| 133 | - private OMElement buildDownloadEnvelope(String userName, String password) | ||
| 134 | - { | ||
| 135 | - OMFactory fac = OMAbstractFactory.getOMFactory(); | ||
| 136 | - OMNamespace omNs = fac.createOMNamespace(namespace, | ||
| 137 | - "ser"); | ||
| 138 | - OMElement data = fac.createOMElement("downloadAllDataFile", omNs); | ||
| 139 | - OMElement _userName = fac.createOMElement("userName", omNs); | ||
| 140 | - _userName.setText(userName); | ||
| 141 | - OMElement _passWord = fac.createOMElement("passWord", omNs); | ||
| 142 | - _passWord.setText(String.valueOf(password)); | ||
| 143 | - | ||
| 144 | - data.addChild(_userName); | ||
| 145 | - data.addChild(_passWord); | ||
| 146 | - | ||
| 147 | - OMElement soap = fac.createOMElement("downloadAllDataFile", omNs); | ||
| 148 | - soap.addChild(data); | ||
| 149 | - return soap; | ||
| 150 | - } | ||
| 151 | - | ||
| 152 | - /** | ||
| 153 | - * 读取zip文件的内容 | ||
| 154 | - * @param file | ||
| 155 | - * @return | ||
| 156 | - * @throws Exception | ||
| 157 | - */ | ||
| 158 | - public StringBuffer readZipFile(String file) throws Exception { | ||
| 159 | - ZipFile zf = new ZipFile(file); | ||
| 160 | - InputStream in = new BufferedInputStream(new FileInputStream(file)); | ||
| 161 | - ZipInputStream zin = new ZipInputStream(in); | ||
| 162 | - ZipEntry ze; | ||
| 163 | - StringBuffer sb = new StringBuffer(); | ||
| 164 | - while ((ze = zin.getNextEntry()) != null) { | ||
| 165 | - System.out.print(ze); | ||
| 166 | - if (ze.isDirectory()) { | ||
| 167 | - } else { | ||
| 168 | - System.err.println("file - " + ze.getName() + " : " | ||
| 169 | - + ze.getSize() + " bytes"); | ||
| 170 | - long size = ze.getSize(); | ||
| 171 | - if (size > 0) { | ||
| 172 | - BufferedReader br = new BufferedReader( | ||
| 173 | - new InputStreamReader(zf.getInputStream(ze),"GBK")); | ||
| 174 | - String line; | ||
| 175 | - boolean addFlag = false; | ||
| 176 | - while ((line = br.readLine()) != null) { | ||
| 177 | - if(line.indexOf("BusLineList") != -1){ | ||
| 178 | - addFlag = true; | ||
| 179 | - } | ||
| 180 | - if(addFlag){ | ||
| 181 | - sb.append(line); | ||
| 182 | - } | ||
| 183 | - | ||
| 184 | - if(line.indexOf("/BusLineList") != -1){ | ||
| 185 | - break; | ||
| 186 | - } | ||
| 187 | - } | ||
| 188 | - br.close(); | ||
| 189 | - } | ||
| 190 | - } | ||
| 191 | - } | ||
| 192 | - zin.closeEntry(); | ||
| 193 | - return sb; | ||
| 194 | - } | ||
| 195 | - | ||
| 196 | - /** | ||
| 197 | - * 解析xml | ||
| 198 | - * @param sb | ||
| 199 | - */ | ||
| 200 | - private List<HashMap<String,String>> parseXml(StringBuffer sb){ | ||
| 201 | - List<HashMap<String,String>> list = new ArrayList<>(); | ||
| 202 | - HashMap<String,String> map; | ||
| 203 | - try { | ||
| 204 | - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | ||
| 205 | - DocumentBuilder builder = factory.newDocumentBuilder(); | ||
| 206 | - Document doc = builder.parse(new ByteArrayInputStream(sb.toString().getBytes())); | ||
| 207 | - NodeList nl = doc.getElementsByTagName("BusLine"); | ||
| 208 | - String lineName; //线路名称 | ||
| 209 | - String lineId; // 线路ID | ||
| 210 | - String abbreviation ; // 公司名称 | ||
| 211 | - String ddfs ; // 调度方式 | ||
| 212 | - String lineStandardCode; // 上海市线路编码 | ||
| 213 | - String parentUnitName ; // 总公司 | ||
| 214 | - for (int i = 0; i < nl.getLength(); i++) { | ||
| 215 | - parentUnitName = doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild() == null ?"": | ||
| 216 | - doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild().getNodeValue(); | ||
| 217 | - if(parentUnitName.indexOf("浦东") != -1){// 只查找浦东的数据 | ||
| 218 | - lineName = doc.getElementsByTagName("LineName").item(i).getFirstChild() == null ?"": | ||
| 219 | - doc.getElementsByTagName("LineName").item(i).getFirstChild().getNodeValue(); | ||
| 220 | - lineId = doc.getElementsByTagName("LineId").item(i).getFirstChild() == null ?"": | ||
| 221 | - doc.getElementsByTagName("LineId").item(i).getFirstChild().getNodeValue(); | ||
| 222 | - abbreviation = doc.getElementsByTagName("Abbreviation").item(i).getFirstChild() == null ?"": | ||
| 223 | - doc.getElementsByTagName("Abbreviation").item(i).getFirstChild().getNodeValue(); | ||
| 224 | - ddfs = doc.getElementsByTagName("DDFS").item(i).getFirstChild() == null ?"": | ||
| 225 | - doc.getElementsByTagName("DDFS").item(i).getFirstChild().getNodeValue(); | ||
| 226 | - lineStandardCode = doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild() == null ?"": | ||
| 227 | - doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild().getNodeValue(); | ||
| 228 | - map = new HashMap<>(); | ||
| 229 | - map.put("lineName",lineName); | ||
| 230 | - map.put("lineId",lineId); | ||
| 231 | - map.put("abbreviation",abbreviation); | ||
| 232 | - map.put("ddfs",ddfs); | ||
| 233 | - map.put("lineStandardCode",lineStandardCode); | ||
| 234 | - list.add(map); | ||
| 235 | - } | ||
| 236 | - } | ||
| 237 | - }catch (Exception e){ | ||
| 238 | - e.printStackTrace();; | ||
| 239 | - } | ||
| 240 | - return list; | ||
| 241 | - } | ||
| 242 | - | ||
| 243 | - /** | ||
| 244 | - * 批量插入用法 | ||
| 245 | - * @param list | ||
| 246 | - */ | ||
| 247 | - public boolean insertRecord(List<HashMap<String,String>> list) | ||
| 248 | - { | ||
| 249 | - boolean flag = false; | ||
| 250 | - final List<HashMap<String,String>> tempList=list; | ||
| 251 | - String sql="INSERT INTO JJWGPS_T_SHSXLFILE(XLID,SHSXLBM,XLMC,GSMC,DDFS,CREATETIME,XLMC_ALL) VALUES (?,?,?,?,?,SYSDATE,?)"; | ||
| 252 | - jdbcTemplate = new JdbcTemplate(DBUtils_oldSystem.getDataSource()); | ||
| 253 | - jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() | ||
| 254 | - { | ||
| 255 | - public void setValues(PreparedStatement ps, int i)throws SQLException | ||
| 256 | - { | ||
| 257 | - String lineId =tempList.get(i).get("lineId"); | ||
| 258 | - String lineStandardCode =tempList.get(i).get("lineStandardCode"); | ||
| 259 | - String lineName =tempList.get(i).get("lineName"); | ||
| 260 | - String abbreviation =tempList.get(i).get("abbreviation"); | ||
| 261 | - String ddfs =tempList.get(i).get("ddfs"); | ||
| 262 | - String lineNameAll = lineName; | ||
| 263 | - if(ddfs.equals("2")){ | ||
| 264 | - lineNameAll = lineName+"区间(走向部分在全程线路之外)"; | ||
| 265 | - }else if(ddfs.equals("7")){ | ||
| 266 | - lineNameAll = lineName+"区间(走向在全程线路之内)"; | ||
| 267 | - } | ||
| 268 | - ps.setString(1, lineId); | ||
| 269 | - ps.setString(2, lineStandardCode); | ||
| 270 | - ps.setString(3, lineName); | ||
| 271 | - ps.setString(4, abbreviation); | ||
| 272 | - ps.setString(5, ddfs); | ||
| 273 | - ps.setString(6, lineNameAll); | ||
| 274 | - } | ||
| 275 | - public int getBatchSize() | ||
| 276 | - { | ||
| 277 | - return tempList.size(); | ||
| 278 | - } | ||
| 279 | - }); | ||
| 280 | - flag = true; | ||
| 281 | - return flag; | ||
| 282 | - } | ||
| 283 | -} | 1 | +package com.bsth.service.traffic.impl; |
| 2 | + | ||
| 3 | +import com.bsth.service.impl.TrafficManageServiceImpl; | ||
| 4 | +import com.bsth.service.traffic.YgcBasicDataService; | ||
| 5 | +import com.bsth.util.db.DBUtils_oldSystem; | ||
| 6 | +import org.apache.axiom.om.*; | ||
| 7 | +import org.apache.axis2.addressing.EndpointReference; | ||
| 8 | +import org.apache.axis2.client.Options; | ||
| 9 | +import org.apache.axis2.client.ServiceClient; | ||
| 10 | +import org.apache.commons.codec.digest.DigestUtils; | ||
| 11 | +import org.slf4j.Logger; | ||
| 12 | +import org.slf4j.LoggerFactory; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.jdbc.core.BatchPreparedStatementSetter; | ||
| 15 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 16 | +import org.springframework.stereotype.Service; | ||
| 17 | +import org.w3c.dom.Document; | ||
| 18 | +import org.w3c.dom.NodeList; | ||
| 19 | + | ||
| 20 | +import javax.activation.DataHandler; | ||
| 21 | +import javax.xml.parsers.DocumentBuilder; | ||
| 22 | +import javax.xml.parsers.DocumentBuilderFactory; | ||
| 23 | +import java.io.*; | ||
| 24 | +import java.sql.PreparedStatement; | ||
| 25 | +import java.sql.SQLException; | ||
| 26 | +import java.util.ArrayList; | ||
| 27 | +import java.util.HashMap; | ||
| 28 | +import java.util.List; | ||
| 29 | +import java.util.zip.ZipEntry; | ||
| 30 | +import java.util.zip.ZipFile; | ||
| 31 | +import java.util.zip.ZipInputStream; | ||
| 32 | + | ||
| 33 | +/** | ||
| 34 | + * 运管处基础数据操作类 | ||
| 35 | + * Created by zq on 2017/6/15. | ||
| 36 | + */ | ||
| 37 | +@Service | ||
| 38 | +public class YgcBasicDataServiceImpl implements YgcBasicDataService{ | ||
| 39 | + Logger logger = LoggerFactory.getLogger(TrafficManageServiceImpl.class); | ||
| 40 | + | ||
| 41 | + @Autowired | ||
| 42 | + JdbcTemplate jdbcTemplate; | ||
| 43 | + | ||
| 44 | + private static String IP = "218.242.195.76:9091"; | ||
| 45 | + private static String targetEndpoint = "http://" + IP +"/ygc.TransManager.Basicdown?wsdl"; | ||
| 46 | + private static String namespace = "http://service.shygc.com"; | ||
| 47 | + private static String userName = "admin"; | ||
| 48 | + private static String passWord = "000000"; | ||
| 49 | + private static EndpointReference targetEPR; | ||
| 50 | + { | ||
| 51 | + try { | ||
| 52 | + targetEPR = new EndpointReference(targetEndpoint); | ||
| 53 | + } catch (Exception e) { | ||
| 54 | + e.printStackTrace(); | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 更新运管处基础数据 | ||
| 60 | + */ | ||
| 61 | + public void updateYgcBasicData(){ | ||
| 62 | + String saveFile = "ygcBasicData.zip"; | ||
| 63 | + String flag = "failure"; | ||
| 64 | + try { | ||
| 65 | + // 调用接口下载基础数据 | ||
| 66 | + if(download(userName, DigestUtils.md5Hex(passWord), saveFile)){ | ||
| 67 | + // 读取基础数据zip | ||
| 68 | + StringBuffer sb = readZipFile(saveFile); | ||
| 69 | + // 解析xml | ||
| 70 | + List<HashMap<String,String>> result = parseXml(sb); | ||
| 71 | + // 插入数据库 | ||
| 72 | + if(result != null && result.size() > 0){ | ||
| 73 | + insertRecord(result); | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + flag = "success"; | ||
| 77 | + }catch (Exception e){ | ||
| 78 | + e.printStackTrace(); | ||
| 79 | + } | ||
| 80 | + finally { | ||
| 81 | + // 删除文件 | ||
| 82 | + File fill = new File(saveFile); | ||
| 83 | + logger.info("updateYgcBasicData:"+fill.getAbsolutePath()); | ||
| 84 | + logger.info("updateYgcBasicData:"+flag); | ||
| 85 | + if(fill.exists()){ | ||
| 86 | + fill.delete(); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + } | ||
| 90 | + /** | ||
| 91 | + * 下载基础数据,并生成rar文件 | ||
| 92 | + * @param userName | ||
| 93 | + * @param password | ||
| 94 | + * @param saveFile | ||
| 95 | + * @return | ||
| 96 | + */ | ||
| 97 | + private boolean download(String userName, String password, String saveFile) | ||
| 98 | + { | ||
| 99 | + try | ||
| 100 | + { | ||
| 101 | + OMElement data = buildDownloadEnvelope(userName, password); | ||
| 102 | + ServiceClient sender = new ServiceClient(); | ||
| 103 | + Options options = sender.getOptions(); | ||
| 104 | + options.setProperty("SO_TIMEOUT", Integer.valueOf(1800000)); | ||
| 105 | + options.setTo(targetEPR); | ||
| 106 | + sender.setOptions(options); | ||
| 107 | + System.out.println("The data in method download: " + data); | ||
| 108 | + data.build(); | ||
| 109 | + OMElement ome = sender.sendReceive(data); | ||
| 110 | + | ||
| 111 | + OMText binaryNode = (OMText)ome.getFirstOMChild(); | ||
| 112 | + binaryNode.setOptimize(true); | ||
| 113 | + DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); | ||
| 114 | + FileOutputStream imageOutStream = new FileOutputStream(saveFile); | ||
| 115 | + InputStream is = actualDH.getInputStream(); | ||
| 116 | + int read ; | ||
| 117 | + byte[] buffer = new byte[1024]; | ||
| 118 | + while ((read = is.read(buffer)) != -1) { | ||
| 119 | + imageOutStream.write(buffer, 0, read); | ||
| 120 | + } | ||
| 121 | + return true; | ||
| 122 | + } catch (Exception e) { | ||
| 123 | + e.printStackTrace(); | ||
| 124 | + }return false; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + /** | ||
| 128 | + * 构建webservice接口参数 | ||
| 129 | + * @param userName | ||
| 130 | + * @param password | ||
| 131 | + * @return | ||
| 132 | + */ | ||
| 133 | + private OMElement buildDownloadEnvelope(String userName, String password) | ||
| 134 | + { | ||
| 135 | + OMFactory fac = OMAbstractFactory.getOMFactory(); | ||
| 136 | + OMNamespace omNs = fac.createOMNamespace(namespace, | ||
| 137 | + "ser"); | ||
| 138 | + OMElement data = fac.createOMElement("downloadAllDataFile", omNs); | ||
| 139 | + OMElement _userName = fac.createOMElement("userName", omNs); | ||
| 140 | + _userName.setText(userName); | ||
| 141 | + OMElement _passWord = fac.createOMElement("passWord", omNs); | ||
| 142 | + _passWord.setText(String.valueOf(password)); | ||
| 143 | + | ||
| 144 | + data.addChild(_userName); | ||
| 145 | + data.addChild(_passWord); | ||
| 146 | + | ||
| 147 | + OMElement soap = fac.createOMElement("downloadAllDataFile", omNs); | ||
| 148 | + soap.addChild(data); | ||
| 149 | + return soap; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 读取zip文件的内容 | ||
| 154 | + * @param file | ||
| 155 | + * @return | ||
| 156 | + * @throws Exception | ||
| 157 | + */ | ||
| 158 | + public StringBuffer readZipFile(String file) throws Exception { | ||
| 159 | + ZipFile zf = new ZipFile(file); | ||
| 160 | + InputStream in = new BufferedInputStream(new FileInputStream(file)); | ||
| 161 | + ZipInputStream zin = new ZipInputStream(in); | ||
| 162 | + ZipEntry ze; | ||
| 163 | + StringBuffer sb = new StringBuffer(); | ||
| 164 | + while ((ze = zin.getNextEntry()) != null) { | ||
| 165 | + System.out.print(ze); | ||
| 166 | + if (ze.isDirectory()) { | ||
| 167 | + } else { | ||
| 168 | + System.err.println("file - " + ze.getName() + " : " | ||
| 169 | + + ze.getSize() + " bytes"); | ||
| 170 | + long size = ze.getSize(); | ||
| 171 | + if (size > 0) { | ||
| 172 | + BufferedReader br = new BufferedReader( | ||
| 173 | + new InputStreamReader(zf.getInputStream(ze),"GBK")); | ||
| 174 | + String line; | ||
| 175 | + boolean addFlag = false; | ||
| 176 | + while ((line = br.readLine()) != null) { | ||
| 177 | + if(line.indexOf("BusLineList") != -1){ | ||
| 178 | + addFlag = true; | ||
| 179 | + } | ||
| 180 | + if(addFlag){ | ||
| 181 | + sb.append(line); | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + if(line.indexOf("/BusLineList") != -1){ | ||
| 185 | + break; | ||
| 186 | + } | ||
| 187 | + } | ||
| 188 | + br.close(); | ||
| 189 | + } | ||
| 190 | + } | ||
| 191 | + } | ||
| 192 | + zin.closeEntry(); | ||
| 193 | + return sb; | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + /** | ||
| 197 | + * 解析xml | ||
| 198 | + * @param sb | ||
| 199 | + */ | ||
| 200 | + private List<HashMap<String,String>> parseXml(StringBuffer sb){ | ||
| 201 | + List<HashMap<String,String>> list = new ArrayList<>(); | ||
| 202 | + HashMap<String,String> map; | ||
| 203 | + try { | ||
| 204 | + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | ||
| 205 | + DocumentBuilder builder = factory.newDocumentBuilder(); | ||
| 206 | + Document doc = builder.parse(new ByteArrayInputStream(sb.toString().getBytes())); | ||
| 207 | + NodeList nl = doc.getElementsByTagName("BusLine"); | ||
| 208 | + String lineName; //线路名称 | ||
| 209 | + String lineId; // 线路ID | ||
| 210 | + String abbreviation ; // 公司名称 | ||
| 211 | + String ddfs ; // 调度方式 | ||
| 212 | + String lineStandardCode; // 上海市线路编码 | ||
| 213 | + String parentUnitName ; // 总公司 | ||
| 214 | + for (int i = 0; i < nl.getLength(); i++) { | ||
| 215 | + parentUnitName = doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild() == null ?"": | ||
| 216 | + doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild().getNodeValue(); | ||
| 217 | + if(parentUnitName.indexOf("浦东") != -1){// 只查找浦东的数据 | ||
| 218 | + lineName = doc.getElementsByTagName("LineName").item(i).getFirstChild() == null ?"": | ||
| 219 | + doc.getElementsByTagName("LineName").item(i).getFirstChild().getNodeValue(); | ||
| 220 | + lineId = doc.getElementsByTagName("LineId").item(i).getFirstChild() == null ?"": | ||
| 221 | + doc.getElementsByTagName("LineId").item(i).getFirstChild().getNodeValue(); | ||
| 222 | + abbreviation = doc.getElementsByTagName("Abbreviation").item(i).getFirstChild() == null ?"": | ||
| 223 | + doc.getElementsByTagName("Abbreviation").item(i).getFirstChild().getNodeValue(); | ||
| 224 | + ddfs = doc.getElementsByTagName("DDFS").item(i).getFirstChild() == null ?"": | ||
| 225 | + doc.getElementsByTagName("DDFS").item(i).getFirstChild().getNodeValue(); | ||
| 226 | + lineStandardCode = doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild() == null ?"": | ||
| 227 | + doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild().getNodeValue(); | ||
| 228 | + map = new HashMap<>(); | ||
| 229 | + map.put("lineName",lineName); | ||
| 230 | + map.put("lineId",lineId); | ||
| 231 | + map.put("abbreviation",abbreviation); | ||
| 232 | + map.put("ddfs",ddfs); | ||
| 233 | + map.put("lineStandardCode",lineStandardCode); | ||
| 234 | + list.add(map); | ||
| 235 | + } | ||
| 236 | + } | ||
| 237 | + }catch (Exception e){ | ||
| 238 | + e.printStackTrace();; | ||
| 239 | + } | ||
| 240 | + return list; | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + /** | ||
| 244 | + * 批量插入用法 | ||
| 245 | + * @param list | ||
| 246 | + */ | ||
| 247 | + public boolean insertRecord(List<HashMap<String,String>> list) | ||
| 248 | + { | ||
| 249 | + boolean flag = false; | ||
| 250 | + final List<HashMap<String,String>> tempList=list; | ||
| 251 | + String sql="INSERT INTO JJWGPS_T_SHSXLFILE(XLID,SHSXLBM,XLMC,GSMC,DDFS,CREATETIME,XLMC_ALL) VALUES (?,?,?,?,?,SYSDATE,?)"; | ||
| 252 | + jdbcTemplate = new JdbcTemplate(DBUtils_oldSystem.getDataSource()); | ||
| 253 | + jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() | ||
| 254 | + { | ||
| 255 | + public void setValues(PreparedStatement ps, int i)throws SQLException | ||
| 256 | + { | ||
| 257 | + String lineId =tempList.get(i).get("lineId"); | ||
| 258 | + String lineStandardCode =tempList.get(i).get("lineStandardCode"); | ||
| 259 | + String lineName =tempList.get(i).get("lineName"); | ||
| 260 | + String abbreviation =tempList.get(i).get("abbreviation"); | ||
| 261 | + String ddfs =tempList.get(i).get("ddfs"); | ||
| 262 | + String lineNameAll = lineName; | ||
| 263 | + if(ddfs.equals("2")){ | ||
| 264 | + lineNameAll = lineName+"区间(走向部分在全程线路之外)"; | ||
| 265 | + }else if(ddfs.equals("7")){ | ||
| 266 | + lineNameAll = lineName+"区间(走向在全程线路之内)"; | ||
| 267 | + } | ||
| 268 | + ps.setString(1, lineId); | ||
| 269 | + ps.setString(2, lineStandardCode); | ||
| 270 | + ps.setString(3, lineName); | ||
| 271 | + ps.setString(4, abbreviation); | ||
| 272 | + ps.setString(5, ddfs); | ||
| 273 | + ps.setString(6, lineNameAll); | ||
| 274 | + } | ||
| 275 | + public int getBatchSize() | ||
| 276 | + { | ||
| 277 | + return tempList.size(); | ||
| 278 | + } | ||
| 279 | + }); | ||
| 280 | + flag = true; | ||
| 281 | + return flag; | ||
| 282 | + } | ||
| 283 | +} |
src/main/resources/static/pages/base/line/add.html
| @@ -199,6 +199,40 @@ | @@ -199,6 +199,40 @@ | ||
| 199 | </div> | 199 | </div> |
| 200 | <!-- 表单分组组件 form-group END --> | 200 | <!-- 表单分组组件 form-group END --> |
| 201 | 201 | ||
| 202 | + <!-- 表单分组组件 form-group START --> | ||
| 203 | + <div class="form-group"> | ||
| 204 | + <!-- 是否营运START (因为options值基本固定,所以在页面固定。【以后可以根具需求修改成使用字典表实现】) --> | ||
| 205 | + <div class="col-md-6"> | ||
| 206 | + <label class="control-label col-md-5"> | ||
| 207 | + <span class="required"> * </span>是否营运线路 : | ||
| 208 | + </label> | ||
| 209 | + <div class="col-md-4"> | ||
| 210 | + <div class="md-radio-inline"> | ||
| 211 | + <div class="md-radio"> | ||
| 212 | + <input type="radio" id="radio18" name="sfyy" class="md-radiobtn" value="1" data-title="是" checked="checked" > | ||
| 213 | + <label for="radio18"> | ||
| 214 | + <span></span> | ||
| 215 | + <span class="check"></span> | ||
| 216 | + <span class="box"></span> 是 | ||
| 217 | + </label> | ||
| 218 | + </div> | ||
| 219 | + <div class="md-radio has-error"> | ||
| 220 | + <input type="radio" id="radio19" name="sfyy" class="md-radiobtn" value="0" data-title="否" > | ||
| 221 | + <label for="radio19" style="color:#FFC0CB"> | ||
| 222 | + <span></span> | ||
| 223 | + <span class="check"></span> | ||
| 224 | + <span class="box"></span> 否 | ||
| 225 | + </label> | ||
| 226 | + </div> | ||
| 227 | + </div> | ||
| 228 | + </div> | ||
| 229 | + </div> | ||
| 230 | + <!-- 是否营运 END --> | ||
| 231 | + | ||
| 232 | + | ||
| 233 | + </div> | ||
| 234 | + <!-- 表单分组组件 form-group END --> | ||
| 235 | + | ||
| 202 | <!-- 表单分组组件 form-group START --> | 236 | <!-- 表单分组组件 form-group START --> |
| 203 | <div class="form-group"> | 237 | <div class="form-group"> |
| 204 | <!-- 起始站名称 START (该字段值会在规划线路站点操作时会去验证是否有值。如果为空,则用线路规划站点的起点站。默认使用该字段填写值) --> | 238 | <!-- 起始站名称 START (该字段值会在规划线路站点操作时会去验证是否有值。如果为空,则用线路规划站点的起点站。默认使用该字段填写值) --> |
src/main/resources/static/pages/base/line/details.html
| @@ -191,7 +191,39 @@ | @@ -191,7 +191,39 @@ | ||
| 191 | <!-- 是否撤销 START --> | 191 | <!-- 是否撤销 START --> |
| 192 | </div> | 192 | </div> |
| 193 | <!-- 表单分组组件 form-group END --> | 193 | <!-- 表单分组组件 form-group END --> |
| 194 | - | 194 | + <!-- 表单分组组件 form-group START --> |
| 195 | + <div class="form-group"> | ||
| 196 | + <!-- 是否营运START (因为options值基本固定,所以在页面固定。【以后可以根具需求修改成使用字典表实现】) --> | ||
| 197 | + <div class="col-md-6"> | ||
| 198 | + <label class="control-label col-md-5"> | ||
| 199 | + <span class="required"> * </span>是否营运线路 : | ||
| 200 | + </label> | ||
| 201 | + <div class="col-md-4"> | ||
| 202 | + <div class="md-radio-inline"> | ||
| 203 | + <div class="md-radio"> | ||
| 204 | + <input type="radio" id="radio18" name="sfyy" class="md-radiobtn" value="1" data-title="是" checked="checked" > | ||
| 205 | + <label for="radio18"> | ||
| 206 | + <span></span> | ||
| 207 | + <span class="check"></span> | ||
| 208 | + <span class="box"></span> 是 | ||
| 209 | + </label> | ||
| 210 | + </div> | ||
| 211 | + <div class="md-radio has-error"> | ||
| 212 | + <input type="radio" id="radio19" name="sfyy" class="md-radiobtn" value="0" data-title="否" > | ||
| 213 | + <label for="radio19" style="color:#FFC0CB"> | ||
| 214 | + <span></span> | ||
| 215 | + <span class="check"></span> | ||
| 216 | + <span class="box"></span> 否 | ||
| 217 | + </label> | ||
| 218 | + </div> | ||
| 219 | + </div> | ||
| 220 | + </div> | ||
| 221 | + </div> | ||
| 222 | + <!-- 是否营运 END --> | ||
| 223 | + | ||
| 224 | + | ||
| 225 | + </div> | ||
| 226 | + <!-- 表单分组组件 form-group END --> | ||
| 195 | <!-- 表单分组组件 form-group START --> | 227 | <!-- 表单分组组件 form-group START --> |
| 196 | <div class="form-group"> | 228 | <div class="form-group"> |
| 197 | <!-- 起始站名称 START (该字段值会在规划线路站点操作时会去验证是否有值。如果为空,则用线路规划站点的起点站。默认使用该字段填写值) --> | 229 | <!-- 起始站名称 START (该字段值会在规划线路站点操作时会去验证是否有值。如果为空,则用线路规划站点的起点站。默认使用该字段填写值) --> |
src/main/resources/static/pages/base/line/edit.html
| @@ -199,7 +199,39 @@ | @@ -199,7 +199,39 @@ | ||
| 199 | <!-- 是否撤销 START --> | 199 | <!-- 是否撤销 START --> |
| 200 | </div> | 200 | </div> |
| 201 | <!-- 表单分组组件 form-group END --> | 201 | <!-- 表单分组组件 form-group END --> |
| 202 | - | 202 | + <!-- 表单分组组件 form-group START --> |
| 203 | + <div class="form-group"> | ||
| 204 | + <!-- 是否营运START (因为options值基本固定,所以在页面固定。【以后可以根具需求修改成使用字典表实现】) --> | ||
| 205 | + <div class="col-md-6"> | ||
| 206 | + <label class="control-label col-md-5"> | ||
| 207 | + <span class="required"> * </span>是否营运线路 : | ||
| 208 | + </label> | ||
| 209 | + <div class="col-md-4"> | ||
| 210 | + <div class="md-radio-inline"> | ||
| 211 | + <div class="md-radio"> | ||
| 212 | + <input type="radio" id="radio18" name="sfyy" class="md-radiobtn" value="1" data-title="是" checked="checked" > | ||
| 213 | + <label for="radio18"> | ||
| 214 | + <span></span> | ||
| 215 | + <span class="check"></span> | ||
| 216 | + <span class="box"></span> 是 | ||
| 217 | + </label> | ||
| 218 | + </div> | ||
| 219 | + <div class="md-radio has-error"> | ||
| 220 | + <input type="radio" id="radio19" name="sfyy" class="md-radiobtn" value="0" data-title="否" > | ||
| 221 | + <label for="radio19" style="color:#FFC0CB"> | ||
| 222 | + <span></span> | ||
| 223 | + <span class="check"></span> | ||
| 224 | + <span class="box"></span> 否 | ||
| 225 | + </label> | ||
| 226 | + </div> | ||
| 227 | + </div> | ||
| 228 | + </div> | ||
| 229 | + </div> | ||
| 230 | + <!-- 是否营运 END --> | ||
| 231 | + | ||
| 232 | + | ||
| 233 | + </div> | ||
| 234 | + <!-- 表单分组组件 form-group END --> | ||
| 203 | <!-- 表单分组组件 form-group START --> | 235 | <!-- 表单分组组件 form-group START --> |
| 204 | <div class="form-group"> | 236 | <div class="form-group"> |
| 205 | <!-- 起始站名称 START (该字段值会在规划线路站点操作时会去验证是否有值。如果为空,则用线路规划站点的起点站。默认使用该字段填写值) --> | 237 | <!-- 起始站名称 START (该字段值会在规划线路站点操作时会去验证是否有值。如果为空,则用线路规划站点的起点站。默认使用该字段填写值) --> |
src/main/resources/static/pages/base/stationroute/delete_select.html
0 → 100644
| 1 | +<!-- 批量撤销选项 --> | ||
| 2 | +<div class="modal fade" id="delete_select_mobal" tabindex="-1" | ||
| 3 | + role="basic" aria-hidden="true"> | ||
| 4 | + <div class="modal-dialog"> | ||
| 5 | + <div class="modal-content"> | ||
| 6 | + <div class="modal-header"> | ||
| 7 | + <button type="button" class="close" data-dismiss="modal" | ||
| 8 | + aria-hidden="true"></button> | ||
| 9 | + <h4 class="modal-title"> | ||
| 10 | + 批量撤销选项 | ||
| 11 | + </h4> | ||
| 12 | + </div> | ||
| 13 | + <div class="modal-body"> | ||
| 14 | + <form class="form-horizontal" action="/" method="post" | ||
| 15 | + id="formBootbox" role="form"> | ||
| 16 | + <div class="form-group"> | ||
| 17 | + <label class="col-md-3 control-label">撤销选项:</label> | ||
| 18 | + <div class="col-md-9"> | ||
| 19 | + <div class="icheck-list"> | ||
| 20 | + <label> | ||
| 21 | + <input type="radio" name="deleteOptions" value="0" checked> 批量撤销站点 | ||
| 22 | + </label> | ||
| 23 | + <label > | ||
| 24 | + <input type="radio" name="deleteOptions" value="1" > 批量撤销路段 | ||
| 25 | + </label> | ||
| 26 | + </div> | ||
| 27 | + </div> | ||
| 28 | + </div> | ||
| 29 | + </form> | ||
| 30 | + </div> | ||
| 31 | + <div class="modal-footer"> | ||
| 32 | + <button type="button" class="btn default" data-dismiss="modal">取消</button> | ||
| 33 | + <button type="button" class="btn btn-primary" | ||
| 34 | + id="deleteSelectnextButton">下一步</button> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | +</div> | ||
| 39 | +<script type="text/javascript"> | ||
| 40 | + $('#delete_select_mobal').on('deleteSelectMobal.show',function(e,ajaxd,line,fun,delBatch) { | ||
| 41 | + // 加载显示mobal | ||
| 42 | + $('#delete_select_mobal').modal({ | ||
| 43 | + show : true, | ||
| 44 | + backdrop : 'static', | ||
| 45 | + keyboard : false | ||
| 46 | + }); | ||
| 47 | + // 获取表单元素 | ||
| 48 | + var form = $('#formBootbox'); | ||
| 49 | + // 下一步点击事件 | ||
| 50 | + $('#deleteSelectnextButton').on('click', function() { | ||
| 51 | + // 获取撤销类型 | ||
| 52 | + deleteOptions = $("input[name='deleteOptions']:checked").val(); | ||
| 53 | + // 表单提交 | ||
| 54 | + form.submit(); | ||
| 55 | + }); | ||
| 56 | + // 表单验证 | ||
| 57 | + form.validate({ | ||
| 58 | + // 表单序列化 | ||
| 59 | + submitHandler : function(f) { | ||
| 60 | + // 批量删除站点 (deleteOptions:0) | ||
| 61 | + if(deleteOptions == 0) { | ||
| 62 | + // 隐藏选项mobal | ||
| 63 | + $('#delete_select_mobal').modal('hide'); | ||
| 64 | + // 加载deletestation页面 | ||
| 65 | + $.get('deletestation.html', function(m){ | ||
| 66 | + $(pjaxContainer).append(m); | ||
| 67 | + $('#delete_station_mobal').trigger('deleteStationMobal.show', [ajaxd,line,fun,delBatch]); | ||
| 68 | + }); | ||
| 69 | + // 批量删除路段(deleteOptions:1) | ||
| 70 | + } else if(deleteOptions == 1) { | ||
| 71 | + // 隐藏选项mobal | ||
| 72 | + $('#delete_select_mobal').modal('hide'); | ||
| 73 | + // 加载deletesection页面 | ||
| 74 | + $.get('deletesection.html', function(m){ | ||
| 75 | + $(pjaxContainer).append(m); | ||
| 76 | + $('#delete_section_mobal').trigger('deleteSectionMobal.show', [ajaxd,line,fun,delBatch]); | ||
| 77 | + }); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + } | ||
| 81 | + }); | ||
| 82 | + }); | ||
| 83 | +</script> | ||
| 0 | \ No newline at end of file | 84 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/deletesection.html
0 → 100644
| 1 | +<!-- 编辑路段 --> | ||
| 2 | +<div class="modal fade" id="delete_section_mobal" role="basic" | ||
| 3 | + aria-hidden="true"> | ||
| 4 | + <div style="margin:5% auto"> | ||
| 5 | + <div class="modal-content"> | ||
| 6 | + <div class="col-md-12"> | ||
| 7 | + <div class="portlet light porttlet-fit bordered"> | ||
| 8 | + <div class="portlet-title"> | ||
| 9 | + <div class="tipso-animation"> | ||
| 10 | + </div> | ||
| 11 | + <div class="caption"> | ||
| 12 | + <i class="fa fa-info-circle font-dark"></i> <span | ||
| 13 | + class="caption-subject font-dark sbold uppercase">路段信息</span> | ||
| 14 | + </div> | ||
| 15 | + <div class="actions"> | ||
| 16 | + <div class="modal-footer-left"> | ||
| 17 | + <button type="button" class="btn btn-primary" id="batchDeleteSectionButton">批量撤销路段</button> | ||
| 18 | + <button type="button" class="btn default" data-dismiss="modal">取消</button> | ||
| 19 | + </div> | ||
| 20 | + </div> | ||
| 21 | + </div> | ||
| 22 | + <div class="portlet-body"> | ||
| 23 | + <div class="table-container" style="margin-top: 10px"> | ||
| 24 | + <from class="form-horizontal" role="form" | ||
| 25 | + id="batch_delete_section_form"> | ||
| 26 | + <table | ||
| 27 | + class="table table-striped table-bordered table-hover table-checkable" | ||
| 28 | + id="datatable_section_detele"> | ||
| 29 | + <thead> | ||
| 30 | + <tr role="row" class="heading"> | ||
| 31 | + <th width="2%"><input type="checkbox" name="scetionCheckItems" | ||
| 32 | + id="scetionCheckItems"></input></th> | ||
| 33 | + <th width="2%">序号</th> | ||
| 34 | + <th width="5%">路段路由编号</th> | ||
| 35 | + <th width="5%">线路编号</th> | ||
| 36 | + <th width="11%">线路名称</th> | ||
| 37 | + <th width="7%">线路方向</th> | ||
| 38 | + <th width="11%">路段名称</th> | ||
| 39 | + <th width="5%">路段编码</th> | ||
| 40 | + <th width="5%">路段序号</th> | ||
| 41 | + <th width="5%">路段限速</th> | ||
| 42 | + <th width="5%">路段长度</th> | ||
| 43 | + <th width="5%">路段历时</th> | ||
| 44 | + <th width="5%">版本号</th> | ||
| 45 | + <!-- <th width="6%">是否撤销</th> | ||
| 46 | + <th width="9%">操作</th> --> | ||
| 47 | + </tr> | ||
| 48 | + </thead> | ||
| 49 | + <tbody></tbody> | ||
| 50 | + </table> | ||
| 51 | + </from> | ||
| 52 | + <div class="actions"> | ||
| 53 | + <div style="text-align: right"> | ||
| 54 | + <ul id="pagination" class="pagination"></ul> | ||
| 55 | + </div> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | +</div> | ||
| 64 | + | ||
| 65 | +<script type="text/html" id="sectionInfo_list_table_temp_detele"> | ||
| 66 | + {{each list as obj i }} | ||
| 67 | + <tr> | ||
| 68 | + <td style="vertical-align: middle;"> | ||
| 69 | + <input type="checkbox" class="group-checkable icheck" name="items" value="{{obj.id}}" id="{{obj.id}}" > | ||
| 70 | + </td> | ||
| 71 | + <td style="vertical-align: middle;"> | ||
| 72 | + {{(list.page*10)+(i+1)}} | ||
| 73 | + </td> | ||
| 74 | + <td style="vertical-align: middle;"> | ||
| 75 | + {{obj.id}} | ||
| 76 | + </td> | ||
| 77 | + <td style="vertical-align: middle;"> | ||
| 78 | + {{obj.lineCode}} | ||
| 79 | + </td> | ||
| 80 | + <td style="vertical-align: middle;"> | ||
| 81 | + {{obj.line.name}} | ||
| 82 | + </td> | ||
| 83 | + <td style="vertical-align: middle;"> | ||
| 84 | + {{if obj.directions == '0'}} | ||
| 85 | + 上行 | ||
| 86 | + {{else if obj.directions == '1'}} | ||
| 87 | + 下行 | ||
| 88 | + {{/if}} | ||
| 89 | + </td> | ||
| 90 | + <td style="vertical-align: middle;"> | ||
| 91 | + {{obj.section.sectionName}} | ||
| 92 | + </td> | ||
| 93 | + <td style="vertical-align: middle;"> | ||
| 94 | + {{obj.sectionCode}} | ||
| 95 | + </td> | ||
| 96 | + <td style="vertical-align: middle;"> | ||
| 97 | + {{obj.sectionrouteCode}} | ||
| 98 | + </td> | ||
| 99 | + <td style="vertical-align: middle;"> | ||
| 100 | + {{obj.speedLimit}} | ||
| 101 | + </td> | ||
| 102 | + <td style="vertical-align: middle;"> | ||
| 103 | + {{obj.sectionDistance}} | ||
| 104 | + </td> | ||
| 105 | + <td style="vertical-align: middle;"> | ||
| 106 | + {{obj.sectionTime}} | ||
| 107 | + </td> | ||
| 108 | + <td style="vertical-align: middle;"> | ||
| 109 | + {{obj.versions}} | ||
| 110 | + </td> | ||
| 111 | + </tr> | ||
| 112 | + {{/each}} | ||
| 113 | + {{if list.length == 0}} | ||
| 114 | + <tr> | ||
| 115 | + <td colspan=13><h6 class="muted">没有找到相关数据</h6></td> | ||
| 116 | + </tr> | ||
| 117 | + {{/if}} | ||
| 118 | +</script> | ||
| 119 | +<script type="text/javascript"> | ||
| 120 | +$('#delete_section_mobal').on('deleteSectionMobal.show',function(e, ajaxd, line, fun, delBatch) { | ||
| 121 | + layer.closeAll(); | ||
| 122 | + // 显示mobal | ||
| 123 | + $('#delete_section_mobal').modal({ | ||
| 124 | + show : true, | ||
| 125 | + backdrop : 'static', | ||
| 126 | + keyboard : false | ||
| 127 | + }); | ||
| 128 | + // 编辑表单元素 | ||
| 129 | + var form = $('#batch_delete_section_form'); | ||
| 130 | + // 提交数据按钮事件 | ||
| 131 | + $('#batchDeleteSectionButton').on('click', function() { | ||
| 132 | + var checked = $("[name=items]:checked"); | ||
| 133 | + var ids = ""; | ||
| 134 | + checked.each(function() { | ||
| 135 | + ids = ids + "," + $(this).val(); | ||
| 136 | + //ids.push($(this).val()); | ||
| 137 | + }); | ||
| 138 | + if (ids != "" && ids != null && ids != undefined) { | ||
| 139 | + console.log("ids:" + ids); | ||
| 140 | + ids = ids.substr(1, ids.length - 1); | ||
| 141 | + var params = {}; | ||
| 142 | + params.ids = ids; | ||
| 143 | + $.get('/sectionroute/batchDestroy',params,function(resuntDate) { | ||
| 144 | + if (resuntDate.status == 'SUCCESS') { | ||
| 145 | + // 弹出添加成功提示消息 | ||
| 146 | + layer.msg('修改成功...'); | ||
| 147 | + /** 通知更新缓存区 */ | ||
| 148 | + //$.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs) {console.log(rs)}) | ||
| 149 | + } else { | ||
| 150 | + // 弹出添加失败提示消息 | ||
| 151 | + layer.msg('修改失败...'); | ||
| 152 | + } | ||
| 153 | + initSearch(); | ||
| 154 | + // 刷新左边树 | ||
| 155 | + fun.resjtreeDate(line.id,delBatch.dir); | ||
| 156 | + /** 查询路段信息 @param:<Line.id:线路Id;delBatch.dir:方向> @return:data:路段数据 */ | ||
| 157 | + ajaxd.getSectionRouteInfo(line.id,delBatch.dir,function(data) { | ||
| 158 | + /** 在地图上画出线路走向 @param:<Line.id:线路Id;delBatch.dir:方向;data:路段数据> */ | ||
| 159 | + fun.linePanlThree(line.id,data,delBatch.dir); | ||
| 160 | + }); | ||
| 161 | + }); | ||
| 162 | + } else { | ||
| 163 | + layer.msg('请选择要删除的路段!!!'); | ||
| 164 | + } | ||
| 165 | + }); | ||
| 166 | + | ||
| 167 | + /** 全选框 */ | ||
| 168 | + document.getElementById('scetionCheckItems').onclick = function() { | ||
| 169 | + // 获取所有的复选框 | ||
| 170 | + var checkElements = document.getElementsByName('items'); | ||
| 171 | + if (this.checked) { | ||
| 172 | + for ( var i = 0; i < checkElements.length; i++) { | ||
| 173 | + var checkElement = checkElements[i]; | ||
| 174 | + checkElement.checked = "checked"; | ||
| 175 | + } | ||
| 176 | + } else { | ||
| 177 | + for ( var i = 0; i < checkElements.length; i++) { | ||
| 178 | + var checkElement = checkElements[i]; | ||
| 179 | + checkElement.checked = null; | ||
| 180 | + } | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + /** 页面加载完显示数据 */ | ||
| 185 | + window.onload = initSearch(); | ||
| 186 | + | ||
| 187 | + /** | ||
| 188 | + * @description : (TODO) 页面加载事件 | ||
| 189 | + * | ||
| 190 | + */ | ||
| 191 | + function initSearch() { | ||
| 192 | + var params = new getParams(); | ||
| 193 | + page = 0; | ||
| 194 | + loadTableDate(params, true); | ||
| 195 | + } | ||
| 196 | + function getParams() { | ||
| 197 | + // 搜索参数集合 | ||
| 198 | + params = {}; | ||
| 199 | + params.lineCode_eq = line.id; | ||
| 200 | + params.directions_eq = delBatch.dir; | ||
| 201 | + params.destroy_eq = "0"; //默认查没有撤销的路段 | ||
| 202 | + return params; | ||
| 203 | + } | ||
| 204 | + /** | ||
| 205 | + * @description : (TODO) 表格数据分页加载事件 | ||
| 206 | + * | ||
| 207 | + * ------@param : 查询参数 | ||
| 208 | + * | ||
| 209 | + * ------@isPon : 是否重新分页 | ||
| 210 | + * | ||
| 211 | + */ | ||
| 212 | + function loadTableDate(param, isPon) { | ||
| 213 | + // 搜索参数 | ||
| 214 | + var params = {}; | ||
| 215 | + if (param) | ||
| 216 | + params = param; | ||
| 217 | + // 排序(按方向与序号) | ||
| 218 | + params['order'] = 'directions,sectionrouteCode'; | ||
| 219 | + // 排序方向. | ||
| 220 | + params['direction'] = 'ASC,ASC'; | ||
| 221 | + // 记录当前页数 | ||
| 222 | + params['page'] = page; | ||
| 223 | + // 弹出正在加载层 | ||
| 224 | + var i = layer.load(2); | ||
| 225 | + // 异步请求获取表格数据 | ||
| 226 | + $.get('/sectionroute',params,function(result) { | ||
| 227 | + // 添加序号 | ||
| 228 | + result.content.page = page; | ||
| 229 | + // 把数据填充到模版中 | ||
| 230 | + var tbodyHtml = template('sectionInfo_list_table_temp_detele',{list : result.content}); | ||
| 231 | + // 把渲染好的模版html文本追加到表格中 | ||
| 232 | + $('#datatable_section_detele tbody').html(tbodyHtml); | ||
| 233 | + // 是重新分页且返回数据长度大于0 | ||
| 234 | + if (isPon && result.content.length > 0) { | ||
| 235 | + // 重新分页 | ||
| 236 | + initPag = true; | ||
| 237 | + // 分页栏 | ||
| 238 | + showPagination(result); | ||
| 239 | + } | ||
| 240 | + // 关闭弹出加载层 | ||
| 241 | + layer.close(i); | ||
| 242 | + }); | ||
| 243 | + } | ||
| 244 | + /** | ||
| 245 | + * @description : (TODO) 分页栏组件 | ||
| 246 | + * | ||
| 247 | + */ | ||
| 248 | + function showPagination(data) { | ||
| 249 | + // 分页组件 | ||
| 250 | + $('#pagination').jqPaginator({ | ||
| 251 | + // 总页数 | ||
| 252 | + totalPages : data.totalPages, | ||
| 253 | + // 中间显示页数 | ||
| 254 | + visiblePages : 6, | ||
| 255 | + // 当前页 | ||
| 256 | + urrentPage : page + 1, | ||
| 257 | + first : '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | ||
| 258 | + prev : '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', | ||
| 259 | + next : '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', | ||
| 260 | + last : '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', | ||
| 261 | + page : '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', | ||
| 262 | + onPageChange : function(num, type) { | ||
| 263 | + if (initPag) { | ||
| 264 | + initPag = false; | ||
| 265 | + return; | ||
| 266 | + } | ||
| 267 | + var pData = getParams(); | ||
| 268 | + page = num - 1; | ||
| 269 | + loadTableDate(pData, false); | ||
| 270 | + } | ||
| 271 | + }); | ||
| 272 | + } | ||
| 273 | +}); | ||
| 274 | +</script> | ||
| 0 | \ No newline at end of file | 275 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/deletestation.html
0 → 100644
| 1 | +<!-- 编辑路段 --> | ||
| 2 | +<div class="modal fade" id="delete_station_mobal" role="basic" | ||
| 3 | + aria-hidden="true"> | ||
| 4 | + <div style="margin:5% auto"> | ||
| 5 | + <div class="modal-content"> | ||
| 6 | + <div class="col-md-12"> | ||
| 7 | + <div class="portlet light porttlet-fit bordered"> | ||
| 8 | + <div class="portlet-title"> | ||
| 9 | + <div class="tipso-animation"> | ||
| 10 | + </div> | ||
| 11 | + <div class="caption"> | ||
| 12 | + <i class="fa fa-info-circle font-dark"></i> | ||
| 13 | + <span class="caption-subject font-dark sbold uppercase">站点信息</span> | ||
| 14 | + </div> | ||
| 15 | + <div class="actions"> | ||
| 16 | + <div class="btn-group btn-group-devided" data-toggle="buttons"> | ||
| 17 | + <button type="button" class="btn btn-primary" id="batchDeleteStationButton">批量撤销站点</button> | ||
| 18 | + <button type="button" class="btn default" data-dismiss="modal">取消</button> | ||
| 19 | + </div> | ||
| 20 | + </div> | ||
| 21 | + </div> | ||
| 22 | + <div class="portlet-body"> | ||
| 23 | + <div class="table-container" style="margin-top: 10px"> | ||
| 24 | + <from class="form-horizontal" role="form" id="batch_delete_station_form"> | ||
| 25 | + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_station_detele"> | ||
| 26 | + <thead> | ||
| 27 | + <tr role="row" class="heading"> | ||
| 28 | + <th width="2%"><input type="checkbox" name="checkItems" | ||
| 29 | + id="stationCheckItems"></input></th> | ||
| 30 | + <th width="2%">序号</th> | ||
| 31 | + <th width="5%">站点路由编号</th> | ||
| 32 | + <th width="5%">线路编号</th> | ||
| 33 | + <th width="8%">线路名称</th> | ||
| 34 | + <th width="5%">线路方向</th> | ||
| 35 | + <th width="8%">站点路由名称</th> | ||
| 36 | + <th width="4%">站点编码</th> | ||
| 37 | + <th width="4%">站点序号</th> | ||
| 38 | + <th width="4%">站点类型</th> | ||
| 39 | + <th width="6%">站点距离(km)</th> | ||
| 40 | + <th width="6%">站点时长(min)</th> | ||
| 41 | + <th width="4%">版本号</th> | ||
| 42 | + </tr> | ||
| 43 | + </thead> | ||
| 44 | + <tbody></tbody> | ||
| 45 | + </table> | ||
| 46 | + </from> | ||
| 47 | + <div class="actions"> | ||
| 48 | + <div style="text-align: right"> | ||
| 49 | + <ul id="pagination" class="pagination"></ul> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + </div> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | +</div> | ||
| 59 | + | ||
| 60 | +<script type="text/html" id="stationInfo_list_table_temp_detele"> | ||
| 61 | + {{each list as obj i }} | ||
| 62 | + <tr> | ||
| 63 | + <td style="vertical-align: middle;"> | ||
| 64 | + <input type="checkbox" class="group-checkable icheck" name="items" value="{{obj.id}}" id="{{obj.id}}" > | ||
| 65 | + </td> | ||
| 66 | + <td style="vertical-align: middle;"> | ||
| 67 | + {{(list.page*10)+(i+1)}} | ||
| 68 | + </td> | ||
| 69 | + <td style="vertical-align: middle;"> | ||
| 70 | + {{obj.id}} | ||
| 71 | + </td> | ||
| 72 | + <td> | ||
| 73 | + {{obj.lineCode}} | ||
| 74 | + </td> | ||
| 75 | + <td> | ||
| 76 | + {{obj.line.name}} | ||
| 77 | + </td> | ||
| 78 | + <td> | ||
| 79 | + {{if obj.directions == '0'}} | ||
| 80 | + 上行 | ||
| 81 | + {{else if obj.directions == '1'}} | ||
| 82 | + 下行 | ||
| 83 | + {{/if}} | ||
| 84 | + </td> | ||
| 85 | + <td> | ||
| 86 | + {{obj.stationName}} | ||
| 87 | + </td> | ||
| 88 | + <td> | ||
| 89 | + {{obj.stationCode}} | ||
| 90 | + </td> | ||
| 91 | + <td> | ||
| 92 | + {{obj.stationRouteCode}} | ||
| 93 | + </td> | ||
| 94 | + <td> | ||
| 95 | + {{if obj.stationMark == 'B'}} | ||
| 96 | + 起始站 | ||
| 97 | + {{else if obj.stationMark == 'Z'}} | ||
| 98 | + 中途站 | ||
| 99 | + {{else if obj.stationMark== 'E'}} | ||
| 100 | + 终点站 | ||
| 101 | + {{/if}} | ||
| 102 | + </td> | ||
| 103 | + <td> | ||
| 104 | + {{obj.distances}} | ||
| 105 | + </td> | ||
| 106 | + <td> | ||
| 107 | + {{obj.toTime}} | ||
| 108 | + </td> | ||
| 109 | + <td> | ||
| 110 | + {{obj.versions}} | ||
| 111 | + </td> | ||
| 112 | + </tr> | ||
| 113 | + {{/each}} | ||
| 114 | + {{if list.length == 0}} | ||
| 115 | + <tr> | ||
| 116 | + <td colspan=13><h6 class="muted">没有找到相关数据</h6></td> | ||
| 117 | + </tr> | ||
| 118 | + {{/if}} | ||
| 119 | +</script> | ||
| 120 | +<script type="text/javascript"> | ||
| 121 | +$('#delete_station_mobal').on('deleteStationMobal.show',function(e, ajaxd, line, fun, delBatch) { | ||
| 122 | + layer.closeAll(); | ||
| 123 | + // 显示mobal | ||
| 124 | + $('#delete_station_mobal').modal({ | ||
| 125 | + show : true, | ||
| 126 | + backdrop : 'static', | ||
| 127 | + keyboard : false | ||
| 128 | + }); | ||
| 129 | + // 编辑表单元素 | ||
| 130 | + var form = $('#batch_delete_station_form'); | ||
| 131 | + // 提交数据按钮事件 | ||
| 132 | + $('#batchDeleteStationButton').on('click', function() { | ||
| 133 | + var checked = $("[name=items]:checked"); | ||
| 134 | + var ids = ""; | ||
| 135 | + checked.each(function() { | ||
| 136 | + ids = ids + "," + $(this).val(); | ||
| 137 | + //ids.push($(this).val()); | ||
| 138 | + }); | ||
| 139 | + if (ids != "" && ids != null && ids != undefined) { | ||
| 140 | + console.log("ids:" + ids); | ||
| 141 | + ids = ids.substr(1, ids.length - 1); | ||
| 142 | + var params = {}; | ||
| 143 | + params.ids = ids; | ||
| 144 | + $.get('/stationroute/batchDestroy',params,function(resuntDate) { | ||
| 145 | + if (resuntDate.status == 'SUCCESS') { | ||
| 146 | + // 弹出添加成功提示消息 | ||
| 147 | + layer.msg('修改成功...'); | ||
| 148 | + /** 通知更新缓存区 */ | ||
| 149 | + //$.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs) {console.log(rs)}) | ||
| 150 | + } else { | ||
| 151 | + // 弹出添加失败提示消息 | ||
| 152 | + layer.msg('修改失败...'); | ||
| 153 | + } | ||
| 154 | + initSearch(); | ||
| 155 | + // 刷新左边树 | ||
| 156 | + fun.resjtreeDate(line.id,delBatch.dir); | ||
| 157 | + /** 查询路段信息 @param:<Line.id:线路Id;delBatch.dir:方向> @return:data:路段数据 */ | ||
| 158 | + ajaxd.getSectionRouteInfo(line.id,delBatch.dir,function(data) { | ||
| 159 | + /** 在地图上画出线路走向 @param:<Line.id:线路Id;delBatch.dir:方向;data:路段数据> */ | ||
| 160 | + fun.linePanlThree(line.id,data,delBatch.dir); | ||
| 161 | + }); | ||
| 162 | + }); | ||
| 163 | + } else { | ||
| 164 | + layer.msg('请选择要删除的站点!!!'); | ||
| 165 | + } | ||
| 166 | + }); | ||
| 167 | + | ||
| 168 | + /** 全选框 */ | ||
| 169 | + document.getElementById('stationCheckItems').onclick = function() { | ||
| 170 | + // 获取所有的复选框 | ||
| 171 | + var checkElements = document.getElementsByName('items'); | ||
| 172 | + if (this.checked) { | ||
| 173 | + for ( var i = 0; i < checkElements.length; i++) { | ||
| 174 | + var checkElement = checkElements[i]; | ||
| 175 | + checkElement.checked = "checked"; | ||
| 176 | + } | ||
| 177 | + } else { | ||
| 178 | + for ( var i = 0; i < checkElements.length; i++) { | ||
| 179 | + var checkElement = checkElements[i]; | ||
| 180 | + checkElement.checked = null; | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + /** 页面加载完显示数据 */ | ||
| 186 | + window.onload = initSearch(); | ||
| 187 | + | ||
| 188 | + /** | ||
| 189 | + * @description : (TODO) 页面加载事件 | ||
| 190 | + * | ||
| 191 | + */ | ||
| 192 | + function initSearch() { | ||
| 193 | + var params = new getParams(); | ||
| 194 | + page = 0; | ||
| 195 | + loadTableDate(params, true); | ||
| 196 | + } | ||
| 197 | + function getParams() { | ||
| 198 | + // 搜索参数集合 | ||
| 199 | + params = {}; | ||
| 200 | + params.lineCode_eq = line.id; | ||
| 201 | + params.directions_eq = delBatch.dir; | ||
| 202 | + params.destroy_eq = "0"; //默认查没有撤销的站点 | ||
| 203 | + return params; | ||
| 204 | + } | ||
| 205 | + /** | ||
| 206 | + * @description : (TODO) 表格数据分页加载事件 | ||
| 207 | + * | ||
| 208 | + * ------@param : 查询参数 | ||
| 209 | + * | ||
| 210 | + * ------@isPon : 是否重新分页 | ||
| 211 | + * | ||
| 212 | + */ | ||
| 213 | + function loadTableDate(param, isPon) { | ||
| 214 | + // 搜索参数 | ||
| 215 | + var params = {}; | ||
| 216 | + if (param) | ||
| 217 | + params = param; | ||
| 218 | + // 排序(按方向与序号) | ||
| 219 | + params['order'] = 'directions,stationRouteCode'; | ||
| 220 | + // 排序方向. | ||
| 221 | + params['direction'] = 'ASC,ASC'; | ||
| 222 | + // 记录当前页数 | ||
| 223 | + params['page'] = page; | ||
| 224 | + // 弹出正在加载层 | ||
| 225 | + var i = layer.load(2); | ||
| 226 | + // 异步请求获取表格数据 | ||
| 227 | + $.get('/stationroute',params,function(result) { | ||
| 228 | + // 添加序号 | ||
| 229 | + result.content.page = page; | ||
| 230 | + // 把数据填充到模版中 | ||
| 231 | + var tbodyHtml = template('stationInfo_list_table_temp_detele',{list : result.content}); | ||
| 232 | + // 把渲染好的模版html文本追加到表格中 | ||
| 233 | + $('#datatable_station_detele tbody').html(tbodyHtml); | ||
| 234 | + // 是重新分页且返回数据长度大于0 | ||
| 235 | + if (isPon && result.content.length > 0) { | ||
| 236 | + // 重新分页 | ||
| 237 | + initPag = true; | ||
| 238 | + // 分页栏 | ||
| 239 | + showPagination(result); | ||
| 240 | + } | ||
| 241 | + // 关闭弹出加载层 | ||
| 242 | + layer.close(i); | ||
| 243 | + }); | ||
| 244 | + } | ||
| 245 | + /** | ||
| 246 | + * @description : (TODO) 分页栏组件 | ||
| 247 | + * | ||
| 248 | + */ | ||
| 249 | + function showPagination(data) { | ||
| 250 | + // 分页组件 | ||
| 251 | + $('#pagination').jqPaginator({ | ||
| 252 | + // 总页数 | ||
| 253 | + totalPages : data.totalPages, | ||
| 254 | + // 中间显示页数 | ||
| 255 | + visiblePages : 6, | ||
| 256 | + // 当前页 | ||
| 257 | + urrentPage : page + 1, | ||
| 258 | + first : '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', | ||
| 259 | + prev : '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', | ||
| 260 | + next : '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', | ||
| 261 | + last : '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', | ||
| 262 | + page : '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', | ||
| 263 | + onPageChange : function(num, type) { | ||
| 264 | + if (initPag) { | ||
| 265 | + initPag = false; | ||
| 266 | + return; | ||
| 267 | + } | ||
| 268 | + var pData = getParams(); | ||
| 269 | + page = num - 1; | ||
| 270 | + loadTableDate(pData, false); | ||
| 271 | + } | ||
| 272 | + }); | ||
| 273 | + } | ||
| 274 | +}); | ||
| 275 | +</script> | ||
| 0 | \ No newline at end of file | 276 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/js/deletebatch.js
0 → 100644
| 1 | +var DeleteBatchObj = function(){ | ||
| 2 | + | ||
| 3 | + /** 定义修改线路对象 */ | ||
| 4 | + | ||
| 5 | + var deleteBatchObj = { | ||
| 6 | + /** 获取批量撤销对象 @return:<Batch:批量撤销对象> */ | ||
| 7 | + getDeleteBatch : function() { | ||
| 8 | + return deleteBatchObj; | ||
| 9 | + }, | ||
| 10 | + | ||
| 11 | + /** 设置批量撤销的线路方向 @param:<dir:方向(0:上行;1:下行)> */ | ||
| 12 | + setDeteleBatchDiraction : function(dir) { | ||
| 13 | + | ||
| 14 | + deleteBatchObj.dir = dir; | ||
| 15 | + }, | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + return deleteBatchObj; | ||
| 19 | +}(); |
src/main/resources/static/pages/base/stationroute/js/editsection.js
| @@ -7,7 +7,6 @@ var EditSectionObj = function () { | @@ -7,7 +7,6 @@ var EditSectionObj = function () { | ||
| 7 | 7 | ||
| 8 | /** 获取修改路段集合对象 @return:<Section:修改路段对象> */ | 8 | /** 获取修改路段集合对象 @return:<Section:修改路段对象> */ |
| 9 | getEitdSection : function() { | 9 | getEitdSection : function() { |
| 10 | - | ||
| 11 | return Section; | 10 | return Section; |
| 12 | }, | 11 | }, |
| 13 | 12 |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-events.js
| @@ -56,6 +56,18 @@ $(function(){ | @@ -56,6 +56,18 @@ $(function(){ | ||
| 56 | PublicFunctions.stationRevoke(directionUpValue); | 56 | PublicFunctions.stationRevoke(directionUpValue); |
| 57 | }); | 57 | }); |
| 58 | 58 | ||
| 59 | + // 上行批量撤销事件 | ||
| 60 | + $('.module_tools #batchUpDelete').on('click', function() { | ||
| 61 | + var Line = LineObj.getLineObj(); | ||
| 62 | + /** 设置批量删除的线路方向 @param:<directionUpValue:方向(0:上行;1:下行)> */ | ||
| 63 | + DeleteBatchObj.setDeteleBatchDiraction(directionUpValue); | ||
| 64 | + // 加载选择新增方式mobal | ||
| 65 | + $.get('delete_select.html', function(m){ | ||
| 66 | + $(pjaxContainer).append(m); | ||
| 67 | + $('#delete_select_mobal').trigger('deleteSelectMobal.show',[GetAjaxData,Line,PublicFunctions,DeleteBatchObj]); | ||
| 68 | + }); | ||
| 69 | + }); | ||
| 70 | + | ||
| 59 | // 切换上下行. | 71 | // 切换上下行. |
| 60 | $('.retweet').on('click',function() { | 72 | $('.retweet').on('click',function() { |
| 61 | layer.confirm('您是否确定将【上、下】行站点和路段进行对换!', { | 73 | layer.confirm('您是否确定将【上、下】行站点和路段进行对换!', { |
| @@ -210,6 +222,18 @@ $(function(){ | @@ -210,6 +222,18 @@ $(function(){ | ||
| 210 | $('.module_tools #deleteDownStation').on('click', function() { | 222 | $('.module_tools #deleteDownStation').on('click', function() { |
| 211 | PublicFunctions.stationRevoke(directionDownValue); | 223 | PublicFunctions.stationRevoke(directionDownValue); |
| 212 | }); | 224 | }); |
| 225 | + | ||
| 226 | + // 下行批量撤销事件 | ||
| 227 | + $('.module_tools #batchDownDelete').on('click', function() { | ||
| 228 | + var Line = LineObj.getLineObj(); | ||
| 229 | + /** 设置批量删除的线路方向 @param:<directionDownValue:方向(0:上行;1:下行)> */ | ||
| 230 | + DeleteBatchObj.setDeteleBatchDiraction(directionDownValue); | ||
| 231 | + // 加载选择新增方式mobal | ||
| 232 | + $.get('delete_select.html', function(m){ | ||
| 233 | + $(pjaxContainer).append(m); | ||
| 234 | + $('#delete_select_mobal').trigger('deleteSelectMobal.show',[GetAjaxData,Line,PublicFunctions,DeleteBatchObj]); | ||
| 235 | + }); | ||
| 236 | + }); | ||
| 213 | 237 | ||
| 214 | // 编辑线路下行走向 | 238 | // 编辑线路下行走向 |
| 215 | $('.module_tools #editDownlineTrend').on('click', function() { | 239 | $('.module_tools #editDownlineTrend').on('click', function() { |
| @@ -242,5 +266,5 @@ $(function(){ | @@ -242,5 +266,5 @@ $(function(){ | ||
| 242 | $('.defeat-scroll').css('overflow','auto'); | 266 | $('.defeat-scroll').css('overflow','auto'); |
| 243 | }).on('mouseleave',function() { | 267 | }).on('mouseleave',function() { |
| 244 | $('.defeat-scroll').css('overflow','hidden'); | 268 | $('.defeat-scroll').css('overflow','hidden'); |
| 245 | - }); | 269 | + }); |
| 246 | }); | 270 | }); |
| 247 | \ No newline at end of file | 271 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/list.html
| @@ -59,6 +59,10 @@ | @@ -59,6 +59,10 @@ | ||
| 59 | </li> | 59 | </li> |
| 60 | <li class="divider"> </li> | 60 | <li class="divider"> </li> |
| 61 | <li> | 61 | <li> |
| 62 | + <a href="javascript:;" id="batchUpDelete"><i class="fa fa-trash-o"></i> 批量撤销</a> | ||
| 63 | + </li> | ||
| 64 | + <li class="divider"> </li> | ||
| 65 | + <li> | ||
| 62 | <a href="javascript:;" class="retweet"><i class="fa fa-retweet"></i> 切换上下行</a> | 66 | <a href="javascript:;" class="retweet"><i class="fa fa-retweet"></i> 切换上下行</a> |
| 63 | </li> | 67 | </li> |
| 64 | <li class="divider"> </li> | 68 | <li class="divider"> </li> |
| @@ -69,6 +73,7 @@ | @@ -69,6 +73,7 @@ | ||
| 69 | <li> | 73 | <li> |
| 70 | <a href="javascript:;" id="quoteDown"><i class="fa fa-long-arrow-down"></i> 引用下行路段</a> | 74 | <a href="javascript:;" id="quoteDown"><i class="fa fa-long-arrow-down"></i> 引用下行路段</a> |
| 71 | </li> | 75 | </li> |
| 76 | + <li class="divider"> </li> | ||
| 72 | <!-- <li> | 77 | <!-- <li> |
| 73 | <a href="javascript:;" id="editUplineTrend"><i class="fa fa-edit"></i> 编辑走向</a> | 78 | <a href="javascript:;" id="editUplineTrend"><i class="fa fa-edit"></i> 编辑走向</a> |
| 74 | </li> --> | 79 | </li> --> |
| @@ -154,6 +159,10 @@ | @@ -154,6 +159,10 @@ | ||
| 154 | </li> | 159 | </li> |
| 155 | <li class="divider"> </li> | 160 | <li class="divider"> </li> |
| 156 | <li> | 161 | <li> |
| 162 | + <a href="javascript:;" id="batchDownDelete"><i class="fa fa-trash-o"></i> 批量撤销</a> | ||
| 163 | + </li> | ||
| 164 | + <li class="divider"> </li> | ||
| 165 | + <li> | ||
| 157 | <a href="javascript:;" class="retweet"><i class="fa fa-retweet"></i> 切换上下行</a> | 166 | <a href="javascript:;" class="retweet"><i class="fa fa-retweet"></i> 切换上下行</a> |
| 158 | </li> | 167 | </li> |
| 159 | <li class="divider"> </li> | 168 | <li class="divider"> </li> |
| @@ -227,6 +236,8 @@ | @@ -227,6 +236,8 @@ | ||
| 227 | <script src="/pages/base/stationroute/js/editstationobj.js"></script> | 236 | <script src="/pages/base/stationroute/js/editstationobj.js"></script> |
| 228 | <!-- 修改路段对象类 --> | 237 | <!-- 修改路段对象类 --> |
| 229 | <script src="/pages/base/stationroute/js/editsection.js"></script> | 238 | <script src="/pages/base/stationroute/js/editsection.js"></script> |
| 239 | +<!-- 批量撤销对象类 --> | ||
| 240 | +<script src="/pages/base/stationroute/js/deletebatch.js"></script> | ||
| 230 | <!-- 绘图类 --> | 241 | <!-- 绘图类 --> |
| 231 | <script src="/pages/base/stationroute/js/drawingManager.js"></script> | 242 | <script src="/pages/base/stationroute/js/drawingManager.js"></script> |
| 232 | <!-- 地图类 --> | 243 | <!-- 地图类 --> |
src/main/resources/static/pages/base/timesmodel/add.html
| @@ -156,7 +156,7 @@ | @@ -156,7 +156,7 @@ | ||
| 156 | </div> | 156 | </div> |
| 157 | <div class="form-actions"> | 157 | <div class="form-actions"> |
| 158 | <div class="row"> | 158 | <div class="row"> |
| 159 | - <div class="col-md-offset-3 col-md-9"> | 159 | + <div class="col-md-offset-5 col-md-9"> |
| 160 | <a href="javascript:;" class="btn default button-previous disabled" style="display: none;"> | 160 | <a href="javascript:;" class="btn default button-previous disabled" style="display: none;"> |
| 161 | <i class="fa fa-angle-left"></i> 返回 </a> | 161 | <i class="fa fa-angle-left"></i> 返回 </a> |
| 162 | <a href="javascript:;" class="btn btn-outline green button-next"> 下一步 | 162 | <a href="javascript:;" class="btn btn-outline green button-next"> 下一步 |
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
| @@ -324,6 +324,448 @@ var BaseFun = function() { | @@ -324,6 +324,448 @@ var BaseFun = function() { | ||
| 324 | 'bxrcgs':null}; | 324 | 'bxrcgs':null}; |
| 325 | }, | 325 | }, |
| 326 | 326 | ||
| 327 | + /** | ||
| 328 | + * @description (TODO) 剔除不在上、下行时间范围内的班次. | ||
| 329 | + * | ||
| 330 | + * | ||
| 331 | + */ | ||
| 332 | + tcbzfwndbc02 : function(jsonArray,dataMap) { | ||
| 333 | + var _obj = baseF.getsxAndxxbc(jsonArray,dataMap); | ||
| 334 | + // 剔除上行不在时间范围内的班次 | ||
| 335 | + baseF.tcbc(_obj.sxbc,dataMap.smbcsjArr[0].kssj,dataMap.smbcsjArr[0].jssj); | ||
| 336 | + // 剔除下行不在时间范围内的班次 | ||
| 337 | + baseF.tcbc(_obj.xxbc,dataMap.smbcsjArr[1].kssj,dataMap.smbcsjArr[1].jssj); | ||
| 338 | + return _obj.sxbc.concat(_obj.xxbc); | ||
| 339 | + }, | ||
| 340 | + | ||
| 341 | + /** | ||
| 342 | + * @description : (TODO) 调整某班型下的各个路牌对应的班次以及工时、停站时间、是否分班. | ||
| 343 | + * @param bxlpbc 班型下的各个路牌的所有班次数组. | ||
| 344 | + * @param map 表单参数信息 | ||
| 345 | + * @param dataMap 封装的 以上、下行方向成对存在的 一些参数数组 [下标0 -- 代表上行 ; 下标1 -- 代表下行]. | ||
| 346 | + * @param saa 封装的一些 停站时间、周转时间、行驶时间、行驶里程等. | ||
| 347 | + * @param cara 路牌数组 | ||
| 348 | + * @param bxrcObj 班次类型对象 | ||
| 349 | + * @param dgminpcs 低谷最多配车数. | ||
| 350 | + * *********************************** 业务要求 **************************************************** | ||
| 351 | + * 满足单个路牌对应的标准工时、满足某班型下的所有路牌的平均工时对应的日平均工时、停站时间、路牌是否分班的班次集合. | ||
| 352 | + * | ||
| 353 | + * *********************************** 业务分析与思路 ********************************************** | ||
| 354 | + * | ||
| 355 | + * 首先判断出该路牌所属的班型,这里暂时考虑分两种情况. | ||
| 356 | + * | ||
| 357 | + * 第一种情况 :【五工二休】班型 | ||
| 358 | + * | ||
| 359 | + * 特点:一天标准工时为 : 8个小时 ; | ||
| 360 | + * 一般该班型下的路牌班次出现密集的地方 是在高峰时段以及高峰时段附近。(这种路牌在模型里,我们称为短(断)路牌); | ||
| 361 | + * 这种班型现象一般是晚出早归. | ||
| 362 | + * | ||
| 363 | + * 要求:单个路牌下的工时满足: 工时浮动范围在 标准工时【1-1.5】小时. | ||
| 364 | + * 相同班型路牌下的平均工时满足: 工时浮动范围在 以表单录入的日平均工时10分钟内. | ||
| 365 | + * | ||
| 366 | + * 剔除规则:从最后一个班次开始剔除,遇到高峰时段则跳过。一直剔除到满足到班型的判断标准工时8小时。 | ||
| 367 | + * | ||
| 368 | + * 第二种情况 : 其它班型(包括 一工一休 、 二工一休 、 三工一休 、 四工一休 、 五工一休 、 六工一休) | ||
| 369 | + * | ||
| 370 | + * 特点:一天标准工时:以各自对应的班型工时为准。这里会有单/双档 等的概念。现在我们暂时也只考虑单/双档这种情况. | ||
| 371 | + * 单:一个路牌一个人开 / 双:一个路牌两个开 ...... | ||
| 372 | + * 那么一个路牌下的总工时为 各自对应的班型标准工时*档数. | ||
| 373 | + * 这种情况下的路牌 | ||
| 374 | + * 第一条件首先满足高峰时段。然后看情况(满足工时或者是防止工时超出)是否会产生分班。 | ||
| 375 | + * 如果不产生分班:则一定为连续的,也就是说从头开到尾. | ||
| 376 | + * 如果产生分班: | ||
| 377 | + * 第一种情况 : 中间会断掉.一般这个断掉的时间不会太长,但至少是3小时以上。 | ||
| 378 | + * 第二种情况 : 连续的。这种情况一定是双档。不然工时会超出. | ||
| 379 | + * | ||
| 380 | + * 要求:单个路牌下的工时满足 :工时浮动范围在 标准工时【1-1.5】小时. | ||
| 381 | + * 相同班型路牌下的平均工时满足 : 工时浮动范围在 以表单录入的日平均工时10分钟内. | ||
| 382 | + * | ||
| 383 | + * 剔除规则:这里情况比较复杂,因为先要考虑该路牌是否分班。 | ||
| 384 | + * | ||
| 385 | + * 判断是否会产生分班分两种条件 | ||
| 386 | + * | ||
| 387 | + * 第一种情况:是双档一定有分班班次.并且是连续的班次. | ||
| 388 | + * | ||
| 389 | + * 第二种情况:是单档 , 但是单个路牌工时超出了要求范围 , 为了在满足工时的条件下。采取分班。 | ||
| 390 | + * 判断依据:反算出低谷最少配车数. | ||
| 391 | + * 计算公式:(低谷上行行驶时间 + 低谷下行行驶时间 + 低谷最大停站时间*2) / 低谷最大发车间隙 | ||
| 392 | + * 这里的取整数要求:四舍五入去整。 | ||
| 393 | + * | ||
| 394 | + * | ||
| 395 | + * 共同满足的条件 : 所有路牌下的相邻班次(前提条件是 不是分班班次)的停站时间不得超过 行业标准 行驶时间的10%~15%。如果有特殊情况,以表单录入的低谷最大停站时间为极限。 | ||
| 396 | + * | ||
| 397 | + * | ||
| 398 | + **/ | ||
| 399 | + tzlpgs02 : function(bxlpbc , map , dataMap , saa , cara , bxrcObj , dgminpcs) { | ||
| 400 | + var rsultA = new Array(); | ||
| 401 | + for(var a = 0 ; a < bxlpbc.length ; a++) { | ||
| 402 | + // 定义该版型下对应的路牌的班次数组、班次数组长度。 | ||
| 403 | + var lpbc = bxlpbc[a].lpbc, lpbclen_; | ||
| 404 | + // 定义当前路牌的初始工时、班型对应的标准工时 | ||
| 405 | + var initCountGs = bxlpbc[a].initCountGs ,bzgs = bxlpbc[a].bzgs; | ||
| 406 | + // 定义初始工时与日平均工时差值 | ||
| 407 | + var initdx = initCountGs - bxlpbc[a].gsavg; | ||
| 408 | + // 定义剔除班次数、剔除的时间段. | ||
| 409 | + var deletebcNum = Math.ceil((initCountGs - bxlpbc[a].gsavg) / saa[0].zzsj.dgzzsj) , tcbcgzA = new Array(); | ||
| 410 | + // var deletebcNum = parseInt((initCountGs - bxlpbc[a].gsavg) / saa[0].zzsj.dgzzsj) , tcbcgzA = new Array(); | ||
| 411 | + if(bxrcObj.type == '五工二休') { | ||
| 412 | + if(lpbclen_>0) { | ||
| 413 | + // 定义晚高峰后能剔除多少班次数. | ||
| 414 | + var wgfhtcbcNum = parseInt(( dataMap.wgfzhsjd[0].ed - dataMap.wgfsjd[0].ed ) / (60000 * saa[0].zzsj.dgzzsj)); | ||
| 415 | + // 定义时间段内剔除班次规则. | ||
| 416 | + tcbcgzA.push({'minsj': dataMap.wgfsjd[0].ed , 'maxsj' : dataMap.wgfzhsjd[0].ed , 'deletebcNum' : wgfhtcbcNum}, | ||
| 417 | + {'minsj': dataMap.zgfsjd[0].ed , 'maxsj' : dataMap.wgfsjd[0].st , 'deletebcNum' : deletebcNum - wgfhtcbcNum}); | ||
| 418 | + // 逆序排序剔除. | ||
| 419 | + lpbc.sort(function(r,s){return s.fcno-r.fcno}); | ||
| 420 | + // 剔除不在高峰时间段内的班次. | ||
| 421 | + baseF.spliceBc02(lpbc , tcbcgzA , dataMap , 'desc' , true); | ||
| 422 | + } | ||
| 423 | + }else { | ||
| 424 | + /*console.log(bxlpbc[a].lpNo , initCountGs , bzgs , saa[0].zzsj.dgzzsj , | ||
| 425 | + initCountGs - bzgs , (initCountGs - bzgs) /saa[0].zzsj.dgzzsj , | ||
| 426 | + initCountGs - bxlpbc[a].gsavg , (initCountGs - bxlpbc[a].gsavg) / saa[0].zzsj.dgzzsj );*/ | ||
| 427 | + // 单档 一个路牌一档劳动力 | ||
| 428 | + if(bxlpbc[a].keepOff==1) { | ||
| 429 | + // 如果低谷至少配车数大于零,则该班型下的路牌 存在一些 分班路牌,这里的分班 指的是 这个路牌先满足的前提条件就是 是单档。 | ||
| 430 | + // 为了满足工时的要求,在低谷断开一段时间. | ||
| 431 | + if(dgminpcs>0 && dgminpcs <= bxrcObj.fpcls ) { | ||
| 432 | + if( (a + 1) <= dgminpcs) { | ||
| 433 | + var dgzjsj = baseF.getDateTime('12:30'); | ||
| 434 | + /*var zgfyh = dataMap.zgfsjd[0].ed; | ||
| 435 | + zgfyh.setMinutes(zgfyh.getMinutes()+ Math.min.apply(null, dataMap.dgxxsjArr));*/ | ||
| 436 | + if( a % 2 == 0) { | ||
| 437 | + // 定义早高峰结束 ~ 12:30 剔除规则.如果剔除的班次数不够,则去晚高峰之后剔除剩下的班次. | ||
| 438 | + var swmaxtcbcNum = parseInt(( dgzjsj - dataMap.zgfsjd[0].ed) / (60000 * saa[0].zzsj.dgzzsj)); | ||
| 439 | + if(deletebcNum < swmaxtcbcNum) { | ||
| 440 | + // tcbcgzA.push({'minsj': dataMap.zgfsjd[0].ed , 'maxsj' : dgzjsj , 'order' : 'asc' , 'deletebcNum' : deletebcNum}); | ||
| 441 | + tcbcgzA.push({'minsj': dataMap.zgfsjd[0].ed , 'maxsj' : dgzjsj , 'order' : 'asc' , 'deletebcNum' : deletebcNum}); | ||
| 442 | + }else { | ||
| 443 | + tcbcgzA.push({'minsj': dataMap.zgfsjd[0].ed, 'maxsj' : dgzjsj , 'order' : 'asc' , 'deletebcNum' : swmaxtcbcNum}, | ||
| 444 | + {'minsj': dataMap.wgfsjd[0].ed , 'maxsj' : dataMap.wgfzhsjd[0].ed, 'order' : 'desc' , 'deletebcNum' : deletebcNum - swmaxtcbcNum}); | ||
| 445 | + } | ||
| 446 | + // tcbcgzA.push({'minsj': dataMap.zgfsjd[0].ed , 'maxsj' : dgzjsj , 'order' : 'asc' , 'deletebcNum' : deletebcNum}); | ||
| 447 | + }else { | ||
| 448 | + // 定义12:30 ~ 晚高峰开始以前剔除规则. 如果剔除的班次数不够,则去晚高峰之后剔除剩下的班次. | ||
| 449 | + var xwmaxtcbcNum = parseInt(( dataMap.wgfsjd[0].st - dgzjsj) / (60000 * saa[0].zzsj.dgzzsj)); | ||
| 450 | + if(deletebcNum < xwmaxtcbcNum) { | ||
| 451 | + tcbcgzA.push({'minsj': dgzjsj , 'maxsj' : dataMap.wgfsjd[0].st , 'order' : 'desc', 'deletebcNum' : deletebcNum}); | ||
| 452 | + }else { | ||
| 453 | + tcbcgzA.push({'minsj': dataMap.wgfsjd[0].ed , 'maxsj' : dataMap.wgfzhsjd[0].ed , 'order' : 'desc', 'deletebcNum' : deletebcNum - xwmaxtcbcNum}, | ||
| 454 | + {'minsj': dgzjsj , 'maxsj' : dataMap.wgfsjd[0].st , 'order' : 'desc', 'deletebcNum' : xwmaxtcbcNum}); | ||
| 455 | + } | ||
| 456 | + // tcbcgzA.push({'minsj': dgzjsj , 'maxsj' : dataMap.wgfsjd[0].st , 'order' : 'desc', 'deletebcNum' : deletebcNum}); | ||
| 457 | + } | ||
| 458 | + // 按规则剔除班次.并且分班.路牌班次断开. | ||
| 459 | + baseF.spliceBc02(lpbc , tcbcgzA , dataMap , true); | ||
| 460 | + }else { | ||
| 461 | + // 按规则剔除班次.不分班.路牌班次不会断开. | ||
| 462 | + baseF.isdk02(lpbc , dataMap , deletebcNum , false); | ||
| 463 | + } | ||
| 464 | + // 该班型下的路牌 不存在分班路牌. | ||
| 465 | + }else if(dgminpcs == 0){ | ||
| 466 | + // 按规则剔除班次.不分班.路牌班次不会断开. | ||
| 467 | + baseF.isdk02(lpbc , dataMap , deletebcNum , false); | ||
| 468 | + } | ||
| 469 | + // 双档 一个路牌两档劳动力 | ||
| 470 | + }else if(bxlpbc[a].keepOff==2) { | ||
| 471 | + // 按规则剔除班次.分班.但是路牌班次不会断开. | ||
| 472 | + baseF.isdk02(lpbc , dataMap , deletebcNum , true); | ||
| 473 | + } | ||
| 474 | + } | ||
| 475 | + rsultA = rsultA.concat(lpbc); | ||
| 476 | + } | ||
| 477 | + return rsultA; | ||
| 478 | + }, | ||
| 479 | + | ||
| 480 | + /** | ||
| 481 | + * @description (TODO) 定义不断开班次的路牌剔除规则. | ||
| 482 | + * | ||
| 483 | + * | ||
| 484 | + */ | ||
| 485 | + isdk02 : function(lpbc , dataMap , deletebcNum , isfb) { | ||
| 486 | + if(deletebcNum > 0) { | ||
| 487 | + var zgfzqtcbcNum = parseInt(( dataMap.zgfzqsjd[0].ed - dataMap.zgfzqsjd[0].st ) / (60000 * saa[0].zzsj.dgzzsj)), | ||
| 488 | + wgfhtcbcNum = parseInt(( dataMap.wgfzhsjd[0].ed - dataMap.wgfzhsjd[0].st ) / (60000 * saa[0].zzsj.dgzzsj)) | ||
| 489 | + tcbcgzA = new Array(); | ||
| 490 | + if( wgfhtcbcNum >= deletebcNum) { | ||
| 491 | + tcbcgzA.push({'minsj': dataMap.wgfzhsjd[0].st , 'maxsj' : dataMap.wgfzhsjd[0].ed , 'order' : 'desc', 'deletebcNum' : deletebcNum}); | ||
| 492 | + }else if(zgfzqtcbcNum >= deletebcNum){ | ||
| 493 | + tcbcgzA.push({'minsj': dataMap.zgfzqsjd[0].st , 'maxsj' : dataMap.zgfzqsjd[0].ed , 'order' : 'asc', 'deletebcNum' : deletebcNum}); | ||
| 494 | + }else if(deletebcNum >= (zgfzqtcbcNum + wgfhtcbcNum)){ | ||
| 495 | + tcbcgzA.push({'minsj': dataMap.wgfzhsjd[0].st , 'maxsj' : dataMap.wgfzhsjd[0].ed , 'order' : 'desc', 'deletebcNum' : wgfhtcbcNum}, | ||
| 496 | + {'minsj': dataMap.zgfzqsjd[0].st , 'maxsj' : dataMap.zgfzqsjd[0].ed , 'order' : 'asc', 'deletebcNum' : zgfzqtcbcNum}); | ||
| 497 | + } | ||
| 498 | + // lpbc.sort(function(m,n){return n.fcno-m.fcno}); | ||
| 499 | + baseF.spliceBc02(lpbc , tcbcgzA , dataMap , isfb); | ||
| 500 | + } | ||
| 501 | + }, | ||
| 502 | + | ||
| 503 | + /** | ||
| 504 | + * @description (TODO) 根据定义规则剔除班次. | ||
| 505 | + * @param arr 班次数组. | ||
| 506 | + * @param tcbcgzA 剔除规则. | ||
| 507 | + * @param type 剔除类型【asc -- 顺序剔除 ; desc -- 逆序剔除】 | ||
| 508 | + * @param dataMap 封装的 以上、下行方向成对存在的 一些参数数组 [下标0 -- 代表上行 ; 下标1 -- 代表下行]. | ||
| 509 | + * @param isfb 剔除过程中是否会产生分班. | ||
| 510 | + */ | ||
| 511 | + spliceBc02 : function (arr , tcbcgzA , dataMap , isfb) { | ||
| 512 | + for(var t = 0 ; t < tcbcgzA.length ; t++) { | ||
| 513 | + var order = tcbcgzA[t].order; | ||
| 514 | + if(order == 'asc') | ||
| 515 | + arr.sort(function(x,y){return x.fcno-y.fcno}); | ||
| 516 | + else if(order == 'desc') | ||
| 517 | + arr.sort(function(m,n){return n.fcno-m.fcno}); | ||
| 518 | + for(var a = 0 ; a < arr.length ; a ++) { | ||
| 519 | + var fcsj = baseF.getDateTime(arr[a].fcsj); | ||
| 520 | + // 判断是否在高峰时间范围.【true--表示在,false--表示不在】. | ||
| 521 | + if(!baseF.isgfsjd01(fcsj,dataMap) && fcsj > tcbcgzA[t].minsj && fcsj < tcbcgzA[t].maxsj) { | ||
| 522 | + if(order == 'asc') { | ||
| 523 | + arr[a-1].isfb = isfb ? 1 : 0; | ||
| 524 | + arr[a-1].STOPTIME = 0; | ||
| 525 | + }else if(order == 'desc') { | ||
| 526 | + var index_ = a + tcbcgzA[t].deletebcNum * 2; | ||
| 527 | + arr[index_].STOPTIME = 0; | ||
| 528 | + arr[index_].isfb = isfb && a > 0 ? 1 : 0; | ||
| 529 | + } | ||
| 530 | + arr.splice( a , tcbcgzA[t].deletebcNum * 2); | ||
| 531 | + break; | ||
| 532 | + } | ||
| 533 | + } | ||
| 534 | + } | ||
| 535 | + }, | ||
| 536 | + | ||
| 537 | + /** | ||
| 538 | + * @description (TODO) 排列各个路牌下的班次. | ||
| 539 | + * @param bxrclist 班型数组对象. | ||
| 540 | + * @prarm jsonArray 所有路牌下的班次. | ||
| 541 | + * @param cara 路牌数组. | ||
| 542 | + * @prarm saa 封装的一些 停站时间、周转时间、行驶时间、行驶里程等. | ||
| 543 | + * @param dataMap 封装的 以上、下行方向成对存在的 一些参数数组 [下标0 -- 代表上行 ; 下标1 -- 代表下行]. | ||
| 544 | + * @map map 表单参数. | ||
| 545 | + * @return 返回一个满足单个路牌对应的标准工时、满足某班型下的所有路牌的平均工时对应的日平均工时、停站时间、路牌是否分班的班次集合. | ||
| 546 | + */ | ||
| 547 | + jslpgsAndbcs : function(bxrclist , jsonArray , cara , saa , dataMap , map) { | ||
| 548 | + // 定义低谷最大发车时间、最大停站时间来反算出低谷最少配车数. | ||
| 549 | + var dgmaxfcjx = parseInt(map.dgmaxfcjx), | ||
| 550 | + dgmaxtzsj = parseInt(map.dgmaxtzsj); | ||
| 551 | + // 计算低谷最少配车数 (低谷上行行驶时间 + 低谷下行行驶时间 + 低谷最大停站时间*2) / 低谷最大发车间隙. | ||
| 552 | + var dgminpcs = Math.round((dataMap.dgxxsjArr[0] + dataMap.dgxxsjArr[1] + dgmaxtzsj*2) / dgmaxfcjx); | ||
| 553 | + // 定义返回数组. | ||
| 554 | + var rs = new Array(); | ||
| 555 | + for(var x = 0 ; x < bxrclist.length; x++) { | ||
| 556 | + // 定义当前班型下对应的路牌、 班型下的各个路牌的所有班次数组. | ||
| 557 | + var cla = bxrclist[x].sslp , bxlpbc = new Array() ; | ||
| 558 | + // 根据劳动力和配车数 算出是否 单/双 档. | ||
| 559 | + var keepOff = bxrclist[x].rs/bxrclist[x].fpcls; | ||
| 560 | + // 定义当前班型/人次/配车数 下的标准工时. | ||
| 561 | + var hoursV = bxrclist[x].hoursV * keepOff; | ||
| 562 | + for(var s = 0 ; s < cla.length; s++) { | ||
| 563 | + // 定义路牌编号、定义当前路牌下的所有班次. | ||
| 564 | + var lpNo = cla[s].lpNo , lpbc = new Array(); | ||
| 565 | + for(var i =0 ; i <jsonArray.length; i++) { | ||
| 566 | + // 判断当期遍历的班次是否属于当前的路牌. | ||
| 567 | + if(jsonArray[i].lpNo == lpNo) { | ||
| 568 | + jsonArray[i].lpName = bxrclist[x].type + '_' + lpNo ; | ||
| 569 | + lpbc.push(jsonArray[i]); | ||
| 570 | + } | ||
| 571 | + } | ||
| 572 | + // 更新路牌数组的路牌名称. | ||
| 573 | + baseF.updlpArr(cara , lpNo , (bxrclist[x].type + '_' + lpNo)); | ||
| 574 | + if(lpbc.length > 0 ) { | ||
| 575 | + // 按发车序号逆序排序路牌下的班次. | ||
| 576 | + lpbc.sort(function(a,b){return b.fcno-a.fcno}); | ||
| 577 | + lpbc[0].STOPTIME = 0; | ||
| 578 | + // 因为这里路牌下的班次特点是连续性的 | ||
| 579 | + // 所以求这个路牌下当前的总工时(分钟)直接用最后一个班次的到达时间 - 第一个班次的发车时间,再加上进出场时间、早晚例保时间. | ||
| 580 | + var initCountGs = parseInt((baseF.getDateTime(lpbc[0].ARRIVALTIME) - baseF.getDateTime(lpbc[lpbc.length-1].fcsj)) / 60000) + | ||
| 581 | + dataMap.jcsjArr[baseF.dirDmToIndex(lpbc[0].xlDir)] + | ||
| 582 | + dataMap.ccsjArr[baseF.dirDmToIndex(lpbc[lpbc.length-1].xlDir)] + | ||
| 583 | + saa[0].lbsj*2; | ||
| 584 | + | ||
| 585 | + // 如果分班路牌数超过了该班型下的路牌总数.则提示无法排列。 | ||
| 586 | + if(keepOff == 1) { | ||
| 587 | + if(bxrclist[x].gsavg > (hoursV + 1.5 * bxrclist[x].fpcls)) { | ||
| 588 | + ErrorInfo.show('提示', | ||
| 589 | + " 班型【" + bxrclist[x].type + "】 下的 " + | ||
| 590 | + "日平均工时 " + bxrclist[x].gsavg + " 过大!最大值不能超过:" + | ||
| 591 | + hoursV + " + " + "1.5" + "*" + bxrclist[x].fpcls + " 的和。"); | ||
| 592 | + return false; | ||
| 593 | + } | ||
| 594 | + if(dgminpcs > bxrclist[x].fpcls && bxrclist[x].type != '五工二休') { | ||
| 595 | + ErrorInfo.show('提示',"请合理的搭配【低谷的最大停站时间、最大发车间隙】 与 【劳动力】 、 【配车数】之间的数值!" + | ||
| 596 | + " 在班型【" + bxrclist[x].type + " 】下会产生分班," + "而低谷最少配车数为:" + dgminpcs + | ||
| 597 | + " 辆,但是在该班型下只配了:" + bxrclist[x].fpcls + "辆" ); | ||
| 598 | + return false; | ||
| 599 | + } | ||
| 600 | + } else if(keepOff == 2) { | ||
| 601 | + if(bxrclist[x].gsavg > (hoursV + 1.5*2*bxrclist[x].fpcls)) { | ||
| 602 | + ErrorInfo.show('提示', | ||
| 603 | + " 班型【" + bxrclist[x].type + "】 下的 " + | ||
| 604 | + "日平均工时 " + bxrclist[x].gsavg + " 过大!最大值不能超过:" + | ||
| 605 | + hoursV + " + " + "1.5" + "*2" + bxrclist[x].fpcls + " 的和。"); | ||
| 606 | + return false; | ||
| 607 | + } | ||
| 608 | + } | ||
| 609 | + // 'initCountGs' : parseFloat((initCountGs/60).toFixed(2)), | ||
| 610 | + bxlpbc.push({'bxtyp' : bxrclist[x].type , 'lpNo' : lpNo , | ||
| 611 | + 'lpbc' : lpbc , 'dygbcfcsj' : lpbc[lpbc.length-1].fcsj, | ||
| 612 | + 'initCountGs' : initCountGs , | ||
| 613 | + 'keepOff' : keepOff , 'bzgs' : parseInt(hoursV*60) , 'gsavg' : parseInt(bxrclist[x].gsavg*60) , | ||
| 614 | + 'fcint' : baseF.getDateTime(lpbc[lpbc.length-1].fcsj).getTime()}); | ||
| 615 | + } | ||
| 616 | + } | ||
| 617 | + if(bxlpbc.length > 0 ) { | ||
| 618 | + bxlpbc.sort(function(x,y){return x.fcint-y.fcint}); | ||
| 619 | + // console.log(bxlpbc); | ||
| 620 | + // 调整某班型下的各个路牌对应的班次以及工时、停站时间、是否分班. | ||
| 621 | + rs = rs.concat(baseF.tzlpgs02(bxlpbc , map , dataMap , saa , cara , bxrclist[x] , dgminpcs)); | ||
| 622 | + } | ||
| 623 | + } | ||
| 624 | + return rs; | ||
| 625 | + }, | ||
| 626 | + | ||
| 627 | + /** | ||
| 628 | + * @description (TODO) 更新路牌数组的路牌名称. | ||
| 629 | + * @param cara 路牌数组 | ||
| 630 | + * @param name 路牌新名称 | ||
| 631 | + */ | ||
| 632 | + updlpArr : function(cara , lpNo , name) { | ||
| 633 | + for(var l = 0 ; l <cara.length;l++ ) { | ||
| 634 | + if(cara[l].lpNo == lpNo) { | ||
| 635 | + cara[l].lpName = name; | ||
| 636 | + } | ||
| 637 | + } | ||
| 638 | + }, | ||
| 639 | + | ||
| 640 | + BXPplaceClassesTime02 : function(saa , cara , map , seMap , dataMap , lpNoA) { | ||
| 641 | + // 得到所有路牌下的班次数[从各路牌下的第一个班次发车时间 到 营运结束时间点并且是连续的班次数]. | ||
| 642 | + var jsonArray = baseF.plgfbc01(saa , cara , map , seMap , dataMap); | ||
| 643 | + // return {'json':jsonArray,'bxrcgs':null}; | ||
| 644 | + | ||
| 645 | + // 切割班型/人次/配车数 字符串 为 数组对象. | ||
| 646 | + var list = baseF.splitBxRc02(map.bxrc); | ||
| 647 | + // 把班型分配到对应的具体路牌上. | ||
| 648 | + baseF.fprclp01(list,cara); | ||
| 649 | + // console.log(list); | ||
| 650 | + | ||
| 651 | + var tempA = baseF.jslpgsAndbcs(list.data , baseF.tcbzfwndbc02(jsonArray , dataMap) , cara , saa , dataMap , map); | ||
| 652 | + // return {'json':tempA,'bxrcgs':null}; | ||
| 653 | + return {'json':baseF.addjcclcbc01(cara,tempA,dataMap,saa,map),'bxrcgs':null}; | ||
| 654 | + var ttsmbA = baseF.tzsmbcsj01(tempA,dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap); | ||
| 655 | + | ||
| 656 | + baseF.jhfcjx02(ttsmbA,dataMap); | ||
| 657 | + //return {'json':baseF.addjcclcbc01(cara,ttsmbA,dataMap,saa,map),'bxrcgs':null}; | ||
| 658 | + //return {'json':ttsmbA,'bxrcgs':null}; | ||
| 659 | + var rsjar = baseF.tzsztest02(cara,ttsmbA,dataMap); | ||
| 660 | + return {'json':rsjar,'bxrcgs':null}; | ||
| 661 | + return {'json':baseF.addjcclcbc01(cara,rsjar,dataMap,saa,map),'bxrcgs':null}; | ||
| 662 | + }, | ||
| 663 | + | ||
| 664 | + tzsztest02 : function(cara,tempa,dataMap) { | ||
| 665 | + var jsrs = new Array(); | ||
| 666 | + for(var t = 0 ; t < cara.length; t++) { | ||
| 667 | + if(t>3) | ||
| 668 | + continue; | ||
| 669 | + var sslpbcA = new Array(); | ||
| 670 | + for(var j =0 ; j <tempa.length; j++) { | ||
| 671 | + // 判断当期遍历的班次是否属于当前的路牌. | ||
| 672 | + if(tempa[j].lpNo == cara[t].lpNo) | ||
| 673 | + sslpbcA.push(tempa[j]); | ||
| 674 | + } | ||
| 675 | + sslpbcA.sort(function(a,b){return a.fcno-b.fcno}); | ||
| 676 | + baseF.tztzsjInit02(sslpbcA,dataMap); | ||
| 677 | + jsrs = jsrs.concat(sslpbcA); | ||
| 678 | + } | ||
| 679 | + return jsrs; | ||
| 680 | + }, | ||
| 681 | + | ||
| 682 | + tztzsjInit02 : function(ar,dataMap) { | ||
| 683 | + var maxXxsjA = [parseInt(dataMap.map.upTravelTime),parseInt(dataMap.map.downTravelTime)]; | ||
| 684 | + var v1 = Math.max.apply(null, maxXxsjA) *1.5; | ||
| 685 | + for(var r = 0 ; r< ar.length-1;r++) { | ||
| 686 | + var sgbcfcsj = baseF.getDateTime(ar[r+1].fcsj),dqbcddsj = baseF.getDateTime(ar[r].ARRIVALTIME); | ||
| 687 | + var dxmin = parseInt( (sgbcfcsj - dqbcddsj)/60000); | ||
| 688 | + if(dxmin<0 || ar[r].STOPTIME<0) { | ||
| 689 | + var cctag = baseF.dirDmToIndex(ar[r].xlDir); | ||
| 690 | + dxmin = ar[r].bcType == dataMap.bcTypeArr.cf ? 0 : baseF.isgfsjd01(baseF.getDateTime(ar[r].fcsj),dataMap) ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag]; | ||
| 691 | + }else if(dxmin >= v1 && dxmin < 180) { | ||
| 692 | + if(r==ar.length-2 || baseF.issmbcsjArr(ar[r+1].fcsj,dataMap.smbcsjArr)) { | ||
| 693 | + dxmin = dxmin; | ||
| 694 | + }else { | ||
| 695 | + dxmin = v1; | ||
| 696 | + } | ||
| 697 | + } | ||
| 698 | + if(ar[r].STOPTIME >0) { | ||
| 699 | + dqbcddsj.setMinutes(dqbcddsj.getMinutes() + dxmin); | ||
| 700 | + ar[r+1].fcsj = baseF.getTimeStr(dqbcddsj); | ||
| 701 | + dqbcddsj.setMinutes(dqbcddsj.getMinutes() + ar[r+1].bcsj); | ||
| 702 | + ar[r+1].ARRIVALTIME = baseF.getTimeStr(dqbcddsj); | ||
| 703 | + ar[r].STOPTIME = dxmin >= 180 ? 0 : parseInt(dxmin); | ||
| 704 | + } | ||
| 705 | + } | ||
| 706 | + }, | ||
| 707 | + | ||
| 708 | + | ||
| 709 | + /** | ||
| 710 | + * @description : (TODO) 均匀发车间隙 | ||
| 711 | + * | ||
| 712 | + * @params : [arr--某个方向下的班次数组;dir--方向;zzsj--周转时间] | ||
| 713 | + * | ||
| 714 | + * @return : 返回一个数组.这里返回的是调整过后 发车间距均匀的班次数组 | ||
| 715 | + **/ | ||
| 716 | + jhfcjx02 : function(bcArr,dataMap) { | ||
| 717 | + if(bcArr.length<=0) | ||
| 718 | + return; | ||
| 719 | + var dirA = dataMap.dira; | ||
| 720 | + var clzs = parseInt(dataMap.map.clzs); | ||
| 721 | + for(var d = 0 ; d < dirA.length; d++) { | ||
| 722 | + var fxdm = dirA[d],fxbc = new Array(); | ||
| 723 | + var cctag = baseF.dirDmToIndex(fxdm); | ||
| 724 | + for(var b = 0;b<bcArr.length ; b++) { | ||
| 725 | + bcArr[b].fcint = baseF.getDateTime(bcArr[b].fcsj).getTime(); | ||
| 726 | + if(bcArr[b].xlDir == fxdm) | ||
| 727 | + fxbc.push(bcArr[b]); | ||
| 728 | + } | ||
| 729 | + var kssj = baseF.getDateTime(dataMap.smbcsjArr[cctag].kssj),// 开始时间. | ||
| 730 | + jssj = baseF.getDateTime(dataMap.smbcsjArr[cctag].jssj);// 结束时间. | ||
| 731 | + fxbc.sort(function(m,n){return m.fcint - n.fcint}); | ||
| 732 | + while(kssj<=jssj) { | ||
| 733 | + var tagboolean = baseF.isgfsjd01(kssj,dataMap); | ||
| 734 | + var zzsj = tagboolean ? dataMap.zzsj.gfzzsj : dataMap.zzsj.dgzzsj; | ||
| 735 | + if(true){ | ||
| 736 | + var temp = new Date(); | ||
| 737 | + temp.setHours(kssj.getHours()); | ||
| 738 | + temp.setMinutes(kssj.getMinutes()+zzsj); | ||
| 739 | + var sjdbcArr = baseF.getObjRegion(kssj,temp,fxbc,dataMap); | ||
| 740 | + var len_ = sjdbcArr.length; | ||
| 741 | + var bcCount = baseF.getlpNum(sjdbcArr);// 定长度 | ||
| 742 | + if(len_>0 && bcCount > 0) { | ||
| 743 | + var _fcjx = parseInt(Math.ceil(zzsj/bcCount)); | ||
| 744 | + console.log(_fcjx); | ||
| 745 | + var fcnosj = new Date(kssj); | ||
| 746 | + for(var l = 0 ; l< len_ ; l++) { | ||
| 747 | + // 每个路牌的末班车发车时间不准动. | ||
| 748 | + /*if(baseF.iszhclzsbc(fxbc, sjdbcArr[l].fcno , clzs)) { | ||
| 749 | + continue; | ||
| 750 | + }*/ | ||
| 751 | + sjdbcArr[l].fcsj = baseF.getTimeStr(fcnosj); | ||
| 752 | + var _xxsj = baseF.getxssj(dataMap.zgfsjd, | ||
| 753 | + dataMap.wgfsjd,fcnosj,dataMap.pcxssjArr, | ||
| 754 | + dataMap.gfxxsjArr,baseF.dirDmToIndex(sjdbcArr[l].xlDir));// 获取行驶时间 | ||
| 755 | + sjdbcArr[l].bcsj = _xxsj; | ||
| 756 | + var ddsj = new Date(); | ||
| 757 | + ddsj.setHours(fcnosj.getHours()); | ||
| 758 | + ddsj.setMinutes(fcnosj.getMinutes()+_xxsj); | ||
| 759 | + sjdbcArr[l].ARRIVALTIME = baseF.getTimeStr(ddsj); | ||
| 760 | + fcnosj.setMinutes(fcnosj.getMinutes() + _fcjx); | ||
| 761 | + } | ||
| 762 | + } | ||
| 763 | + } | ||
| 764 | + kssj = new Date(kssj.setMinutes(kssj.getMinutes() + zzsj)); | ||
| 765 | + } | ||
| 766 | + } | ||
| 767 | + }, | ||
| 768 | + | ||
| 327 | BXPplaceClassesTime01 : function(saa,cara,map,seMap,dataMap,lpNoA) { | 769 | BXPplaceClassesTime01 : function(saa,cara,map,seMap,dataMap,lpNoA) { |
| 328 | var jsonArray = baseF.plgfbc(saa,cara,map,seMap,dataMap); | 770 | var jsonArray = baseF.plgfbc(saa,cara,map,seMap,dataMap); |
| 329 | var list = baseF.splitBxRc(map.bxrc); | 771 | var list = baseF.splitBxRc(map.bxrc); |
| @@ -830,6 +1272,7 @@ var BaseFun = function() { | @@ -830,6 +1272,7 @@ var BaseFun = function() { | ||
| 830 | var bcCount = baseF.getlpNum(sjdbcArr);// 定长度 | 1272 | var bcCount = baseF.getlpNum(sjdbcArr);// 定长度 |
| 831 | if(len_>0 && bcCount > 0) { | 1273 | if(len_>0 && bcCount > 0) { |
| 832 | var _fcjx = parseInt(Math.ceil(zzsj/bcCount)); | 1274 | var _fcjx = parseInt(Math.ceil(zzsj/bcCount)); |
| 1275 | + console.log(_fcjx); | ||
| 833 | var fcnosj = new Date(kssj); | 1276 | var fcnosj = new Date(kssj); |
| 834 | for(var l = 0 ; l< len_ ; l++) { | 1277 | for(var l = 0 ; l< len_ ; l++) { |
| 835 | // 每个路牌的末班车发车时间不准动. | 1278 | // 每个路牌的末班车发车时间不准动. |
| @@ -1044,11 +1487,11 @@ var BaseFun = function() { | @@ -1044,11 +1487,11 @@ var BaseFun = function() { | ||
| 1044 | for(var r = 0 ; r<array.length;r++) { | 1487 | for(var r = 0 ; r<array.length;r++) { |
| 1045 | tempA.push(array[r].STOPTIME + bs); | 1488 | tempA.push(array[r].STOPTIME + bs); |
| 1046 | } | 1489 | } |
| 1047 | - var v1 = Math.max.apply(null, maxXxsjA) *1.5; | 1490 | + var v1 = Math.max.apply(null, maxXxsjA) * 1.5; |
| 1048 | var v2 = Math.max.apply(null, tempA); | 1491 | var v2 = Math.max.apply(null, tempA); |
| 1049 | if( v2 > v1) { | 1492 | if( v2 > v1) { |
| 1050 | tag = false; | 1493 | tag = false; |
| 1051 | - dx = parseInt(v2 -v1); | 1494 | + dx = parseInt(v2 - v1); |
| 1052 | } | 1495 | } |
| 1053 | return {tag:tag,dx:dx}; | 1496 | return {tag:tag,dx:dx}; |
| 1054 | }, | 1497 | }, |
| @@ -1565,6 +2008,115 @@ var BaseFun = function() { | @@ -1565,6 +2008,115 @@ var BaseFun = function() { | ||
| 1565 | return inv; | 2008 | return inv; |
| 1566 | }, | 2009 | }, |
| 1567 | 2010 | ||
| 2011 | + | ||
| 2012 | + /** | ||
| 2013 | + * @discription : (TODO)获取所有路牌默认出场方向. | ||
| 2014 | + * | ||
| 2015 | + * 判定规则: | ||
| 2016 | + * 下行头班车时间 + 下行行驶时间 + 下行停站时间 大于了 上行头班车时间 判定都为上行出场 否则为下行出场. | ||
| 2017 | + * | ||
| 2018 | + * 举例: | ||
| 2019 | + * 浦东38路 上行头班车时间是7:00 下行头班车是6:30 ,下行行驶时间是25分钟 , 下行停站时间为5分钟. | ||
| 2020 | + * 所以浦东38的所有路牌的第一个班次都是下行出场. | ||
| 2021 | + * | ||
| 2022 | + * @params : 起终点站的首末班车时间 | ||
| 2023 | + * | ||
| 2024 | + * @return : 返回方向结果. [0--上;1--下;2--未知]. | ||
| 2025 | + * | ||
| 2026 | + **/ | ||
| 2027 | + getdefaultDir01 : function(list , xxsj , tzsj) { | ||
| 2028 | + var sxtbcsj = baseF.getDateTime(list[0].kssj); | ||
| 2029 | + var xxtbcsj = baseF.getDateTime(list[1].kssj); | ||
| 2030 | + xxtbcsj.setMinutes(xxtbcsj.getMinutes() + xxsj + tzsj); | ||
| 2031 | + if(xxtbcsj>sxtbcsj) { | ||
| 2032 | + return 0; | ||
| 2033 | + }else { | ||
| 2034 | + return 1; | ||
| 2035 | + } | ||
| 2036 | + }, | ||
| 2037 | + /** | ||
| 2038 | + * @description (TODO) 得到所有路牌下的班次数[从各路牌下的第一个班次发车时间 到 营运结束时间点并且是连续的班次数]. | ||
| 2039 | + * @param saa 封装的一些 停站时间、周转时间、行驶时间、行驶里程等. | ||
| 2040 | + * @param cara 路牌数组 | ||
| 2041 | + * @param map 表单参数 | ||
| 2042 | + * @param seMap 线路营运开始 ~ 结束时间 | ||
| 2043 | + * @param dataMap 封装的 以上、下行方向成对存在的 一些参数数组 [下标0 -- 代表上行 ; 下标1 -- 代表下行]. | ||
| 2044 | + * @return 返回一个所有路牌下的班次数[从各路牌下的第一个班次发车时间 ~ 营运结束时间点并且是连续的班次数]. | ||
| 2045 | + * | ||
| 2046 | + * ******************************** 思路 ********************************************************* | ||
| 2047 | + * | ||
| 2048 | + * 首先,以早高峰开始时间作为开始点 , 并且作为最后一个路牌的第一个班次的发车时间展开。 | ||
| 2049 | + * | ||
| 2050 | + * 纵向展开: | ||
| 2051 | + * 以最后一个路牌的第一个班次发车时间为开始点,以阶梯形式向上展开. | ||
| 2052 | + * | ||
| 2053 | + * 规则: | ||
| 2054 | + * 下一个路牌的第一个班次发车时间 = 当前路牌的第一个班次发车时间 + 在某时间范围内的发车间隙。 | ||
| 2055 | + * 依次类推。可以得到每一个路牌下的第一个班次发车时间。 | ||
| 2056 | + * | ||
| 2057 | + * 举例:以最后一个路牌第一个班次的发车时间为开始点向上展开. | ||
| 2058 | + * 最后一个路牌的第一个班次的发车时间为 6:31 | ||
| 2059 | + * 倒数第二个路牌的第一个班次的发车时间为 6:39 = 6:31 + 某周转时间段内的发车间隙为:8 | ||
| 2060 | + * 倒数第三个路牌的第一个班次的发车时间为 6:47 = 6:39 + 某周转时间段内的发车间隙为:8 | ||
| 2061 | + * 倒数第四个.... | ||
| 2062 | + * 以此类推. | ||
| 2063 | + * | ||
| 2064 | + * 横向展开: | ||
| 2065 | + * 就是以每个路牌下的第一个班次的发车时间去补全当前路牌后面并且为连续性的班次。 | ||
| 2066 | + * | ||
| 2067 | + * 规则: | ||
| 2068 | + * 当前班次 :班次的计划发车时间 + 当前方向下并且在某时间范围内的行驶时间 = 当前班次下的计划到达时间 以此推出下个班次的发车时间. | ||
| 2069 | + * 下个班次 :下个班次的发车时间 = 以上个班次的到达时间 + 上个班次方向下并且在某时间范围内的停站时间. | ||
| 2070 | + * 依次类推。以营运结束时间点作为结束。铺出当前路牌下并为连续性的班次数. | ||
| 2071 | + * | ||
| 2072 | + * 举例:以最后一个路牌的第一个班次开始向水平方向连续性的补全. | ||
| 2073 | + * 第一个班次的发车时间是 6:31 , 某放下下的高峰行驶时间 25分钟 ,得到第一个班次的到达时间 6:31 + 25 = 6:56 , | ||
| 2074 | + * 第二个班次: | ||
| 2075 | + * 发车时间是 7:01 = 第一个班次的到达时间 6:56 + 第一个班次方向下并且在某时间范围内的停站时间 5分钟 | ||
| 2076 | + * 某放下下的高峰行驶时间 25分钟 得到到达时间 : 7:01 + 25 = 7:26 | ||
| 2077 | + * 第三个班次 | ||
| 2078 | + * 发车时间是 7:31 = 第二个班次的到达时间 7:26 + 第二个班次方向下并且在某时间范围内的停站时间 5分钟 | ||
| 2079 | + * 某放下下的高峰行驶时间 25分钟 得到到达时间 : 7:31 + 25 = 7:56 | ||
| 2080 | + * 第四个班次 | ||
| 2081 | + * 第五个班次 | ||
| 2082 | + * ........ | ||
| 2083 | + */ | ||
| 2084 | + plgfbc01 : function(saa , cara , map, seMap , dataMap) { | ||
| 2085 | + // 定义路牌长度 、所有路牌默认出场方向 [0--上行出场;1--下行出场] 、营运结束时间、返回数组. | ||
| 2086 | + var len = cara.length , cctag , endTime = baseF.getDateTime(seMap.e) , rs = new Array(); | ||
| 2087 | + // 获取所有路牌默认出场方向.如果是环线则只有一个上行方向. | ||
| 2088 | + cctag = map.linePlayType=='1' ? 0 : baseF.getdefaultDir01(dataMap.smbcsjArr,saa[0].xxsj, saa[0].dgxxtzjx); | ||
| 2089 | + for(var c = 0 ; c < len ; c++) { | ||
| 2090 | + // 定义当前路牌的第一个班次的开始时间. | ||
| 2091 | + var kssj = baseF.getDateTime(map.earlyStartTime); | ||
| 2092 | + kssj.setMinutes(kssj.getMinutes()-(len - cara[c].lpNo)*saa[0].fcjx.dgfcjx); | ||
| 2093 | + // 定义当前路牌方向变量 、 是否开启方向切换变量[0 --- 表示不开启 ; 1 -- 表示开启] 、 序号. | ||
| 2094 | + var fxTagDm = cctag , fxflag = 0 , xhNo = 3; | ||
| 2095 | + while(kssj <= endTime) { | ||
| 2096 | + // 获取当前班次方向,如果是当前路牌的第一个班次则为默认方向,否则切换方向. | ||
| 2097 | + fxTagDm = baseF.getfx(fxflag,fxTagDm); | ||
| 2098 | + // 开启方向切换. | ||
| 2099 | + fxflag = 1; | ||
| 2100 | + // 定义在某时间段内[高峰时间段、低谷时间段]的停站时间. | ||
| 2101 | + var tzsj = baseF.isgfsjd01(kssj,dataMap) ? dataMap.gftzsj[fxTagDm] : dataMap.dgtzsj[fxTagDm]; | ||
| 2102 | + // 定义在某时间段内的行驶时间. | ||
| 2103 | + var _xxsj = baseF.getxssj(dataMap.zgfsjd,dataMap.wgfsjd,kssj,dataMap.pcxssjArr,dataMap.gfxxsjArr,fxTagDm); | ||
| 2104 | + // 定义当前班次的停站时间,这里是为了当计算到了最后一个班次的时候,那么停站时间为0 ,但是后续的班次的发车时间需要加上前一个班次的停站时间. | ||
| 2105 | + var xs_tzsj = baseF.isLastbc(kssj,endTime,tzsj,_xxsj) ? 0 : tzsj; | ||
| 2106 | + // 添加正常班次对象. | ||
| 2107 | + rs.push(baseF.getbcObj(kssj , _xxsj , cara[c] , | ||
| 2108 | + dataMap.bcTypeArr.normal, | ||
| 2109 | + dataMap.dira[fxTagDm] , xhNo++, | ||
| 2110 | + dataMap.pcxslcArr[fxTagDm] , map , 0, | ||
| 2111 | + dataMap.qdzArr[fxTagDm], | ||
| 2112 | + dataMap.zdzArr[fxTagDm], null , xs_tzsj , 0)); | ||
| 2113 | + // 重新计算下一个班次的开始时间. | ||
| 2114 | + kssj = new Date(kssj.setMinutes(kssj.getMinutes() + tzsj)); | ||
| 2115 | + } | ||
| 2116 | + } | ||
| 2117 | + return rs; | ||
| 2118 | + }, | ||
| 2119 | + | ||
| 1568 | plgfbc : function(saa , cara , map, seMap ,dataMap) { | 2120 | plgfbc : function(saa , cara , map, seMap ,dataMap) { |
| 1569 | var len = cara.length,rs = new Array(); | 2121 | var len = cara.length,rs = new Array(); |
| 1570 | var lbsj = map.lb=='' ? 0:parseInt(map.lb); | 2122 | var lbsj = map.lb=='' ? 0:parseInt(map.lb); |
| @@ -1610,9 +2162,10 @@ var BaseFun = function() { | @@ -1610,9 +2162,10 @@ var BaseFun = function() { | ||
| 1610 | return rs; | 2162 | return rs; |
| 1611 | }, | 2163 | }, |
| 1612 | 2164 | ||
| 1613 | - isgfsjd01 : function(kssj,dataMap,type) { | 2165 | + isgfsjd01 : function(kssj,dataMap) { |
| 1614 | var tag = false; | 2166 | var tag = false; |
| 1615 | - if((dataMap.zgfsjd[0].st <=kssj && kssj<= dataMap.zgfsjd[0].ed ) || ( dataMap.wgfsjd[0].st <= kssj && kssj <= dataMap.wgfsjd[0].ed)) | 2167 | + if((dataMap.zgfsjd[0].st <= kssj && kssj<= dataMap.zgfsjd[0].ed ) || |
| 2168 | + ( dataMap.wgfsjd[0].st <= kssj && kssj <= dataMap.wgfsjd[0].ed)) | ||
| 1616 | tag = true; | 2169 | tag = true; |
| 1617 | return tag; | 2170 | return tag; |
| 1618 | }, | 2171 | }, |
| @@ -1653,6 +2206,34 @@ var BaseFun = function() { | @@ -1653,6 +2206,34 @@ var BaseFun = function() { | ||
| 1653 | return result; | 2206 | return result; |
| 1654 | }, | 2207 | }, |
| 1655 | 2208 | ||
| 2209 | + splitBxRc02 : function(str) { | ||
| 2210 | + var list = new Array(),rsa = new Array(); | ||
| 2211 | + var gsgd = baseF.getBxLs(); | ||
| 2212 | + var bxrcAr = str.split(','); | ||
| 2213 | + for(var s = 0 ; s< bxrcAr.length;s++) { | ||
| 2214 | + var s1a = bxrcAr[s].split('/'); | ||
| 2215 | + var rs = parseInt(s1a[1]); | ||
| 2216 | + var fpcls = parseInt(s1a[2]); | ||
| 2217 | + var gsavg = parseInt(s1a[3]); | ||
| 2218 | + var gsgdIndex = 0,hoursV = 0.0,minueV='' ; | ||
| 2219 | + for(var g = 0 ; g < gsgd.length; g++) { | ||
| 2220 | + if(gsgd[g].type == s1a[0]) { | ||
| 2221 | + gsgdIndex = g; | ||
| 2222 | + hoursV = gsgd[g].hoursV; | ||
| 2223 | + minueV = gsgd[g].minueV; | ||
| 2224 | + } | ||
| 2225 | + } | ||
| 2226 | + list.push({'type':s1a[0], | ||
| 2227 | + 'rs':rs, | ||
| 2228 | + 'fpcls':fpcls, | ||
| 2229 | + 'hoursV':hoursV, | ||
| 2230 | + 'minueV':minueV, | ||
| 2231 | + 'gsavg' : gsavg}); | ||
| 2232 | + rsa.push(rs); | ||
| 2233 | + } | ||
| 2234 | + return {'data':list.sort(function(a,b){return b.rs-a.rs}),'rsa':rsa.sort().reverse()}; | ||
| 2235 | + }, | ||
| 2236 | + | ||
| 1656 | splitBxRc : function(str) { | 2237 | splitBxRc : function(str) { |
| 1657 | var list = new Array(),rsa = new Array();; | 2238 | var list = new Array(),rsa = new Array();; |
| 1658 | var gsgd = baseF.getBxLs(); | 2239 | var gsgd = baseF.getBxLs(); |
src/main/resources/static/pages/base/timesmodel/js/d3.relationshipgraph.js
| @@ -966,9 +966,11 @@ var RelationshipGraph = function () { | @@ -966,9 +966,11 @@ var RelationshipGraph = function () { | ||
| 966 | var lpNo = array[a].lpNo; | 966 | var lpNo = array[a].lpNo; |
| 967 | var timeNum = 0 ,tempNum = 0; | 967 | var timeNum = 0 ,tempNum = 0; |
| 968 | for(var z = 0 ;z < tza.length;z++) { | 968 | for(var z = 0 ;z < tza.length;z++) { |
| 969 | - if(tza[z].lpNo == lpNo) { | 969 | + if(tza[z].lpNo == lpNo && tza[z].bcsj >0 ) { |
| 970 | timeNum = timeNum + tza[z].bcsj + tza[z].STOPTIME; | 970 | timeNum = timeNum + tza[z].bcsj + tza[z].STOPTIME; |
| 971 | - tempNum ++; | 971 | + if( tza[z].bcType !='bd' && tza[z].bcType !='lc' ) { |
| 972 | + tempNum ++; | ||
| 973 | + } | ||
| 972 | } | 974 | } |
| 973 | } | 975 | } |
| 974 | var className = 'statis_container_' + lpNo; | 976 | var className = 'statis_container_' + lpNo; |
src/main/resources/static/pages/base/timesmodel/js/gantt.js
| @@ -64,7 +64,8 @@ | @@ -64,7 +64,8 @@ | ||
| 64 | }else if(map.baseRes== '1') { | 64 | }else if(map.baseRes== '1') { |
| 65 | // 采用班型人次数据获取渲染时刻表明细图形的配置参数数据. | 65 | // 采用班型人次数据获取渲染时刻表明细图形的配置参数数据. |
| 66 | // data = BaseFun.BXPplaceClassesTime(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | 66 | // data = BaseFun.BXPplaceClassesTime(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); |
| 67 | - data = BaseFun.BXPplaceClassesTime01(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | 67 | + // data = BaseFun.BXPplaceClassesTime01(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); |
| 68 | + data = BaseFun.BXPplaceClassesTime02(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | ||
| 68 | } | 69 | } |
| 69 | 70 | ||
| 70 | }else { | 71 | }else { |
| @@ -129,7 +130,11 @@ | @@ -129,7 +130,11 @@ | ||
| 129 | * @returns 返回一个分装发车间隙、车辆数的最大值集合. | 130 | * @returns 返回一个分装发车间隙、车辆数的最大值集合. |
| 130 | * */ | 131 | * */ |
| 131 | function getMaxCarAndStopSpace1(map) { | 132 | function getMaxCarAndStopSpace1(map) { |
| 132 | - return {'gattA':null,'fcjx': {'gffcjx': Math.round(map.zzsj.gfzzsj/map.clzs) , 'dgfcjx': Math.round(map.zzsj.dgzzsj/map.clzs)},'maxCar':BaseFun.getYAxisCarArray(parseInt(map.clzs))}; | 133 | + return {'gattA':null, |
| 134 | + 'fcjx': {'gffcjx': Math.round(map.zzsj.gfzzsj/map.clzs) , | ||
| 135 | + 'dgfcjx': Math.round(map.zzsj.dgzzsj/map.clzs), | ||
| 136 | + 'dgmaxfcjx' : parseInt(map.dgmaxfcjx)}, | ||
| 137 | + 'maxCar':BaseFun.getYAxisCarArray(parseInt(map.clzs))}; | ||
| 133 | } | 138 | } |
| 134 | 139 | ||
| 135 | /** | 140 | /** |
| @@ -147,6 +152,8 @@ | @@ -147,6 +152,8 @@ | ||
| 147 | 'pcxssjArr' : BaseFun.formatPairing(gatps.upTravelTime,gatps.downTravelTime),// 平常行驶时间。[下标0代表上;下标1代表下] | 152 | 'pcxssjArr' : BaseFun.formatPairing(gatps.upTravelTime,gatps.downTravelTime),// 平常行驶时间。[下标0代表上;下标1代表下] |
| 148 | 'gfxxsjArr' : BaseFun.formatPairing(gatps.lateUpTime=='' ? gatps.upTravelTime : gatps.lateUpTime, | 153 | 'gfxxsjArr' : BaseFun.formatPairing(gatps.lateUpTime=='' ? gatps.upTravelTime : gatps.lateUpTime, |
| 149 | gatps.lateDownTime=='' ? gatps.downTravelTime : gatps.lateDownTime),// 高峰行驶时间。[下标0代表上;下标1代表下] | 154 | gatps.lateDownTime=='' ? gatps.downTravelTime : gatps.lateDownTime),// 高峰行驶时间。[下标0代表上;下标1代表下] |
| 155 | + 'dgxxsjArr' : BaseFun.formatPairing(gatps.troughUpTime=='' ? gatps.upTravelTime : gatps.troughUpTime, | ||
| 156 | + gatps.troughDownTime=='' ? gatps.downTravelTime : gatps.troughDownTime),// 低谷行驶时间。[下标0代表上;下标1代表下] | ||
| 150 | 'pcxslcArr' : BaseFun.formatPairing(gatps.upMileage,gatps.downMileage),// 行驶里程。[下标0代表上;下标1代表下] | 157 | 'pcxslcArr' : BaseFun.formatPairing(gatps.upMileage,gatps.downMileage),// 行驶里程。[下标0代表上;下标1代表下] |
| 151 | 'qdzArr' : BaseFun.qzdz(gatps.up_s.split('_')[0],gatps.down_s.split('_')[0]),// 起始站。[下标0代表上;下标1代表下] | 158 | 'qdzArr' : BaseFun.qzdz(gatps.up_s.split('_')[0],gatps.down_s.split('_')[0]),// 起始站。[下标0代表上;下标1代表下] |
| 152 | 'zdzArr':BaseFun.qzdz(gatps.up_s.split('_')[1],gatps.down_s.split('_')[1]),// 终点站。[下标0代表上;下标1代表下] | 159 | 'zdzArr':BaseFun.qzdz(gatps.up_s.split('_')[1],gatps.down_s.split('_')[1]),// 终点站。[下标0代表上;下标1代表下] |
| @@ -170,6 +177,8 @@ | @@ -170,6 +177,8 @@ | ||
| 170 | // 'maxztjx' : parseInt(gatps.maxstopTime), // 最大停站时间. | 177 | // 'maxztjx' : parseInt(gatps.maxstopTime), // 最大停站时间. |
| 171 | 'gftzsj': BaseFun.formatPairing(gatps.gfupStopTime,gatps.gfdownStopTime),// 高峰停站时间. | 178 | 'gftzsj': BaseFun.formatPairing(gatps.gfupStopTime,gatps.gfdownStopTime),// 高峰停站时间. |
| 172 | 'dgtzsj' : BaseFun.formatPairing(gatps.dgupStopTime,gatps.dgdownStopTime),// 低谷停站时间. | 179 | 'dgtzsj' : BaseFun.formatPairing(gatps.dgupStopTime,gatps.dgdownStopTime),// 低谷停站时间. |
| 180 | + 'dgmaxtzsj' : parseInt(gatps.dgmaxtzsj),// 低谷最大停站时间. | ||
| 181 | + 'dgmaxfcjx' : parseInt(gatps.dgmaxfcjx),// 低谷最大发车间隙. | ||
| 173 | 'map' : gatps, | 182 | 'map' : gatps, |
| 174 | 'zzsj':gatps.zzsj,// 周转时间. | 183 | 'zzsj':gatps.zzsj,// 周转时间. |
| 175 | }; | 184 | }; |
| @@ -191,6 +200,9 @@ | @@ -191,6 +200,9 @@ | ||
| 191 | 'dgzzsj': parseInt(map.troughUpTime==''? map.upTravelTime : map.troughUpTime) + | 200 | 'dgzzsj': parseInt(map.troughUpTime==''? map.upTravelTime : map.troughUpTime) + |
| 192 | parseInt(map.dgupStopTime) + parseInt(map.dgdownStopTime) + | 201 | parseInt(map.dgupStopTime) + parseInt(map.dgdownStopTime) + |
| 193 | parseInt(map.troughDownTime==''? map.downTravelTime: map.troughDownTime),// 低谷周转时间 | 202 | parseInt(map.troughDownTime==''? map.downTravelTime: map.troughDownTime),// 低谷周转时间 |
| 203 | + 'dgmaxzzsj' : parseInt(map.troughUpTime==''? map.upTravelTime : map.troughUpTime) + | ||
| 204 | + parseInt(map.dgmaxtzsj) + parseInt(map.dgmaxtzsj) + | ||
| 205 | + parseInt(map.troughDownTime==''? map.downTravelTime: map.troughDownTime),// 低谷最大的周转时间 | ||
| 194 | }; | 206 | }; |
| 195 | } | 207 | } |
| 196 | 208 |
src/main/resources/static/pages/base/timesmodel/js/tagsinput.js
| @@ -42,7 +42,8 @@ var ComponentsBootstrapTagsinput = function() { | @@ -42,7 +42,8 @@ var ComponentsBootstrapTagsinput = function() { | ||
| 42 | var bctypeValue = $('#state_tagsinput_bctype').val(); | 42 | var bctypeValue = $('#state_tagsinput_bctype').val(); |
| 43 | var rcnum = $('#state_tagsinput_rcsvalue').val(); | 43 | var rcnum = $('#state_tagsinput_rcsvalue').val(); |
| 44 | var clnum = $('#state_tagsinput_clsvalue').val(); | 44 | var clnum = $('#state_tagsinput_clsvalue').val(); |
| 45 | - if(isNull(bctypeValue,rcnum,clnum)) { | 45 | + var gsvag = $('#state_tagsinput_gsavgvalue').val(); |
| 46 | + if(isNull(bctypeValue,rcnum,clnum,gsvag)) { | ||
| 46 | if(!Number.isInteger(parseInt(rcnum)/parseInt(clnum))) { | 47 | if(!Number.isInteger(parseInt(rcnum)/parseInt(clnum))) { |
| 47 | layer.msg('当前算法只支持【单/双挡】!请您重新输入!'); | 48 | layer.msg('当前算法只支持【单/双挡】!请您重新输入!'); |
| 48 | $('#state_tagsinput_bctype').val(null); | 49 | $('#state_tagsinput_bctype').val(null); |
| @@ -56,22 +57,24 @@ var ComponentsBootstrapTagsinput = function() { | @@ -56,22 +57,24 @@ var ComponentsBootstrapTagsinput = function() { | ||
| 56 | if(s1a[0]==bctypeValue) { | 57 | if(s1a[0]==bctypeValue) { |
| 57 | rcnum = parseInt(rcnum) + parseInt(s1a[1]); | 58 | rcnum = parseInt(rcnum) + parseInt(s1a[1]); |
| 58 | clnum = parseInt(clnum) + parseInt(s1a[2]); | 59 | clnum = parseInt(clnum) + parseInt(s1a[2]); |
| 60 | + gsvag = parseInt(s1a[3]); | ||
| 59 | } | 61 | } |
| 60 | } | 62 | } |
| 61 | elt.tagsinput('add', { | 63 | elt.tagsinput('add', { |
| 62 | - "value": bctypeValue + '/' + rcnum + '/' + clnum, | ||
| 63 | - "text": bctypeValue + '/' + rcnum + '/' + clnum, | 64 | + "value": bctypeValue + '/' + rcnum + '/' + clnum + '/' + gsvag, |
| 65 | + "text": bctypeValue + '/' + rcnum + '/' + clnum + '/' + gsvag, | ||
| 64 | "continent": bctypeValue, | 66 | "continent": bctypeValue, |
| 65 | }); | 67 | }); |
| 66 | $('#state_tagsinput_bctype').val(null); | 68 | $('#state_tagsinput_bctype').val(null); |
| 67 | $('#state_tagsinput_rcsvalue').val(null); | 69 | $('#state_tagsinput_rcsvalue').val(null); |
| 68 | $('#state_tagsinput_clsvalue').val(null); | 70 | $('#state_tagsinput_clsvalue').val(null); |
| 71 | + $('#state_tagsinput_gsavgvalue').val(null); | ||
| 69 | } | 72 | } |
| 70 | }); | 73 | }); |
| 71 | 74 | ||
| 72 | - var isNull = function(v1,v2,v3) { | 75 | + var isNull = function(v1,v2,v3,v4) { |
| 73 | var tag = true; | 76 | var tag = true; |
| 74 | - if(v1==''|| v2=='' || v3=='') | 77 | + if(v1==''|| v2=='' || v3=='' || v4=='') |
| 75 | tag = false; | 78 | tag = false; |
| 76 | return tag; | 79 | return tag; |
| 77 | } | 80 | } |
src/main/resources/static/pages/base/timesmodel/tepms/bctype_temp.html
| @@ -170,56 +170,83 @@ | @@ -170,56 +170,83 @@ | ||
| 170 | 170 | ||
| 171 | <!-- 表单分组组件 form-group START --> | 171 | <!-- 表单分组组件 form-group START --> |
| 172 | <div class="form-group"> | 172 | <div class="form-group"> |
| 173 | - <!-- 高峰上行停站间隙 (* 必填项) START --> | 173 | + <!-- 高峰上行停站时间 (* 必填项) START --> |
| 174 | <div class="col-md-6"> | 174 | <div class="col-md-6"> |
| 175 | <label class="control-label col-md-5"> | 175 | <label class="control-label col-md-5"> |
| 176 | - <span class="required"> * </span> 高峰上行停站间隙: | 176 | + <span class="required"> * </span> 高峰上行停站时间: |
| 177 | </label> | 177 | </label> |
| 178 | <div class="col-md-5"> | 178 | <div class="col-md-5"> |
| 179 | <input type="text" class="form-control" name="gfupStopTime" id="gfupStopTimeInput" | 179 | <input type="text" class="form-control" name="gfupStopTime" id="gfupStopTimeInput" |
| 180 | - placeholder="请输入高峰上行停站间隙"> | 180 | + placeholder="请输入高峰上行停站时间"> |
| 181 | </div> | 181 | </div> |
| 182 | </div> | 182 | </div> |
| 183 | - <!-- 上行停站间隙 (* 必填项) END --> | 183 | + <!-- 上行停站时间 (* 必填项) END --> |
| 184 | 184 | ||
| 185 | - <!-- 高峰下行停站间隙 (* 必填项) START --> | 185 | + <!-- 高峰下行停站时间 (* 必填项) START --> |
| 186 | <div class="col-md-6"> | 186 | <div class="col-md-6"> |
| 187 | <label class="control-label col-md-5"> | 187 | <label class="control-label col-md-5"> |
| 188 | - <span class="required"> * </span> 高峰下行停站间隙: | 188 | + <span class="required"> * </span> 高峰下行停站时间: |
| 189 | </label> | 189 | </label> |
| 190 | <div class="col-md-5"> | 190 | <div class="col-md-5"> |
| 191 | <input type="text" class="form-control" name="gfdownStopTime" id="gfdownStopTimeInput" | 191 | <input type="text" class="form-control" name="gfdownStopTime" id="gfdownStopTimeInput" |
| 192 | - placeholder="请输入高峰下行停站间隙"> | 192 | + placeholder="请输入高峰下行停站时间"> |
| 193 | </div> | 193 | </div> |
| 194 | </div> | 194 | </div> |
| 195 | - <!-- 高峰下行停站间隙 (* 必填项) END --> | 195 | + <!-- 高峰下行停站时间 (* 必填项) END --> |
| 196 | </div> | 196 | </div> |
| 197 | <!-- 表单分组组件 form-group END --> | 197 | <!-- 表单分组组件 form-group END --> |
| 198 | 198 | ||
| 199 | <!-- 表单分组组件 form-group START --> | 199 | <!-- 表单分组组件 form-group START --> |
| 200 | <div class="form-group"> | 200 | <div class="form-group"> |
| 201 | - <!-- 低谷上行停站间隙(* 必填项) START --> | 201 | + <!-- 低谷上行停站时间(* 必填项) START --> |
| 202 | <div class="col-md-6"> | 202 | <div class="col-md-6"> |
| 203 | <label class="control-label col-md-5"> | 203 | <label class="control-label col-md-5"> |
| 204 | - <span class="required"> * </span> 低谷上行停站间隙: | 204 | + <span class="required"> * </span> 低谷上行停站时间: |
| 205 | </label> | 205 | </label> |
| 206 | <div class="col-md-5"> | 206 | <div class="col-md-5"> |
| 207 | - <input type="text" class="form-control" name="dgupStopTime" id="dgupStopTimeInput" placeholder="请输入低谷上行停站间隙"> | 207 | + <input type="text" class="form-control" name="dgupStopTime" id="dgupStopTimeInput" placeholder="请输入低谷上行停站时间"> |
| 208 | </div> | 208 | </div> |
| 209 | </div> | 209 | </div> |
| 210 | - <!-- 低谷上行停站间隙(* 必填项) END --> | 210 | + <!-- 低谷上行停站时间(* 必填项) END --> |
| 211 | 211 | ||
| 212 | - <!-- 低谷下行停站间隙(* 必填项) START --> | 212 | + <!-- 低谷下行停站时间(* 必填项) START --> |
| 213 | <div class="col-md-6"> | 213 | <div class="col-md-6"> |
| 214 | <label class="control-label col-md-5"> | 214 | <label class="control-label col-md-5"> |
| 215 | - <span class="required"> * </span> 低谷下行停站间隙: | 215 | + <span class="required"> * </span> 低谷下行停站时间: |
| 216 | </label> | 216 | </label> |
| 217 | <div class="col-md-5"> | 217 | <div class="col-md-5"> |
| 218 | <input type="text" class="form-control" name="dgdownStopTime" id="dgdownStopTimeInput" | 218 | <input type="text" class="form-control" name="dgdownStopTime" id="dgdownStopTimeInput" |
| 219 | - placeholder="请输入低谷下行停站间隙"> | 219 | + placeholder="请输入低谷下行停站时间"> |
| 220 | </div> | 220 | </div> |
| 221 | </div> | 221 | </div> |
| 222 | - <!-- 低谷停站间隙 (* 必填项) END --> | 222 | + <!-- 低谷停站时间 (* 必填项) END --> |
| 223 | +</div> | ||
| 224 | +<!-- 表单分组组件 form-group END --> | ||
| 225 | + | ||
| 226 | +<!-- 表单分组组件 form-group START --> | ||
| 227 | +<div class="form-group"> | ||
| 228 | + <!-- 低谷最大发车间隙(* 必填项) START --> | ||
| 229 | + <div class="col-md-6"> | ||
| 230 | + <label class="control-label col-md-5"> | ||
| 231 | + <span class="required"> * </span> 低谷最大发车间隙: | ||
| 232 | + </label> | ||
| 233 | + <div class="col-md-5"> | ||
| 234 | + <input type="text" class="form-control" name="dgmaxfcjx" id="dgmaxfcjxInput" placeholder="请输入低谷最大发车间隙"> | ||
| 235 | + </div> | ||
| 236 | + </div> | ||
| 237 | + <!-- 低谷最大发车间隙(* 必填项) END --> | ||
| 238 | + | ||
| 239 | + <!-- 低谷最大停站时间(* 必填项) START --> | ||
| 240 | + <div class="col-md-6"> | ||
| 241 | + <label class="control-label col-md-5"> | ||
| 242 | + <span class="required"> * </span> 低谷最大停站时间: | ||
| 243 | + </label> | ||
| 244 | + <div class="col-md-5"> | ||
| 245 | + <input type="text" class="form-control" name="dgmaxtzsj" id="dgmaxtzsjInput" | ||
| 246 | + placeholder="请输入低谷最大停站时间"> | ||
| 247 | + </div> | ||
| 248 | + </div> | ||
| 249 | + <!-- 低谷停站时间 (* 必填项) END --> | ||
| 223 | </div> | 250 | </div> |
| 224 | <!-- 表单分组组件 form-group END --> | 251 | <!-- 表单分组组件 form-group END --> |
| 225 | 252 | ||
| @@ -523,9 +550,14 @@ | @@ -523,9 +550,14 @@ | ||
| 523 | <div class="col-md-6 "> | 550 | <div class="col-md-6 "> |
| 524 | <label class="control-label col-md-5"><span class="required"> * </span>班型/人次/车辆 :</label> | 551 | <label class="control-label col-md-5"><span class="required"> * </span>班型/人次/车辆 :</label> |
| 525 | <div class="col-md-5 tagsDiv"> | 552 | <div class="col-md-5 tagsDiv"> |
| 526 | - <input type="text" value="" name="bxrc" id="state_tagsinput" style="display: none;"> | ||
| 527 | - <div class="margin-top-10"> | ||
| 528 | - <select class="form-control" id="state_tagsinput_bctype"> | 553 | + <div class="row" style="margin-left: 15px;"> |
| 554 | + <input type="text" value="" name="bxrc" id="state_tagsinput" style="display: none;"> | ||
| 555 | + </div> | ||
| 556 | + | ||
| 557 | + <div class="row" style="margin-top: 10px;"> | ||
| 558 | + <label class="control-label col-md-4">工休类型 :</label> | ||
| 559 | + <div class="col-md-8"> | ||
| 560 | + <select class="form-control" id="state_tagsinput_bctype"> | ||
| 529 | <option value="">请选择工休类型...</option> | 561 | <option value="">请选择工休类型...</option> |
| 530 | <option value="六工一休">六工一休</option> | 562 | <option value="六工一休">六工一休</option> |
| 531 | <option value="五工一休">五工一休</option> | 563 | <option value="五工一休">五工一休</option> |
| @@ -536,14 +568,31 @@ | @@ -536,14 +568,31 @@ | ||
| 536 | <option value="一工一休">一工一休</option> | 568 | <option value="一工一休">一工一休</option> |
| 537 | <option value="无工休">无工休</option> | 569 | <option value="无工休">无工休</option> |
| 538 | </select> | 570 | </select> |
| 571 | + </div> | ||
| 572 | + </div> | ||
| 573 | + | ||
| 574 | + <div class="row" style="margin-top: 10px;"> | ||
| 575 | + <label class="control-label col-md-4">分配人次数:</label> | ||
| 576 | + <div class="col-md-8"> | ||
| 577 | + <input type="number" class="form-control" placeholder="请输入分配人次数" id="state_tagsinput_rcsvalue" min="1"> | ||
| 578 | + </div> | ||
| 539 | </div> | 579 | </div> |
| 540 | - <div class="margin-top-10"> | ||
| 541 | - <input type="number" class="form-control" placeholder="请输入分配人次数" id="state_tagsinput_rcsvalue" min="1"> | 580 | + |
| 581 | + <div class="row" style="margin-top: 10px;"> | ||
| 582 | + <label class="control-label col-md-4">分配车辆数:</label> | ||
| 583 | + <div class="col-md-8"> | ||
| 584 | + <input type="number" class="form-control" placeholder="请输入分配车辆数" id="state_tagsinput_clsvalue" min="1"> | ||
| 585 | + </div> | ||
| 542 | </div> | 586 | </div> |
| 543 | - <div class="margin-top-10"> | ||
| 544 | - <input type="number" class="form-control" placeholder="请输入分配车辆数" id="state_tagsinput_clsvalue" min="1"> | 587 | + |
| 588 | + <div class="row" style="margin-top: 10px;"> | ||
| 589 | + <label class="control-label col-md-4">日平均工时:</label> | ||
| 590 | + <div class="col-md-8"> | ||
| 591 | + <input type="number" class="form-control" placeholder="请输入日平均工时" id="state_tagsinput_gsavgvalue" min="1"> | ||
| 592 | + </div> | ||
| 545 | </div> | 593 | </div> |
| 546 | - <div class="margin-top-10"> | 594 | + |
| 595 | + <div class="row" style="margin-top: 10px;margin-left: 116px;"> | ||
| 547 | <a href="javascript:;" class="btn red" id="state_tagsinput_add">添加</a> | 596 | <a href="javascript:;" class="btn red" id="state_tagsinput_add">添加</a> |
| 548 | </div> | 597 | </div> |
| 549 | </div> | 598 | </div> |
| @@ -710,43 +759,65 @@ | @@ -710,43 +759,65 @@ | ||
| 710 | 759 | ||
| 711 | <!-- 表单分组组件 form-group START --> | 760 | <!-- 表单分组组件 form-group START --> |
| 712 | <div class="form-group"> | 761 | <div class="form-group"> |
| 713 | - <!-- 高峰上行停站间隙(* 必填项) START --> | 762 | + <!-- 高峰上行停站时间(* 必填项) START --> |
| 714 | <div class="col-md-6"> | 763 | <div class="col-md-6"> |
| 715 | - <label class="control-label col-md-5"> 高峰上行停站间隙: </label> | 764 | + <label class="control-label col-md-5"> 高峰上行停站时间: </label> |
| 716 | <div class="col-md-4"> | 765 | <div class="col-md-4"> |
| 717 | <p class="form-control-static" data-display="gfupStopTime"> </p> | 766 | <p class="form-control-static" data-display="gfupStopTime"> </p> |
| 718 | </div> | 767 | </div> |
| 719 | </div> | 768 | </div> |
| 720 | - <!-- 高峰上行停站间隙(* 必填项) END --> | ||
| 721 | - <!-- 高峰下行停站间隙(* 必填项) START --> | 769 | + <!-- 高峰上行停站时间(* 必填项) END --> |
| 770 | + <!-- 高峰下行停站时间(* 必填项) START --> | ||
| 722 | <div class="col-md-6"> | 771 | <div class="col-md-6"> |
| 723 | - <label class="control-label col-md-5"> 高峰下行停站间隙: </label> | 772 | + <label class="control-label col-md-5"> 高峰下行停站时间: </label> |
| 724 | <div class="col-md-4"> | 773 | <div class="col-md-4"> |
| 725 | <p class="form-control-static" data-display="gfdownStopTime"> </p> | 774 | <p class="form-control-static" data-display="gfdownStopTime"> </p> |
| 726 | </div> | 775 | </div> |
| 727 | </div> | 776 | </div> |
| 728 | - <!-- 高峰下行停站间隙(* 必填项) END --> | 777 | + <!-- 高峰下行停站时间(* 必填项) END --> |
| 729 | </div> | 778 | </div> |
| 730 | <!-- 表单分组组件 form-group END --> | 779 | <!-- 表单分组组件 form-group END --> |
| 731 | 780 | ||
| 732 | <!-- 表单分组组件 form-group START --> | 781 | <!-- 表单分组组件 form-group START --> |
| 733 | <div class="form-group"> | 782 | <div class="form-group"> |
| 734 | - <!-- 低谷上行停站间隙(* 必填项) START --> | 783 | + <!-- 低谷上行停站时间(* 必填项) START --> |
| 735 | <div class="col-md-6"> | 784 | <div class="col-md-6"> |
| 736 | - <label class="control-label col-md-5"> 低谷上行停站间隙: </label> | 785 | + <label class="control-label col-md-5"> 低谷上行停站时间: </label> |
| 737 | <div class="col-md-4"> | 786 | <div class="col-md-4"> |
| 738 | <p class="form-control-static" data-display="dgupStopTime"> </p> | 787 | <p class="form-control-static" data-display="dgupStopTime"> </p> |
| 739 | </div> | 788 | </div> |
| 740 | </div> | 789 | </div> |
| 741 | - <!-- 低谷上行停站间隙(* 必填项) END --> | ||
| 742 | - <!-- 低谷下行停站间隙(* 必填项) START --> | 790 | + <!-- 低谷上行停站时间(* 必填项) END --> |
| 791 | + <!-- 低谷下行停站时间(* 必填项) START --> | ||
| 743 | <div class="col-md-6"> | 792 | <div class="col-md-6"> |
| 744 | - <label class="control-label col-md-5"> 低谷下行停站间隙: </label> | 793 | + <label class="control-label col-md-5"> 低谷下行停站时间: </label> |
| 745 | <div class="col-md-4"> | 794 | <div class="col-md-4"> |
| 746 | <p class="form-control-static" data-display="dgdownStopTime"> </p> | 795 | <p class="form-control-static" data-display="dgdownStopTime"> </p> |
| 747 | </div> | 796 | </div> |
| 748 | </div> | 797 | </div> |
| 749 | - <!-- 低谷下行停站间隙(* 必填项) END --> | 798 | + <!-- 低谷下行停站时间(* 必填项) END --> |
| 799 | +</div> | ||
| 800 | +<!-- 表单分组组件 form-group END --> | ||
| 801 | + | ||
| 802 | +<!-- 表单分组组件 form-group START --> | ||
| 803 | +<div class="form-group"> | ||
| 804 | + <!-- 低谷最大发车间隙(* 必填项) START --> | ||
| 805 | + <div class="col-md-6"> | ||
| 806 | + <label class="control-label col-md-5"> 低谷最大发车间隙: </label> | ||
| 807 | + <div class="col-md-4"> | ||
| 808 | + <p class="form-control-static" data-display="dgmaxfcjx"> </p> | ||
| 809 | + </div> | ||
| 810 | + </div> | ||
| 811 | + <!-- 低谷最大发车间隙(* 必填项) END --> | ||
| 812 | + | ||
| 813 | + <!-- 低谷最大停站时间(* 必填项) START --> | ||
| 814 | + <div class="col-md-6"> | ||
| 815 | + <label class="control-label col-md-5"> 低谷最大停站时间: </label> | ||
| 816 | + <div class="col-md-4"> | ||
| 817 | + <p class="form-control-static" data-display="dgmaxtzsj"> </p> | ||
| 818 | + </div> | ||
| 819 | + </div> | ||
| 820 | + <!-- 低谷最大停站时间(* 必填项) END --> | ||
| 750 | </div> | 821 | </div> |
| 751 | <!-- 表单分组组件 form-group END --> | 822 | <!-- 表单分组组件 form-group END --> |
| 752 | 823 |
src/main/resources/static/pages/forms/mould/correctForm.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/inoutstation.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shifday.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/correctForm.html
| @@ -32,13 +32,13 @@ | @@ -32,13 +32,13 @@ | ||
| 32 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> | 32 | <select class="form-control" name="line" id="line" style="width: 136px;"></select> |
| 33 | </div> | 33 | </div> |
| 34 | <div style="display: inline-block;margin-left: 15px;"> | 34 | <div style="display: inline-block;margin-left: 15px;"> |
| 35 | - <span class="item-label" style="width: 80px;">时间: </span> | 35 | + <span class="item-label" style="width: 80px;">开始时间: </span> |
| 36 | <input class="form-control" type="text" id="date" style="width: 120px;"/> | 36 | <input class="form-control" type="text" id="date" style="width: 120px;"/> |
| 37 | </div> | 37 | </div> |
| 38 | -<!-- <div style="display: inline-block;margin-left: 15px;"> --> | ||
| 39 | -<!-- <span class="item-label" style="width: 80px;">结束时间: </span> --> | ||
| 40 | -<!-- <input class="form-control" type="text" id="endDate" style="width: 120px;"/> --> | ||
| 41 | -<!-- </div> --> | 38 | + <div style="display: inline-block;margin-left: 15px;"> |
| 39 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 40 | + <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 41 | + </div> | ||
| 42 | <div style="display: inline-block;margin-left: 15px"> | 42 | <div style="display: inline-block;margin-left: 15px"> |
| 43 | <span class="item-label" style="width: 140px;">路牌: </span> | 43 | <span class="item-label" style="width: 140px;">路牌: </span> |
| 44 | <select class="form-control" name="lpName" id="lpName" style="width: 136px;"></select> | 44 | <select class="form-control" name="lpName" id="lpName" style="width: 136px;"></select> |
| @@ -59,10 +59,11 @@ | @@ -59,10 +59,11 @@ | ||
| 59 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 59 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 60 | <thead> | 60 | <thead> |
| 61 | <tr> | 61 | <tr> |
| 62 | - <th colspan="6">营运车辆修正统计表</th> | 62 | + <th colspan="7">营运车辆修正统计表</th> |
| 63 | </tr> | 63 | </tr> |
| 64 | <tr> | 64 | <tr> |
| 65 | <td>编号</td> | 65 | <td>编号</td> |
| 66 | + <td>日期</td> | ||
| 66 | <td>路牌</td> | 67 | <td>路牌</td> |
| 67 | <td>车号</td> | 68 | <td>车号</td> |
| 68 | <td>司机</td> | 69 | <td>司机</td> |
| @@ -96,6 +97,10 @@ | @@ -96,6 +97,10 @@ | ||
| 96 | format : 'YYYY-MM-DD', | 97 | format : 'YYYY-MM-DD', |
| 97 | locale : 'zh-cn' | 98 | locale : 'zh-cn' |
| 98 | }); | 99 | }); |
| 100 | + $("#endDate").datetimepicker({ | ||
| 101 | + format : 'YYYY-MM-DD', | ||
| 102 | + locale : 'zh-cn' | ||
| 103 | + }); | ||
| 99 | var d = new Date(); | 104 | var d = new Date(); |
| 100 | var year = d.getFullYear(); | 105 | var year = d.getFullYear(); |
| 101 | var month = d.getMonth() + 1; | 106 | var month = d.getMonth() + 1; |
| @@ -105,6 +110,7 @@ | @@ -105,6 +110,7 @@ | ||
| 105 | if(day < 10) | 110 | if(day < 10) |
| 106 | day = "0" + day; | 111 | day = "0" + day; |
| 107 | $("#date").val(year + "-" + month + "-" + day); | 112 | $("#date").val(year + "-" + month + "-" + day); |
| 113 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 108 | 114 | ||
| 109 | $.get('/basic/lineCode2Name',function(result){ | 115 | $.get('/basic/lineCode2Name',function(result){ |
| 110 | var data=[]; | 116 | var data=[]; |
| @@ -197,16 +203,18 @@ | @@ -197,16 +203,18 @@ | ||
| 197 | }); | 203 | }); |
| 198 | 204 | ||
| 199 | var line = $("#line").val(); | 205 | var line = $("#line").val(); |
| 200 | - var date = $("#startDate").val(); | 206 | + var date = $("#date").val();endDate |
| 201 | var lpName = $("#lpName").val(); | 207 | var lpName = $("#lpName").val(); |
| 208 | + var endDate = $("#endDate").val(); | ||
| 202 | var code = $("#code").val(); | 209 | var code = $("#code").val(); |
| 203 | $("#query").on("click",function(){ | 210 | $("#query").on("click",function(){ |
| 204 | line = $("#line").val(); | 211 | line = $("#line").val(); |
| 205 | date = $("#date").val(); | 212 | date = $("#date").val(); |
| 206 | lpName = $("#lpName").val(); | 213 | lpName = $("#lpName").val(); |
| 207 | code = $("#code").val(); | 214 | code = $("#code").val(); |
| 215 | + endDate = $("#endDate").val(); | ||
| 208 | var type = "query"; | 216 | var type = "query"; |
| 209 | - $get("/realSchedule/correctForm",{line:line,date:date,lpName:lpName,code:code,type:type},function(result){ | 217 | + $get("/realSchedule/correctForm",{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type},function(result){ |
| 210 | var list_correctForm = template('list_correctForm',{list:result}); | 218 | var list_correctForm = template('list_correctForm',{list:result}); |
| 211 | // 把渲染好的模版html文本追加到表格中 | 219 | // 把渲染好的模版html文本追加到表格中 |
| 212 | $('#forms .list_correctForm').html(list_correctForm); | 220 | $('#forms .list_correctForm').html(list_correctForm); |
| @@ -224,7 +232,7 @@ | @@ -224,7 +232,7 @@ | ||
| 224 | 232 | ||
| 225 | $("#export").on("click",function(){ | 233 | $("#export").on("click",function(){ |
| 226 | var type = "export"; | 234 | var type = "export"; |
| 227 | - $get('/realSchedule/correctForm',{line:line,date:date,lpName:lpName,code:code,type:type},function(result){ | 235 | + $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type},function(result){ |
| 228 | window.open("/downloadFile/download?fileName=修正报表"+date); | 236 | window.open("/downloadFile/download?fileName=修正报表"+date); |
| 229 | }); | 237 | }); |
| 230 | }); | 238 | }); |
| @@ -234,7 +242,8 @@ | @@ -234,7 +242,8 @@ | ||
| 234 | <script type="text/html" id="list_correctForm"> | 242 | <script type="text/html" id="list_correctForm"> |
| 235 | {{each list as obj i}} | 243 | {{each list as obj i}} |
| 236 | <tr> | 244 | <tr> |
| 237 | - <td>{{i+1}}</td> | 245 | + <td>{{i+1}}</td> |
| 246 | + <td>{{obj.rq}}</td> | ||
| 238 | <td>{{obj.lpName}}</td> | 247 | <td>{{obj.lpName}}</td> |
| 239 | <td>{{obj.clZbh}}</td> | 248 | <td>{{obj.clZbh}}</td> |
| 240 | <td>{{obj.jName}}/{{obj.jGh}}</td> | 249 | <td>{{obj.jName}}/{{obj.jGh}}</td> |
| @@ -244,7 +253,7 @@ | @@ -244,7 +253,7 @@ | ||
| 244 | {{/each}} | 253 | {{/each}} |
| 245 | {{if list.length == 0}} | 254 | {{if list.length == 0}} |
| 246 | <tr> | 255 | <tr> |
| 247 | - <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> | 256 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> |
| 248 | </tr> | 257 | </tr> |
| 249 | {{/if}} | 258 | {{/if}} |
| 250 | </script> | 259 | </script> |
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
| @@ -157,35 +157,71 @@ | @@ -157,35 +157,71 @@ | ||
| 157 | } | 157 | } |
| 158 | } | 158 | } |
| 159 | $('#subCompany').html(options); | 159 | $('#subCompany').html(options); |
| 160 | - initXl(); | ||
| 161 | } | 160 | } |
| 162 | 161 | ||
| 163 | - $("#subCompany").on("change",initXl); | ||
| 164 | - function initXl(){ | ||
| 165 | - var data=[]; | ||
| 166 | - if(fage){ | ||
| 167 | - $("#line").select2("destroy").html(''); | ||
| 168 | - } | ||
| 169 | - var fgs=$('#subCompany').val(); | ||
| 170 | - var gs=$('#company').val(); | 162 | +// $("#subCompany").on("change",initXl); |
| 163 | + | ||
| 164 | +// function initXl(){ | ||
| 165 | +// var data=[]; | ||
| 166 | +// data.push({id: " ", text: "全部线路"}); | ||
| 167 | +// if(fage){ | ||
| 168 | +// $("#line").select2("destroy").html(''); | ||
| 169 | +// } | ||
| 170 | +// var fgs=$('#subCompany').val(); | ||
| 171 | +// var gs=$('#company').val(); | ||
| 172 | +// for(var i=0;i<xlList.length;i++){ | ||
| 173 | +// if(gs!=""){ | ||
| 174 | +// if(fgs!=""){ | ||
| 175 | +// if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){ | ||
| 176 | +// data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 177 | +// } | ||
| 178 | +// }else{ | ||
| 179 | +// if(xlList[i]["gsbm"]==gs){ | ||
| 180 | +// data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 181 | +// } | ||
| 182 | +// } | ||
| 183 | +// } | ||
| 184 | +// } | ||
| 185 | +// initPinYinSelect2('#line',data,''); | ||
| 186 | +// fage=true; | ||
| 187 | +// } | ||
| 188 | + | ||
| 189 | + var tempData = {}; | ||
| 190 | + $.get('/report/lineList',function(xlList){ | ||
| 191 | + var data = []; | ||
| 171 | data.push({id: " ", text: "全部线路"}); | 192 | data.push({id: " ", text: "全部线路"}); |
| 172 | - for(var i=0;i<xlList.length;i++){ | ||
| 173 | - if(gs!=""){ | ||
| 174 | - if(fgs!=""){ | ||
| 175 | - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){ | ||
| 176 | - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 177 | - } | ||
| 178 | - }else{ | ||
| 179 | - if(xlList[i]["gsbm"]==gs){ | ||
| 180 | - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | 193 | + $.get('/user/companyData', function(result){ |
| 194 | + for(var i = 0; i < result.length; i++){ | ||
| 195 | + var companyCode = result[i].companyCode; | ||
| 196 | + var children = result[i].children; | ||
| 197 | + for(var j = 0; j < children.length; j++){ | ||
| 198 | + var code = children[j].code; | ||
| 199 | + for(var k=0;k < xlList.length;k++ ){ | ||
| 200 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | ||
| 201 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | ||
| 202 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | ||
| 203 | + } | ||
| 181 | } | 204 | } |
| 182 | } | 205 | } |
| 183 | } | 206 | } |
| 184 | - } | ||
| 185 | - initPinYinSelect2('#line',data,''); | ||
| 186 | - fage=true; | ||
| 187 | - } | 207 | + initPinYinSelect2('#line',data,''); |
| 208 | + | ||
| 209 | + }); | ||
| 210 | + }); | ||
| 188 | 211 | ||
| 212 | + $("#line").on("change", function(){ | ||
| 213 | + if($("#line").val() == " "){ | ||
| 214 | + $("#company").attr("disabled", false); | ||
| 215 | + $("#subCompany").attr("disabled", false); | ||
| 216 | + } else { | ||
| 217 | + var temp = tempData[$("#line").val()].split(":"); | ||
| 218 | + $("#company").val(temp[0]); | ||
| 219 | + updateCompany(); | ||
| 220 | + $("#subCompany").val(temp[1]); | ||
| 221 | + $("#company").attr("disabled", true); | ||
| 222 | + $("#subCompany").attr("disabled", true); | ||
| 223 | + } | ||
| 224 | + }); | ||
| 189 | 225 | ||
| 190 | $("#query").on("click",jsDoQuery); | 226 | $("#query").on("click",jsDoQuery); |
| 191 | 227 |
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
| @@ -312,22 +312,50 @@ | @@ -312,22 +312,50 @@ | ||
| 312 | <tr> | 312 | <tr> |
| 313 | <td>{{obj.date}}</td> | 313 | <td>{{obj.date}}</td> |
| 314 | <td>{{obj.line}}</td> | 314 | <td>{{obj.line}}</td> |
| 315 | - <td>{{obj.qdzFirst0}}</td> | ||
| 316 | - <td>{{obj.jhfcFirst0}}</td> | ||
| 317 | - <td>{{obj.sjfcFirst0}}</td> | ||
| 318 | - <td>{{obj.delayFirst0}}</td> | ||
| 319 | - <td>{{obj.qdzLast0}}</td> | ||
| 320 | - <td>{{obj.jhfcLast0}}</td> | ||
| 321 | - <td>{{obj.sjfcLast0}}</td> | ||
| 322 | - <td>{{obj.delayLast0}}</td> | ||
| 323 | - <td>{{obj.qdzFirst1}}</td> | ||
| 324 | - <td>{{obj.jhfcFirst1}}</td> | ||
| 325 | - <td>{{obj.sjfcFirst1}}</td> | ||
| 326 | - <td>{{obj.delayFirst1}}</td> | ||
| 327 | - <td>{{obj.qdzLast1}}</td> | ||
| 328 | - <td>{{obj.jhfcLast1}}</td> | ||
| 329 | - <td>{{obj.sjfcLast1}}</td> | ||
| 330 | - <td>{{obj.delayLast1}}</td> | 315 | + {{if obj.delayFirst0 != '/' && (obj.delayFirst0 > 1 || obj.delayFirst0 < -2)}} |
| 316 | + <td style="background-color: #FF9999">{{obj.qdzFirst0}}</td> | ||
| 317 | + <td style="background-color: #FF9999">{{obj.jhfcFirst0}}</td> | ||
| 318 | + <td style="background-color: #FF9999">{{obj.sjfcFirst0}}</td> | ||
| 319 | + <td style="background-color: #FF9999">{{obj.delayFirst0}}</td> | ||
| 320 | + {{else}} | ||
| 321 | + <td>{{obj.qdzFirst0}}</td> | ||
| 322 | + <td>{{obj.jhfcFirst0}}</td> | ||
| 323 | + <td>{{obj.sjfcFirst0}}</td> | ||
| 324 | + <td>{{obj.delayFirst0}}</td> | ||
| 325 | + {{/if}} | ||
| 326 | + {{if obj.delayLast0 != '/' && (obj.delayLast0 > 1 || obj.delayLast0 < -2)}} | ||
| 327 | + <td style="background-color: #FF9999">{{obj.qdzLast0}}</td> | ||
| 328 | + <td style="background-color: #FF9999">{{obj.jhfcLast0}}</td> | ||
| 329 | + <td style="background-color: #FF9999">{{obj.sjfcLast0}}</td> | ||
| 330 | + <td style="background-color: #FF9999">{{obj.delayLast0}}</td> | ||
| 331 | + {{else}} | ||
| 332 | + <td>{{obj.qdzLast0}}</td> | ||
| 333 | + <td>{{obj.jhfcLast0}}</td> | ||
| 334 | + <td>{{obj.sjfcLast0}}</td> | ||
| 335 | + <td>{{obj.delayLast0}}</td> | ||
| 336 | + {{/if}} | ||
| 337 | + {{if obj.delayFirst1 != '/' && (obj.delayFirst1 > 1 || obj.delayFirst1 < -2)}} | ||
| 338 | + <td style="background-color: #FF9999">{{obj.qdzFirst1}}</td> | ||
| 339 | + <td style="background-color: #FF9999">{{obj.jhfcFirst1}}</td> | ||
| 340 | + <td style="background-color: #FF9999">{{obj.sjfcFirst1}}</td> | ||
| 341 | + <td style="background-color: #FF9999">{{obj.delayFirst1}}</td> | ||
| 342 | + {{else}} | ||
| 343 | + <td>{{obj.qdzFirst1}}</td> | ||
| 344 | + <td>{{obj.jhfcFirst1}}</td> | ||
| 345 | + <td>{{obj.sjfcFirst1}}</td> | ||
| 346 | + <td>{{obj.delayFirst1}}</td> | ||
| 347 | + {{/if}} | ||
| 348 | + {{if obj.delayLast1 != '/' && (obj.delayLast1 > 1 || obj.delayLast1 < -2)}} | ||
| 349 | + <td style="background-color: #FF9999">{{obj.qdzLast1}}</td> | ||
| 350 | + <td style="background-color: #FF9999">{{obj.jhfcLast1}}</td> | ||
| 351 | + <td style="background-color: #FF9999">{{obj.sjfcLast1}}</td> | ||
| 352 | + <td style="background-color: #FF9999">{{obj.delayLast1}}</td> | ||
| 353 | + {{else}} | ||
| 354 | + <td>{{obj.qdzLast1}}</td> | ||
| 355 | + <td>{{obj.jhfcLast1}}</td> | ||
| 356 | + <td>{{obj.sjfcLast1}}</td> | ||
| 357 | + <td>{{obj.delayLast1}}</td> | ||
| 358 | + {{/if}} | ||
| 331 | </tr> | 359 | </tr> |
| 332 | {{/each}} | 360 | {{/each}} |
| 333 | </script> | 361 | </script> |
| 334 | \ No newline at end of file | 362 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/historyMessage.html
| @@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
| 46 | </form> | 46 | </form> |
| 47 | </div> | 47 | </div> |
| 48 | <div class="portlet-body"> | 48 | <div class="portlet-body"> |
| 49 | - <div class="table-container" id="table" style="margin-top: 10px;overflow:auto;min-width: 906px;"> | 49 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;"> |
| 50 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 50 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 51 | <thead> | 51 | <thead> |
| 52 | <tr class="hidden"> | 52 | <tr class="hidden"> |
| @@ -80,7 +80,6 @@ | @@ -80,7 +80,6 @@ | ||
| 80 | format : 'YYYY-MM-DD', | 80 | format : 'YYYY-MM-DD', |
| 81 | locale : 'zh-cn' | 81 | locale : 'zh-cn' |
| 82 | }); | 82 | }); |
| 83 | - $("#table").height($(window).height()-280); | ||
| 84 | 83 | ||
| 85 | $.get('/basic/lineCode2Name',function(result){ | 84 | $.get('/basic/lineCode2Name',function(result){ |
| 86 | var data=[]; | 85 | var data=[]; |
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
| @@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
| 93 | </form> | 93 | </form> |
| 94 | </div> | 94 | </div> |
| 95 | <div class="portlet-body"> | 95 | <div class="portlet-body"> |
| 96 | - <div class="table-container" id="table" style="margin-top: 0px;overflow:auto;min-width: 906px;height:481px;"> | 96 | + <div class="table-container" id="table" style="margin-top: 0px;overflow:auto;min-width: 906px;"> |
| 97 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 97 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 98 | <thead> | 98 | <thead> |
| 99 | 99 | ||
| @@ -135,7 +135,6 @@ | @@ -135,7 +135,6 @@ | ||
| 135 | format : 'HH:mm', | 135 | format : 'HH:mm', |
| 136 | locale : 'zh-cn' | 136 | locale : 'zh-cn' |
| 137 | }); | 137 | }); |
| 138 | - $("#table").height($(window).height()-320); | ||
| 139 | 138 | ||
| 140 | var d = new Date(); | 139 | var d = new Date(); |
| 141 | var year = d.getFullYear(); | 140 | var year = d.getFullYear(); |
| @@ -346,7 +345,12 @@ | @@ -346,7 +345,12 @@ | ||
| 346 | $('#export').attr('disabled', "true"); | 345 | $('#export').attr('disabled', "true"); |
| 347 | else | 346 | else |
| 348 | $("#export").removeAttr("disabled"); | 347 | $("#export").removeAttr("disabled"); |
| 349 | - | 348 | + |
| 349 | + if($("#forms").height()+70 > $(window).height()-110){ | ||
| 350 | + $("#table").height($(window).height()-110); | ||
| 351 | + } else { | ||
| 352 | + $("#table").height($("#forms").height()+70); | ||
| 353 | + } | ||
| 350 | }); | 354 | }); |
| 351 | } | 355 | } |
| 352 | 356 |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -294,7 +294,7 @@ word-wrap: break-word; | @@ -294,7 +294,7 @@ word-wrap: break-word; | ||
| 294 | day = "0" + day; | 294 | day = "0" + day; |
| 295 | $("#date").val(year + "-" + month + "-" + day); | 295 | $("#date").val(year + "-" + month + "-" + day); |
| 296 | 296 | ||
| 297 | - $("#ddrbBody").height($(window).height()-280); | 297 | + $("#ddrbBody").height($(window).height()-100); |
| 298 | /* $.get('/basic/lineCode2Name',function(result){ | 298 | /* $.get('/basic/lineCode2Name',function(result){ |
| 299 | var data=[]; | 299 | var data=[]; |
| 300 | 300 | ||
| @@ -407,6 +407,7 @@ word-wrap: break-word; | @@ -407,6 +407,7 @@ word-wrap: break-word; | ||
| 407 | layer.msg("请选择时间"); | 407 | layer.msg("请选择时间"); |
| 408 | return; | 408 | return; |
| 409 | } | 409 | } |
| 410 | + $("#ddrbBody").height($(window).height()-100); | ||
| 410 | $("c").html("全日"); | 411 | $("c").html("全日"); |
| 411 | $("#export").removeAttr("disabled"); | 412 | $("#export").removeAttr("disabled"); |
| 412 | $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){ | 413 | $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){ |
src/main/resources/static/pages/forms/statement/statisticsDaily.html
| @@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
| 65 | </form> | 65 | </form> |
| 66 | </div> | 66 | </div> |
| 67 | <div class="portlet-body"> | 67 | <div class="portlet-body"> |
| 68 | - <div class="table-container" id="ddrbBody" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 68 | + <div class="table-container" id="tjrbBody" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 69 | <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | 69 | <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> |
| 70 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 70 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 71 | <thead> | 71 | <thead> |
| @@ -248,6 +248,7 @@ | @@ -248,6 +248,7 @@ | ||
| 248 | layer.msg("请选择时间范围!"); | 248 | layer.msg("请选择时间范围!"); |
| 249 | return; | 249 | return; |
| 250 | } | 250 | } |
| 251 | + $("#tjrbBody").height($(window).height()-100); | ||
| 251 | line = $("#line").val(); | 252 | line = $("#line").val(); |
| 252 | xlName = $("#select2-line-container").html(); | 253 | xlName = $("#select2-line-container").html(); |
| 253 | date = $("#date").val(); | 254 | date = $("#date").val(); |
| @@ -282,7 +283,7 @@ | @@ -282,7 +283,7 @@ | ||
| 282 | } | 283 | } |
| 283 | 284 | ||
| 284 | }); | 285 | }); |
| 285 | - $("#ddrbBody").height($(window).height()-280); | 286 | + $("#tjrbBody").height($(window).height()-100); |
| 286 | $("#export").on("click",function(){ | 287 | $("#export").on("click",function(){ |
| 287 | var params = {}; | 288 | var params = {}; |
| 288 | params['gsdm'] = gsdm; | 289 | params['gsdm'] = gsdm; |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
| 55 | <div class="portlet-body"> | 55 | <div class="portlet-body"> |
| 56 | <div class="row"> | 56 | <div class="row"> |
| 57 | <div class="col-md-3"> | 57 | <div class="col-md-3"> |
| 58 | - <div class="" style="margin-top: 10px;overflow:auto;height: 520px"> | 58 | + <div class="" id="left_height" style="margin-top: 10px;overflow:auto;"> |
| 59 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | 59 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> |
| 60 | <thead> | 60 | <thead> |
| 61 | <tr class="hidden"> | 61 | <tr class="hidden"> |
| @@ -106,7 +106,9 @@ | @@ -106,7 +106,9 @@ | ||
| 106 | locale : 'zh-cn' | 106 | locale : 'zh-cn' |
| 107 | }); | 107 | }); |
| 108 | 108 | ||
| 109 | + $("#left_height").height($(window).height()-100); | ||
| 109 | $("#xcld_height").height($(window).height()-100); | 110 | $("#xcld_height").height($(window).height()-100); |
| 111 | + | ||
| 110 | var d = new Date(); | 112 | var d = new Date(); |
| 111 | var year = d.getFullYear(); | 113 | var year = d.getFullYear(); |
| 112 | var month = d.getMonth() + 1; | 114 | var month = d.getMonth() + 1; |
| @@ -187,8 +189,9 @@ | @@ -187,8 +189,9 @@ | ||
| 187 | fage=true; | 189 | fage=true; |
| 188 | } | 190 | } |
| 189 | var date = ''; | 191 | var date = ''; |
| 190 | - var line =''; | 192 | + var line = ''; |
| 191 | $("#query").on("click",function(){ | 193 | $("#query").on("click",function(){ |
| 194 | + $("#left_height").height($(window).height()-100); | ||
| 192 | line = $("#line").val(); | 195 | line = $("#line").val(); |
| 193 | date = $("#date").val(); | 196 | date = $("#date").val(); |
| 194 | $(".hidden").removeClass("hidden"); | 197 | $(".hidden").removeClass("hidden"); |
src/main/resources/static/pages/forms/statement/workDaily.html
| @@ -7,7 +7,8 @@ | @@ -7,7 +7,8 @@ | ||
| 7 | .table-bordered > tbody > tr > td, | 7 | .table-bordered > tbody > tr > td, |
| 8 | .table-bordered > tfoot > tr > th, | 8 | .table-bordered > tfoot > tr > th, |
| 9 | .table-bordered > tfoot > tr > td { | 9 | .table-bordered > tfoot > tr > td { |
| 10 | - border: 1px solid; } | 10 | + border: 1px solid; |
| 11 | + text-align: center; } | ||
| 11 | .table-bordered > thead > tr > th, | 12 | .table-bordered > thead > tr > th, |
| 12 | .table-bordered > thead > tr > td { | 13 | .table-bordered > thead > tr > td { |
| 13 | border-bottom-width: 2px; } | 14 | border-bottom-width: 2px; } |
src/main/resources/static/pages/mforms/operationservices/operationservice.html
| @@ -169,7 +169,7 @@ | @@ -169,7 +169,7 @@ | ||
| 169 | $("#fgsdmOperat").on("change",initXl); | 169 | $("#fgsdmOperat").on("change",initXl); |
| 170 | function initXl(){ | 170 | function initXl(){ |
| 171 | var data=[]; | 171 | var data=[]; |
| 172 | - data.push({id: " ", text: "请选择"}); | 172 | + data.push({id: " ", text: "全部线路"}); |
| 173 | if(fage){ | 173 | if(fage){ |
| 174 | $("#line").select2("destroy").html(''); | 174 | $("#line").select2("destroy").html(''); |
| 175 | } | 175 | } |
src/main/resources/static/pages/oil/add.html
| @@ -173,7 +173,7 @@ | @@ -173,7 +173,7 @@ | ||
| 173 | <div class="row"> | 173 | <div class="row"> |
| 174 | <div class="col-md-offset-3 col-md-4"> | 174 | <div class="col-md-offset-3 col-md-4"> |
| 175 | <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> | 175 | <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> |
| 176 | - <a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a> | 176 | + <a type="button" class="btn default" href="list_ph.html" data-pjax><i class="fa fa-times"></i> 取消</a> |
| 177 | </div> | 177 | </div> |
| 178 | </div> | 178 | </div> |
| 179 | </div> | 179 | </div> |
src/main/resources/static/pages/report/inoutstation.html
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | <div style="display: inline-block;margin-left: 15px;"> | 31 | <div style="display: inline-block;margin-left: 15px;"> |
| 32 | <input class="item-label" type="radio" name="typeLx" checked="checked" value="1" /> | 32 | <input class="item-label" type="radio" name="typeLx" checked="checked" value="1" /> |
| 33 | 班次执行情况 | 33 | 班次执行情况 |
| 34 | - <input class="item-label" type="radio" name="typeLX" value="2" /> | 34 | + <input class="item-label" type="radio" name="typeLx" value="2" /> |
| 35 | 车辆/站点 | 35 | 车辆/站点 |
| 36 | </div> | 36 | </div> |
| 37 | <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv"> | 37 | <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv"> |
| @@ -116,16 +116,17 @@ | @@ -116,16 +116,17 @@ | ||
| 116 | <thead> | 116 | <thead> |
| 117 | <tr> | 117 | <tr> |
| 118 | <td width="3%"></td> | 118 | <td width="3%"></td> |
| 119 | - <td width="9%">内部编码</td> | ||
| 120 | - <td width="8%">到站名称</td> | ||
| 121 | - <td width="8%">到站时刻</td> | ||
| 122 | - <td width="8%">离站时刻</td> | ||
| 123 | - <td width="8%">是否开关门</td> | ||
| 124 | - <td width="8%">上下行</td> | 119 | + <td width="8%">内部编码</td> |
| 120 | + <td width="8%">牌照号</td> | ||
| 121 | + <td width="7%">到站名称</td> | ||
| 122 | + <td width="7%">到站时刻</td> | ||
| 123 | + <td width="7%">离站时刻</td> | ||
| 124 | + <td width="7%">是否开关门</td> | ||
| 125 | + <td width="7%">上下行</td> | ||
| 125 | <td width="8%">开门速度(公里/小时)</td> | 126 | <td width="8%">开门速度(公里/小时)</td> |
| 126 | - <td width="8%">补发</td> | ||
| 127 | - <td width="8%">刷卡次数</td> | ||
| 128 | - <td width="8%">刷卡金额</td> | 127 | + <td width="7%">补发</td> |
| 128 | + <td width="7%">刷卡次数</td> | ||
| 129 | + <td width="7%">刷卡金额</td> | ||
| 129 | <td width="8%">免费刷卡次数</td> | 130 | <td width="8%">免费刷卡次数</td> |
| 130 | <td width="8%">免费刷卡金额</td> | 131 | <td width="8%">免费刷卡金额</td> |
| 131 | </tr> | 132 | </tr> |
| @@ -497,6 +498,7 @@ | @@ -497,6 +498,7 @@ | ||
| 497 | <tr> | 498 | <tr> |
| 498 | <td>{{i+1}}</td> | 499 | <td>{{i+1}}</td> |
| 499 | <td>{{obj.nbbm}}</td> | 500 | <td>{{obj.nbbm}}</td> |
| 501 | + <td>{{obj.pzh}}</td> | ||
| 500 | <td>{{obj.stopName}}</td> | 502 | <td>{{obj.stopName}}</td> |
| 501 | <td>{{obj.jzsj}}</td> | 503 | <td>{{obj.jzsj}}</td> |
| 502 | <td>{{obj.czsj}}</td> | 504 | <td>{{obj.czsj}}</td> |
src/main/resources/static/pages/report/message/message.html
| @@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
| 42 | <div class="form-group" style="display: inline-block;margin-left: 15px;"> | 42 | <div class="form-group" style="display: inline-block;margin-left: 15px;"> |
| 43 | <input class="btn btn-default" type="button" id="query" value="查询"/> | 43 | <input class="btn btn-default" type="button" id="query" value="查询"/> |
| 44 | <input class="btn btn-default" type="button" id="export" value="导出"/> | 44 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 45 | - <input class="btn btn-default" type="button" id="print" value="打印"/> | 45 | +<!-- <input class="btn btn-default" type="button" id="print" value="打印"/> --> |
| 46 | <!-- <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> --> | 46 | <!-- <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> --> |
| 47 | </div> | 47 | </div> |
| 48 | </form> | 48 | </form> |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | <div class="portlet-body"> | 50 | <div class="portlet-body"> |
| 51 | <div class="row"> | 51 | <div class="row"> |
| 52 | <div class="col-md-3"> | 52 | <div class="col-md-3"> |
| 53 | - <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> | 53 | + <div class="" id="left_table" style="margin-top: 10px;overflow:auto;height: 860px"> |
| 54 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info_msg"> | 54 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info_msg"> |
| 55 | <thead> | 55 | <thead> |
| 56 | <tr class="hidden"> | 56 | <tr class="hidden"> |
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | </div> | 67 | </div> |
| 68 | </div> | 68 | </div> |
| 69 | <div class="col-md-9" id="printArea"> | 69 | <div class="col-md-9" id="printArea"> |
| 70 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 70 | + <div class="table-container" id="table" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 71 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 71 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 72 | <thead> | 72 | <thead> |
| 73 | <tr class="hidden"> | 73 | <tr class="hidden"> |
| @@ -106,6 +106,10 @@ | @@ -106,6 +106,10 @@ | ||
| 106 | format : 'YYYY-MM-DD', | 106 | format : 'YYYY-MM-DD', |
| 107 | locale : 'zh-cn' | 107 | locale : 'zh-cn' |
| 108 | }); | 108 | }); |
| 109 | + | ||
| 110 | + $("#left_table").height($(window).height()-100); | ||
| 111 | + $("#table").height($(window).height()-100); | ||
| 112 | + | ||
| 109 | var d = new Date(); | 113 | var d = new Date(); |
| 110 | var year = d.getFullYear(); | 114 | var year = d.getFullYear(); |
| 111 | var month = d.getMonth() + 1; | 115 | var month = d.getMonth() + 1; |
| @@ -171,7 +175,8 @@ | @@ -171,7 +175,8 @@ | ||
| 171 | if($("#date").val() == null || $("#date").val().trim().length == 0){ | 175 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| 172 | layer.msg("请选择时间!"); | 176 | layer.msg("请选择时间!"); |
| 173 | return; | 177 | return; |
| 174 | - } | 178 | + } |
| 179 | + $("#left_table").height($(window).height()-100); | ||
| 175 | line = $("#line").val(); | 180 | line = $("#line").val(); |
| 176 | date = $("#date").val(); | 181 | date = $("#date").val(); |
| 177 | var code = $("#code").val(); | 182 | var code = $("#code").val(); |
| @@ -194,13 +199,15 @@ | @@ -194,13 +199,15 @@ | ||
| 194 | $("#info_msg tbody").on("click","tr",function(){ | 199 | $("#info_msg tbody").on("click","tr",function(){ |
| 195 | if($(this).children().size() < 2){ | 200 | if($(this).children().size() < 2){ |
| 196 | return; | 201 | return; |
| 197 | - } | 202 | + } |
| 203 | + $("#table").height($(window).height()-100); | ||
| 198 | $(this).children().each(function(index){ | 204 | $(this).children().each(function(index){ |
| 199 | params[index] = $(this).text(); | 205 | params[index] = $(this).text(); |
| 200 | }); | 206 | }); |
| 201 | jName = params[1]; | 207 | jName = params[1]; |
| 202 | line = $("#line").val(); | 208 | line = $("#line").val(); |
| 203 | date = $("#date").val(); | 209 | date = $("#date").val(); |
| 210 | + var obj = $(this); | ||
| 204 | $get('/realSchedule/historyMessage',{line:line,date:date,code:jName,type:"query"},function(result){ | 211 | $get('/realSchedule/historyMessage',{line:line,date:date,code:jName,type:"query"},function(result){ |
| 205 | var list_history_msg = template('list_history_msg',{list:result}); | 212 | var list_history_msg = template('list_history_msg',{list:result}); |
| 206 | // 把渲染好的模版html文本追加到表格中 | 213 | // 把渲染好的模版html文本追加到表格中 |
| @@ -214,7 +221,9 @@ | @@ -214,7 +221,9 @@ | ||
| 214 | $("#print").removeAttr("disabled"); | 221 | $("#print").removeAttr("disabled"); |
| 215 | } | 222 | } |
| 216 | $('#printArea').show(); | 223 | $('#printArea').show(); |
| 217 | - | 224 | + |
| 225 | + $("#info_msg tbody tr").css('background-color', ''); | ||
| 226 | + obj.css('background-color', '#99CCFF'); | ||
| 218 | }); | 227 | }); |
| 219 | }); | 228 | }); |
| 220 | 229 |
src/main/resources/static/pages/report/sheet/list.html
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | 18 | ||
| 19 | <div class="page-head"> | 19 | <div class="page-head"> |
| 20 | <div class="page-title" style="margin-left: 20px"> | 20 | <div class="page-title" style="margin-left: 20px"> |
| 21 | - <button>数据导出</button> | 21 | + <button id="exportList">数据导出</button> |
| 22 | </div> | 22 | </div> |
| 23 | </div> | 23 | </div> |
| 24 | 24 | ||
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-body"> | 28 | <div class="portlet-body"> |
| 29 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px"> | 29 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px"> |
| 30 | - <table class="table table-bordered table-hover table-checkable" id="forms_1"> | 30 | + <table class="table table-bordered table-hover table-checkable" id="forms_2"> |
| 31 | <thead> | 31 | <thead> |
| 32 | <tr> | 32 | <tr> |
| 33 | <td></td> | 33 | <td></td> |
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | </tr> | 40 | </tr> |
| 41 | </thead> | 41 | </thead> |
| 42 | 42 | ||
| 43 | - <tbody > | 43 | + <tbody> |
| 44 | 44 | ||
| 45 | </tbody> | 45 | </tbody> |
| 46 | </table> | 46 | </table> |
| @@ -55,32 +55,28 @@ | @@ -55,32 +55,28 @@ | ||
| 55 | // 关闭左侧栏 | 55 | // 关闭左侧栏 |
| 56 | if (!$('body').hasClass('page-sidebar-closed')) | 56 | if (!$('body').hasClass('page-sidebar-closed')) |
| 57 | $('.menu-toggler.sidebar-toggler').click(); | 57 | $('.menu-toggler.sidebar-toggler').click(); |
| 58 | - | 58 | + var no=""; |
| 59 | $("#sheetList").on('init', function (e, id) { | 59 | $("#sheetList").on('init', function (e, id) { |
| 60 | + no=id; | ||
| 60 | $get('/sheet/sheetList',{id:id},function(result){ | 61 | $get('/sheet/sheetList',{id:id},function(result){ |
| 61 | - var sheetList_1 = template('sheetList_1',{list:result}); | ||
| 62 | - $('#forms_1 tbody').html(sheetList_1); | 62 | + var sheetList_2 = template('sheetList_2',{list:result}); |
| 63 | + $('#forms_2 tbody').html(sheetList_2); | ||
| 63 | }); | 64 | }); |
| 64 | }) | 65 | }) |
| 65 | - /* $("#query").on('click',function(){ | ||
| 66 | - var line = $("#line").val(); | ||
| 67 | - var date = $("#date").val(); | ||
| 68 | - var fgs=$('#fgsdm').val(); | ||
| 69 | - var gs=$('#gsdm').val(); | ||
| 70 | - $get('/sheet/countList',{line:line,date:date,gs:gs,fgs:fgs},function(result){ | ||
| 71 | - var sheetList = template('sheetList',{list:result}); | ||
| 72 | - $('#forms tbody').html(sheetList); | ||
| 73 | - $('.btn-sheetList').on('click', openSheetList); | ||
| 74 | - }); | ||
| 75 | - }); */ | 66 | + $("#exportList").on('click',function(){ |
| 67 | + | ||
| 68 | + $get('/sheet/exportList',params,function(result){ | ||
| 69 | + window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD")); | ||
| 70 | + }); | ||
| 71 | + }); | ||
| 76 | 72 | ||
| 77 | 73 | ||
| 78 | }); | 74 | }); |
| 79 | </script> | 75 | </script> |
| 80 | -<script type="text/html" id="sheetList_1"> | 76 | +<script type="text/html" id="sheetList_2"> |
| 81 | {{each list as obj i}} | 77 | {{each list as obj i}} |
| 82 | <tr {{if obj.sfzd!="Y"}}style="color: red" {{/if}}> | 78 | <tr {{if obj.sfzd!="Y"}}style="color: red" {{/if}}> |
| 83 | - <td>{{i}}</td> | 79 | + <td>{{i+1}}</td> |
| 84 | <td>{{obj.date}}</td> | 80 | <td>{{obj.date}}</td> |
| 85 | <td>{{obj.line}}</td> | 81 | <td>{{obj.line}}</td> |
| 86 | <td>{{obj.zdname}}</td> | 82 | <td>{{obj.zdname}}</td> |
src/main/resources/static/pages/report/sheet/sheetList.html
| @@ -35,14 +35,20 @@ | @@ -35,14 +35,20 @@ | ||
| 35 | <span class="item-label" style="width: 80px;">分公司: </span> | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | 36 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> |
| 37 | </div> | 37 | </div> |
| 38 | - <div style="display: inline-block;margin-left: 15px;"> | 38 | + <div style="margin-top: 10px"> |
| 39 | + </div> | ||
| 40 | + <div style="display: inline-block;margin-left: 33px;"> | ||
| 39 | <span class="item-label" style="width: 80px;">线路: </span> | 41 | <span class="item-label" style="width: 80px;">线路: </span> |
| 40 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 42 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 41 | </div> | 43 | </div> |
| 42 | <div style="display: inline-block;"> | 44 | <div style="display: inline-block;"> |
| 43 | - <span class="item-label" style="width: 80px;">时间: </span> | 45 | + <span class="item-label" style="width: 80px;margin-left: 24px;">开始时间: </span> |
| 44 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 46 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 45 | </div> | 47 | </div> |
| 48 | + <div style="display: inline-block;"> | ||
| 49 | + <span class="item-label" style="width: 80px;margin-left: 24px;">结束时间: </span> | ||
| 50 | + <input class="form-control" type="text" id="endDate" style="width: 180px;"/> | ||
| 51 | + </div> | ||
| 46 | 52 | ||
| 47 | <div class="form-group"> | 53 | <div class="form-group"> |
| 48 | <input class="btn btn-default" type="button" id="query" value="查询"/> | 54 | <input class="btn btn-default" type="button" id="query" value="查询"/> |
| @@ -65,7 +71,28 @@ | @@ -65,7 +71,28 @@ | ||
| 65 | </tr> | 71 | </tr> |
| 66 | </thead> | 72 | </thead> |
| 67 | 73 | ||
| 68 | - <tbody > | 74 | + <tbody> |
| 75 | + | ||
| 76 | + </tbody> | ||
| 77 | + </table> | ||
| 78 | + </div> | ||
| 79 | + | ||
| 80 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 81 | + <table class="table table-bordered table-hover table-checkable" id="forms_1"> | ||
| 82 | + <thead> | ||
| 83 | + <tr class="hidden"> | ||
| 84 | + <td>公司</td> | ||
| 85 | + <td>分公司</td> | ||
| 86 | + <td>日期</td> | ||
| 87 | + <td>线路</td> | ||
| 88 | + <td>班次数</td> | ||
| 89 | + <td>准点班次数</td> | ||
| 90 | + <td>准点率</td> | ||
| 91 | + <td>查看</td> | ||
| 92 | + </tr> | ||
| 93 | + </thead> | ||
| 94 | + | ||
| 95 | + <tbody> | ||
| 69 | 96 | ||
| 70 | </tbody> | 97 | </tbody> |
| 71 | </table> | 98 | </table> |
| @@ -85,6 +112,10 @@ | @@ -85,6 +112,10 @@ | ||
| 85 | format : 'YYYY-MM-DD', | 112 | format : 'YYYY-MM-DD', |
| 86 | locale : 'zh-cn' | 113 | locale : 'zh-cn' |
| 87 | }); | 114 | }); |
| 115 | + $("#endDate").datetimepicker({ | ||
| 116 | + format : 'YYYY-MM-DD', | ||
| 117 | + locale : 'zh-cn' | ||
| 118 | + }); | ||
| 88 | var d = new Date(); | 119 | var d = new Date(); |
| 89 | var year = d.getFullYear(); | 120 | var year = d.getFullYear(); |
| 90 | var month = d.getMonth() + 1; | 121 | var month = d.getMonth() + 1; |
| @@ -93,8 +124,10 @@ | @@ -93,8 +124,10 @@ | ||
| 93 | day = "0"+day; | 124 | day = "0"+day; |
| 94 | if(month > 9){ | 125 | if(month > 9){ |
| 95 | $("#date").val(year + "-" + month + "-" + day); | 126 | $("#date").val(year + "-" + month + "-" + day); |
| 127 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 96 | } else { | 128 | } else { |
| 97 | $("#date").val(year + "-0" + month + "-" + day); | 129 | $("#date").val(year + "-0" + month + "-" + day); |
| 130 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 98 | } | 131 | } |
| 99 | 132 | ||
| 100 | var fage=false; | 133 | var fage=false; |
| @@ -172,19 +205,34 @@ | @@ -172,19 +205,34 @@ | ||
| 172 | $("#query").on('click',function(){ | 205 | $("#query").on('click',function(){ |
| 173 | var line = $("#line").val(); | 206 | var line = $("#line").val(); |
| 174 | var date = $("#date").val(); | 207 | var date = $("#date").val(); |
| 208 | + var endDate = $("#endDate").val(); | ||
| 175 | var fgs=$('#fgsdm').val(); | 209 | var fgs=$('#fgsdm').val(); |
| 176 | var gs=$('#gsdm').val(); | 210 | var gs=$('#gsdm').val(); |
| 177 | - $get('/sheet/countList',{line:line,date:date,gs:gs,fgs:fgs},function(result){ | 211 | + $get('/sheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs},function(result){ |
| 178 | var sheetList = template('sheetList',{list:result}); | 212 | var sheetList = template('sheetList',{list:result}); |
| 179 | $('#forms tbody').html(sheetList); | 213 | $('#forms tbody').html(sheetList); |
| 180 | - $('.btn-sheetList').on('click', openSheetList); | 214 | + $('.btn-sheetList').on('click', showSheetList); |
| 181 | }); | 215 | }); |
| 182 | // $post('/sheet/saveListSheet',function(result){ | 216 | // $post('/sheet/saveListSheet',function(result){ |
| 183 | // }); | 217 | // }); |
| 184 | }); | 218 | }); |
| 185 | - | 219 | + function showSheetList(){ |
| 220 | + var id = $(this).data('id'); | ||
| 221 | + var date = $("#date").val(); | ||
| 222 | + var endDate = $("#endDate").val(); | ||
| 223 | + $get('/sheet/listSheet',{id:id,date:date,endDate:endDate},function(result){ | ||
| 224 | + var sheetList = template('sheetList_1',{list:result}); | ||
| 225 | + | ||
| 226 | + $('#forms_1 tbody').html(sheetList); | ||
| 227 | + $('.btn-sheetList_1').on('click', openSheetList); | ||
| 228 | + $("#forms_1 .hidden").removeClass("hidden"); | ||
| 229 | + $("html,body").animate({scrollTop:$("#forms_1").offset().top},1000); | ||
| 230 | + | ||
| 231 | + }); | ||
| 232 | + } | ||
| 186 | function openSheetList(){ | 233 | function openSheetList(){ |
| 187 | var id = $(this).data('id'); | 234 | var id = $(this).data('id'); |
| 235 | + console.log(id); | ||
| 188 | $.get('/pages/report/sheet/list.html', function (content) { | 236 | $.get('/pages/report/sheet/list.html', function (content) { |
| 189 | layer.open({ | 237 | layer.open({ |
| 190 | type: 1, | 238 | type: 1, |
| @@ -221,4 +269,27 @@ | @@ -221,4 +269,27 @@ | ||
| 221 | <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 269 | <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> |
| 222 | </tr> | 270 | </tr> |
| 223 | {{/if}} | 271 | {{/if}} |
| 272 | +</script> | ||
| 273 | + | ||
| 274 | +<script type="text/html" id="sheetList_1"> | ||
| 275 | + {{each list as obj i}} | ||
| 276 | + <tr> | ||
| 277 | + <td>{{obj.gs}}</td> | ||
| 278 | + <td>{{obj.fgs}}</td> | ||
| 279 | + <td>{{obj.date}}</td> | ||
| 280 | + <td>{{obj.line}}</td> | ||
| 281 | + <td>{{obj.bcs}}</td> | ||
| 282 | + <td>{{obj.zdbcs}}</td> | ||
| 283 | + <td>{{obj.zdlv}}</td> | ||
| 284 | + <td> | ||
| 285 | + <button type="button" class="btn btn-sm blue btn-sheetList_1" | ||
| 286 | + data-id="{{obj.id}}">详细</button> | ||
| 287 | + </td> | ||
| 288 | + </tr> | ||
| 289 | + {{/each}} | ||
| 290 | + {{if list.length == 0}} | ||
| 291 | + <tr> | ||
| 292 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 293 | + </tr> | ||
| 294 | + {{/if}} | ||
| 224 | </script> | 295 | </script> |
| 225 | \ No newline at end of file | 296 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -520,7 +520,7 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | @@ -520,7 +520,7 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | ||
| 520 | return { | 520 | return { |
| 521 | rest : $resource( | 521 | rest : $resource( |
| 522 | '/spic/:id', | 522 | '/spic/:id', |
| 523 | - {order: 'scheduleDate,lp,fcno', direction: 'ASC,ASC,ASC', id: '@id'}, | 523 | + {order: 'xl,scheduleDate,lp,xlDir,fcno', direction: 'ASC,ASC,ASC,ASC,ASC', id: '@id'}, |
| 524 | { | 524 | { |
| 525 | list: { | 525 | list: { |
| 526 | method: 'GET', | 526 | method: 'GET', |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html
| @@ -84,10 +84,20 @@ | @@ -84,10 +84,20 @@ | ||
| 84 | <span ng-bind="info.bcType | dict:'ScheduleType':'未知' "></span> | 84 | <span ng-bind="info.bcType | dict:'ScheduleType':'未知' "></span> |
| 85 | </td> | 85 | </td> |
| 86 | <td> | 86 | <td> |
| 87 | - <span ng-bind="info.xlDir | dict:'LineTrend2':'未知' "></span> | 87 | + <a href="#" ng-if="info.xlDir == '0'"> |
| 88 | + <i class="fa fa-arrow-up" aria-hidden="true"></i> | ||
| 89 | + <span ng-bind="info.xlDir | dict:'LineTrend2':'未知' "></span> | ||
| 90 | + </a> | ||
| 91 | + <a href="#" ng-if="info.xlDir == '1'"> | ||
| 92 | + <i class="fa fa-arrow-circle-down" aria-hidden="true"></i> | ||
| 93 | + <span ng-bind="info.xlDir | dict:'LineTrend2':'未知' "></span> | ||
| 94 | + </a> | ||
| 88 | </td> | 95 | </td> |
| 89 | <td> | 96 | <td> |
| 90 | - <span ng-bind="info.fcsj"></span> | 97 | + <a href="#"> |
| 98 | + <i class="fa fa-clock-o" aria-hidden="true"></i> | ||
| 99 | + <span ng-bind="info.fcsj"></span> | ||
| 100 | + </a> | ||
| 91 | </td> | 101 | </td> |
| 92 | <td> | 102 | <td> |
| 93 | <a href="#" | 103 | <a href="#" |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/service.js
| @@ -64,7 +64,7 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | @@ -64,7 +64,7 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | ||
| 64 | return { | 64 | return { |
| 65 | rest : $resource( | 65 | rest : $resource( |
| 66 | '/spic/:id', | 66 | '/spic/:id', |
| 67 | - {order: 'scheduleDate,lp,fcno', direction: 'ASC,ASC,ASC', id: '@id'}, | 67 | + {order: 'xl,scheduleDate,lp,xlDir,fcno', direction: 'ASC,ASC,ASC,ASC,ASC', id: '@id'}, |
| 68 | { | 68 | { |
| 69 | list: { | 69 | list: { |
| 70 | method: 'GET', | 70 | method: 'GET', |