管道基础大数据平台系统开发-【后端】-Server
13693261870
2023-06-10 dc1ad2b146bd1f66b4f411d02cc920ccc80ec88e
src/main/java/com/lf/server/controller/all/BaseQueryController.java
@@ -28,6 +28,7 @@
import com.lf.server.service.show.DataLibService;
import com.lf.server.service.sys.AttachService;
import com.lf.server.service.sys.DepService;
import com.lf.server.service.sys.DownlogService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -64,7 +65,10 @@
    DataLibService dataLibService;
    @Autowired
    DownloadService downloadService;
    public DownlogService downlogService;
    @Autowired
    public DownloadService downloadService;
    @Autowired
    BaseQueryService baseQueryService;
@@ -196,7 +200,7 @@
            if (StringHelper.isEmpty(wkt)) {
                return fail("WKT不能为空", null);
            }
            if (null == limit || limit < 1 || limit > StaticData.ONE_HUNDRED) {
            if (null == limit || limit < 1 || limit > StaticData.I100) {
                limit = 20;
            }
            if (null == buffer || buffer < 0 || buffer > StaticData.ONE_HUNDRED_THOUSAND) {
@@ -573,6 +577,32 @@
    }
    @SysLog()
    @ApiOperation(value = "查询元数据中溢出的单位ID")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "reqEntity", value = "请求下载实体", dataType = "DownloadReqEntity", paramType = "body")
    })
    @ResponseBody
    @PostMapping(value = "/selectMetaOverflowDep")
    public ResponseMsg<Object> selectMetaOverflowDep(@RequestBody DownloadReqEntity dr, HttpServletRequest req, HttpServletResponse res) {
        try {
            if (null == dr || null == dr.getIds() || dr.getIds().isEmpty()) {
                return fail("请选择要下载的文件ID");
            }
            UserEntity ue = tokenService.getCurrentUser(req);
            if (StaticData.ADMIN.equals(ue.getUid())) {
                return success(new ArrayList<String>());
            }
            List<String> list = metaService.selectMetaOverflowDep(ue, dr);
            return success(list);
        } catch (Exception ex) {
            return fail(ex, null);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询DB中溢出的单位ID")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "reqEntity", value = "请求下载实体", dataType = "DownloadReqEntity", paramType = "body")
@@ -684,11 +714,11 @@
                return fail("用户未登录", null);
            }
            int count = downloadService.selectCountForUser(ue.getId(), 4, name);
            int count = downloadService.selectCountForUser(ue.getId(), "3,4", name);
            if (count == 0) {
                return success(0, null);
            }
            List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 4, name, pageSize, pageSize * (pageIndex - 1));
            List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "3,4", name, pageSize, pageSize * (pageIndex - 1));
            return success(count, rs);
        } catch (Exception ex) {