Commit f1a266a53215c6baca258ee061959e7d60440025
1 parent
5d368621
update..
Showing
1 changed file
with
1 additions
and
8 deletions
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
| ... | ... | @@ -313,17 +313,10 @@ public class GpsServiceImpl implements GpsService { |
| 313 | 313 | try{ |
| 314 | 314 | |
| 315 | 315 | //JdbcTemplate jdbcTemplate_ms = new JdbcTemplate(DBUtils_MS.getDataSource()); |
| 316 | - dcs = jdbcTemplate.query("select cl_zbh as nbbm,new_device_no as device,old_device_no as old_device,UNIX_TIMESTAMP(qyrq) * 1000 as st from bsth_c_car_device where is_cancel=0 and cl_zbh='"+nbbm+"'" | |
| 316 | + dcs = jdbcTemplate.query("select cl_zbh as nbbm,new_device_no as device,old_device_no as old_device,UNIX_TIMESTAMP(qyrq) * 1000 as st from bsth_c_car_device where is_cancel=0 and cl_zbh='"+nbbm+"' order by qyrq" | |
| 317 | 317 | , BeanPropertyRowMapper.newInstance(DeviceChange.class)); |
| 318 | 318 | |
| 319 | 319 | |
| 320 | - Collections.sort(dcs, new Comparator<DeviceChange>() { | |
| 321 | - @Override | |
| 322 | - public int compare(DeviceChange d1, DeviceChange d2) { | |
| 323 | - return (int) (d1.getSt() - d2.getSt()); | |
| 324 | - } | |
| 325 | - }); | |
| 326 | - | |
| 327 | 320 | //生成一条初始记录 |
| 328 | 321 | if(dcs.size() > 0){ |
| 329 | 322 | DeviceChange first = dcs.get(0); | ... | ... |