Commit 5b794987c20af97af899a1e94fc1e29a5ad2e2cb

Authored by 廖磊
1 parent 5bc8f72d

更新班次接口 早高峰班次 晚高峰班次

src/main/java/com/bsth/server_rs/bigdata/BigdateService.java
... ... @@ -603,13 +603,13 @@ public class BigdateService {
603 603 @PathParam("date") String date) {
604 604 String sql="";
605 605 if(type.equals("all")){
606   - sql="select t.gsdm,t.xl,t.xl_name,t.jhbcz as jhbc,t.jhgfbcsz as gfbcs,"
607   - + " t.jhdgbcsz as dgbcs,t.sjbc,t.sjgfbcs,t.sjdgbcs from bsth_c_calc_count t "
  606 + sql="select t.gsdm,t.xl,t.xl_name,t.jhbcz as jhbc,t.jhzgfbcz as jhzgfbc,"
  607 + + " t.jhwgfbcz as jhwgfbc,t.sjbc,t.sjzgfbc,t.sjwgfbc from bsth_c_calc_count t"
608 608 + " where t.date='"+date+"'";
609 609 }
610 610 if(type.equals("actual")){
611   - sql="select t.gsdm,t.xl,t.xl_name,t.jhbc as jhbc,t.jhssgfbcs as gfbcs,"
612   - + " t.jhssdgbcs as dgbcs, t.sjbc,t.sjgfbcs,t.sjdgbcs from bsth_c_calc_count t"
  611 + sql="select t.gsdm,t.xl,t.xl_name,t.jhbc as jhbc,t.jhzgfbcss as jhzgfbc,"
  612 + + " t.jhwgfbcss as jhwgfbc,t.sjbc,t.sjzgfbc,t.sjwgfbc from bsth_c_calc_count t"
613 613 + " where t.date='"+date+"'";
614 614 }
615 615 List<Map<String, Object>> list=jdbcTemplate.query(sql,
... ... @@ -622,11 +622,11 @@ public class BigdateService {
622 622 m.put("lineCode",rs.getString("xl"));
623 623 m.put("lineName", rs.getString("xl_name"));
624 624 m.put("jhbc", rs.getString("jhbc"));
625   - m.put("gfbcs", rs.getString("gfbcs"));
626   - m.put("dgbcs", rs.getString("dgbcs"));
  625 + m.put("jhzgfbc", rs.getString("jhzgfbc"));
  626 + m.put("jhwgfbc", rs.getString("jhwgfbc"));
627 627 m.put("sjbc", rs.getString("sjbc"));
628   - m.put("sjgfbcs", rs.getString("sjgfbcs"));
629   - m.put("sjdgbcs", rs.getString("sjdgbcs"));
  628 + m.put("sjzgfbc", rs.getString("sjzgfbc"));
  629 + m.put("sjwgfbc", rs.getString("sjwgfbc"));
630 630 return m;
631 631 }
632 632 });
... ... @@ -640,13 +640,13 @@ public class BigdateService {
640 640 @PathParam("date") String date,@PathParam("line") String line) {
641 641 String sql="";
642 642 if(type.equals("all")){
643   - sql="select t.gsdm,t.xl,t.xl_name,t.jhbcz as jhbc,t.jhgfbcsz as gfbcs,"
644   - + " t.jhdgbcsz as dgbcs,t.sjbc,t.sjgfbcs,t.sjdgbcs from bsth_c_calc_count t "
  643 + sql="select t.gsdm,t.xl,t.xl_name,t.jhbcz as jhbc,t.jhzgfbcz as jhzgfbc,"
  644 + + " t.jhwgfbcz as jhwgfbc,t.sjbc,t.sjzgfbc,t.sjwgfbc from bsth_c_calc_count t "
645 645 + " where t.date='"+date+"' and xl='"+line+"'";
646 646 }
647 647 if(type.equals("actual")){
648   - sql="select t.gsdm,t.xl,t.xl_name,t.jhbc as jhbc,t.jhssgfbcs as gfbcs,"
649   - + " t.jhssdgbcs as dgbcs,t.sjbc,t.sjgfbcs,t.sjdgbcs from bsth_c_calc_count t"
  648 + sql="select t.gsdm,t.xl,t.xl_name,t.jhbc as jhbc,t.jhzgfbcss as jhzgfbc,"
  649 + + " t.jhwgfbcss as jhwgfbc,t.sjbc,t.sjzgfbc,t.sjwgfbc from bsth_c_calc_count t"
650 650 + " where t.date='"+date+"' and xl='"+line+"'";
651 651 }
652 652 List<Map<String, Object>> list=jdbcTemplate.query(sql,
... ... @@ -659,11 +659,11 @@ public class BigdateService {
659 659 m.put("lineCode",rs.getString("xl"));
660 660 m.put("lineName", rs.getString("xl_name"));
661 661 m.put("jhbc", rs.getString("jhbc"));
662   - m.put("gfbcs", rs.getString("gfbcs"));
663   - m.put("dgbcs", rs.getString("dgbcs"));
  662 + m.put("jhzgfbc", rs.getString("jhzgfbc"));
  663 + m.put("jhwgfbc", rs.getString("jhwgfbc"));
664 664 m.put("sjbc", rs.getString("sjbc"));
665   - m.put("sjgfbcs", rs.getString("sjgfbcs"));
666   - m.put("sjdgbcs", rs.getString("sjdgbcs"));
  665 + m.put("sjzgfbc", rs.getString("sjzgfbc"));
  666 + m.put("sjwgfbc", rs.getString("sjwgfbc"));
667 667 return m;
668 668 }
669 669 });
... ... @@ -941,4 +941,51 @@ public class BigdateService {
941 941 /*
942 942 *安全驾驶接口结束
943 943 */
  944 +
  945 +
  946 + /**
  947 + * 闵行线路班次里程
  948 + *
  949 + */
  950 +
  951 + @GET
  952 + @Path("/findByAll/starDate/{starDate}/endDate/{endDate}/line/{line}")
  953 + public List<Map<String, Object>> findMinhang(@PathParam("starDate") String starDate,
  954 + @PathParam("endDate") String endDate,@PathParam("line") String line) {
  955 + String sql="select xl,xl_name,date,jhszfcs,sjszfczds,jhbc,sjbc,jhcc,sjcc,"
  956 + + " jhyylc,sjyylc,jhkslc,sjkslc,jhssgfbcs,sjgfbcs,jhssdgbcs,"
  957 + + " sjdgbcs from bsth_c_calc_count "
  958 + + " where date>='"+starDate+"' and date<= '"+endDate+"'";
  959 + if(!line.equals("all")){
  960 + sql +=" and xl='"+line+"'";
  961 + }
  962 +
  963 + List<Map<String, Object>> list=jdbcTemplate.query(sql,
  964 + new RowMapper<Map<String, Object>>(){
  965 + @Override
  966 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  967 + Map<String, Object> m=new HashMap<String,Object>();
  968 + m.put("lineCode",rs.getString("xl"));
  969 + m.put("lineName", rs.getString("xl_name"));
  970 + m.put("date", rs.getString("date"));
  971 + m.put("jhszfcs", rs.getString("jhszfcs"));
  972 + m.put("sjszfczds", rs.getString("sjszfczds"));
  973 + m.put("jhbc", rs.getString("jhbc"));
  974 + m.put("sjbc", rs.getString("sjbc"));
  975 + m.put("jhcc", rs.getString("jhcc"));
  976 + m.put("sjcc", rs.getString("sjcc"));
  977 + m.put("jhyylc", rs.getString("jhyylc"));
  978 + m.put("sjyylc", rs.getString("sjyylc"));
  979 + m.put("jhkslc", rs.getString("jhkslc"));
  980 + m.put("sjkslc", rs.getString("sjkslc"));
  981 + m.put("jhgfbcs", rs.getString("jhssgfbcs"));
  982 + m.put("sjgfbcs", rs.getString("sjgfbcs"));
  983 + m.put("jhdgbcs", rs.getString("jhssdgbcs"));
  984 + m.put("sjdgbcs", rs.getString("sjdgbcs"));
  985 + return m;
  986 + }
  987 + });
  988 + return list;
  989 + }
  990 +
944 991 }
... ...