From 85ef942e7195abeb71466b7159c3ee30161e1e54 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 07 四月 2026 08:51:01 +0800
Subject: [PATCH] 2026.4.7
---
src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt | 1
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MediafileService.kt | 4
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt | 2
src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt | 10
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt | 125 +++++++++++-
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt | 12 -
src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt | 42 +--
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt | 10
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt | 3
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt | 8
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt | 4
src/main/kotlin/cn/flightfeather/supervision/common/utils/StringUtil.kt | 22 ++
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProductServiceImpl.kt | 10 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubtaskVo.kt | 114 -----------
src/main/kotlin/cn/flightfeather/supervision/business/import/SceneImport.kt | 49 +++-
src/main/resources/application-pro-https.yml | 6
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProductService.kt | 11 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProductController.kt | 29 ++
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt | 5
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt | 17 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt | 11 +
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/Subtask.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt | 43 ++-
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt | 2
25 files changed, 328 insertions(+), 216 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/import/SceneImport.kt b/src/main/kotlin/cn/flightfeather/supervision/business/import/SceneImport.kt
index ec2d8ef..a11e82e 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/import/SceneImport.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/import/SceneImport.kt
@@ -7,6 +7,7 @@
import cn.flightfeather.supervision.domain.ds1.repository.RegionRep
import cn.flightfeather.supervision.lightshare.vo.SceneDetail
import com.google.gson.Gson
+import org.apache.poi.ss.usermodel.Cell
import org.apache.poi.ss.usermodel.CellType
import org.springframework.stereotype.Component
import java.io.InputStream
@@ -111,23 +112,23 @@
when (scense?.typeid.toString()) {
Constant.SceneType.TYPE1.value -> {
subScene = SceneConstructionSite().apply {
- csProjectType = it.getCell(12)?.stringCellValue?.trim()
- csStatus = it.getCell(13)?.stringCellValue?.trim()
- siExtension1 = it.getCell(14)?.stringCellValue?.trim()
- csStartTime = it.getCell(15)?.stringCellValue?.trim()
- csEndTime = it.getCell(16)?.stringCellValue?.trim()
- csLeftTime = it.getCell(17)?.stringCellValue?.trim()
- csFloorSpace = it.getCell(18)?.numericCellValue?.toString()
- csConstructionArea = it.getCell(19)?.numericCellValue?.toString()
- csConstructionAreaPerMonth = it.getCell(20)?.numericCellValue?.toString()
- csEmployerUnit = it.getCell(21)?.stringCellValue?.trim()
- csEmployerContacts = it.getCell(22)?.stringCellValue?.trim()
- csEmployerContactsTel = it.getCell(23)?.stringCellValue?.trim()
- csConstructionUnit = it.getCell(24)?.stringCellValue?.trim()
- csConstructionContacts = it.getCell(25)?.stringCellValue?.trim()
- csConstructionContactsTel = it.getCell(26)?.stringCellValue?.trim()
- csSecurityOfficer = it.getCell(27)?.stringCellValue?.trim()
- csSecurityOfficerTel = it.getCell(28)?.stringCellValue?.trim()
+ csProjectType = getCellValueToString(it.getCell(12))
+ csStatus = getCellValueToString(it.getCell(13))
+ siExtension1 = getCellValueToString(it.getCell(14))
+ csStartTime = getCellValueToString(it.getCell(15))
+ csEndTime = getCellValueToString(it.getCell(16))
+ csLeftTime = getCellValueToString(it.getCell(17))
+ csFloorSpace = getCellValueToString(it.getCell(18))
+ csConstructionArea = getCellValueToString(it.getCell(19))
+ csConstructionAreaPerMonth = getCellValueToString(it.getCell(20))
+ csEmployerUnit = getCellValueToString(it.getCell(21))
+ csEmployerContacts = getCellValueToString(it.getCell(22))
+ csEmployerContactsTel = getCellValueToString(it.getCell(23))
+ csConstructionUnit = getCellValueToString(it.getCell(24))
+ csConstructionContacts = getCellValueToString(it.getCell(25))
+ csConstructionContactsTel = getCellValueToString(it.getCell(26))
+ csSecurityOfficer = getCellValueToString(it.getCell(27))
+ csSecurityOfficerTel = getCellValueToString(it.getCell(28))
}
}
Constant.SceneType.TYPE2.value -> {
@@ -145,7 +146,7 @@
result.add(data)
}
} catch (e: IllegalStateException) {
- throw BizException("excel鏂囦欢鍐呭閿欒锛屾暟鎹浆鎹㈠け璐ワ紒", e)
+ throw BizException(e.message, e)
}
return result
}
@@ -153,4 +154,16 @@
private fun errorStr(row: Int, col: Int, str: String): String {
return "绗�${row}琛岋紝绗�${col}鍒楀崟鍏冩牸閿欒锛�${str}"
}
+
+ private fun getCellValueToString(cell: Cell?): String {
+ cell ?: return ""
+ return when (cell.cellType) {
+ CellType.STRING -> cell.stringCellValue.trim()
+ CellType.NUMERIC -> cell.numericCellValue.toString().trim()
+ CellType.BLANK -> cell.stringCellValue.trim()
+ CellType.BOOLEAN -> cell.booleanCellValue.toString().trim()
+ CellType.ERROR -> cell.errorCellValue.toString().trim()
+ else -> throw BizException(errorStr(cell.rowIndex + 1, cell.columnIndex + 1, "鍗曞厓鏍兼牸寮忎笉鏄父瑙佹牸寮忥紝鏃犳硶璇嗗埆"))
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt b/src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt
index ba6dae3..f1a87c1 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt
@@ -122,6 +122,7 @@
fos.write(b, 0, a)
a = fis.read(b)
}
+
}
}
@@ -145,30 +146,21 @@
}
/**
- * 鎸夌収鍥哄畾瀹藉害鍘嬬缉鍥剧墖鑷砨ase64褰㈠紡
+ * 鎸夌収璺緞寤虹珛鏂囦欢澶癸紝骞惰嚜鍔ㄥ鐞嗛噸澶嶈矾寰�
*/
-// fun compressImage2(bytes: ByteArray): String {
-// val length = 1440//鍥剧墖闀胯竟鍥哄畾鍘嬬缉涓�1440鍍忕礌
-//
-// val input = ByteArrayInputStream(bytes)
-// val srcImg = ImageIO.read(input)
-// var srcLong = 0
-// var srcShort = 0
-// if (srcImg.width <= srcImg.height) {
-// srcLong = srcImg.height
-// srcShort = srcImg.width
-//
-// } else {
-//
-// }
-// val scale = w.toFloat() / srcW
-// val h = (srcImg.height * scale).toInt()
-//
-// val buffImg = BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB)
-// buffImg.graphics.drawImage(srcImg.getScaledInstance(w, h, Image.SCALE_SMOOTH), 0, 0, null)
-// val out = ByteArrayOutputStream()
-// ImageIO.write(buffImg, "PNG", out)
-//
-// return SCHEME_PNG + Base64.getEncoder().encodeToString(out.toByteArray())
-// }
+ fun mkDirs(basePath: String): File {
+ var file = File(basePath)
+ var i = 1
+ while (file.exists() && i <= 100) {
+ val path = "$basePath($i)"
+ file = File(path)
+ i++
+ }
+ if (file.exists()) {
+ delAllFile(file.absolutePath)
+ } else {
+ file.mkdirs()
+ }
+ return file
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/utils/StringUtil.kt b/src/main/kotlin/cn/flightfeather/supervision/common/utils/StringUtil.kt
new file mode 100644
index 0000000..dffb199
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/common/utils/StringUtil.kt
@@ -0,0 +1,22 @@
+package cn.flightfeather.supervision.common.utils
+
+/**
+ *
+ * @date 2026/1/20
+ * @author feiyu02
+ */
+object StringUtil {
+
+ /**
+ * 鏁存暟鏁板瓧鎸夌収鏄剧ず浣嶆暟鏍煎紡鍖�
+ * @param num 鏁板瓧
+ * @param digit 鏄剧ず浣嶆暟
+ */
+ fun numberFormat(num: Int?, digit: Int): String {
+ var str = num.toString()
+ while (str.length < digit) {
+ str = "0$str"
+ }
+ return str
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt b/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt
index 8b6421d..f8e737e 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt
@@ -35,6 +35,7 @@
@ExceptionHandler(BizException::class)
@ResponseStatus(HttpStatus.OK)
fun bizException(e: BizException): BaseResponse<String> {
+ e.printStackTrace()
return BaseResponse.fail("200", e)
}
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/Subtask.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/Subtask.kt
index 6edd5ac..6dd384c 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/Subtask.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/Subtask.kt
@@ -11,7 +11,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "tm_t_subtask")
@ApiModel(value = "Subtask")
-public class Subtask {
+open class Subtask {
@Id
@Column(name = "ST_GUID")
@ApiModelProperty(value = "涓婚敭16浣峠uid")
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProductService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProductService.kt
index 5e99f5f..79e3f05 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProductService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProductService.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.lightshare.vo.AreaVo
+import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt
import cn.flightfeather.supervision.model.dataproduct.DataProdOption
import cn.flightfeather.supervision.model.dataproduct.PPListProbRecurrence
import cn.flightfeather.supervision.model.dataproduct.PPListProblemChange
@@ -27,4 +28,14 @@
* 闂澶嶅彂鎯呭喌
*/
fun problemRecurrence(option: DataProdOption): List<PPListProbRecurrence>
+
+ /**
+ * 鏌ヨ鏁版嵁浜у搧璁板綍
+ */
+ fun findProduct(queryOpt: QueryOpt, page: Int, perPage: Int)
+
+ /**
+ * 鐢熸垚鏁版嵁浜у搧
+ */
+ fun generateProduct(queryOpt: QueryOpt)
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MediafileService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MediafileService.kt
index fefebf0..4dcaf28 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MediafileService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MediafileService.kt
@@ -1,8 +1,10 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
+import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import cn.flightfeather.supervision.lightshare.vo.MediaFileVo
import org.springframework.web.multipart.MultipartFile
+import javax.servlet.http.HttpServletResponse
interface MediafileService {
@@ -32,4 +34,6 @@
fun findBysubtaskbtid(id: String, btid: String): MutableList<Mediafile>?
fun getRoutineRecord(iGuid: String?, stGuid: String?): List<Mediafile?>
+
+ fun downloadPic(config: ExcelConfigVo, response: HttpServletResponse): HttpServletResponse
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt
index f61a1bd..c347464 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt
@@ -45,7 +45,7 @@
fun newProblem(problem: String, files: Array<MultipartFile>): String
- fun updateProblem(problem: ProblemListVo, deleteImg: List<String>, files: Array<MultipartFile>): String
+ fun updateProblem(problem: ProblemListVo, deleteImg: List<String>?, files: Array<MultipartFile>): String
fun changeProblem(problemId: String, files: Array<MultipartFile>): String
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
index 7e0fabe..f26f21f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
@@ -37,7 +37,7 @@
fun findByDayTaskID(taskId: String): List<SubtaskVo>
- fun findByDayTaskID(dayTaskId: String, userId: String, userType: String): List<Subtask>
+ fun findByDayTaskID(dayTaskId: String, userId: String, userType: String): List<SubtaskVo>
fun getTaskProgress(areaVo: AreaVo, userGuid: String): TaskVo
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt
index 7fd2799..8df2eeb 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt
@@ -39,4 +39,9 @@
* 鎼滅储绗笁鏂硅澶�
*/
fun searchThirdPartyDevice(areaVo: AreaVo, keyword: String, page: Int?, perPage: Int?): Pair<DataHead, List<DeviceSiteVo>>
+
+ /**
+ * 鍚屾涓や釜绯荤粺鍦烘櫙鐨勪笂涓嬬嚎鐘舵��
+ */
+ fun syncOnlineStatus()
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProductServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProductServiceImpl.kt
index 5441142..f8c7e74 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProductServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProductServiceImpl.kt
@@ -12,6 +12,7 @@
import cn.flightfeather.supervision.lightshare.service.DataProductService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
+import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt
import cn.flightfeather.supervision.model.dataproduct.DataProdOption
import cn.flightfeather.supervision.model.dataproduct.PPListProbRecurrence
import cn.flightfeather.supervision.model.dataproduct.PPListProblemChange
@@ -112,4 +113,13 @@
}
return res
}
+
+ override fun findProduct(queryOpt: QueryOpt, page: Int, perPage: Int) {
+ // 鏍规嵁浜у搧绫诲瀷缂栧彿銆佸尯鍩熴�佹椂娈点�佸満鏅被鍨嬨�侀厤缃甶d鏌ヨ
+ TODO("Not yet implemented")
+ }
+
+ override fun generateProduct(queryOpt: QueryOpt) {
+ TODO("Not yet implemented")
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
index 927627b..b06ee08 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
@@ -1,17 +1,20 @@
package cn.flightfeather.supervision.lightshare.service.impl
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
import cn.flightfeather.supervision.common.exception.BizException
+import cn.flightfeather.supervision.common.utils.*
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
import cn.flightfeather.supervision.domain.ds1.mapper.MediafileMapper
-import cn.flightfeather.supervision.common.utils.Constant
-import cn.flightfeather.supervision.common.utils.FileUtil
import cn.flightfeather.supervision.domain.ds1.entity.Inspection
+import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.domain.ds1.repository.InspectionRep
import cn.flightfeather.supervision.domain.ds1.repository.MediaFileRep
import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.lightshare.service.DomainitemService
import cn.flightfeather.supervision.lightshare.service.MediafileService
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
+import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import cn.flightfeather.supervision.lightshare.vo.MediaFileVo
import com.fasterxml.jackson.core.type.TypeReference
import org.springframework.beans.BeanUtils
@@ -21,7 +24,15 @@
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
+import tk.mybatis.mapper.entity.Example
import java.io.File
+import java.io.FileInputStream
+import java.io.FileOutputStream
+import java.nio.charset.StandardCharsets
+import java.time.LocalDateTime
+import java.time.ZoneId
+import java.util.*
+import javax.servlet.http.HttpServletResponse
@Service
@@ -32,6 +43,7 @@
private val subTaskRep: SubTaskRep,
private val sceneRep: SceneRep,
private val domainItemService: DomainitemService,
+ private val dbMapper: AopDbMapper,
@Value("\${filePath}") var filePath: String,
@Value("\${imgPath}") var imgPath: String,
) : MediafileService {
@@ -98,7 +110,9 @@
mapper.readValue<List<MediaFileVo>>(mediafileVoList, object : TypeReference<List<MediaFileVo>>() {})
if (mediaFileVos.isNotEmpty()) {
- mediaFileVos.forEach {
+ mediaFileVos.forEachIndexed { i, it ->
+ if (i >= files.size) return@forEachIndexed
+
val mediafile = Mediafile()
BeanUtils.copyProperties(it, mediafile)
@@ -108,17 +122,15 @@
if (reme == null) {
mediafileMapper.insert(mediafile)
}
- }
- //鏍规嵁鎵╁睍瀛楁1鑾峰彇淇濆瓨璺緞
- val path = mediaFileVos[0].extension1
- for (image in files) {
- val fileName = image.originalFilename
-
+ //鏍规嵁鎵╁睍瀛楁1鑾峰彇淇濆瓨璺緞
+ val path = it.extension1
+ val fileName = it.guid + ".jpg"
+ val image = files[i]
val filePath = "${imgPath}/$path/"
try {
//璋冪敤鏂囦欢淇濆瓨鏂规硶
- FileUtil.uploadFile(image.bytes, filePath, fileName!!)
+ FileUtil.uploadFile(image.bytes, filePath, fileName)
} catch (e: Exception) {
// TODO: handle exception
}
@@ -198,4 +210,97 @@
}
return res
}
+
+ override fun downloadPic(config: ExcelConfigVo, response: HttpServletResponse): HttpServletResponse {
+ val subSum = dbMapper.subtaskMapper.getSummaryByArea(AreaVo().apply {
+ provincecode = config.provinceCode
+ citycode = config.cityCode
+ districtcode = config.districtCode
+ starttime = LocalDateTime.ofInstant(config.startTime?.toInstant(), ZoneId.systemDefault())
+ endtime = LocalDateTime.ofInstant(config.endTime?.toInstant(), ZoneId.systemDefault())
+ scensetypeid = config.sceneType.toString()
+ })
+ if (subSum.isEmpty()) return response
+
+ val mediaList = mediafileMapper.selectByExample(Example(Mediafile::class.java).apply {
+ createCriteria().andIn("iguid", subSum.map { it.insGuid })
+ .apply {
+ if (!config.fileType.isNullOrEmpty()) {
+ andIn("businesstypeid", config.fileType)
+ }
+ }
+ })
+
+ //寤虹珛绗竴灞傜洰褰曪紝鍖呭惈鎵�鏈夌殑浠诲姟
+ val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
+ val basePath = imgPath + File.separator + "temp" + File.separator + time
+ FileUtil.mkDirs(basePath)
+
+ //寰幆寤虹珛绗簩灞傜洰褰曪紝鎸夌収鏃ユ湡鍒嗙被
+ subSum.groupBy { it.stPlanTime }.forEach { (date, sList) ->
+ //寤虹珛涓�涓棩鏈熸枃浠跺す
+ val datePath = "${basePath}${File.separator}${DateUtil.DateToString(date, DateUtil.DateStyle.YYYY_MM_DD)}"
+ FileUtil.mkDirs(datePath)
+
+ //寰幆寤虹珛绗笁灞傜洰褰曪紝鎸夌収宸℃煡浠诲姟鍒嗙被
+ sList.forEach {s ->
+ //寤虹珛涓�涓瓙浠诲姟鏂囦欢澶�
+ val subTaskFilePath = "${datePath}${File.separator}${StringUtil.numberFormat(s.sceneIndex, 3)} ${s.sceneName}"
+ FileUtil.mkDirs(subTaskFilePath)
+
+ //寰幆寤虹珛绗洓灞傜洰褰曪紝鎸夌収鍥剧墖绫诲瀷鍒嗙被
+ mediaList.filter { m-> m.iguid == s.insGuid }.groupBy { m-> m.businesstype }.forEach { (type, mList) ->
+ val mediaTypeFilePath = "${subTaskFilePath}${File.separator}${type}"
+ FileUtil.mkDirs(mediaTypeFilePath)
+
+ // 鍐欏叆鍥剧墖
+ mList.forEachIndexed { i, m->
+ val fromPicName = m.guid + ".jpg"
+ val picPath =
+ imgPath + File.separator + m.extension1 + fromPicName
+ val fromFile = File(picPath)
+ val picName = if (m.description != null) {
+ m.description!!.replace("/", "-")
+ .replace("\\", "-")
+ .replace("\n", "")
+ .replace(".", "(${i + 1}).")
+ } else {
+ fromPicName
+ }
+// val picName = fromPicName
+ val toFile = File(mediaTypeFilePath + File.separator + picName)
+ if (fromFile.exists()) {
+ FileUtil.copy(fromFile, toFile)
+ }
+ }
+ }
+ }
+ }
+
+ response.apply {
+ setHeader("Content-Disposition", "attachment;filename=$time.zip")
+ contentType = "application/octet-stream"
+ characterEncoding = StandardCharsets.UTF_8.name()
+ }
+
+ val zipFile = File("$basePath.zip")
+ val fos1 = FileOutputStream(zipFile)
+ ZipUtils.toZip(basePath, fos1, true)
+
+ val out = response.outputStream
+ val fis = FileInputStream(zipFile)
+
+ val buf = ByteArray(2 * 1024)
+ var len = fis.read(buf)
+ while (len != -1) {
+ out.write(buf, 0, len)
+ len = fis.read(buf)
+ }
+ out.flush()
+ out.close()
+ fis.close()
+ fos1.close()
+
+ return response
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
index add0297..1b7cae2 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -555,13 +555,13 @@
return "success"
}
- override fun updateProblem(problem: ProblemListVo, deleteImg: List<String>, files: Array<MultipartFile>): String {
+ override fun updateProblem(problem: ProblemListVo, deleteImg: List<String>?, files: Array<MultipartFile>): String {
problemRep.findOne(problem.guid) ?: throw BizException("璇ラ棶棰樹笉瀛樺湪")
problemRep.update(problem)
val inspection = inspectionMapper.selectByPrimaryKey(problem.iguid) ?: throw BizException("宸℃煡璁板綍涓嶅瓨鍦�")
val scene = scenseMapper.selectByPrimaryKey(inspection.sguid) ?: throw BizException("宸℃煡璁板綍瀵瑰簲鍦烘櫙涓嶅瓨鍦�")
mediafileService.saveMediaFile(files) { MediaFileVo.newProFile(inspection, problem, scene) }
- mediafileService.deleteList(deleteImg)
+ deleteImg?.let { mediafileService.deleteList(it) }
return "success"
}
@@ -615,9 +615,10 @@
val mediaFiles = mediafileMapper.selectByExample(Example(Mediafile::class.java).apply {
createCriteria().andEqualTo("businessguid", problemId)
.andEqualTo("businesstypeid", 1)
- .andEqualTo("ischanged", true)
+// .andEqualTo("ischanged", true)
})
- if (mediaFiles.isEmpty()) throw BizException("闂杩樻湭鏁存敼锛屾棤娉曚慨鏀规暣鏀�")
+ if (mediaFiles.isEmpty()) throw BizException("缂哄皯闂鍜屾暣鏀瑰浘鐗囷紝鏃犳硶淇敼")
+ if (p.ischanged != true) throw BizException("鏈暣鏀归棶棰樻棤娉曚慨鏀�")
// 淇濆瓨鏂扮殑鏁存敼鍥剧墖
val m = mediaFiles[0]
@@ -626,6 +627,7 @@
m.apply {
guid = UUIDGenerator.generate16ShortUUID()
description = p.problemname + " " + p.location + " 鏁存敼 " + UUIDGenerator.generateUUID(4) + ".jpg"
+ ischanged = true
}
}
mediafileService.deleteList(deleteImg)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
index d3c51fd..251713f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -1,7 +1,6 @@
package cn.flightfeather.supervision.lightshare.service.impl
import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
-import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds1.mapper.*
import cn.flightfeather.supervision.common.utils.Constant
@@ -104,7 +103,7 @@
return subtaskVoList
}
- override fun findByDayTaskID(dayTaskId: String, userId: String, userType: String): List<Subtask> {
+ override fun findByDayTaskID(dayTaskId: String, userId: String, userType: String): List<SubtaskVo> {
val example = Example(Subtask::class.java)
val criteria = example.createCriteria()
criteria.andEqualTo("tsguid", dayTaskId)
@@ -115,25 +114,31 @@
)
}
example.orderBy("name")
- val result = subtaskMapper.selectByExample(example).apply {
- forEach breaking@{
- //宸插鏍告彁绀�
- it.remark = Constant.PROBLEM_CHECK_PASS
-
- problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
- createCriteria().andEqualTo("stguid", it.stguid)
- and(
- createCriteria().orIsNull("remark")
- .orNotEqualTo("remark", Constant.PROBLEM_DELETED)
- )
- }).forEach { problem ->
- //瀛愪换鍔′腑鏈夐棶棰樻湭瀹℃牳鏃讹紝璁剧疆鏈鏍告彁绀�
- if (problem.extension3 == Constant.PROBLEM_UNCHECKED) {
- it.remark = Constant.PROBLEM_UNCHECKED
- return@breaking
- }
+ val result = subtaskMapper.selectByExample(example).map {
+ val vo = SubtaskVo()
+ BeanUtils.copyProperties(it, vo)
+ vo
+ }.onEach {
+ //宸插鏍告彁绀�
+ it.remark = Constant.PROBLEM_CHECK_PASS
+ problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", it.stguid)
+ and(
+ createCriteria().orIsNull("remark")
+ .orNotEqualTo("remark", Constant.PROBLEM_DELETED)
+ )
+ }).forEach { problem ->
+ //瀛愪换鍔′腑鏈夐棶棰樻湭瀹℃牳鏃讹紝璁剧疆鏈鏍告彁绀�
+ if (problem.extension3 == Constant.PROBLEM_UNCHECKED) {
+ it.remark = Constant.PROBLEM_UNCHECKED
}
}
+
+ // 鍦烘櫙绫诲瀷
+ scenseMapper.selectByPrimaryKey(it.scenseid)?.let { s->
+ it.sceneTypeId = s.typeid
+ it.sceneTypeName = s.type
+ }
}
return result
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
index aee2d25..987fb06 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
@@ -337,11 +337,14 @@
// 鑾峰彇鎬讳换鍔′笅鎵�鏈夌殑瀛愪换鍔�
val subTasks = subTaskRep.findAll(Subtask().apply { tguid = taskId })
- if (subTasks.isEmpty()) return emptyList()
// 鑾峰彇鎵�鏈夊瓙浠诲姟娑夊強鐨勫贰鏌ュ満鏅俊鎭�
- val sceneList = scenseMapper.selectByExample(Example(Scense::class.java).apply {
- createCriteria().andIn("guid", subTasks.map { it?.scenseid })
- })
+ val sceneList = if (subTasks.isEmpty()) {
+ emptyList()
+ } else {
+ scenseMapper.selectByExample(Example(Scense::class.java).apply {
+ createCriteria().andIn("guid", subTasks.map { it?.scenseid })
+ })
+ }
//鏍规嵁sql鏉′欢鏌ヨ
dayTasks.forEach { t ->
@@ -377,7 +380,7 @@
val userProgressMap = mutableMapOf<String, ProgressPerUserPerDay>()
filterSubTasks.forEach fst@{ fst ->
fst ?: return@fst
- // fixme 2025.11.30 鐢变簬鐩戠APP鐨刡ug锛屽鑷寸敤鎴峰彲浠ヤ笉閫夋嫨鎵ц浜哄憳鐩存帴鍒涘缓浠诲姟锛屾墍浠ユ殏鏃跺皢娌℃湁鎵ц浜哄憳鐨勪换鍔″畾涔変负鍖垮悕鐢ㄦ埛
+ // 2026.2.2 灏嗘病鏈夋墽琛屼汉鍛樼殑浠诲姟瀹氫箟涓哄尶鍚嶇敤鎴�
if (fst.executorguids.isNullOrBlank()) {
fst.executorguids = "niming"
fst.executorusernames = "niming"
@@ -400,8 +403,8 @@
// 褰撳涓汉涓�璧锋墽琛屽悓涓�浠诲姟鏃讹紝骞冲垎宸℃煡閲�
this.totalTaskNum += 1.0 / ids.size
if (fst.status == Constant.TaskProgress.RUNINGSTATUS3.text) {
+ this.completeTaskNum += 1.0 / ids.size
}
- this.completeTaskNum += 1.0 / ids.size
// 鍗曚汉鏁存敼鐜囩疮璁★紙璇勫垎锛�
this.totalProblemNum += proList.size.toDouble() / ids.size
@@ -741,7 +744,7 @@
override fun create(task: Task): Task {
val res = save(task)
if (res < 1)
- throw BizException("浠诲姟鍒涘缓澶辫触")
+ throw BizException("鎬讳换鍔℃垨褰撴棩浠诲姟鍒涘缓澶辫触")
else
return task
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt
index 5f4a5fb..2d26749 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt
@@ -164,4 +164,8 @@
): Pair<DataHead, List<DeviceSiteVo>> {
return aopDataDeviceMap.searchDevice(areaVo, keyword, page ?: 1, perPage ?: 30)
}
+
+ override fun syncOnlineStatus() {
+ TODO("Not yet implemented")
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt
index 2dbdce2..2060974 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt
@@ -30,4 +30,7 @@
// 鍐冲畾鏄惁缁熻鎬讳换鍔′笅鎵�鏈夌殑鍦烘櫙鎴栧彧缁熻绛涢�夊嚭鐨勫瓙浠诲姟瀵瑰簲鐨勫満鏅�
var allScene: Boolean = true,
+
+ // 濯掍綋鏂囦欢鐨勭被鍨�
+ var fileType: List<Int>? = null,
)
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubtaskVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubtaskVo.kt
index 6cd14dc..1cb5af8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubtaskVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubtaskVo.kt
@@ -1,122 +1,16 @@
package cn.flightfeather.supervision.lightshare.vo
+import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import com.fasterxml.jackson.annotation.JsonInclude
-import java.util.*
@JsonInclude(JsonInclude.Include.NON_NULL)
-public class SubtaskVo {
- var stguid: String? = null
+class SubtaskVo : Subtask() {
- /**
- * 鏈堜换鍔℃垨鍏朵粬椤跺眰浠诲姟锛屼笉涓虹┖
- */
- var tguid: String? = null
+ var sceneTypeId: Byte? = null
- /**
- * 鎵�灞炴棩鐨凾_GUID锛屽彲涓虹┖
- */
- var tsguid: String? = null
-
- var name: String? = null
-
- var priority: Boolean? = null
-
- var typeno: Byte? = null
-
- var type: String? = null
-
- var provincecode: String? = null
-
- var provincename: String? = null
-
- var citycode: String? = null
-
- var cityname: String? = null
-
- var districtcode: String? = null
-
- var districtname: String? = null
-
- var towncode: String? = null
-
- var townname: String? = null
-
- var scensename: String? = null
-
- var scenseid: String? = null
-
- var scenseTypeId: String? = null
-
- var scenseaddress: String? = null
-
- var deadlinetype: String? = null
-
- var planstarttime: Date? = null
+ var sceneTypeName: String? = null
var planstarttimestr: String? = null
- var planendtime: Date? = null
-
var planendtimestr: String? = null
-
- var deployerguid: String? = null
-
- var deployerusername: String? = null
-
- var deployerrealname: String? = null
-
- var deploytime: Date? = null
-
- var executionstarttime: Date? = null
-
- var executionendtime: Date? = null
-
- var executorguids: String? = null
-
- var executorusernames: String? = null
-
- /**
- * 涓庣敤鎴疯〃鐢ㄦ埛鍚嶅叧鑱�,鐢ㄢ��&鈥濊繛鎺ュ浜猴紝渚嬪锛氬紶涓�&鏉庡洓&鐜嬩簲
- */
- var executorrealtimes: String? = null
-
- /**
- * 鏈墽琛屻�佹鍦ㄦ墽琛屻�佸凡缁撴潫
- */
- var status: String? = null
-
- var notifedcount: Int? = null
-
- /**
- * ER_GUID鐨勯泦鍚堬紝澶氫釜鏃垛��,鈥濆垎鍓诧紝鑷姩鍖归厤鍦烘櫙锛屽悓绫诲満鏅涓�冩牳瑙勮寖鏃讹紝鐜板満宸℃煡鏃讹紝鍙崟閫夋垨澶氶�夈��
- */
- var rulelist: String? = null
-
- var stAssessorguid: String? = null
-
- var assessorusername: String? = null
-
- var assessorrealname: String? = null
-
- var assesstime: Date? = null
-
- var assessresult: String? = null
-
- var thirdassessorguid: String? = null
-
- var thirdassessorusername: String? = null
-
- var thirdassessorrealname: String? = null
-
- var thirdassesstime: Date? = null
-
- var thirdassessresult: String? = null
-
- var extension1: String? = null
-
- var extension2: String? = null
-
- var extension3: String? = null
-
- var remark: String? = null
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt
index 11877b8..851e176 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt
@@ -11,7 +11,13 @@
* @author feiyu02
*/
@ApiModel("鏌ヨ鍙傛暟")
-class QueryOpt {
+open class QueryOpt {
+ @ApiModelProperty("浜у搧缂栧彿")
+ var prodId: String? = null
+
+ @ApiModelProperty("閰嶇疆缂栧彿", notes = "0琛ㄧず鏈娇鐢ㄩ厤缃殑鑷畾涔夋椂娈典骇鍝�")
+ var configId: Int = 0
+
@ApiModelProperty("鎬讳换鍔d")
var topTaskId: String? = null
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt
index f1527b8..0e42146 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt
@@ -1,9 +1,7 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
-import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
-import java.time.LocalDateTime
/**
* 鍗曚釜鍦烘櫙绾靛悜鏁版嵁缁熻浜у搧鏌ヨ鏉′欢
@@ -11,16 +9,8 @@
* @author feiyu02
*/
@ApiModel("鍗曚釜鍦烘櫙绾靛悜鏁版嵁缁熻浜у搧鏌ヨ鏉′欢")
-class QueryOptSingle {
+class QueryOptSingle : QueryOpt() {
@ApiModelProperty("鍦烘櫙id")
var sceneId: String? = null
-
- @ApiModelProperty("璧峰鏃堕棿锛屾牸寮� yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- var startTime: LocalDateTime? = null
-
- @ApiModelProperty("缁撴潫鏃堕棿锛屾牸寮� yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- var endTime: LocalDateTime? = null
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProductController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProductController.kt
index 84a144c..232286c 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProductController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProductController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.lightshare.service.DataProductService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
+import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt
import cn.flightfeather.supervision.model.dataproduct.DataProdOption
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
@@ -42,4 +43,32 @@
fun problemRecurrence(
@ApiParam("鏌ヨ鏉′欢") @RequestBody option: DataProdOption,
) = dataProductService.problemRecurrence(option)
+
+
+
+
+
+
+ @ApiOperation(value = "鏌ヨ鏁版嵁浜у搧椤瑰強瀵瑰簲鐨勭粺璁$姸鎬�")
+ @GetMapping("/type/query")
+ fun findProductType(
+ @ApiParam("浜у搧绫诲瀷", allowableValues = "base, middle, final", format = "base") @RequestParam types: String,
+ ) {
+
+ }
+
+ @ApiOperation(value = "鏌ヨ鏁版嵁浜у搧璁板綍")
+ @PostMapping("/record/query")
+ fun findProduct(
+ @ApiParam("鏌ヨ鏉′欢") @RequestBody queryOpt: QueryOpt,
+ @ApiParam("椤电爜") @RequestParam(value = "page", required = false, defaultValue = "1") page: Int?,
+ @ApiParam("鍗曢〉鏁版嵁閲�") @RequestParam(value = "perPage", required = false, defaultValue = "30") perPage: Int?,
+ ) {
+ // 鏍规嵁浜у搧绫诲瀷缂栧彿銆佸尯鍩熴�佹椂娈点�佸満鏅被鍨嬨�侀厤缃甶d鏌ヨ
+ return dataProductService.findProduct(queryOpt, page ?: 1, perPage ?: 30)
+ }
+
+// @ApiOperation(value = "鐢熸垚鏁版嵁浜у搧")
+// @PostMapping("/generate")
+// fun generateProduct() = dataProductService.generateProduct()
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
index 748035d..1c49df8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
@@ -3,11 +3,14 @@
import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
import cn.flightfeather.supervision.lightshare.service.MediafileService
+import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
import org.springframework.web.multipart.MultipartFile
+import springfox.documentation.annotations.ApiIgnore
+import javax.servlet.http.HttpServletResponse
@Api(tags = ["MediafileController"], description = "澶氬獟浣撴枃浠禔PI鎺ュ彛")
@RestController
@@ -56,4 +59,12 @@
@ApiParam("宸℃煡璁板綍id", required = false) @RequestParam(required = false) iGuid: String?,
@ApiParam("宸℃煡浠诲姟id", required = false) @RequestParam(required = false) stGuid: String?,
) = mediafileService.getRoutineRecord(iGuid, stGuid)
+
+ @IgnoreResponseAdvice
+ @ApiOperation("涓嬭浇鍥剧墖")
+ @PostMapping("/pic/download")
+ fun downloadPic(
+ @RequestBody config: ExcelConfigVo,
+ @ApiIgnore response: HttpServletResponse
+ ) = mediafileService.downloadPic(config, response)
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
index cb60564..f5f1c15 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
@@ -127,7 +127,7 @@
@PostMapping("/updateProblem")
fun updateProblem(
@ApiParam("闂淇℃伅json") @RequestParam("problem") problem: String,
- @ApiParam("鍒犻櫎鐨勯棶棰樺浘鐗噄d") @RequestParam("deleteImg") deleteImg: List<String>,
+ @ApiParam("鍒犻櫎鐨勯棶棰樺浘鐗噄d") @RequestParam("deleteImg", required = false) deleteImg: List<String>?,
@ApiParam("闂鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
): String {
val problemVo = ObjectMapper().readValue(problem, object : TypeReference<ProblemListVo>() {})
diff --git a/src/main/resources/application-pro-https.yml b/src/main/resources/application-pro-https.yml
index d55fa7e..90f08ae 100644
--- a/src/main/resources/application-pro-https.yml
+++ b/src/main/resources/application-pro-https.yml
@@ -15,6 +15,12 @@
configuration:
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+springfox:
+ documentation:
+ swagger:
+ v2:
+ enabled: true
+
imgPath: D:/02product/04supervision/images/
filePath: D:/02product/04supervision/files/
mode: prohttps
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt b/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt
index 070a972..2fc3125 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt
@@ -22,12 +22,8 @@
@Test
fun findStr() {
- val str = "http://114.233.144.555:9006/asdasd/asdasd"
- val url = str.split("://")[1].split("/")[0]
- val newStr = str.replace(url, "224.55.2.12:8085")
-// val i1 = str.indexOf("://")
-// val i2 = str.indexOf("/")
- println(str)
- println(newStr)
+ val m = "cOm7.jpg"
+ val m1 = m.replace("/", "-").replace(".", "(${0 + 1}).")
+ println(m1)
}
}
\ No newline at end of file
--
Gitblit v1.9.3