feiyu02
2024-11-21 9de446b0b83610055437fbc5172d216bb374900f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
        }
    }
}