Commit 5827e98cc11a343ae29f25ee54074de4831cfa3e

Authored by sgz
1 parent 641a7822

掉线异常数据表

src/main/java/com/bsth/service/excep/impl/OfflineServiceImpl.java
... ... @@ -43,15 +43,16 @@ public class OfflineServiceImpl implements OfflineService {
43 43 String days_year=map.get("days_year").toString();
44 44 String line_id=map.get("line_id").toString();
45 45 String device_id=map.get("device_id").toString();
  46 + String ts=map.get("ts").toString();
46 47 String sql="SELECT t.line_id,t.device_id,MIN(ts) as ts,days_year FROM bsth_c_gps_info t "
47   - + " WHERE t.line_id='"+line_id+"' and t.device_id='"+device_id+"' and t.days_year='"+days_year+"' "
  48 + + " WHERE t.line_id='"+line_id+"' and t.device_id='"+device_id+"' and t.days_year='"+days_year+"' and t.ts>='"+ts+"' "
48 49 + " GROUP BY t.device_id,t.line_id ";
49   - sql +=" order by ts limit ?,?";
  50 + sql +=" order by ts ";
50 51 try {
51 52 conn = DBUtils_MS.getConnection();
52 53 ps = conn.prepareStatement(sql);
53   - ps.setInt(1,0*10); // O-最大条数 -- M-起始条数
54   - ps.setInt(2, 100000000); // O-最小条数 -- M-显示条数
  54 +// ps.setInt(1,0*10); // O-最大条数 -- M-起始条数
  55 +// ps.setInt(2, 1000000); // O-最小条数 -- M-显示条数
55 56 rs = ps.executeQuery();
56 57 list = resultSet(rs);
57 58 } catch (SQLException e) {
... ... @@ -258,6 +259,7 @@ public class OfflineServiceImpl implements OfflineService {
258 259 gpsmap.put("device_id",deviceid );
259 260 gpsmap.put("line_id", lineid);
260 261 gpsmap.put("days_year", str);
  262 + gpsmap.put("ts", d1);
261 263 List<Offline> gps=findGPS(gpsmap);
262 264 if(gps.size()>0){
263 265 Long ts= gps.get(0).getTs();
... ...