[shuttle]
[插入多条数据]
This commit is contained in:
yangyakun
2024-08-28 15:50:17 +08:00
parent 8b87e711d0
commit 91c27b49fa
3 changed files with 9 additions and 6 deletions

View File

@@ -62,10 +62,7 @@ class BusRoutesResponse : BaseData() {
}
}
LineManager.setLineInfo(lineInfo)
LineManager.startStation = currentStation
if (currentStationIndex < result.size-1) {
LineManager.endStation = result[currentStationIndex + 1]
}
return Pair(result,currentStationIndex)
}
fun bean2Db(sites: MutableList<BusStationBean>,lineId:Long,lineName:String?,taskId:Long) {

View File

@@ -284,6 +284,13 @@ object BusLineModel {
val db2Beans = BusRoutesResponse.db2Beans(runnintTaskAndSites)
stationList = db2Beans.first
startStationIndex = db2Beans.second
stationList?.let {stationlist->
LineManager.startStation = stationlist[startStationIndex]
if (startStationIndex < stationlist.size-1) {
LineManager.endStation = stationlist[startStationIndex + 1]
}
}
}
// 设置自动驾驶信息
currentTask?.lineId?.let {

View File

@@ -109,7 +109,6 @@ class BusSwitchLineActivity : MvpActivity<BusSwitchLineView?, BusLinePresenter?>
}
animator?.start()
}
mPresenter?.setRefreshTime()
pb_start_task.progressTintList = ColorStateList.valueOf(Color.WHITE)
}
@@ -133,6 +132,7 @@ class BusSwitchLineActivity : MvpActivity<BusSwitchLineView?, BusLinePresenter?>
*/
private fun initDatas() {
mPresenter?.queryBusLines()
mPresenter?.setRefreshTime()
}
/**
@@ -246,7 +246,6 @@ class BusSwitchLineActivity : MvpActivity<BusSwitchLineView?, BusLinePresenter?>
//切换路线提交
if (v.id == R.id.switch_line_btn_commit) {
if(mAdapter.checkLine!=null&&mAdapter.checkTask!=null){
mPresenter?.commitSwitchLineId(mAdapter.checkTask!!,mAdapter.checkLine!!)
mPresenter?.let {
it.commitSwitchLineId(mAdapter.checkTask!!,mAdapter.checkLine!!)
startTaskLoading()