diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt
index 11dec34bee..8abbc106a1 100644
--- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt
+++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt
@@ -25,7 +25,18 @@ import com.mogo.och.common.module.wigets.WrapContentLinearLayoutManager
import com.mogo.och.biz.routing.ui.RoutingSwitchModel
import com.mogo.och.biz.routing.ui.routingselect.RoutingSelectModel.SwtichRoutingViewCallback
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
+import com.mogo.och.common.module.utils.ResourcesUtils
import kotlinx.android.synthetic.main.biz_taxi_select.view.aciv_refresh_task
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_current_order
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_distance
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_id_asc
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_id_desc
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_num_asc
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_num_desc
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_time_asc
+import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_time_desc
+import kotlinx.android.synthetic.main.biz_taxi_select.view.cl_select_order
+import kotlinx.android.synthetic.main.biz_taxi_select.view.cl_select_order_contain
import kotlinx.android.synthetic.main.biz_taxi_select.view.include_empty
import kotlinx.android.synthetic.main.biz_taxi_select.view.include_error
import kotlinx.android.synthetic.main.biz_taxi_select.view.switch_routing_rv
@@ -122,6 +133,67 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback {
}
animator?.start()
}
+
+ cl_select_order_contain.onClick {
+ cl_select_order_contain.visibility = View.GONE
+ }
+ cl_select_order.onClick {
+ cl_select_order_contain.visibility = View.VISIBLE
+ }
+
+ actv_order_by_distance.onClick {
+ mRoutingLineList.sortBy { it.distance }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_default)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
+ actv_order_by_id_asc.onClick {
+ mRoutingLineList.sortBy { it.lineId }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_id_asc)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
+ actv_order_by_id_desc.onClick {
+ mRoutingLineList.sortByDescending { it.lineId }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_id_desc)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
+ actv_order_by_num_asc.onClick {
+ mRoutingLineList.sortBy {
+ (it.lineSuccessCount?:0)+(it.lineFailCount?:0)
+ }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_num_asc)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
+ actv_order_by_num_desc.onClick {
+ mRoutingLineList.sortByDescending {
+ (it.lineSuccessCount?:0)+(it.lineFailCount?:0)
+ }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_num_desc)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
+ actv_order_by_time_asc.onClick {
+ mRoutingLineList.sortBy { it.contrailId }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_time_asc)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
+ actv_order_by_time_desc.onClick {
+ mRoutingLineList.sortByDescending { it.contrailId }
+ mChooseLineListAdapter.notifyDataSetChanged()
+ cl_select_order_contain.visibility = View.GONE
+ actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_time_desc)
+ switch_routing_rv.smoothScrollToPosition(0)
+ }
}
private fun showEmptyView() {
diff --git a/OCH/common/biz/src/main/res/routing/drawable-nodpi/biz_routing_order_bg.png b/OCH/common/biz/src/main/res/routing/drawable-nodpi/biz_routing_order_bg.png
new file mode 100644
index 0000000000..1a85566ad7
Binary files /dev/null and b/OCH/common/biz/src/main/res/routing/drawable-nodpi/biz_routing_order_bg.png differ
diff --git a/OCH/common/biz/src/main/res/routing/drawable-nodpi/biz_routing_search_icon.png b/OCH/common/biz/src/main/res/routing/drawable-nodpi/biz_routing_search_icon.png
new file mode 100644
index 0000000000..2df184c80a
Binary files /dev/null and b/OCH/common/biz/src/main/res/routing/drawable-nodpi/biz_routing_search_icon.png differ
diff --git a/OCH/common/biz/src/main/res/routing/layout/biz_taxi_select.xml b/OCH/common/biz/src/main/res/routing/layout/biz_taxi_select.xml
index fd2ce8f974..29a172b06c 100644
--- a/OCH/common/biz/src/main/res/routing/layout/biz_taxi_select.xml
+++ b/OCH/common/biz/src/main/res/routing/layout/biz_taxi_select.xml
@@ -30,6 +30,35 @@
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_50"/>
+
+
+
+
+
+
@@ -59,7 +89,120 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="gone"
+ tools:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/common/biz/src/main/res/routing/values/strings.xm.xml b/OCH/common/biz/src/main/res/routing/values/strings.xm.xml
index 7dcbd3e41e..6509906cda 100644
--- a/OCH/common/biz/src/main/res/routing/values/strings.xm.xml
+++ b/OCH/common/biz/src/main/res/routing/values/strings.xm.xml
@@ -1,4 +1,11 @@
您确认要结束任务吗?
+ 距离最近
+ 线路ID升序
+ 线路ID降序
+ 验证次数升序
+ 验证次数降序
+ 灰度时间升序
+ 灰度时间降序
\ No newline at end of file