Commit 360a1cca857d8c7a4069369da9770a4543e2f17a
1 parent
8f6ab784
驾驶员请求台账
Showing
3 changed files
with
6 additions
and
6 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.oldDeviceNo=?1 and s.qyrq<=?2 ") | |
| 17 | 17 | List<CarDevice> findCarDevice(String device,Date date ); |
| 18 | 18 | } | ... | ... |
src/main/java/com/bsth/repository/LineRepository.java
| ... | ... | @@ -45,7 +45,7 @@ public interface LineRepository extends BaseRepository<Line, Integer> { |
| 45 | 45 | |
| 46 | 46 | public Line findByLineCode(String string); |
| 47 | 47 | |
| 48 | - @Query(value = " SELECT l FROM Line l where l.company like %?1% and l.brancheCompany like %?2% and l.lineCode like ?3") | |
| 48 | + @Query(value = " SELECT l FROM Line l where l.company like ?1 and l.brancheCompany like ?2 and l.lineCode like ?3") | |
| 49 | 49 | public List<Line> findLineBygsBm(String gsBm, String fgsBm, String line); |
| 50 | 50 | |
| 51 | 51 | @Query("SELECT L FROM Line L where L.destroy=0") | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1870,7 +1870,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1870 | 1870 | code=BasicData.deviceId2NbbmMap.inverse().get(code); |
| 1871 | 1871 | } |
| 1872 | 1872 | String fgs=""; |
| 1873 | - List<Line> lineList= lineRepository.findLineBygsBm("", "", line); | |
| 1873 | + List<Line> lineList= lineRepository.findLineByCode(line); | |
| 1874 | 1874 | if(lineList.size()>0){ |
| 1875 | 1875 | Line l=lineList.get(0); |
| 1876 | 1876 | fgs=BasicData.businessFgsCodeNameMap.get(l.getBrancheCompany()+"_"+l.getCompany()); |
| ... | ... | @@ -1938,7 +1938,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1938 | 1938 | code=BasicData.deviceId2NbbmMap.inverse().get(code); |
| 1939 | 1939 | } |
| 1940 | 1940 | String fgs=""; |
| 1941 | - List<Line> lineList= lineRepository.findLineBygsBm("", "", line); | |
| 1941 | + List<Line> lineList= lineRepository.findLineByCode(line); | |
| 1942 | 1942 | if(lineList.size()>0){ |
| 1943 | 1943 | Line l=lineList.get(0); |
| 1944 | 1944 | fgs=BasicData.businessFgsCodeNameMap.get(l.getBrancheCompany()+"_"+l.getCompany()); |
| ... | ... | @@ -1956,8 +1956,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1956 | 1956 | if(BasicData.deviceId2NbbmMap.get(obj[2])==null){ |
| 1957 | 1957 | List<CarDevice> carDeviceList=new ArrayList<CarDevice>(); |
| 1958 | 1958 | try { |
| 1959 | - carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(date + " 00:00:00")); | |
| 1960 | - } catch (ParseException e) { | |
| 1959 | + carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(obj[1].toString())); | |
| 1960 | + } catch (Exception e) { | |
| 1961 | 1961 | // TODO Auto-generated catch block |
| 1962 | 1962 | e.printStackTrace(); |
| 1963 | 1963 | } | ... | ... |