From 6c7f45871b93ef26d353a5a3596701ac2f39ed9c Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 10 九月 2024 17:48:27 +0800 Subject: [PATCH] 1. 新增问题更新接口 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/MediaFileVo.kt | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/MediaFileVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/MediaFileVo.kt new file mode 100644 index 0000000..d5b4291 --- /dev/null +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/MediaFileVo.kt @@ -0,0 +1,87 @@ +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鎻掍笉鍚岃〃鐨凣UID锛屽闂琛ㄣ�佹妧闃叉帾鏂借〃 +// */ +// 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 +} \ No newline at end of file -- Gitblit v1.9.3