Commit b9831686a74717bd0ba1e0922ed5ee8808cff43d

Authored by 廖磊
1 parent ac54383f

到离站

src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -2058,7 +2058,7 @@ public class ReportServiceImpl implements ReportService{ @@ -2058,7 +2058,7 @@ public class ReportServiceImpl implements ReportService{
2058 int weeks_year2 = cal.get(Calendar.WEEK_OF_YEAR); 2058 int weeks_year2 = cal.get(Calendar.WEEK_OF_YEAR);
2059 Date dates2=cal.getTime(); 2059 Date dates2=cal.getTime();
2060 String d2=simpleDateFormat.format(dates2); 2060 String d2=simpleDateFormat.format(dates2);
2061 - String sql="select *,UNIX_TIMESTAMP(times) as ts from bsth_c_arrival_info where times >= '"+d1 +"'and " 2061 + /*String sql="select *,UNIX_TIMESTAMP(times) as ts from bsth_c_arrival_info where times >= '"+d1 +"'and "
2062 + " times <='"+d2+"' and line_id = '"+line+"' and up_down = '"+zd+"'" 2062 + " times <='"+d2+"' and line_id = '"+line+"' and up_down = '"+zd+"'"
2063 + " order by device_id,times"; 2063 + " order by device_id,times";
2064 2064
@@ -2073,7 +2073,30 @@ public class ReportServiceImpl implements ReportService{ @@ -2073,7 +2073,30 @@ public class ReportServiceImpl implements ReportService{
2073 ai.setTs(arg0.getLong("ts")*1000); 2073 ai.setTs(arg0.getLong("ts")*1000);
2074 return ai; 2074 return ai;
2075 } 2075 }
2076 - }); 2076 + });*/
  2077 +
  2078 + Connection conn = null;
  2079 + PreparedStatement ps = null;
  2080 + ResultSet rs = null;
  2081 +
  2082 + String sql = "select * from bsth_c_arrival_info where line_id=? AND weeks_year=? "
  2083 + + " AND ts >= ? AND ts <=? AND up_down=? order by device_id,ts";
  2084 + try{
  2085 + conn = DBUtils_MS.getConnection();
  2086 + ps = conn.prepareStatement(sql);
  2087 + ps.setString(1, line);
  2088 + ps.setInt(2, weeks_year1);
  2089 + ps.setLong(3, date1);
  2090 + ps.setLong(4, date2);
  2091 + ps.setInt(5, zd);
  2092 + rs = ps.executeQuery();
  2093 +
  2094 + list = resultSet2Set(rs);
  2095 + }catch(Exception e){
  2096 + logger.error("", e);
  2097 + }finally {
  2098 + DBUtils_MS.close(rs, ps, conn);
  2099 + }
2077 2100
2078 } catch (ParseException e1) { 2101 } catch (ParseException e1) {
2079 // TODO Auto-generated catch block 2102 // TODO Auto-generated catch block
@@ -2223,23 +2246,6 @@ public class ReportServiceImpl implements ReportService{ @@ -2223,23 +2246,6 @@ public class ReportServiceImpl implements ReportService{
2223 , (i+1)); 2246 , (i+1));
2224 } 2247 }
2225 inoutList.add(map1); 2248 inoutList.add(map1);
2226 -  
2227 - /*for (int j = 0; j < listStation.size(); j++) {  
2228 - map2=new HashMap<String,Object>();  
2229 - StationRoute s=listStation.get(j);  
2230 - List<ArrivalInfo> arrivalList=new ArrayList<ArrivalInfo>();  
2231 - for (int j2 = 0; j2 < arrInfoList.size(); j2++) {  
2232 - ArrivalInfo a=arrivalList.get(j2);  
2233 - if(s.getStationCode().equals(a.getStopNo())){  
2234 - arrivalList.add(a);  
2235 - }  
2236 - }  
2237 - Map<String, String> m=this.strInOut(arrivalList,lzsj);  
2238 -  
2239 - map2.put(s.getStationCode()+"in", m.get("in"));  
2240 - map2.put(s.getStationCode()+"out", m.get("out"));  
2241 - map2.put(s.getStationCode(), m.get("type"));  
2242 - }*/  
2243 List<String> list_nbbm=new ArrayList<String>(); 2249 List<String> list_nbbm=new ArrayList<String>();
2244 Map<String, Object> m=new HashMap<String,Object>(); 2250 Map<String, Object> m=new HashMap<String,Object>();
2245 for (int i = 0; i < arrInfoList.size(); i++) { 2251 for (int i = 0; i < arrInfoList.size(); i++) {
src/main/resources/static/pages/report/inoutstation/inoutstation.html
@@ -199,7 +199,7 @@ @@ -199,7 +199,7 @@
199 layer.msg("请选择方向"); 199 layer.msg("请选择方向");
200 }else{ 200 }else{
201 $get('/report/queryStrinon',{line:line,zd:zdlx},function(result){ 201 $get('/report/queryStrinon',{line:line,zd:zdlx},function(result){
202 - $get('/report/queryInOutStrtions',{line:line,date:date,zd:zdlx,lzsj:lzsj},function(result2){ 202 + $get('/report/queryInOutStrtion',{line:line,date:date,zd:zdlx,lzsj:lzsj},function(result2){
203 console.log(result2); 203 console.log(result2);
204 /* getTime(result); */ 204 /* getTime(result); */
205 var ludan_ll_1 = template('ludan_ll_1',{list:result2,lists:result}); 205 var ludan_ll_1 = template('ludan_ll_1',{list:result2,lists:result});