| | |
| | | public String convert(int metaId) { |
| | | MetaEntity me = metaService.selectById(metaId); |
| | | if (null == me || StringUtils.isEmpty(me.getPath()) || !StaticData.DWG.equals(me.getType())) { |
| | | return null; |
| | | return ""; |
| | | } |
| | | |
| | | String dwg = pathHelper.getConfig().getUploadPath() + File.separator + me.getPath(); |
| | | File file = new File(dwg); |
| | | if (!file.exists() || file.isDirectory()) { |
| | | return null; |
| | | return ""; |
| | | } |
| | | |
| | | String[] strs = me.getPath().replace("\\", "/").split("/"); |
| | |
| | | return strs[0] + "/" + outName; |
| | | } |
| | | |
| | | return null; |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 调用格式转换 |
| | | */ |
| | | public boolean callConvert(String dwgFile, String outPath, String outName) { |
| | | try { |
| | | String jsonParam = "{'srcpath':'" + dwgFile + "','outpath':'" + outPath + "','outname':'" + outName + "'}"; |