Commit c6de45550bc4ebb5685e4c7987290b642aa6a1d6
1 parent
53646be6
update...
Showing
1 changed file
with
11 additions
and
8 deletions
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
| ... | ... | @@ -190,7 +190,8 @@ public class GpsServiceImpl implements GpsService { |
| 190 | 190 | List<DeviceChange> dcs = findDeviceChangeLogs(nbbm, et, st); |
| 191 | 191 | |
| 192 | 192 | //按年分表 |
| 193 | - String tableName = "bsth_c_gps_info_" + fmtyyyy.print(st); | |
| 193 | + //String tableName = "bsth_c_gps_info_" + fmtyyyy.print(st); | |
| 194 | + String tableName = "bsth_c_gps_info"; | |
| 194 | 195 | |
| 195 | 196 | StringBuilder sql = new StringBuilder(""); |
| 196 | 197 | long t1,t2; |
| ... | ... | @@ -376,7 +377,8 @@ public class GpsServiceImpl implements GpsService { |
| 376 | 377 | int eWeekOfYear = eCal.get(Calendar.WEEK_OF_YEAR); |
| 377 | 378 | |
| 378 | 379 | //按年分表 |
| 379 | - String tableName = "bsth_c_arrival_info_" + fmtyyyy.print(st); | |
| 380 | + //String tableName = "bsth_c_arrival_info_" + fmtyyyy.print(st); | |
| 381 | + String tableName = "bsth_c_arrival_info"; | |
| 380 | 382 | |
| 381 | 383 | StringBuilder sql = new StringBuilder(""); |
| 382 | 384 | long t1,t2; |
| ... | ... | @@ -883,15 +885,16 @@ public class GpsServiceImpl implements GpsService { |
| 883 | 885 | st = st * 1000; |
| 884 | 886 | et = et * 1000; |
| 885 | 887 | //按周分区 |
| 886 | - Calendar sCal = Calendar.getInstance(); | |
| 888 | + /*Calendar sCal = Calendar.getInstance(); | |
| 887 | 889 | sCal.setTime(new Date(st)); |
| 888 | 890 | int sWeekYear = sCal.get(Calendar.WEEK_OF_YEAR); |
| 889 | 891 | Calendar eCal = Calendar.getInstance(); |
| 890 | 892 | eCal.setTime(new Date(et)); |
| 891 | - int eWeekYear = eCal.get(Calendar.WEEK_OF_YEAR); | |
| 893 | + int eWeekYear = eCal.get(Calendar.WEEK_OF_YEAR);*/ | |
| 892 | 894 | |
| 893 | 895 | //按年分表 |
| 894 | - String tableName = "bsth_c_speeding_" + fmtyyyy.print(st); | |
| 896 | + //String tableName = "bsth_c_speeding_" + fmtyyyy.print(st); | |
| 897 | + String tableName = "bsth_c_speeding"; | |
| 895 | 898 | |
| 896 | 899 | List<DeviceChange> dcs = findDeviceChangeLogs(nbbm, et, st); |
| 897 | 900 | StringBuilder sql = new StringBuilder(""); |
| ... | ... | @@ -906,8 +909,7 @@ public class GpsServiceImpl implements GpsService { |
| 906 | 909 | if(dc.getEt() < et && dc.getEt()!=0) |
| 907 | 910 | t2 = dc.getEt(); |
| 908 | 911 | |
| 909 | - sql.append(" select vehicle, line, up_down, lon, lat, speed,timestamp from "+tableName+" where " + | |
| 910 | - " weeks_year in ("+sWeekYear+", "+eWeekYear+") and vehicle='"+dc.getDevice()+"' and timestamp>="+t1+" and timestamp<= " + t2); | |
| 912 | + sql.append(" select vehicle, line, up_down, lon, lat, speed,timestamp from "+tableName+" where vehicle='"+dc.getDevice()+"' and timestamp>="+t1+" and timestamp<= " + t2); | |
| 911 | 913 | |
| 912 | 914 | if(i == len - 1) |
| 913 | 915 | sql.append(" ORDER BY vehicle,timestamp"); |
| ... | ... | @@ -932,7 +934,8 @@ public class GpsServiceImpl implements GpsService { |
| 932 | 934 | int eWeekYear = eCal.get(Calendar.WEEK_OF_YEAR); |
| 933 | 935 | |
| 934 | 936 | //按年分表 |
| 935 | - String tableName = "bsth_c_outbound_" + fmtyyyy.print(st); | |
| 937 | + //String tableName = "bsth_c_outbound_" + fmtyyyy.print(st); | |
| 938 | + String tableName = "bsth_c_outbound"; | |
| 936 | 939 | |
| 937 | 940 | List<DeviceChange> dcs = findDeviceChangeLogs(nbbm, et, st); |
| 938 | 941 | StringBuilder sql = new StringBuilder(""); | ... | ... |