[8.2.0][fix]解决库中读取站点和轨迹点未排序的问题
This commit is contained in:
@@ -56,10 +56,13 @@ class BusRoutesResponse : BaseData() {
|
|||||||
temp?.isPlayTts = Boolean.TRUE == taskAndsite.isPlayTts
|
temp?.isPlayTts = Boolean.TRUE == taskAndsite.isPlayTts
|
||||||
temp?.seq = (taskAndsite.seq ?: 0)
|
temp?.seq = (taskAndsite.seq ?: 0)
|
||||||
temp?.siteId = if (taskAndsite.siteId == null) 0 else taskAndsite.siteId!!.toInt()
|
temp?.siteId = if (taskAndsite.siteId == null) 0 else taskAndsite.siteId!!.toInt()
|
||||||
points?.let {
|
points?.let { pointList->
|
||||||
val sitePoint = it.filter {
|
val sitePoint = pointList.filter {
|
||||||
it.siteId?.toInt() == temp?.siteId
|
it.siteId?.toInt() == temp?.siteId
|
||||||
}
|
}.sortedWith(
|
||||||
|
compareBy<PointDataBean> { it.subSeq }
|
||||||
|
// .thenBy {it.subSeq }
|
||||||
|
)
|
||||||
val tempPassPoints = mutableListOf<BusStationBean>()
|
val tempPassPoints = mutableListOf<BusStationBean>()
|
||||||
val tempblackPoints = mutableListOf<BusStationBean>()
|
val tempblackPoints = mutableListOf<BusStationBean>()
|
||||||
sitePoint.forEach { point->
|
sitePoint.forEach { point->
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ interface SiteDataDao {
|
|||||||
@Query("SELECT * FROM ${SiteDataBean.tableName} WHERE line_id = :lineId and site_id = :siteId")
|
@Query("SELECT * FROM ${SiteDataBean.tableName} WHERE line_id = :lineId and site_id = :siteId")
|
||||||
fun querySitesByLineIdAndSiteId(lineId: Long,siteId:Long):List<SiteDataBean>?
|
fun querySitesByLineIdAndSiteId(lineId: Long,siteId:Long):List<SiteDataBean>?
|
||||||
|
|
||||||
@Query("SELECT * FROM ${SiteDataBean.tableName} WHERE line_id = :lineId")
|
@Query("SELECT * FROM ${SiteDataBean.tableName} WHERE line_id = :lineId order by seq")
|
||||||
fun querySitesByLineId(lineId: Long):List<SiteDataBean>?
|
fun querySitesByLineId(lineId: Long):List<SiteDataBean>?
|
||||||
|
|
||||||
@Query("SELECT * FROM ${SiteDataBean.tableName} GROUP by md5 HAVING count(1) > 1")
|
@Query("SELECT * FROM ${SiteDataBean.tableName} GROUP by md5 HAVING count(1) > 1")
|
||||||
|
|||||||
Reference in New Issue
Block a user