Commit 3bd57b7b7c598b040913d998674041287117d93f
1 parent
381923c8
青浦时刻表上传代码依赖
Showing
1 changed file
with
22 additions
and
17 deletions
src/main/java/com/bsth/repository/SectionRepository.java
| 1 | package com.bsth.repository; | 1 | package com.bsth.repository; |
| 2 | 2 | ||
| 3 | - | ||
| 4 | import org.springframework.data.jpa.repository.Modifying; | 3 | import org.springframework.data.jpa.repository.Modifying; |
| 5 | import org.springframework.data.jpa.repository.Query; | 4 | import org.springframework.data.jpa.repository.Query; |
| 6 | import org.springframework.stereotype.Repository; | 5 | import org.springframework.stereotype.Repository; |
| @@ -8,6 +7,8 @@ import org.springframework.transaction.annotation.Transactional; | @@ -8,6 +7,8 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 8 | 7 | ||
| 9 | import com.bsth.entity.Section; | 8 | import com.bsth.entity.Section; |
| 10 | 9 | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 11 | /** | 12 | /** |
| 12 | * | 13 | * |
| 13 | * @Interface: SectionRepository(路段Repository数据持久层接口) | 14 | * @Interface: SectionRepository(路段Repository数据持久层接口) |
| @@ -64,13 +65,13 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { | @@ -64,13 +65,13 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { | ||
| 64 | 65 | ||
| 65 | "?16 , ?17, ?18"+ | 66 | "?16 , ?17, ?18"+ |
| 66 | ")", nativeQuery=true) | 67 | ")", nativeQuery=true) |
| 67 | - public void systemSave(String sectionCode , String sectionName , String crosesRoad , String endNode , String startNode, | ||
| 68 | - | ||
| 69 | - String middleNode,String gsectionVector,String bsectionVector, String sectionType,String csectionVector, | ||
| 70 | - | ||
| 71 | - String roadCoding,double sectionDistance,double sectionTime,String dbType,double speedLimit, | ||
| 72 | - | ||
| 73 | - String descriptions, int versions,int id); | 68 | + public void systemSave(String sectionCode, String sectionName, String crosesRoad, String endNode, String startNode, |
| 69 | + | ||
| 70 | + String middleNode, String gsectionVector, String bsectionVector, String sectionType, String csectionVector, | ||
| 71 | + | ||
| 72 | + String roadCoding, double sectionDistance, double sectionTime, String dbType, double speedLimit, | ||
| 73 | + | ||
| 74 | + String descriptions, int versions, int id); | ||
| 74 | 75 | ||
| 75 | /** | 76 | /** |
| 76 | * @Description :TODO(编辑线路走向) | 77 | * @Description :TODO(编辑线路走向) |
| @@ -103,13 +104,17 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { | @@ -103,13 +104,17 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { | ||
| 103 | " update_by = ?20," + | 104 | " update_by = ?20," + |
| 104 | " update_date = str_to_date(?21,'%Y-%m-%d %H:%i:%s')" + | 105 | " update_date = str_to_date(?21,'%Y-%m-%d %H:%i:%s')" + |
| 105 | " WHERE id = ?1", nativeQuery=true) | 106 | " WHERE id = ?1", nativeQuery=true) |
| 106 | - public void sectionUpdate(Integer sectionId,String gsectionVector,String bsectionVector,String sectionCode,String sectionName, | ||
| 107 | - | ||
| 108 | - String crosesRoad,String endNode,String startNode,String middleNode,String sectionType, | ||
| 109 | - | ||
| 110 | - String roadCoding,Double sectionDistance,Double sectionTime,String dbType, | ||
| 111 | - | ||
| 112 | - Double speedLimit,String descriptions,Integer version,Integer createBy,String createDate, | ||
| 113 | - | ||
| 114 | - Integer updateBy,String updateDate); | 107 | + public void sectionUpdate(Integer sectionId, String gsectionVector, String bsectionVector, String sectionCode, String sectionName, |
| 108 | + | ||
| 109 | + String crosesRoad, String endNode, String startNode, String middleNode, String sectionType, | ||
| 110 | + | ||
| 111 | + String roadCoding, Double sectionDistance, Double sectionTime, String dbType, | ||
| 112 | + | ||
| 113 | + Double speedLimit, String descriptions, Integer version, Integer createBy, String createDate, | ||
| 114 | + | ||
| 115 | + Integer updateBy, String updateDate); | ||
| 116 | + | ||
| 117 | + @Query(value = "SELECT AsText(s.bsection_vector) as section,r.directions as dir FROM bsth_c_section s left join bsth_c_sectionroute r on s.section_code = r.section_code " + | ||
| 118 | + "where r.line = ?1 and directions = ?2 ORDER BY r.directions,r.sectionroute_code ",nativeQuery = true) | ||
| 119 | + List<Object[]> getSectionDirByLineId(Integer lineId, Integer directions); | ||
| 115 | } | 120 | } |