|
@@ -46,8 +46,8 @@ import com.persagy.service.models.responses.SBaseResponse
|
|
|
import com.persagy.service.models.responses.SCountResponse
|
|
|
import com.persagy.service.models.responses.SCreateResponse
|
|
|
import com.persagy.service.models.responses.SQueryResponse
|
|
|
-import io.swagger.annotations.Api
|
|
|
-import io.swagger.annotations.ApiOperation
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag
|
|
|
+import io.swagger.v3.oas.annotations.Operation
|
|
|
import org.slf4j.LoggerFactory
|
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
|
import org.springframework.web.bind.annotation.*
|
|
@@ -58,7 +58,7 @@ import java.util.*
|
|
|
*
|
|
|
* @author jxing
|
|
|
*/
|
|
|
-@Api(tags = ["模型文件接口"])
|
|
|
+@Tag(name = "模型文件接口")
|
|
|
@RestController
|
|
|
@RequestMapping("/model-file")
|
|
|
class ModelFileController {
|
|
@@ -94,7 +94,7 @@ class ModelFileController {
|
|
|
* @param idList 删除列表
|
|
|
* @return 删除结果应答信息
|
|
|
*/
|
|
|
- @ApiOperation(value = "删除模型文件(只有记录, 文件不动)", notes = "")
|
|
|
+ @Operation(summary = "删除模型文件(只有记录, 文件不动)", description = "")
|
|
|
@PostMapping(value = ["/delete"])
|
|
|
fun delete(@RequestBody idList: ArrayList<ModelFile>): SBaseResponse {
|
|
|
return dataService.modelFileService.deleteByKeysList(idList)
|
|
@@ -106,7 +106,7 @@ class ModelFileController {
|
|
|
* @param modelFile 要删除的模型文件
|
|
|
* @return 删除结果应答信息
|
|
|
*/
|
|
|
- @ApiOperation(value = "删除模型文件 (真删除模型文件, 模型文件记录做删除标记, 有个别情况不允许删除文件)", notes = "")
|
|
|
+ @Operation(summary = "删除模型文件 (真删除模型文件, 模型文件记录做删除标记, 有个别情况不允许删除文件)", description = "")
|
|
|
@PostMapping(value = ["/delete-file"])
|
|
|
fun deleteFile(@RequestBody modelFile: ModelFile): SBaseResponse {
|
|
|
return modelFileService.removeSingle(modelFile, properties, isForce = modelFile.isForce?:false, isMarkDelete = true)
|
|
@@ -119,7 +119,7 @@ class ModelFileController {
|
|
|
* @param request 更新请求
|
|
|
* @return 更新结果应答信息
|
|
|
*/
|
|
|
- @ApiOperation(value = "更新模型记录, 并非文件", notes = "")
|
|
|
+ @Operation(summary = "更新模型记录, 并非文件", description = "")
|
|
|
@PostMapping(value = ["/update"])
|
|
|
fun update(@RequestBody request: SUpdateRequest<ModelFile>): SBaseResponse {
|
|
|
return dataService.modelFileService.updateList(request)
|
|
@@ -131,7 +131,7 @@ class ModelFileController {
|
|
|
* @param request 查询请求
|
|
|
* @return 查询结果应答信息
|
|
|
*/
|
|
|
- @ApiOperation(value = "查询模型文件", notes = "")
|
|
|
+ @Operation(summary = "查询模型文件", description = "")
|
|
|
@PostMapping(value = ["/query"])
|
|
|
fun query(@RequestBody request: SQueryRequest): SQueryResponse<ModelFile> {
|
|
|
if(SPageContext.getHeader("ProjectId") != null && SPageContext.getHeader("ProjectId")!!.isNotEmpty())
|
|
@@ -145,7 +145,7 @@ class ModelFileController {
|
|
|
* @param entity 实体
|
|
|
* @return 创建结果应答信息
|
|
|
*/
|
|
|
- @ApiOperation(value = "创建模型文件", notes = "")
|
|
|
+ @Operation(summary = "创建模型文件", description = "")
|
|
|
@PostMapping(value = ["/create"])
|
|
|
fun create(@RequestBody entity: SCreateRequest<ModelFile>): SCreateResponse<ModelFile> {
|
|
|
entity.content.stream().forEach { x ->
|
|
@@ -160,7 +160,7 @@ class ModelFileController {
|
|
|
// */
|
|
|
// @PostMapping("/uploadaa")
|
|
|
// @ResponseBody
|
|
|
-// @ApiOperation(value = "上传模型文件接口", notes = "")
|
|
|
+// @Operation(summary = "上传模型文件接口", description = "")
|
|
|
// fun multiUpload(@RequestParam("file") file: MultipartFile, @RequestParam("model") modelFile: ModelFile): SBaseResponse {
|
|
|
// try {
|
|
|
// // 检查是否可以上传(所属楼层模型是否存在, 是否有人正在上传模型), 检测文件是否正常
|
|
@@ -220,7 +220,7 @@ class ModelFileController {
|
|
|
*/
|
|
|
@PostMapping("/upload")
|
|
|
@ResponseBody
|
|
|
- @ApiOperation(value = "准备分片上传模型文件接口", notes = "")
|
|
|
+ @Operation(summary = "准备分片上传模型文件接口", description = "")
|
|
|
fun multipartUpload(@RequestBody request: UploadModelRequest): SBaseResponse {
|
|
|
try {
|
|
|
modelFileService.checkUploadInputValid(request)
|
|
@@ -259,7 +259,7 @@ class ModelFileController {
|
|
|
|
|
|
@PostMapping("/merge")
|
|
|
@ResponseBody
|
|
|
- @ApiOperation(value = "在完成分片上传之后, 合并所有已上传的分片接口", notes = "")
|
|
|
+ @Operation(summary = "在完成分片上传之后, 合并所有已上传的分片接口", description = "")
|
|
|
fun mergeMultipartUpload(@RequestBody request: MergeMultipartRequest): SBaseResponse {
|
|
|
try{
|
|
|
modelFileService.checkMergeUploadInputValid(request)
|
|
@@ -299,7 +299,7 @@ class ModelFileController {
|
|
|
@Autowired
|
|
|
lateinit var producer: JMSProducer
|
|
|
|
|
|
- @ApiOperation(value = "测试发送JMS消息", notes = "")
|
|
|
+ @Operation(summary = "测试发送JMS消息", description = "")
|
|
|
@PostMapping(value = ["/sendmsg"])
|
|
|
fun testJMS(@RequestBody request: String) : SBaseResponse{
|
|
|
try {
|
|
@@ -313,7 +313,7 @@ class ModelFileController {
|
|
|
/**
|
|
|
* 根据条件查询统计数量
|
|
|
*/
|
|
|
- @ApiOperation(value = "根据条件查询统计数量", notes = "")
|
|
|
+ @Operation(summary = "根据条件查询统计数量", description = "")
|
|
|
@PostMapping(value = ["/count"])
|
|
|
fun count(@RequestBody request: SCountRequest): SCountResponse {
|
|
|
val sb = StringBuilder()
|
|
@@ -334,7 +334,7 @@ class ModelFileController {
|
|
|
// */
|
|
|
// @PostMapping("/upload")
|
|
|
// @ResponseBody
|
|
|
-// @ApiOperation(value = "上传模型文件接口", notes = "")
|
|
|
+// @Operation(summary = "上传模型文件接口", description = "")
|
|
|
// fun multiUpload(request : HttpServletRequest, @RequestParam("note") note: String) : String {
|
|
|
// val multipartRequest = request as MultipartHttpServletRequest
|
|
|
// val jsonTxt = note
|
|
@@ -357,7 +357,7 @@ class ModelFileController {
|
|
|
/**
|
|
|
* 模型文件json数据导入
|
|
|
*/
|
|
|
- @ApiOperation(value = "模型文件json数据导入", notes = "")
|
|
|
+ @Operation(summary = "模型文件json数据导入", description = "")
|
|
|
@GetMapping(value = ["/export"])
|
|
|
fun export(@RequestParam modelId: String): SBaseResponse {
|
|
|
try {
|
|
@@ -368,7 +368,7 @@ class ModelFileController {
|
|
|
// 解析json
|
|
|
jsonData = jsonAnalyzerService.analyzeJsonzFile(fileStream)
|
|
|
val importResult = jsonAnalyzerService.importModelData(jsonData!!, "")
|
|
|
- return SBaseResponse(SResponseType.success)
|
|
|
+ return importResult
|
|
|
}catch (e : Exception){
|
|
|
return SBaseResponse(SResponseType.failure, e.message?: "")
|
|
|
}
|