Commit 8d3ea91b751a76d32d4f6a616ddeb513bcbf4802

Authored by 廖磊
1 parent f1bab7ee

新增班次异常,首末班异常推送接口

车辆库IP地址变更
src/main/java/com/bsth/server_rs/bigdata/BigdateService.java
@@ -782,6 +782,51 @@ public class BigdateService { @@ -782,6 +782,51 @@ public class BigdateService {
782 782
783 783
784 /* 784 /*
  785 + * 班次执行率连续三天不满93%推送
  786 + */
  787 + @GET
  788 + @Path("/abnormal/executionRate/date/{date}")
  789 + public List<Map<String, Object>> executionRate(@PathParam("date") String date) {
  790 + String sql="select gs_name,show_date,xl_bm,xl_name from bsth_c_calc_push t"
  791 + + " where t.date='"+date+"' and push_type in ('1','3')";
  792 + List<Map<String, Object>> list=jdbcTemplate.query(sql,
  793 + new RowMapper<Map<String, Object>>(){
  794 + @Override
  795 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  796 + Map<String, Object> m=new HashMap<String,Object>();
  797 + m.put("companyName", rs.getString("gs_name"));
  798 + m.put("lineCode",rs.getString("xl_bm"));
  799 + m.put("lineName", rs.getString("xl_name"));
  800 + m.put("showDate", rs.getString("show_date"));
  801 + return m;
  802 + }
  803 + });
  804 + return list;
  805 + }
  806 + /*
  807 + * 首末班发车连续三天不准点
  808 + */
  809 + @GET
  810 + @Path("/abnormal/firstAndLast/date/{date}")
  811 + public List<Map<String, Object>> firstAndLast(@PathParam("date") String date) {
  812 + String sql="select gs_name,show_date,xl_bm,xl_name from bsth_c_calc_push t"
  813 + + " where t.date='"+date+"' and push_type in ('2','3')";
  814 + List<Map<String, Object>> list=jdbcTemplate.query(sql,
  815 + new RowMapper<Map<String, Object>>(){
  816 + @Override
  817 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  818 + Map<String, Object> m=new HashMap<String,Object>();
  819 + m.put("companyName", rs.getString("gs_name"));
  820 + m.put("lineCode",rs.getString("xl_bm"));
  821 + m.put("lineName", rs.getString("xl_name"));
  822 + m.put("showDate", rs.getString("show_date"));
  823 + return m;
  824 + }
  825 + });
  826 + return list;
  827 + }
  828 +
  829 + /*
785 * 车辆数据接口开始 830 * 车辆数据接口开始
786 */ 831 */
787 832
@@ -789,7 +834,7 @@ public class BigdateService { @@ -789,7 +834,7 @@ public class BigdateService {
789 @Path("/car/all") 834 @Path("/car/all")
790 public List<Map<String, Object>> findCar() { 835 public List<Map<String, Object>> findCar() {
791 String carStr= GetHttpInterface. 836 String carStr= GetHttpInterface.
792 - getHttpInterface("http://222.66.0.204:8076/cars/getAllCarsInterface"); 837 + getHttpInterface("http://101.95.0.106:8076/cars/getAllCarsInterface");
793 //车辆库资料资料 838 //车辆库资料资料
794 List<Map<String, Object>> clkList=(List<Map<String, Object>>) JSONObject.parse(carStr); 839 List<Map<String, Object>> clkList=(List<Map<String, Object>>) JSONObject.parse(carStr);
795 //调度系统车辆资料 840 //调度系统车辆资料
@@ -827,7 +872,7 @@ public class BigdateService { @@ -827,7 +872,7 @@ public class BigdateService {
827 @Path("/car/company/{companyId}") 872 @Path("/car/company/{companyId}")
828 public List<Map<String, Object>> findCarByCompany(@PathParam("companyId") String companyId) { 873 public List<Map<String, Object>> findCarByCompany(@PathParam("companyId") String companyId) {
829 String carStr= GetHttpInterface. 874 String carStr= GetHttpInterface.
830 - getHttpInterface("http://222.66.0.204:8076/cars/getAllCarsInterface?company="+companyId); 875 + getHttpInterface("http:/101.95.0.106:8076/cars/getAllCarsInterface?company="+companyId);
831 //车辆库资料资料 876 //车辆库资料资料
832 List<Map<String, Object>> clkList=(List<Map<String, Object>>) JSONObject.parse(carStr); 877 List<Map<String, Object>> clkList=(List<Map<String, Object>>) JSONObject.parse(carStr);
833 //调度系统车辆资料 878 //调度系统车辆资料
@@ -864,7 +909,7 @@ public class BigdateService { @@ -864,7 +909,7 @@ public class BigdateService {
864 @Path("/car/code/{carCode}") 909 @Path("/car/code/{carCode}")
865 public List<Map<String, Object>> findCarByCode(@PathParam("carCode") String carCode) { 910 public List<Map<String, Object>> findCarByCode(@PathParam("carCode") String carCode) {
866 String carStr= GetHttpInterface. 911 String carStr= GetHttpInterface.
867 - getHttpInterface("http://222.66.0.204:8076/cars/getAllCarsInterface?car_code="+carCode); 912 + getHttpInterface("http://101.95.0.106:8076/cars/getAllCarsInterface?car_code="+carCode);
868 //车辆库资料资料 913 //车辆库资料资料
869 List<Map<String, Object>> clkList=(List<Map<String, Object>>) JSONObject.parse(carStr); 914 List<Map<String, Object>> clkList=(List<Map<String, Object>>) JSONObject.parse(carStr);
870 //调度系统车辆资料 915 //调度系统车辆资料
@@ -914,6 +959,7 @@ public class BigdateService { @@ -914,6 +959,7 @@ public class BigdateService {
914 return list; 959 return list;
915 } 960 }
916 961
  962 +
917 /* 963 /*
918 * 事故数据接口结束 964 * 事故数据接口结束
919 */ 965 */