| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 检查控制器 |
| | | * @author WWW |
| | | */ |
| | | @SuppressWarnings("ALL") |
| | | public class CheckController extends BaseController { |
| | | @Autowired |
| | | protected PathHelper pathHelper; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取文件路径 |
| | | */ |
| | | 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; |
| | |
| | | return zipFile.exists() && !zipFile.isDirectory(); |
| | | } |
| | | |
| | | /** |
| | | * 是/否为Excel文件 |
| | | */ |
| | | private boolean isXlsFile(String filePath) { |
| | | if (null == filePath) { |
| | | return false; |
| | |
| | | return zipFile.exists() && !zipFile.isDirectory(); |
| | | } |
| | | |
| | | /** |
| | | * 方法调用 |
| | | */ |
| | | private String invoke(String name, FmeReqEntity entity, HttpServletRequest req) throws Exception { |
| | | Method method; |
| | | try { |
| | |
| | | |
| | | 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 = "服务注册") |