| | |
| | | import com.xw.yunwei.model.CheckRecordModel |
| | | import com.xw.yunwei.model.MaintainRecordModel |
| | | import com.xw.yunwei.model.SiteModel |
| | | import com.xw.yunwei.model.UploadModel |
| | | |
| | | class WorkRepository(private val api: WorkApi) { |
| | | |
| | |
| | | work: Boolean, |
| | | model: SiteModel, |
| | | sceneDescription: String, |
| | | scenePhoto: List<String>,//现场照片JSON数组 |
| | | ): Any? { |
| | | scenePhoto: MutableList<UploadModel>, |
| | | ): Boolean { |
| | | val map = mapOf<String, Any>( |
| | | "fieldSituation" to if (work) 1 else 2,//现场情况(1=正常,2=异常) |
| | | "pointId" to model.id.toString(),//点位id |
| | | "sceneDescription" to sceneDescription,//现场情况说明 |
| | | "scenePhoto" to GsonUtils.toJson(scenePhoto), |
| | | "scenePhoto" to GsonUtils.toJson(scenePhoto),//现场照片JSON数组 |
| | | ) |
| | | return api.addPointSituationReport(map).interceptAwait() |
| | | api.addPointSituationReport(getBody(map)).interceptAwait() |
| | | return true |
| | | } |
| | | } |