18034727885
2026-04-15 7bc0929de16396ed06459872c8d0fb7cd7f30b0c
app/src/main/java/com/xw/yunwei/net/WorkRepository.kt
@@ -6,6 +6,7 @@
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) {
@@ -62,14 +63,15 @@
        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
    }
}