feiyu02
2024-10-12 7cd8d2a1e96de3d173bf5af64b4adc29c497db2a
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package cn.flightfeather.supervision.lightshare.vo
 
import cn.flightfeather.supervision.common.utils.UUIDGenerator
import cn.flightfeather.supervision.domain.ds1.entity.Inspection
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
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.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.*
 
@JsonInclude(JsonInclude.Include.NON_NULL)
class MediaFileVo : Mediafile() {
 
    companion object {
        /**
         * 生成一个问题图片
         */
        fun newProFile(inspection: Inspection, problemlist: Problemlist, scene: Scense) = Mediafile().apply {
            val now = LocalDateTime.now()
            guid = UUIDGenerator.generate16ShortUUID()
            iguid = inspection.guid
            businessguid = problemlist.guid
            longitude = problemlist.longitude
            latitude = problemlist.latitude
            address = problemlist.senseaddress
            filetype = 1
            businesstype = "问题"
            businesstypeid = 1
            path =
                "FlightFeather/Photo/" + scene.districtname + "/" + now.year + "年" + now.monthValue + "月/" + now.monthValue + "月" + now.dayOfMonth + "日/" + scene.name + "/"
            description =
                problemlist.problemname + " " + problemlist.location + " " + UUIDGenerator.generateUUID(4) + ".jpg"
            savetime = Date()
            ischanged = false
            extension1 =
                scene.citycode + "/" + scene.districtcode + "/" + now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + "/" + scene.guid + "/"
            remark = "已上传"
        }
    }
//    var guid: String? = null
//
//    var iguid: String? = null
//
//    /**
//     * 根据MF_BusinessType插不同表的GUID,如问题表、技防措施表
//     */
//    var businessguid: String? = null
//
//    var longitude: BigDecimal? = null
//
//    var latitude: BigDecimal? = null
//
//    var address: String? = null
//
//    /**
//     * 1图片 2音频 3视频
//     */
//    var filetype: Int? = null
//
//    var businesstypeid: Byte? = null
//
//    /**
//     * 1. 问题;2技防措施;3监测设备;4治理设置;5 常规记录,99 其他
//     */
//    var businesstype: String? = null
//
//    var path: String? = null
//
//    var description: String? = null
//
//    var savetime: Date? = null
//
//    /**
//     * 否为整改前的图片
//     */
//    var ischanged: Boolean? = null
//
//    var extension1: String? = null
//
//    var extension2: String? = null
//
//    var extension3: String? = null
//
//    var remark: String? = null
}