| | |
| | | |
| | | import android.arch.lifecycle.MutableLiveData |
| | | import cn.flightfeather.thirdappmodule.bean.entity.Evaluation |
| | | import cn.flightfeather.thirdappmodule.bean.vo.ChangeRateVo |
| | | import cn.flightfeather.thirdappmodule.bean.vo.TypicalSceneVo |
| | | import cn.flightfeather.thirdappmodule.bean.vo.* |
| | | import cn.flightfeather.thirdappmodule.common.net.ResultCallBack |
| | | import cn.flightfeather.thirdappmodule.module.base.BaseViewModel |
| | | import cn.flightfeather.thirdappmodule.repository.EvaluationRepository |
| | |
| | | class MenuSceneHistoryViewModel : BaseViewModel() { |
| | | private val evaluationRepository = EvaluationRepository.instance |
| | | |
| | | // 1. 历史评估情况 |
| | | val evaluationList = MutableLiveData<List<Evaluation>>() |
| | | |
| | | /** |
| | | * 获取前三个月的评估总分 |
| | | * 1.历史评估情况 |
| | | * 展示场景前3个月的现场巡查得分(去除监测数据得分)。 |
| | | */ |
| | | val evaluationList = MutableLiveData<List<Evaluation>>() |
| | | fun getEvaluationList(sceneId:String) { |
| | | evaluationRepository.getEvaluationByScene(sceneId, resultCallBack = object : ResultCallBack<List<Evaluation>> { |
| | | override fun onSuccess(result: List<Evaluation>?) { |
| | |
| | | }) |
| | | } |
| | | |
| | | // 2. 典型工地情况 |
| | | /** |
| | | * 2.典型场景情况 |
| | | * 展示场景前3个月是否属于典型场景清单中。 |
| | | */ |
| | | val typicalScene = MutableLiveData<List<TypicalSceneVo>>() |
| | | |
| | | fun getTypicalScene(sceneId: String) { |
| | | typicalScene.value = listOf() |
| | | } |
| | | |
| | | // 3. 整改效率 |
| | | /** |
| | | * 3.重点区域(在国控点、市控点周边) |
| | | * 展示场景位置是否在国控点、市控点周边2公里范围内,是否属于重点区域。 |
| | | */ |
| | | val keyArea = MutableLiveData<Boolean>() |
| | | fun getKeyArea(sceneId: String) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 4.联合执法 |
| | | * 近3个月是否被列入清单,警示。 |
| | | */ |
| | | val jointLawEnforcement = MutableLiveData<List<JointLawEnforcementVo>>() |
| | | fun getJointLawEnforcement(sceneId: String) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 5.整改效率 |
| | | * 展示场景前3个月的整改率和综合整改率(使用颜色区分)以及整改效率(显示整改时间和问题时间相差多少天)。 |
| | | */ |
| | | val changeRate = MutableLiveData<List<ChangeRateVo>>() |
| | | fun getChangeRate() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 6.问题复发 |
| | | * 近3个月问题复发情况是否明显 |
| | | */ |
| | | val problemRecurrence = MutableLiveData<List<ProblemRecurrenceVo>>() |
| | | fun getProblemRecurrence() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 7.施工阶段(只针对工地类型的场景) |
| | | * 至少2个月施工阶段没有确认更新过,提醒去确认更新 |
| | | */ |
| | | val constructionPhase = MutableLiveData<List<ConstructionPhaseVo>>() |
| | | fun getConstructionPhaseV() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 8.在线监测数据 |
| | | * 近3个月的排名是否在全区前十,或者平均浓度高于区均值,警示显示 |
| | | */ |
| | | val monitorData = MutableLiveData<List<MonitorDataVo>>() |
| | | fun getMonitorData() { |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 9.应急巡查 |
| | | * 近3个月是否涉及道路巡查,有则警示 |
| | | */ |
| | | val emergencyInspection = MutableLiveData<List<EmergencyInspectionVo>>() |
| | | fun getEmergencyInspection() { |
| | | |
| | | } |
| | | |
| | | } |