feiyu02
2024-09-10 6c7f45871b93ef26d353a5a3596701ac2f39ed9c
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ProblemListVo.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
package cn.flightfeather.supervision.lightshare.vo
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.UUIDGenerator
import cn.flightfeather.supervision.domain.ds1.entity.Inspection
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import com.fasterxml.jackson.annotation.JsonInclude
import java.math.BigDecimal
import java.util.*
@JsonInclude(JsonInclude.Include.NON_NULL)
class ProblemListVo : Problemlist() {
    var mediafileList: List<MediaFileVo>? = null
    var typeid: Byte? = null//问题类型id
    var typename: String? = null//问题类型名称
    companion object {
        /**
         * ç”Ÿæˆä¸€ä¸ªæ–°é—®é¢˜
         */
        fun newPro(inspection: Inspection, problemVo:ProblemVo, scene: Scense) = Problemlist().apply {
            guid = UUIDGenerator.generate16ShortUUID()
            iguid = inspection.guid
            stguid = inspection.stguid
            sguid = inspection.sguid
            sensename = inspection.scensename
            senseaddress = inspection.scenseaddress
            ptguid = problemVo.ptGuid
            problemname = problemVo.proName
            longitude = problemVo.longitude ?: scene.longitude
            latitude = problemVo.latitude ?: scene.latitude
            locationid = problemVo.locationId
            location = problemVo.location
            time = Date()
            isrechecked = false
            ischanged = false
            advise = problemVo.advice
            extension3 = Constant.PROBLEM_UNCHECKED
        }
    }
}