diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt
index 58c69affd5..35f66a7159 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/ItinerarySummaryDialog.kt
@@ -4,8 +4,11 @@ import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.widget.ImageView
+import android.widget.TextView
+import com.mogo.eagle.core.data.autopilot.AutopilotSummaryInfo
import com.mogo.eagle.core.function.hmi.R
import me.jessyan.autosize.utils.AutoSizeUtils
+import java.util.Random
/**
* 行程总结View
@@ -17,7 +20,15 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
private val mContext: Context
private val isDriver: Boolean
- private var ivSummaryClose: ImageView ?= null
+ private var ivSummaryClose: ImageView ?= null //关闭弹窗按钮
+ private var tvSummaryZhiContent: TextView ?= null //小智总结
+ private var tvIntersectionServicesNum: TextView ?= null //全息路口服务次数
+ private var tvLightServicesNum: TextView ?= null //路口灯态服务次数
+ private var tvInfoTipNum: TextView ?= null //道路信息提醒次数
+ private var tvVehicleTipNum: TextView ?= null //车辆行为提醒次数
+ private var tvVulnerableTipNum: TextView ?= null //弱势参与者提醒次数
+ private var tvDangerNum: TextView ?= null //消除安全风险隐患次数
+ private var tvEfficiencyNum: TextView ?= null //通行效率提升
init {
this.mContext = context
@@ -47,8 +58,33 @@ class ItinerarySummaryDialog(context: Context, isDriver: Boolean, theme: Int) :
ivSummaryClose?.setOnClickListener {
dismiss()
}
-
-
+ //小智总结
+ tvSummaryZhiContent = findViewById(R.id.tvSummaryZhiContent)
+ //TODO 小智总结文案
+ //全息路口服务次数
+ tvIntersectionServicesNum = findViewById(R.id.tvIntersectionServicesNum)
+ tvIntersectionServicesNum?.text = AutopilotSummaryInfo.intersectionServicesNum.toString()
+ //路口灯态服务次数
+ tvLightServicesNum = findViewById(R.id.tvLightServicesNum)
+ tvLightServicesNum?.text = AutopilotSummaryInfo.lightServicesNum.toString()
+ //道路信息提醒次数
+ tvInfoTipNum = findViewById(R.id.tvInfoTipNum)
+ tvInfoTipNum?.text = AutopilotSummaryInfo.infoTipNum.toString()
+ //车辆行为提醒次数
+ tvVehicleTipNum = findViewById(R.id.tvVehicleTipNum)
+ tvVehicleTipNum?.text = AutopilotSummaryInfo.vehicleTipNum.toString()
+ //弱势参与者提醒次数
+ tvVulnerableTipNum = findViewById(R.id.tvVulnerableTipNum)
+ tvVulnerableTipNum?.text = AutopilotSummaryInfo.vulnerableTipNum.toString()
+ //消除安全风险隐患次数
+ tvDangerNum = findViewById(R.id.tvDangerNum)
+ tvDangerNum?.text = AutopilotSummaryInfo.dangerNum.toString()
+ //通行效率提升:本期为假数据,数据为百分数,值为7-14%之间的随机数,保留小数点后1位
+ tvEfficiencyNum = findViewById(R.id.tvEfficiencyNum)
+ val random = Random()
+ val next: Float= random.nextInt(70).toFloat()/10
+ val num = next + 7
+ tvEfficiencyNum?.text = num.toString()
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml
index df23d3d702..e460f7e862 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary.xml
@@ -30,6 +30,7 @@
/>
@@ -338,7 +332,6 @@
app:layout_constraintHorizontal_chainStyle="packed"
android:textColor="@color/summary_danger_num"
android:textSize="@dimen/sp_150"
- android:text="13"
android:layout_marginTop="@dimen/dp_80"
/>
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml
index e56ca2fdf1..41e74f3228 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_itinerary_summary_p.xml
@@ -30,6 +30,7 @@
/>
@@ -338,7 +332,6 @@
app:layout_constraintHorizontal_chainStyle="packed"
android:textColor="@color/summary_danger_num_p"
android:textSize="@dimen/sp_195"
- android:text="13"
android:layout_marginTop="@dimen/dp_120"
/>
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotSummaryInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotSummaryInfo.kt
new file mode 100644
index 0000000000..693723af34
--- /dev/null
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotSummaryInfo.kt
@@ -0,0 +1,50 @@
+package com.mogo.eagle.core.data.autopilot
+
+/**
+ * 行程总结报告数据
+ */
+object AutopilotSummaryInfo {
+
+ /**
+ * 全息路口服务次数
+ */
+ @JvmField
+ @Volatile
+ var intersectionServicesNum = 0
+
+ /**
+ * 路口灯态服务次数
+ */
+ @JvmField
+ @Volatile
+ var lightServicesNum = 0
+
+ /**
+ * 道路信息提醒次数
+ */
+ @JvmField
+ @Volatile
+ var infoTipNum = 0
+
+ /**
+ * 车辆行为提醒次数
+ */
+ @JvmField
+ @Volatile
+ var vehicleTipNum = 0
+
+ /**
+ * 弱势参与者提醒次数
+ */
+ @JvmField
+ @Volatile
+ var vulnerableTipNum = 0
+
+ /**
+ * 消除安全风险隐患次数
+ */
+ @JvmField
+ @Volatile
+ var dangerNum = 0
+
+}
\ No newline at end of file