From fee67ca8a0760315047a52fc4101a8f4f80b7a7f Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 11 十一月 2024 15:02:54 +0800 Subject: [PATCH] 1 --- src/main/java/com/moon/server/controller/data/upload/CheckController.java | 323 ----------------------------------------------------- 1 files changed, 1 insertions(+), 322 deletions(-) diff --git a/src/main/java/com/moon/server/controller/data/upload/CheckController.java b/src/main/java/com/moon/server/controller/data/upload/CheckController.java index b304901..52315e3 100644 --- a/src/main/java/com/moon/server/controller/data/upload/CheckController.java +++ b/src/main/java/com/moon/server/controller/data/upload/CheckController.java @@ -26,10 +26,7 @@ import java.util.ArrayList; import java.util.List; -/** - * 妫�鏌ユ帶鍒跺櫒 - * @author WWW - */ +@SuppressWarnings("ALL") public class CheckController extends BaseController { @Autowired protected PathHelper pathHelper; @@ -114,16 +111,10 @@ } } - /** - * 鑾峰彇鏂囦欢璺緞 - */ private String getFullPath(String filePath) { return null == filePath ? null : pathHelper.getConfig().getTempPath() + File.separator + filePath; } - /** - * 鏄�/鍚︿负Zip鏂囦欢 - */ private boolean isZipFile(String filePath) { if (null == filePath || !filePath.toLowerCase().endsWith(StaticData.ZIP)) { return false; @@ -134,9 +125,6 @@ return zipFile.exists() && !zipFile.isDirectory(); } - /** - * 鏄�/鍚︿负Excel鏂囦欢 - */ private boolean isXlsFile(String filePath) { if (null == filePath) { return false; @@ -150,9 +138,6 @@ return zipFile.exists() && !zipFile.isDirectory(); } - /** - * 鏂规硶璋冪敤 - */ private String invoke(String name, FmeReqEntity entity, HttpServletRequest req) throws Exception { Method method; try { @@ -165,312 +150,6 @@ return null == obj ? null : obj.toString(); } - - /*@SysLog() - @ApiOperation(value = "鏌ヨOSGB妫�鏌�") - @GetMapping(value = "/selectCheckOsgb") - public ResponseMsg<Object> selectCheckOsgb(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\OSGB妫�鏌�.zip"; - fme.imgResolution = 0.2; - - String rs = fmeService.checkOsgb(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ琛ㄦ牸鏁版嵁妫�鏌�") - @GetMapping(value = "/selectCheckXls") - public ResponseMsg<Object> selectCheckXls(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\琛ㄦ牸鏁版嵁妫�鏌�.zip"; - - String rs = fmeService.checkXls(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鐐逛簯妫�鏌�") - @GetMapping(value = "/selectCheckLaz") - public ResponseMsg<Object> selectCheckLaz(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鐐逛簯妫�鏌�.zip"; - fme.lazDensity = 1; - - String rs = fmeService.checkLaz(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ楂樼▼妫�鏌�") - @GetMapping(value = "/selectCheckDem") - public ResponseMsg<Object> selectCheckDem(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\楂樼▼妫�鏌�.zip"; - fme.demTolerance = 5; - fme.demChangeRate = 200; - - String rs = fmeService.checkDem(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ灞炴�ф鏌�") - @GetMapping(value = "/selectCheckAttrs") - public ResponseMsg<Object> selectCheckAttrs(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\灞炴�ф鏌�.zip"; - - String rs = fmeService.checkAttrs(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鎷撴墤妫�鏌�") - @GetMapping(value = "/selectCheckTopology") - public ResponseMsg<Object> selectCheckTopology(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鎷撴墤妫�鏌�.zip"; - fme.polyTolerance = 0.001; - fme.lineTolerance = 0.001; - fme.pointTolerance = 0.001; - fme.gcdOffset = 20; - fme.kzdOffset = 100; - fme.rangeOffset = 200; - fme.xgMax = 0.005; - - String rs = fmeService.checkTopology(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鍥鹃潰鏁撮グ妫�鏌�") - @GetMapping(value = "/selectCheckDecorate") - public ResponseMsg<Object> selectCheckDecorate(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鍥鹃潰鏁撮グ妫�鏌�.zip"; - fme.xlsList = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鏂囦欢娓呭崟.xlsx"; - - String rs = fmeService.checkDecorate(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鍘熺偣妫�鏌�") - @GetMapping(value = "/selectCheckOrigin") - public ResponseMsg<Object> selectCheckOrigin(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鍘熺偣妫�鏌�.zip"; - - String rs = fmeService.checkOrigin(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鏍呮牸妫�鏌�") - @GetMapping(value = "/selectCheckDom") - public ResponseMsg<Object> selectCheckDom(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鏍呮牸妫�鏌�.zip"; - fme.coordinateSystem = "CGCS2000/GK3d-93E_FME"; - fme.imgResolution = 0.2; - - String rs = fmeService.checkDom(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鏁板鍩虹妫�鏌�") - @GetMapping(value = "/selectCheckMath") - public ResponseMsg<Object> selectCheckMath(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鏁板鍩虹妫�鏌�.zip"; - - String rs = fmeService.checkMath(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鍏冩暟鎹鏌�") - @GetMapping(value = "/selectCheckMeta") - public ResponseMsg<Object> selectCheckMeta(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\鍏冩暟鎹鏌�.zip"; - - String rs = fmeService.checkMeta(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鏌ヨ鎬昏川妫�") - @GetMapping(value = "/selectCheckMain") - public ResponseMsg<Object> selectCheckMain(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�.7z"; - fme.wbsPath = "D:\\Project\\Data\\LF\\temp\\20230107010101\\椤圭洰WBS瀵煎嚭.xlsx"; - fme.isDiZai = "NO"; - fme.diZaiType = "NO"; - - String rs = fmeService.checkMain(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "閫昏緫涓�鑷存�ф鏌�") - @GetMapping(value = "/checkLogical") - public ResponseMsg<Object> checkLogical(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.zipPath = "D:\\LF\\temp\\20230411\\鏁板瓧鍖栨垚鏋�.zip"; - - String rs = fmeService.checkLogical(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - } - - @SysLog() - @ApiOperation(value = "鍗曢」鎴愭灉瀹屾暣鎬ф鏌�") - @GetMapping(value = "/checkSingleIntegrity") - public ResponseMsg<Object> checkSingleIntegrity(HttpServletRequest req) { - try { - FmeReqEntity fme = new FmeReqEntity(); - fme.xmmc = "瑗挎皵涓滆緭鍥涚嚎澶╃劧姘旂閬撳伐绋嬶紙鍚愰瞾鐣�-涓崼锛夛紙00116BT02锛�"; - fme.sjzy = "娴嬮噺涓撲笟"; - fme.sjfl = "鏁板瓧鍖栨垚鏋�"; - fme.zipPath = "D:\\LF\\temp\\20230411\\鏁板瓧鍖栨垚鏋�.zip"; - - String rs = fmeService.checkSingleIntegrity(fme, req); - if (StringHelper.isEmpty(rs)) { - return fail("妫�鏌ュけ璐�"); - } - - return success(rs); - } catch (Exception ex) { - return fail(ex, null); - } - }*/ @SysLog() @ApiOperation(value = "鏈嶅姟娉ㄥ唽") -- Gitblit v1.9.3