From e9aa93f381afcf9f9cf0c39f2b9e32375ed49528 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 30 十月 2025 17:39:43 +0800
Subject: [PATCH] 2025.10.30 1. 新增巡查场景历史详情相关数据逻辑(待完成);

---
 app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/QueryOptSingle.kt                   |   18 +
 app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt        |   68 ++++
 app/src/main/res/layout/layout_scene_history.xml                                              |  151 ++++++++++
 app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPChangeInfo.kt                     |   33 ++
 app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt |   77 +++++
 app/src/main/res/layout/fragment_inspection_content.xml                                       |  237 ++++++++--------
 app/src/main/java/cn/flightfeather/thirdappmodule/adapter/TaskListHolder.java                 |    5 
 app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPProblemRecurrence.kt              |   26 +
 app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt   |   41 ++
 app/src/main/res/layout/dialog_scene_history_2.xml                                            |  167 +++++++++++
 .idea/misc.xml                                                                                |    5 
 app/build.gradle                                                                              |    3 
 12 files changed, 711 insertions(+), 120 deletions(-)

diff --git a/.idea/misc.xml b/.idea/misc.xml
index 8f2f33c..33de404 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -80,6 +80,7 @@
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_problem_list.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_scene_account.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_scene_history.xml" value="0.33" />
+        <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_scene_history_2.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_scene_list.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_scene_subinfo.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_take_evidence.xml" value="0.3338541666666667" />
@@ -132,15 +133,19 @@
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_today_task.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_topclass_task.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_town_rank.xml" value="0.3338541666666667" />
+        <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_actionbar.xml" value="0.3338541666666667" />
+        <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_empty_load_more.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_empty_view.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_loading.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_loading_view.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_night_work_empty.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_recycler_view_refresh.xml" value="0.3338541666666667" />
+        <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_scene_history.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search.xml" value="0.21145833333333333" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_2.xml" value="0.5" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_bar.xml" value="0.21145833333333333" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_title.xml" value="0.33" />
+        <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_toolbar_2.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/page_patrol_icons_first.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/page_patrol_icons_second.xml" value="0.3338541666666667" />
         <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/recycler_item_section_head.xml" value="0.3338541666666667" />
