|
@@ -290,24 +290,24 @@ public class WbsSynchronousServiceImpl {
|
|
|
//绑定实体表
|
|
|
editPrivateNode.setInitTableName(templateNode.getInitTableName());
|
|
|
//封装Html路径
|
|
|
-// if (StringUtil.isBlank(editPrivateNode.getHtmlUrl()) || !Objects.equals(editPrivateNode.getHtmlUrl(), templateNode.getHtmlUrl())) {
|
|
|
-// String[] split = templateNode.getHtmlUrl().split("/");
|
|
|
-// String htmlUrl = file_path + "privateUrlCopy/" + projectInfo.getId() + "/" + split[split.length - 1];
|
|
|
-// File file_in = ResourceUtil.getFile(templateNode.getHtmlUrl());
|
|
|
-// if (!file_in.exists() || file_in.length() == 0) {
|
|
|
-// //如果本地服务器上没有
|
|
|
-// throw new ServiceException(templateNode.getNodeName() + "HTML文件不存在");
|
|
|
-// }
|
|
|
-// File file_out = ResourceUtil.getFile(htmlUrl);
|
|
|
-// //查询父级文件夹
|
|
|
-// File fileParent = file_out.getParentFile();
|
|
|
-// if (!fileParent.exists()) {
|
|
|
-// fileParent.mkdirs();
|
|
|
-// }
|
|
|
-// file_out.createNewFile();
|
|
|
-// FileUtil.copy(file_in, file_out);
|
|
|
-// editPrivateNode.setHtmlUrl(templateNode.getHtmlUrl());
|
|
|
-// }
|
|
|
+ if (StringUtil.isBlank(editPrivateNode.getHtmlUrl()) || !Objects.equals(editPrivateNode.getHtmlUrl(), templateNode.getHtmlUrl())) {
|
|
|
+ String[] split = templateNode.getHtmlUrl().split("/");
|
|
|
+ String htmlUrl = file_path + "privateUrlCopy/" + projectInfo.getId() + "/" + split[split.length - 1];
|
|
|
+ File file_in = ResourceUtil.getFile(templateNode.getHtmlUrl());
|
|
|
+ if (!file_in.exists() || file_in.length() == 0) {
|
|
|
+ //如果本地服务器上没有
|
|
|
+ throw new ServiceException(templateNode.getNodeName() + "HTML文件不存在");
|
|
|
+ }
|
|
|
+ File file_out = ResourceUtil.getFile(htmlUrl);
|
|
|
+ //查询父级文件夹
|
|
|
+ File fileParent = file_out.getParentFile();
|
|
|
+ if (!fileParent.exists()) {
|
|
|
+ fileParent.mkdirs();
|
|
|
+ }
|
|
|
+ file_out.createNewFile();
|
|
|
+ FileUtil.copy(file_in, file_out);
|
|
|
+ editPrivateNode.setHtmlUrl(templateNode.getHtmlUrl());
|
|
|
+ }
|
|
|
|
|
|
|
|
|
if (templateNode.getExcelId() != null) {
|