From 3013b813e5df6977c0be921928f73b1a3adde290 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 02 七月 2025 15:52:04 +0800
Subject: [PATCH] ### 一、巡查模块相关

---
 app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt
index 1203700..271d51f 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt
@@ -6,6 +6,7 @@
 import cn.flightfeather.thirdappmodule.bean.vo.ProblemDetailVo
 import cn.flightfeather.thirdappmodule.bean.vo.ProblemlistVo
 import cn.flightfeather.thirdappmodule.common.net.*
+import cn.flightfeather.thirdappmodule.httpservice.DomainItemService
 import cn.flightfeather.thirdappmodule.httpservice.InspectionService
 import cn.flightfeather.thirdappmodule.httpservice.MediaFileService
 import cn.flightfeather.thirdappmodule.httpservice.ProblemListService
@@ -39,12 +40,11 @@
     /**
      * 鑾峰彇鍦烘櫙闂鍙�変綅缃�
      */
-    fun getLocationList(resultCallBack: ResultCallBack<ArrayList<Domainitem>>) {
-        val dbService = domainDao.getLocationList().map {
-            Response.success(ArrayList<Domainitem>().apply { addAll(it) })
-        }
+    fun getLocationList(sceneType: Int, resultCallBack: ResultCallBack<ArrayList<Domainitem>>) {
 
-        RetrofitFactory.executeResult(dbService, object : ResultObserver<ArrayList<Domainitem>>() {
+        val service = retrofit.create(DomainItemService::class.java).getLocation(sceneType)
+
+        RetrofitFactory.executeResult(service, object : ResultObserver<ArrayList<Domainitem>>() {
             override fun onSuccess(result: ArrayList<Domainitem>?) {
                 resultCallBack.onSuccess(result)
             }
@@ -52,8 +52,22 @@
             override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
                 resultCallBack.onFailure()
             }
-
         })
+
+//        val dbService = domainDao.getLocationList().map {
+//            Response.success(ArrayList<Domainitem>().apply { addAll(it) })
+//        }
+//
+//        RetrofitFactory.executeResult(dbService, object : ResultObserver<ArrayList<Domainitem>>() {
+//            override fun onSuccess(result: ArrayList<Domainitem>?) {
+//                resultCallBack.onSuccess(result)
+//            }
+//
+//            override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
+//                resultCallBack.onFailure()
+//            }
+//
+//        })
     }
 
     /**
@@ -78,6 +92,7 @@
      * 鑾峰彇瀵瑰簲鍦烘櫙涓嬫墍鏈夐棶棰樼被鍨�
      */
     fun getProblemType(taskTypeId: Byte, cityCode: String, districtCode: String, sceneTypeId: Byte, resultCallBack: ResultCallBack<ArrayList<Problemtype>>) {
+
         val dbService = domainDao.getProblemType(taskTypeId, cityCode, districtCode, sceneTypeId).map {
             Response.success(ArrayList<Problemtype>().apply { addAll(it) })
         }

--
Gitblit v1.9.3