diff --git a/app/build.gradle b/app/build.gradle
index d90d03d..8aee6b3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -36,6 +36,9 @@
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    buildFeatures {
+        dataBinding true
+    }
     productFlavors {
     }
     sourceSets {
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/adapter/TaskListHolder.java b/app/src/main/java/cn/flightfeather/thirdappmodule/adapter/TaskListHolder.java
index cdb13b2..e4ca31c 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/adapter/TaskListHolder.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/adapter/TaskListHolder.java
@@ -31,11 +31,16 @@
     TextView mtv_time;
     TextView mtv_staff;
     TextView mtv_check_status;
+    // 瀹℃牳鐘舵��
     ImageView img_status;
+
+    // 椋庨櫓鎻愮ず
     Group group_risk_warn;
     TextView tv_risk_warn;
+    // 宸℃煡瑕佺偣
     Group group_inspection_key_point;
     TextView tv_inspection_key_point;
+    // 搴旀�ュ贰鏌�
     Group group_emergency_inspection;
     TextView tv_emergency_inspection;
 
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPChangeInfo.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPChangeInfo.kt
new file mode 100644
index 0000000..4442591
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPChangeInfo.kt
@@ -0,0 +1,33 @@
+package cn.flightfeather.thirdappmodule.bean.vo
+
+import cn.flightfeather.thirdappmodule.bean.entity.Subtask
+import cn.flightfeather.thirdappmodule.bean.vo.ProblemlistVo
+
+/**
+ * 鍦烘櫙鏁存敼鎯呭喌
+ * @date 2025/10/30
+ * @author feiyu02
+ */
+class DPChangeInfo {
+
+    // 瀛愪换鍔′俊鎭�
+    var subTasks: List<Subtask>? = null
+
+    // 闂鍒楄〃
+    var problems: List<ProblemlistVo>? = null
+
+    // 闂鏁�
+    var proCount = 0
+
+    // 鏁存敼鏁�
+    var changeCount = 0
+
+    // 鏁存敼鐜�
+    var changePer: Double = 0.0
+
+    // 鏁存敼鑰楁椂锛堝ぉ锛�(鍙栬�楁椂鏈�闀跨殑闂浣滀负鏈�缁堟暣鏀硅�楁椂)
+    var changeTime: Int = 0
+
+    // 鏁存敼鏁堢巼 = 鏁存敼瑕佹眰鏈�澶ц�楁椂 / 鏁存敼瀹為檯鑰楁椂
+    var changeEfficiency: Double = 0.0
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPProblemRecurrence.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPProblemRecurrence.kt
new file mode 100644
index 0000000..8595b92
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/DPProblemRecurrence.kt
@@ -0,0 +1,26 @@
+package cn.flightfeather.thirdappmodule.bean.vo
+
+import cn.flightfeather.thirdappmodule.bean.entity.Problemtype
+
+/**
+ * 闂閲嶅鎯呭喌
+ * @date 2025/10/30
+ * @author feiyu02
+ */
+class DPProblemRecurrence {
+
+    // 闂鏍囩
+    var problemTag:String? = null
+
+    // 闂绫诲瀷
+    var problemType: Problemtype? = null
+
+    // 鍑虹幇娆℃暟
+    var count = 0
+
+    // 鏁存敼鏁�
+    var changeCount = 0
+
+    // 鏁存敼鐜�
+    var changePer: Double = 0.0
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/QueryOptSingle.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/QueryOptSingle.kt
new file mode 100644
index 0000000..1c6e90a
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/bean/vo/QueryOptSingle.kt
@@ -0,0 +1,18 @@
+package cn.flightfeather.thirdappmodule.bean.vo
+
+/**
+ * 鍗曚釜鍦烘櫙绾靛悜鏁版嵁缁熻浜у搧鏌ヨ鏉′欢
+ * @date 2025/10/30
+ * @author feiyu02
+ */
+class QueryOptSingle {
+
+    // 鍦烘櫙id
+    var sceneId: String? = null
+
+    // 璧峰鏃堕棿锛屾牸寮� yyyy-MM-dd HH:mm:ss
+    var startTime: String? = null
+
+    // 缁撴潫鏃堕棿锛屾牸寮� yyyy-MM-dd HH:mm:ss
+    var endTime: String? = null
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt
new file mode 100644
index 0000000..1c81e5c
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt
@@ -0,0 +1,68 @@
+package cn.flightfeather.thirdappmodule.databinding
+
+import android.arch.lifecycle.MutableLiveData
+import cn.flightfeather.thirdappmodule.bean.vo.DPChangeInfo
+import cn.flightfeather.thirdappmodule.bean.vo.QueryOptSingle
+import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
+import cn.flightfeather.thirdappmodule.module.base.BaseViewModel
+import cn.flightfeather.thirdappmodule.repository.DataProdSingleSceneRepository
+import cn.flightfeather.thirdappmodule.util.DateUtil
+import org.jetbrains.anko.toast
+import java.util.*
+
+/**
+ * 鍦烘櫙鍘嗗彶鎯呭喌
+ * @author riku
+ * Date: 2025/10/30
+ */
+class SceneHistoryViewModel : BaseViewModel() {
+    private val dataProdSingleSceneRepository = DataProdSingleSceneRepository.instance
+
+    // 涓婁釜鏈堟暣鏀圭巼鏈�宸殑鎯呭喌
+    var worstChangeInfo = MutableLiveData<DPChangeInfo>()
+
+    fun getChangeInfoList(sceneId: String) {
+        val queryOpts = getQueryOptSingleList(sceneId)
+        dataProdSingleSceneRepository.getChangeInfoList(queryOpts, object : ResultCallBack<List<DPChangeInfo>> {
+            override fun onSuccess(result: List<DPChangeInfo>?) {
+                if (!result.isNullOrEmpty()) {
+                    worstChangeInfo.value = result[0]
+                }
+            }
+
+            override fun onFailure() {
+                application.toast("鑾峰彇鏁存敼鐜囨儏鍐靛け璐�")
+            }
+        })
+    }
+
+    private fun getQueryOptSingleList(sceneId: String): List<QueryOptSingle> {
+        val queryOpts = mutableListOf<QueryOptSingle>()
+
+        // 鑾峰彇鍓嶄笁涓湀鐨勬湀澶村拰鏈堟湯鏃堕棿
+        val now = Calendar.getInstance().apply {
+            set(Calendar.DAY_OF_MONTH, 1)
+            set(Calendar.HOUR_OF_DAY, 0)
+            set(Calendar.MINUTE, 0)
+            set(Calendar.SECOND, 0)
+        }
+        repeat(3) {
+            val queryOptSingle = QueryOptSingle().apply { this.sceneId = sceneId }
+            // 寰楀埌涓婃湀鏈�鍚庝竴澶�
+            now.add(Calendar.SECOND, -1)
+            queryOptSingle.endTime = DateUtil.getDateStr(now.time)
+            // 寰楀埌涓婃湀绗竴澶�
+            now.apply {
+                set(Calendar.DAY_OF_MONTH, 1)
+                set(Calendar.HOUR_OF_DAY, 0)
+                set(Calendar.MINUTE, 0)
+                set(Calendar.SECOND, 0)
+            }
+            queryOptSingle.startTime = DateUtil.getDateStr(now.time)
+
+            queryOpts.add(queryOptSingle)
+        }
+
+        return queryOpts
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt
new file mode 100644
index 0000000..4b75dbb
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt
@@ -0,0 +1,41 @@
+package cn.flightfeather.thirdappmodule.httpservice
+
+import cn.flightfeather.thirdappmodule.bean.vo.DPProblemRecurrence
+import cn.flightfeather.thirdappmodule.bean.vo.DPChangeInfo
+import cn.flightfeather.thirdappmodule.bean.vo.QueryOptSingle
+import cn.flightfeather.thirdappmodule.model.bean.BaseResponse
+import io.reactivex.Observable
+import retrofit2.Response
+import retrofit2.http.*
+
+/**
+ * 鍗曞満鏅旱鍚戞暟鎹粺璁℃帴鍙�
+ * @author riku
+ * Date: 2025/10/30
+ */
+interface DataProdSingleSceneService {
+
+    /**
+     * 鑾峰彇鏁存敼鎯呭喌
+     */
+    @POST("dataProd/singleScene/changeInfo/get")
+    fun getChangeInfo(
+        @Body queryOptSingle: QueryOptSingle
+    ): Observable<Response<BaseResponse<DPChangeInfo>>>
+
+    /**
+     * 鎵归噺鏌ヨ鏁存敼鎯呭喌
+     */
+    @POST("dataProd/singleScene/changeInfo/get/list")
+    fun getChangeInfoList(
+        @Body queryOpts: List<QueryOptSingle>
+    ): Observable<Response<BaseResponse<List<DPChangeInfo>>>>
+
+    /**
+     * 闂閲嶅鎯呭喌
+     */
+    @POST("dataProd/singleScene/problemRecurrence/get")
+    fun getProblemRecurrence(
+        @Body queryOptSingle: QueryOptSingle
+    ): Observable<Response<BaseResponse<DPProblemRecurrence>>>
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt
new file mode 100644
index 0000000..ce32d6d
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt
@@ -0,0 +1,77 @@
+package cn.flightfeather.thirdappmodule.repository
+
+import cn.flightfeather.thirdappmodule.bean.vo.DPChangeInfo
+import cn.flightfeather.thirdappmodule.bean.vo.DPProblemRecurrence
+import cn.flightfeather.thirdappmodule.bean.vo.QueryOptSingle
+import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
+import cn.flightfeather.thirdappmodule.common.net.ResultObserver
+import cn.flightfeather.thirdappmodule.common.net.RetrofitFactory
+import cn.flightfeather.thirdappmodule.httpservice.DataProdSingleSceneService
+import cn.flightfeather.thirdappmodule.model.bean.BaseResponse
+
+/**
+ * @author riku
+ * Date: 2025/10/30
+ */
+class DataProdSingleSceneRepository {
+    companion object {
+        @JvmStatic
+        val instance:DataProdSingleSceneRepository by lazy(LazyThreadSafetyMode.SYNCHRONIZED) { DataProdSingleSceneRepository()}
+    }
+
+    val retrofit = RetrofitFactory.instance.retrofit
+
+    /**
+     * 鑾峰彇鏁存敼鎯呭喌
+     */
+    fun getChangeInfo(queryOptSingle: QueryOptSingle, resultCallBack: ResultCallBack<DPChangeInfo>) {
+
+        val service = retrofit.create(DataProdSingleSceneService::class.java).getChangeInfo(queryOptSingle)
+
+        RetrofitFactory.executeResult(service, object : ResultObserver<BaseResponse<DPChangeInfo>>() {
+            override fun onSuccess(result: BaseResponse<DPChangeInfo>?) {
+                resultCallBack.onSuccess(result?.data)
+            }
+
+            override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
+                resultCallBack.onFailure()
+            }
+        })
+    }
+
+    /**
+     * 鎵归噺鏌ヨ鏁存敼鎯呭喌
+     */
+    fun getChangeInfoList(queryOpts: List<QueryOptSingle>, resultCallBack: ResultCallBack<List<DPChangeInfo>>) {
+
+        val service = retrofit.create(DataProdSingleSceneService::class.java).getChangeInfoList(queryOpts)
+
+        RetrofitFactory.executeResult(service, object : ResultObserver<BaseResponse<List<DPChangeInfo>>>() {
+            override fun onSuccess(result: BaseResponse<List<DPChangeInfo>>?) {
+                resultCallBack.onSuccess(result?.data)
+            }
+
+            override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
+                resultCallBack.onFailure()
+            }
+        })
+    }
+
+    /**
+     * 闂閲嶅鎯呭喌
+     */
+    fun getProblemRecurrence(queryOptSingle: QueryOptSingle, resultCallBack: ResultCallBack<DPProblemRecurrence>) {
+
+        val service = retrofit.create(DataProdSingleSceneService::class.java).getProblemRecurrence(queryOptSingle)
+
+        RetrofitFactory.executeResult(service, object : ResultObserver<BaseResponse<DPProblemRecurrence>>() {
+            override fun onSuccess(result: BaseResponse<DPProblemRecurrence>?) {
+                resultCallBack.onSuccess(result?.data)
+            }
+
+            override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
+                resultCallBack.onFailure()
+            }
+        })
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_scene_history_2.xml b/app/src/main/res/layout/dialog_scene_history_2.xml
new file mode 100644
index 0000000..05fe7dc
--- /dev/null
+++ b/app/src/main/res/layout/dialog_scene_history_2.xml
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <android.support.v7.widget.CardView
+        android:id="@+id/cv_dialog_main"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginLeft="12dp"
+        android:layout_marginTop="30dp"
+        android:layout_marginRight="12dp"
+        android:layout_marginBottom="40dp"
+        app:cardCornerRadius="6dp"
+        app:cardElevation="7dp">
+
+        <ScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginBottom="30dp">
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+
+
+            <android.support.constraint.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dimen16">
+                <ImageView
+                    android:id="@+id/img_risk_warn"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:src="@drawable/icon_task_alert"
+                    android:layout_marginBottom="@dimen/dimen4"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="@id/tv_risk_warn"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
+                    android:contentDescription="椋庨櫓鎻愮ず" />
+
+                <TextView
+                    android:id="@+id/tv_risk_warn"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:textColor="@color/red_btn_bg_color"
+                    android:textSize="@dimen/textSize_18"
+                    android:textStyle="bold"
+                    app:layout_constraintStart_toEndOf="@id/img_risk_warn"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="椋庨櫓鎻愮ず" />
+
+                <TextView
+                    android:id="@+id/tv_change_rate"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    tools:text="鏁存敼鐜囨儏鍐碉紝濡傛灉鏁存敼鐜囪緝浣庯紝鍒欎綔涓洪闄╂彁绀哄睍绀�"
+                    app:layout_constraintTop_toBottomOf="@id/tv_risk_warn"/>
+                <TextView
+                    android:id="@+id/tv_change_efficiency"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    tools:text="鏁存敼鏁堢巼鎯呭喌锛屾暣鏀规晥鐜囦负瑕佹眰鏁存敼鐨勬湡闄愶紙澶╂暟锛夐櫎浠ュ疄闄呮暣鏀圭殑鐢ㄦ椂锛堝ぉ鏁帮級锛屽鏋滄晥鐜囦綆浜�60%锛屽垯浣滀负椋庨櫓鎻愮ず灞曠ず"
+                    app:layout_constraintTop_toBottomOf="@id/tv_change_rate"/>
+                <TextView
+                    android:id="@+id/tv_problem_recurrence"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    tools:text="闂澶嶅彂鎯呭喌锛岃嫢鍓嶄笁涓湀鍐呮湁鐩稿悓绫诲瀷鐨勯棶棰樺嚭鐜颁袱娆″強浠ヤ笂鏃讹紝鎻愰啋灞曠ず锛屽苟缁欏嚭瀵瑰簲鐨勬暣鏀圭巼"
+                    app:layout_constraintTop_toBottomOf="@id/tv_change_efficiency"/>
+
+            </android.support.constraint.ConstraintLayout>
+            <android.support.constraint.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dimen16">
+                <ImageView
+                    android:id="@+id/img_inspection_key_point"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:src="@drawable/icon_consult"
+                    android:layout_marginBottom="@dimen/dimen4"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="@id/tv_risk_warn"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_inspection_key_point"
+                    android:contentDescription="宸℃煡瑕佺偣" />
+
+                <TextView
+                    android:id="@+id/tv_inspection_key_point"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:textColor="@color/primary_text"
+                    android:textSize="@dimen/textSize_18"
+                    app:layout_constraintStart_toEndOf="@id/img_inspection_key_point"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="宸℃煡瑕佺偣" />
+
+                <TextView
+                    android:id="@+id/tv_change_rate"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    tools:text="宸℃煡瑕佺偣锛屾敞鎰忛渶瑕佹鏌ョ殑浣嶇疆銆佽澶囧拰闂绛�"
+                    app:layout_constraintTop_toBottomOf="@id/img_inspection_key_point"/>
+
+            </android.support.constraint.ConstraintLayout>
+            <android.support.constraint.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dimen16">
+                <ImageView
+                    android:id="@+id/img_risk_warn"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:src="@drawable/ic_emergency"
+                    android:layout_marginBottom="@dimen/dimen4"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="@id/tv_risk_warn"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
+                    android:contentDescription="搴旀�ュ贰鏌�" />
+
+                <TextView
+                    android:id="@+id/tv_risk_warn"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:textColor="@color/primary_text"
+                    android:textSize="@dimen/textSize_18"
+                    app:layout_constraintStart_toEndOf="@id/img_risk_warn"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="搴旀�ュ贰鏌�" />
+
+            </android.support.constraint.ConstraintLayout>
+            </LinearLayout>
+        </ScrollView>
+    </android.support.v7.widget.CardView>
+
+    <android.support.design.widget.FloatingActionButton
+        android:id="@+id/fab_close"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:contentDescription="@string/cancel"
+        android:src="@drawable/icon_close_white"
+        app:elevation="8dp"
+        app:fabSize="normal"
+        app:layout_anchor="@id/cv_dialog_main"
+        app:layout_anchorGravity="bottom|center" />
+
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_inspection_content.xml b/app/src/main/res/layout/fragment_inspection_content.xml
index f768e0a..b795437 100644
--- a/app/src/main/res/layout/fragment_inspection_content.xml
+++ b/app/src/main/res/layout/fragment_inspection_content.xml
@@ -14,123 +14,6 @@
         android:layout_alignParentTop="true"
         android:layout_marginBottom="20dp" />
 
-    <TextView
-        android:id="@+id/scene_status"
-        android:visibility="gone"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentEnd="true"
-        android:layout_alignParentBottom="true"
-        android:layout_marginBottom="230dp"
-        android:background="@drawable/shape_yellow"
-        android:drawableStart="@drawable/ic_group_black_24dp"
-        android:drawableTint="@color/white"
-        android:elevation="@dimen/dimen4"
-        android:foreground="?android:attr/selectableItemBackground"
-        android:gravity="center"
-        android:padding="@dimen/dimen4"
-        android:text="@string/scene_status"
-        android:textColor="@color/white"
-        tools:ignore="UnusedAttribute" />
-
-    <TextView
-        android:id="@+id/scene_detail"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentEnd="true"
-        android:layout_alignParentBottom="true"
-        android:layout_marginBottom="230dp"
-        android:background="@drawable/shape_yellow"
-        android:drawableStart="@drawable/ic_info_black_24dp"
-        android:drawableTint="@color/white"
-        android:elevation="@dimen/dimen4"
-        android:foreground="?android:attr/selectableItemBackground"
-        android:gravity="center"
-        android:padding="@dimen/dimen4"
-        android:text="鐐逛綅鎯呭喌"
-        android:textColor="@color/white"
-        tools:ignore="UnusedAttribute" />
-
-    <TextView
-        android:id="@+id/user_account"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentEnd="true"
-        android:layout_alignParentBottom="true"
-        android:layout_marginBottom="188dp"
-        android:background="@drawable/shape_green"
-        android:drawableStart="@drawable/ic_group_black_24dp"
-        android:drawableTint="@color/white"
-        android:elevation="@dimen/dimen4"
-        android:foreground="?android:attr/selectableItemBackground"
-        android:gravity="center"
-        android:padding="@dimen/dimen4"
-        android:text="鐢ㄦ埛璐﹀彿"
-        android:textColor="@color/white"
-        tools:ignore="UnusedAttribute" />
-
-    <LinearLayout
-        android:visibility="visible"
-        android:id="@+id/ll_patrol_icons"
-        android:layout_width="match_parent"
-        android:layout_height="180dp"
-        android:layout_alignParentBottom="true"
-        android:background="@drawable/shap_stroke_top"
-        android:orientation="vertical">
-
-        <LinearLayout
-            android:id="@+id/ll_patrol_hide"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:clickable="true"
-            android:foreground="?android:attr/selectableItemBackground"
-            android:gravity="center">
-
-            <ImageView
-                android:id="@+id/imageView5"
-                android:layout_width="36dp"
-                android:layout_height="20dp"
-                android:layout_marginBottom="1dp"
-                android:layout_marginTop="3dp"
-                android:padding="3dp"
-                android:scaleType="fitXY"
-                android:src="@drawable/icon_hide" />
-        </LinearLayout>
-
-        <android.support.v4.view.ViewPager
-            android:id="@+id/vp_patrol_icons"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_weight="2">
-        </android.support.v4.view.ViewPager>
-        <ImageView
-            android:id="@+id/iv_patrol_pointer"
-            android:layout_width="20dp"
-            android:layout_height="20dp"
-            android:adjustViewBounds="true"
-            android:src="@drawable/select_first_point"
-            android:layout_gravity="center_horizontal"
-            />
-    </LinearLayout>
-    <LinearLayout
-        android:id="@+id/ll_patrol_show"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:foreground="?android:attr/selectableItemBackground"
-        android:layout_alignParentBottom="true"
-        android:background="@drawable/shap_stroke_top"
-        android:gravity="center_horizontal">
-        <ImageView
-            android:src="@drawable/icon_hide"
-            android:layout_width="36dp"
-            android:rotation="180"
-            android:layout_height="20dp"
-            android:padding="3dp"
-            android:scaleType="fitXY"
-            android:layout_gravity="center"/>
-    </LinearLayout>
-
     <RelativeLayout
         android:visibility="visible"
         android:elevation="1dp"
@@ -138,7 +21,6 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@color/colorPrimary"
-
         android:layout_alignParentTop="true"
         android:layout_alignParentStart="true">
 
@@ -197,7 +79,7 @@
         <ImageView
             android:id="@+id/iv_patrol_back"
             android:layout_width="45dp"
-           android:paddingLeft="18dp"
+            android:paddingLeft="18dp"
             android:paddingTop="9dp"
             android:paddingRight="9dp"
             android:paddingBottom="9dp"
@@ -414,7 +296,7 @@
             android:layout_height="wrap_content"
             android:layout_marginLeft="16dp"
             android:orientation="horizontal"
-            android:visibility="gone">
+            android:visibility="visible">
 
             <TextView
                 android:layout_width="wrap_content"
@@ -439,6 +321,121 @@
         </LinearLayout>
     </LinearLayout>
 
+    <TextView
+        android:id="@+id/scene_status"
+        android:visibility="gone"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="230dp"
+        android:background="@drawable/shape_yellow"
+        android:drawableStart="@drawable/ic_group_black_24dp"
+        android:drawableTint="@color/white"
+        android:elevation="@dimen/dimen4"
+        android:foreground="?android:attr/selectableItemBackground"
+        android:gravity="center"
+        android:padding="@dimen/dimen4"
+        android:text="@string/scene_status"
+        android:textColor="@color/white"
+        tools:ignore="UnusedAttribute" />
 
+    <TextView
+        android:id="@+id/scene_detail"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="230dp"
+        android:background="@drawable/shape_yellow"
+        android:drawableStart="@drawable/ic_info_black_24dp"
+        android:drawableTint="@color/white"
+        android:elevation="@dimen/dimen4"
+        android:foreground="?android:attr/selectableItemBackground"
+        android:gravity="center"
+        android:padding="@dimen/dimen4"
+        android:text="鐐逛綅鎯呭喌"
+        android:textColor="@color/white"
+        tools:ignore="UnusedAttribute" />
+
+    <TextView
+        android:id="@+id/user_account"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="188dp"
+        android:background="@drawable/shape_green"
+        android:drawableStart="@drawable/ic_group_black_24dp"
+        android:drawableTint="@color/white"
+        android:elevation="@dimen/dimen4"
+        android:foreground="?android:attr/selectableItemBackground"
+        android:gravity="center"
+        android:padding="@dimen/dimen4"
+        android:text="鐢ㄦ埛璐﹀彿"
+        android:textColor="@color/white"
+        tools:ignore="UnusedAttribute" />
+
+    <LinearLayout
+        android:visibility="visible"
+        android:id="@+id/ll_patrol_icons"
+        android:layout_width="match_parent"
+        android:layout_height="180dp"
+        android:layout_alignParentBottom="true"
+        android:background="@drawable/shap_stroke_top"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:id="@+id/ll_patrol_hide"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:clickable="true"
+            android:foreground="?android:attr/selectableItemBackground"
+            android:gravity="center">
+
+            <ImageView
+                android:id="@+id/imageView5"
+                android:layout_width="36dp"
+                android:layout_height="20dp"
+                android:layout_marginBottom="1dp"
+                android:layout_marginTop="3dp"
+                android:padding="3dp"
+                android:scaleType="fitXY"
+                android:src="@drawable/icon_hide" />
+        </LinearLayout>
+
+        <android.support.v4.view.ViewPager
+            android:id="@+id/vp_patrol_icons"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="2">
+        </android.support.v4.view.ViewPager>
+        <ImageView
+            android:id="@+id/iv_patrol_pointer"
+            android:layout_width="20dp"
+            android:layout_height="20dp"
+            android:adjustViewBounds="true"
+            android:src="@drawable/select_first_point"
+            android:layout_gravity="center_horizontal"
+            />
+    </LinearLayout>
+    <LinearLayout
+        android:id="@+id/ll_patrol_show"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:foreground="?android:attr/selectableItemBackground"
+        android:layout_alignParentBottom="true"
+        android:background="@drawable/shap_stroke_top"
+        android:gravity="center_horizontal">
+        <ImageView
+            android:src="@drawable/icon_hide"
+            android:layout_width="36dp"
+            android:rotation="180"
+            android:layout_height="20dp"
+            android:padding="3dp"
+            android:scaleType="fitXY"
+            android:layout_gravity="center"/>
+    </LinearLayout>
 
 </RelativeLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_scene_history.xml b/app/src/main/res/layout/layout_scene_history.xml
new file mode 100644
index 0000000..9103ff4
--- /dev/null
+++ b/app/src/main/res/layout/layout_scene_history.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginBottom="30dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+
+            <android.support.constraint.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dimen16">
+
+                <ImageView
+                    android:id="@+id/img_risk_warn"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginBottom="@dimen/dimen4"
+                    android:contentDescription="椋庨櫓鎻愮ず"
+                    android:src="@drawable/icon_task_alert"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
+
+                <TextView
+                    android:id="@+id/tv_risk_warn"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:text="椋庨櫓鎻愮ず"
+                    android:textColor="@color/red_btn_bg_color"
+                    android:textSize="@dimen/textSize_18"
+                    android:textStyle="bold"
+                    app:layout_constraintStart_toEndOf="@id/img_risk_warn"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_change_rate"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    app:layout_constraintTop_toBottomOf="@id/tv_risk_warn"
+                    tools:text="鏁存敼鐜囨儏鍐碉紝濡傛灉鏁存敼鐜囪緝浣庯紝鍒欎綔涓洪闄╂彁绀哄睍绀�" />
+
+                <TextView
+                    android:id="@+id/tv_change_efficiency"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    app:layout_constraintTop_toBottomOf="@id/tv_change_rate"
+                    tools:text="鏁存敼鏁堢巼鎯呭喌锛屾暣鏀规晥鐜囦负瑕佹眰鏁存敼鐨勬湡闄愶紙澶╂暟锛夐櫎浠ュ疄闄呮暣鏀圭殑鐢ㄦ椂锛堝ぉ鏁帮級锛屽鏋滄晥鐜囦綆浜�60%锛屽垯浣滀负椋庨櫓鎻愮ず灞曠ず" />
+
+                <TextView
+                    android:id="@+id/tv_problem_recurrence"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    app:layout_constraintTop_toBottomOf="@id/tv_change_efficiency"
+                    tools:text="闂澶嶅彂鎯呭喌锛岃嫢鍓嶄笁涓湀鍐呮湁鐩稿悓绫诲瀷鐨勯棶棰樺嚭鐜颁袱娆″強浠ヤ笂鏃讹紝鎻愰啋灞曠ず锛屽苟缁欏嚭瀵瑰簲鐨勬暣鏀圭巼" />
+
+            </android.support.constraint.ConstraintLayout>
+
+            <android.support.constraint.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dimen16">
+
+                <ImageView
+                    android:id="@+id/img_inspection_key_point"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginBottom="@dimen/dimen4"
+                    android:contentDescription="宸℃煡瑕佺偣"
+                    android:src="@drawable/icon_consult"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_inspection_key_point"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
+
+                <TextView
+                    android:id="@+id/tv_inspection_key_point"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:text="宸℃煡瑕佺偣"
+                    android:textColor="@color/primary_text"
+                    android:textSize="@dimen/textSize_18"
+                    app:layout_constraintStart_toEndOf="@id/img_inspection_key_point"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_change_rate"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingStart="20dp"
+                    android:paddingEnd="0dp"
+                    android:textColor="@color/main_color_1"
+                    android:textSize="@dimen/textSize_16"
+                    app:layout_constraintTop_toBottomOf="@id/tv_inspection_key_point"
+                    tools:text="宸℃煡瑕佺偣锛屾敞鎰忛渶瑕佹鏌ョ殑浣嶇疆銆佽澶囧拰闂绛�" />
+
+            </android.support.constraint.ConstraintLayout>
+
+            <android.support.constraint.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dimen16">
+
+                <ImageView
+                    android:id="@+id/img_risk_warn"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginBottom="@dimen/dimen4"
+                    android:contentDescription="搴旀�ュ贰鏌�"
+                    android:src="@drawable/ic_emergency"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
+
+                <TextView
+                    android:id="@+id/tv_risk_warn"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:text="搴旀�ュ贰鏌�"
+                    android:textColor="@color/primary_text"
+                    android:textSize="@dimen/textSize_18"
+                    app:layout_constraintStart_toEndOf="@id/img_risk_warn"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+            </android.support.constraint.ConstraintLayout>
+        </LinearLayout>
+    </ScrollView>
+
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file

--
Gitblit v1.9.3