Commit ae14a8371fe535ae812d3415732642ad5f54b3a3
1 parent
64217be7
修改车辆设备号 处理驾驶员请求台账
Showing
2 changed files
with
5 additions
and
5 deletions
src/main/java/com/bsth/repository/CarDeviceRepository.java
| ... | ... | @@ -13,6 +13,6 @@ import org.springframework.stereotype.Repository; |
| 13 | 13 | */ |
| 14 | 14 | @Repository |
| 15 | 15 | public interface CarDeviceRepository extends BaseRepository<CarDevice, Long> { |
| 16 | - @Query(value="select s from CarDevice s where s.oldDeviceNo=?1 and s.qyrq<=?2 ") | |
| 16 | + @Query(value="select s from CarDevice s where s.newDeviceNo=?1 and s.qyrq<=?2 ") | |
| 17 | 17 | List<CarDevice> findCarDevice(String device,Date date ); |
| 18 | 18 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1129,8 +1129,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1129 | 1129 | if(BasicData.deviceId2NbbmMap.get(obj[0].toString())==null){ |
| 1130 | 1130 | List<CarDevice> carDeviceList=new ArrayList<CarDevice>(); |
| 1131 | 1131 | try { |
| 1132 | - carDeviceList = carDeviceRepository.findCarDevice(obj[0].toString(), sdf.parse(date + " 00:00:00")); | |
| 1133 | - } catch (ParseException e) { | |
| 1132 | + carDeviceList = carDeviceRepository.findCarDevice(obj[0].toString(), new Date(Long.parseLong(obj[3].toString()))); | |
| 1133 | + } catch (Exception e) { | |
| 1134 | 1134 | // TODO Auto-generated catch block |
| 1135 | 1135 | e.printStackTrace(); |
| 1136 | 1136 | } |
| ... | ... | @@ -1901,8 +1901,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1901 | 1901 | if(BasicData.deviceId2NbbmMap.get(obj[2])==null){ |
| 1902 | 1902 | List<CarDevice> carDeviceList=new ArrayList<CarDevice>(); |
| 1903 | 1903 | try { |
| 1904 | - carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(date + " 00:00:00")); | |
| 1905 | - } catch (ParseException e) { | |
| 1904 | + carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(obj[1].toString())); | |
| 1905 | + } catch (Exception e) { | |
| 1906 | 1906 | // TODO Auto-generated catch block |
| 1907 | 1907 | e.printStackTrace(); |
| 1908 | 1908 | } | ... | ... |