管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-01-10 a5de74e84d74eef4543e56b1181a5b4b269212e1
src/main/java/com/lf/server/controller/data/upload/UploadController.java
@@ -3,14 +3,11 @@
import com.lf.server.annotation.SysLog;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.all.StaticData;
import com.lf.server.entity.ctrl.TabMapperEntity;
import com.lf.server.entity.ctrl.UploadEntity;
import com.lf.server.entity.data.DirEntity;
import com.lf.server.entity.data.MetaEntity;
import com.lf.server.entity.data.MetaFileEntity;
import com.lf.server.entity.data.VerEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.StringHelper;
import com.lf.server.helper.WebHelper;
import com.lf.server.service.data.UploadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -113,13 +110,14 @@
    @ApiImplicitParams({
            @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20230109010101"),
            @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")
    })
    @GetMapping(value = "/selectMappers")
    public ResponseMsg<Object> selectMappers(String path, Integer dirid, String epsgCode) {
    public ResponseMsg<Object> selectMappers(String path, Integer dirid, Integer verid, String epsgCode, HttpServletRequest req) {
        try {
            if (StringHelper.isEmpty(path) || StringHelper.isEmpty(epsgCode) || null == dirid) {
                return fail("路径、目录ID和坐标编码不能为空");
            if (StringHelper.isEmpty(path) || StringHelper.isEmpty(epsgCode) || null == dirid || null == verid) {
                return fail("路径、目录ID、版本ID和坐标编码不能为空");
            }
            if (1 > uploadService.selectCount4Coord(epsgCode)) {
                return fail("坐标编码" + epsgCode + "不存在");
@@ -128,8 +126,13 @@
            if (null == dir) {
                return fail("目录ID=" + dirid + "不存在");
            }
            VerEntity ver = verService.selectVersion(verid);
            if (null == ver) {
                return fail("版本ID=" + verid + "不存在");
            }
            List<TabMapperEntity> list = uploadService.selectMappers(path);
            UserEntity ue = tokenService.getCurrentUser(req);
            List<MetaFileEntity> list = uploadService.selectMappers(ue, path, dir, ver, epsgCode);
            return success(list);
        } catch (Exception ex) {
@@ -137,7 +140,7 @@
        }
    }
    @SysLog()
    /*@SysLog()
    @ApiOperation(value = "插入文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "上传实体类", dataType = "UploadEntity", paramType = "body")
@@ -203,7 +206,7 @@
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    }*/
    @SysLog()
    @ApiOperation(value = "删除元数据")