Commit 719ddbb172f1ff36680acc713e03df93f718e18e

Authored by 娄高锋
1 parent 65afc0d9

添加给安全系统的接口,实际排班中的肇事烂班班次

src/main/java/com/bsth/server_rs/bigdata/BigdataService.java
@@ -1282,4 +1282,42 @@ public class BigdataService { @@ -1282,4 +1282,42 @@ public class BigdataService {
1282 return list; 1282 return list;
1283 } 1283 }
1284 1284
  1285 + /**
  1286 + * 给安全系统的接口,实际排班中的肇事烂班班次(用作事故登记)
  1287 + * @param starDate
  1288 + * @param endDate
  1289 + * @return
  1290 + */
  1291 + @GET
  1292 + @Path("/getScheduleZs/starDate/{starDate}/endDate/{endDate}")
  1293 + public List<Map<String, Object>> getScheduleZs(@PathParam("starDate") String starDate,
  1294 + @PathParam("endDate") String endDate) {
  1295 + String sql="select gs_bm,fgs_bm,real_exec_date,fcsj,fcsj_actual,xl_name,j_gh,j_name,cl_zbh,car_plate,remarks "
  1296 + + " from bsth_c_s_sp_info_real r left join bsth_c_cars c on r.cl_zbh = c.inside_code "
  1297 + + " where schedule_date_str>='"+starDate+"' and schedule_date_str<= '"+endDate+"' "
  1298 + + " and adjust_exps like '%肇事%' "
  1299 + + " order by real_exec_date, schedule_date_str, fcsj";
  1300 +
  1301 + List<Map<String, Object>> list=jdbcTemplate.query(sql,
  1302 + new RowMapper<Map<String, Object>>(){
  1303 + @Override
  1304 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  1305 + Map<String, Object> m=new HashMap<String,Object>();
  1306 + m.put("gs_bm",rs.getString("gs_bm"));
  1307 + m.put("fgs_bm",rs.getString("fgs_bm"));
  1308 + m.put("real_exec_date",rs.getString("real_exec_date"));
  1309 + m.put("fcsj", rs.getString("fcsj"));
  1310 + m.put("fcsj_actual", rs.getString("fcsj_actual"));
  1311 + m.put("xl_name", rs.getString("xl_name"));
  1312 + m.put("j_gh", rs.getString("j_gh"));
  1313 + m.put("j_name", rs.getString("j_name"));
  1314 + m.put("cl_zbh", rs.getString("cl_zbh"));
  1315 + m.put("car_plate", rs.getString("car_plate"));
  1316 + m.put("remarks", rs.getString("remarks"));
  1317 + return m;
  1318 + }
  1319 + });
  1320 + return list;
  1321 + }
  1322 +
1285 } 1323 }