| | |
| | | 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 |
| | |
| | | /** |
| | | * 获取场景问题可选位置 |
| | | */ |
| | | 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) |
| | | } |
| | |
| | | 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() |
| | | // } |
| | | // |
| | | // }) |
| | | } |
| | | |
| | | /** |
| | |
| | | * 获取对应场景下所有问题类型 |
| | | */ |
| | | 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) }) |
| | | } |