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
|
}
|
}
|
}
|