1. 新增问题位置获取接口
2. 修复修改问题界面问题子类不随问题大类随动变换问题
已修改5个文件
已添加1个文件
56 ■■■■ 文件已修改
app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DomainItemService.kt 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceViewModel.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/repository/ProblemRepository.kt 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
appsupervision/build.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DomainItemService.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
package cn.flightfeather.thirdappmodule.httpservice
import cn.flightfeather.thirdappmodule.bean.entity.Domainitem
import io.reactivex.Observable
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Query
/**
 * @author riku
 * Date: 2021/8/13
 */
interface DomainItemService {
    @GET("domainitem/location")
    fun getLocation(@Query("sceneType") sceneType: Int): Observable<Response<ArrayList<Domainitem>>>
}
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
@@ -57,9 +57,9 @@
        initUI()
        initObserver()
        viewModel.getLocationList()
        subTask?.let { t ->
            scene?.let { s ->
                viewModel.getLocationList(s.typeid.toInt())
                viewModel.getProblemType(t.typeno, t.citycode, t.districtcode, s.typeid)
            }
        }
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceViewModel.kt
@@ -43,8 +43,8 @@
    /**
     * èŽ·å–åœºæ™¯é—®é¢˜å¯é€‰ä½ç½®ï¼ˆç›®å‰åªæœ‰å·¥åœ°ï¼Œä½†æ‰€æœ‰åœºæ™¯éƒ½ä½¿ç”¨ï¼‰
     */
    fun getLocationList() {
        problemRepository.getLocationList(object : ResultCallBack<ArrayList<Domainitem>> {
    fun getLocationList(sceneType: Int) {
        problemRepository.getLocationList(sceneType, object : ResultCallBack<ArrayList<Domainitem>> {
            override fun onSuccess(result: ArrayList<Domainitem>?) {
                result?.let {
                    locationList.value = it
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt
@@ -97,7 +97,7 @@
                }
            }
            //整改建议备注
            if (getSuggestion) {
            if (getSuggestion && advice.length > 2) {
                var suggestionRemark = advice.removeRange(0, 1)//删除第一个字符,括号“(”
                suggestionRemark = suggestionRemark.dropLast(1)//删除最后一个字符,括号“)”
                et_take_evidence_suggestion.setText(suggestionRemark)
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) })
        }
appsupervision/build.gradle
@@ -11,8 +11,8 @@
        applicationId "cn.flightfeather.thirdapp"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 30
        versionName "1.1.14.14"
        versionCode 31
        versionName "1.1.14.15"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        renderscriptTargetApi 25