| | |
| | | package com.terra.system.controller.data.upload; |
| | | |
| | | import com.terra.system.annotation.SysLog; |
| | | import com.terra.system.entity.all.ResponseMsg; |
| | | import com.terra.common.annotation.SysLog; |
| | | import com.terra.common.entity.all.ResponseMsg; |
| | | import com.terra.system.entity.ctrl.KeyValueEntity; |
| | | import com.terra.system.entity.data.DirEntity; |
| | | import com.terra.system.entity.data.MetaEntity; |
| | | import com.terra.system.entity.data.MetaFileEntity; |
| | | import com.terra.system.entity.data.VerEntity; |
| | | import com.terra.system.entity.sys.UserEntity; |
| | | import com.terra.system.helper.StringHelper; |
| | | import com.terra.common.helper.StringHelper; |
| | | import com.terra.system.service.all.UploadAttachService; |
| | | import com.terra.system.service.data.UploadService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import javax.annotation.Resource; |
| | | |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | * 数据入库 |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "数据管理\\数据上传") |
| | | @Tag(name = "数据管理\\数据上传") |
| | | @RestController |
| | | @RequestMapping("/dataUpload") |
| | | public class UploadController extends QueryController { |
| | |
| | | UploadAttachService uploadAttachService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询路径") |
| | | @Operation(summary = "查询路径") |
| | | @GetMapping(value = "/selectPath") |
| | | public ResponseMsg<String> selectPath() { |
| | | try { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "上传文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query") |
| | | @Operation(summary = "上传文件") |
| | | @Parameters({ |
| | | @Parameter(name = "path", description = "路径", in = ParameterIn.QUERY) |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/uploadFiles") |
| | |
| | | * formData.append("ids", 1209); formData.append("ids", 1180); formData.append("ids", 1387); |
| | | */ |
| | | @SysLog() |
| | | @ApiOperation(value = "上传Excel附件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "ids", value = "元数据集合", dataType = "Integer", allowMultiple = true, paramType = "query") |
| | | @Operation(summary = "上传Excel附件") |
| | | @Parameters({ |
| | | @Parameter(name = "path", description = "路径", in = ParameterIn.QUERY), |
| | | @Parameter(name = "ids", description = "元数据集合", schema = @Schema(type = "array"), in = ParameterIn.QUERY) |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/uploadXlsAnnex") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query") |
| | | @Operation(summary = "查询文件") |
| | | @Parameters({ |
| | | @Parameter(name = "path", description = "路径", in = ParameterIn.QUERY) |
| | | }) |
| | | @GetMapping(value = "/selectFiles") |
| | | public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "MetaEntity", paramType = "body") |
| | | @Operation(summary = "删除文件") |
| | | @Parameters({ |
| | | @Parameter(name = "list", description = "实体类集合") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/deleteFiles") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询映射") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20230722"), |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "verid", value = "版本ID", dataType = "Integer", paramType = "query", example = "0"), |
| | | @ApiImplicitParam(name = "epsgCode", value = "坐标编码", dataType = "String", paramType = "query", example = "EPSG:4490") |
| | | @Operation(summary = "查询映射") |
| | | @Parameters({ |
| | | @Parameter(name = "path", description = "路径", in = ParameterIn.QUERY, example = "20230722"), |
| | | @Parameter(name = "dirid", description = "目录ID", in = ParameterIn.QUERY, example = "1"), |
| | | @Parameter(name = "verid", description = "版本ID", in = ParameterIn.QUERY, example = "0"), |
| | | @Parameter(name = "epsgCode", description = "坐标编码", in = ParameterIn.QUERY, example = "EPSG:4490") |
| | | }) |
| | | @GetMapping(value = "/selectMappers") |
| | | public ResponseMsg<Object> selectMappers(String path, Integer dirid, Integer verid, String epsgCode, HttpServletRequest req) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "元数据文件集合", dataType = "MetaFileEntity", paramType = "body") |
| | | @Operation(summary = "插入文件") |
| | | @Parameters({ |
| | | @Parameter(name = "list", description = "元数据文件集合") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/insertFiles") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入KML文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "元数据文件集合", dataType = "MetaFileEntity", paramType = "body") |
| | | @Operation(summary = "插入KML文件") |
| | | @Parameters({ |
| | | @Parameter(name = "list", description = "元数据文件集合") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/insertKml") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除元数据") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") |
| | | @Operation(summary = "删除元数据") |
| | | @Parameters({ |
| | | @Parameter(name = "ids", description = "ID数组", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "1") |
| | | }) |
| | | @GetMapping(value = "/deleteMetas") |
| | | public ResponseMsg<Integer> deleteMetas(@RequestParam List<Integer> ids) { |