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