data/db_cx.sql | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/controller/all/BaseQueryController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/controller/show/DataLibController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/controller/show/InquiryController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/entity/all/StaticData.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/entity/ctrl/DownloadTileEntity.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
data/db_cx.sql
@@ -21,7 +21,7 @@ select * from lf.sys_layer order by id desc; select * from lf.sys_fme_log order by id desc; select top, bottom, top -(bottom - top) from public.coal2000 order by gid limit 100; select gid, top, bottom, top -(bottom - top) from public.coal2000 order by gid limit 20; update public.coal2000 set bottom = top -(bottom - top); 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; src/main/java/com/lf/server/controller/show/DataLibController.java
@@ -55,12 +55,6 @@ DataLibService dataLibService; @Autowired DownlogService downlogService; @Autowired DownloadService downloadService; @Autowired BaseQueryService baseQueryService; @Autowired src/main/java/com/lf/server/controller/show/InquiryController.java
@@ -2,17 +2,23 @@ import com.lf.server.annotation.SysLog; import com.lf.server.controller.all.BaseQueryController; import com.lf.server.entity.all.HttpStatus; import com.lf.server.entity.all.ResponseMsg; import com.lf.server.entity.all.StaticData; import com.lf.server.entity.ctrl.DownloadTileEntity; import com.lf.server.entity.ctrl.ShpRecordEntity; import com.lf.server.entity.data.DownloadEntity; import com.lf.server.entity.data.MetaFileEntity; import com.lf.server.entity.sys.UserEntity; import com.lf.server.helper.AesHelper; import com.lf.server.helper.StringHelper; import com.lf.server.helper.WebHelper; import com.lf.server.service.all.BaseUploadService; import com.lf.server.service.show.InquiryService; import com.lf.server.service.sys.TokenService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -64,4 +70,46 @@ return fail(ex, null); } } @SysLog() @ApiOperation(value = "ä¸è½½ç¦ç") @ApiImplicitParams({ @ApiImplicitParam(name = "dt", value = "ä¸è½½ç¦çå®ä½ç±»", dataType = "DownloadTileEntity", paramType = "body") }) @ResponseBody @PostMapping(value = "/downloadTiles") public ResponseMsg<Object> downloadTiles(@RequestBody DownloadTileEntity dt, HttpServletRequest req, HttpServletResponse res) { try { return success(""); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "ä¸è½½æä»¶") @ApiImplicitParams({ @ApiImplicitParam(name = "guid", value = "æä»¶GUID", dataType = "String", paramType = "query") }) @ResponseBody @GetMapping(value = "/downloadFile") public void downloadFile(String guid, HttpServletRequest req, HttpServletResponse res) { try { DownloadEntity de = downloadService.selectByGuid(guid); if (null == de) { WebHelper.writeInfo(HttpStatus.NOT_FOUND, "æä»¶ä¸åå¨", res); return; } UserEntity ue = tokenService.getCurrentUser(req); downlogService.updateInfos(ue, de, req); String filePath = downloadService.getDownloadFilePath(de); WebHelper.download(filePath, de.getName(), res); } catch (Exception ex) { WebHelper.writeInfo(HttpStatus.ERROR, ex.getMessage(), res); } } } src/main/java/com/lf/server/entity/all/StaticData.java
@@ -16,45 +16,21 @@ */ public static String[] EXCLUDE_PATH = new String[]{"/sign/", "/perms/", "/fmeit/", "/crds/", "/floatserver/", "/wmts/select", "/swagger", "/error"}; /** * æ°å¼ï¼2 */ public final static int TWO = 2; /** * æ°å¼ï¼4 */ public final static int FOUR = 4; /** * æ°å¼ï¼9 */ public final static int NINE = 9; /** * æ°å¼ï¼10 */ public final static int TEN = 10; /** * æ°å¼ï¼16 */ public final static int SIXTEEN = 16; /** * æ°å¼ï¼100 */ public final static int ONE_HUNDRED = 100; /** * æ°å¼ï¼100,000 */ public final static int ONE_HUNDRED_THOUSAND = 100000; /** * æ°å¼ï¼200 */ public final static int TWO_HUNDRED = 200; public final static int ONE_HUNDRED_THOUSAND = 100000; public static final double D1024 = 1024.0; @@ -68,6 +44,14 @@ public static final int I60 = 60; public static final int I90 = 90; public static final int I90_NEG = -90; public static final int I180 = 180; public static final int I180_NEG = -180; public static final int I2050 = 2050; public static final int I4490 = 4490; src/main/java/com/lf/server/entity/ctrl/DownloadTileEntity.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,103 @@ package com.lf.server.entity.ctrl; import com.lf.server.entity.all.StaticData; import java.io.Serializable; /** * ä¸è½½ç¦çå®ä½ç±» * @author WWW */ public class DownloadTileEntity implements Serializable { private static final long serialVersionUID = -229710198271495902L; private Double xmin; private Double ymin; private Double xmax; private Double ymax; private String title; private String url; private String pwd; public DownloadTileEntity() { } /** * éªè¯åæ */ public String verifyCoords() { if (null == xmin || null == ymin || null == xmax || null == ymax) { return "åè³åæ å¼ä¸è½ä¸ºç©º"; } if (xmin < StaticData.I180_NEG || xmin > StaticData.I180 || xmax < StaticData.I180_NEG || xmax > StaticData.I180) { return "Xåæ å¼ä¸æ£ç¡®"; } if (ymin < StaticData.I90_NEG || ymin > StaticData.I90 || ymax < StaticData.I90_NEG || ymax > StaticData.I90) { return "Yåæ å¼ä¸æ£ç¡®"; } return null; } public Double getXmin() { return xmin; } public void setXmin(Double xmin) { this.xmin = xmin; } public Double getYmin() { return ymin; } public void setYmin(Double ymin) { this.ymin = ymin; } public Double getXmax() { return xmax; } public void setXmax(Double xmax) { this.xmax = xmax; } public Double getYmax() { return ymax; } public void setYmax(Double ymax) { this.ymax = ymax; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getPwd() { return pwd; } public void setPwd(String pwd) { this.pwd = pwd; } }