13693261870
昨天 32eb942e25aa366563b7f40b05a382c0c462213c
se-system/src/main/java/com/terra/system/controller/data/PublishController.java
@@ -1,26 +1,28 @@
package com.terra.system.controller.data;
import com.terra.system.annotation.SysLog;
import com.terra.system.controller.all.BaseController;
import com.terra.system.entity.all.ResponseMsg;
import com.terra.system.entity.all.StaticData;
import com.terra.common.annotation.SysLog;
import com.terra.common.controller.all.BaseController;
import com.terra.common.entity.all.ResponseMsg;
import com.terra.common.entity.all.StaticData;
import com.terra.system.entity.ctrl.PubEntity;
import com.terra.system.entity.data.MetaEntity;
import com.terra.system.entity.data.PublishEntity;
import com.terra.system.entity.sys.UserEntity;
import com.terra.system.helper.PathHelper;
import com.terra.system.helper.StringHelper;
import com.terra.system.helper.WebHelper;
import com.terra.common.helper.StringHelper;
import com.terra.common.helper.WebHelper;
import com.terra.system.service.data.MetaService;
import com.terra.system.service.data.PublishService;
import com.terra.system.service.data.RasterService;
import com.terra.system.service.sys.LayerService;
import com.terra.system.service.sys.TokenService;
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 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.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -33,7 +35,7 @@
 * 数据发布
 * @author WWW
 */
@Api(tags = "数据管理\\发布管理")
@Tag(name = "数据管理\\发布管理")
@RestController
@RequestMapping("/publish")
public class PublishController extends BaseController {
@@ -55,9 +57,9 @@
    @Resource
    PathHelper pathHelper;
    @ApiOperation(value = "测试查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "seconds", value = "秒", dataType = "Integer", paramType = "query", example = "30")
    @Operation(summary = "测试查询")
    @Parameters({
            @Parameter(name = "seconds", description = "秒", in = ParameterIn.QUERY, example = "30")
    })
    @GetMapping(value = "/selectForTest")
    public ResponseMsg<Object> selectForTest(Integer seconds) {
@@ -75,15 +77,15 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询元数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "depcode", value = "单位编码", dataType = "String", paramType = "query", example = "00"),
            @ApiImplicitParam(name = "dircode", value = "目录编码", dataType = "String", paramType = "query", example = "01"),
            @ApiImplicitParam(name = "verid", value = "版本ID", dataType = "Integer", paramType = "query", example = "0"),
            @ApiImplicitParam(name = "type", value = "类别", dataType = "String", paramType = "query", example = "DOM"),
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = ""),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "分页查询元数据")
    @Parameters({
            @Parameter(name = "depcode", description = "单位编码", in = ParameterIn.QUERY, example = "00"),
            @Parameter(name = "dircode", description = "目录编码", in = ParameterIn.QUERY, example = "01"),
            @Parameter(name = "verid", description = "版本ID", in = ParameterIn.QUERY, example = "0"),
            @Parameter(name = "type", description = "类别", in = ParameterIn.QUERY, example = "DOM"),
            @Parameter(name = "name", description = "名称", in = ParameterIn.QUERY, example = ""),
            @Parameter(name = "pageSize", description = "每页条数", in = ParameterIn.QUERY, example = "10"),
            @Parameter(name = "pageIndex", description = "分页数(从1开始)", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectMetasByPage")
    public ResponseMsg<Object> selectMetasByPage(String depcode, String dircode, Integer verid, String type, String name, Integer pageSize, Integer pageIndex) {
@@ -164,13 +166,13 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = ""),
            @ApiImplicitParam(name = "dircode", value = "目录", dataType = "String", paramType = "query", example = ""),
            @ApiImplicitParam(name = "type", value = "类别", dataType = "String", paramType = "query", example = ""),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "分页查询并返回记录数")
    @Parameters({
            @Parameter(name = "name", description = "名称", in = ParameterIn.QUERY, example = ""),
            @Parameter(name = "dircode", description = "目录", in = ParameterIn.QUERY, example = ""),
            @Parameter(name = "type", description = "类别", in = ParameterIn.QUERY, example = ""),
            @Parameter(name = "pageSize", description = "每页条数", in = ParameterIn.QUERY, example = "10"),
            @Parameter(name = "pageIndex", description = "分页数(从1开始)", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectByPageAndCount")
    public ResponseMsg<List<PublishEntity>> selectByPageAndCount(String name, String dircode, String type, Integer pageSize, Integer pageIndex) {
@@ -224,9 +226,9 @@
    }
    @SysLog()
    @ApiOperation(value = "根据ID查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1")
    @Operation(summary = "根据ID查询")
    @Parameters({
            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectById")
    public ResponseMsg<PublishEntity> selectById(int id) {
@@ -240,9 +242,9 @@
    }
    @SysLog()
    @ApiOperation(value = "查询Las文件坐标系ID")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "元数据ID集合", dataType = "Integer[]", paramType = "query", example = "10483,10481,10456,10285")
    @Operation(summary = "查询Las文件坐标系ID")
    @Parameters({
            @Parameter(name = "ids", description = "元数据ID集合", schema = @Schema(type = "array"), in = ParameterIn.QUERY, example = "10483,10481,10456,10285")
    })
    @GetMapping(value = "/selectLasCs")
    public ResponseMsg<Object> selectLasCs(Integer[] ids, HttpServletRequest req) {
@@ -265,9 +267,9 @@
    }
    @SysLog()
    @ApiOperation(value = "查询栅格数据的坐标系ID")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "元数据ID集合", dataType = "Integer[]", paramType = "query", example = "10531,10527,10526")
    @Operation(summary = "查询栅格数据的坐标系ID")
    @Parameters({
            @Parameter(name = "ids", description = "元数据ID集合", schema = @Schema(type = "array"), in = ParameterIn.QUERY, example = "10531,10527,10526")
    })
    @GetMapping(value = "/selectRasterCs")
    public ResponseMsg<Object> selectRasterCs(Integer[] ids, HttpServletRequest req) {
@@ -313,11 +315,11 @@
    }
    @SysLog()
    @ApiOperation(value = "查询坐标转换")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "x", value = "X坐标", dataType = "double", paramType = "query", example = "400925.079"),
            @ApiImplicitParam(name = "y", value = "Y坐标", dataType = "double", paramType = "query", example = "2541768.173"),
            @ApiImplicitParam(name = "epsg", value = "EPSG编码", dataType = "int", paramType = "query", example = "4548")
    @Operation(summary = "查询坐标转换")
    @Parameters({
            @Parameter(name = "x", description = "X坐标", in = ParameterIn.QUERY, example = "400925.079"),
            @Parameter(name = "y", description = "Y坐标", in = ParameterIn.QUERY, example = "2541768.173"),
            @Parameter(name = "epsg", description = "EPSG编码", in = ParameterIn.QUERY, example = "4548")
    })
    @GetMapping(value = "/selectCsTransform")
    public Object selectCsTransform(double x, double y, int epsg) {
@@ -329,9 +331,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入发布数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "PubEntity", paramType = "body")
    @Operation(summary = "插入发布数据")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @PostMapping(value = "/insertForPub", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Object> insertForPub(@RequestBody PubEntity entity, HttpServletRequest req) {
@@ -384,9 +386,9 @@
    }
    @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 = "/deletes")
    public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids, HttpServletRequest req) {
@@ -414,9 +416,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "PublishEntity", paramType = "body")
    @Operation(summary = "更新一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @ResponseBody
    @PostMapping(value = "/update", produces = "application/json; charset=UTF-8")