|
@@ -130,7 +130,7 @@ public class WbsSynchronousServiceImpl {
|
|
|
.ne(WbsTreePrivate::getPKeyId, nodeId)
|
|
|
.eq(WbsTreePrivate::getInitTableName, initTableName)
|
|
|
);
|
|
|
- if(CollectionUtil.isEmpty(wbsTreePrivates)){
|
|
|
+ if (CollectionUtil.isEmpty(wbsTreePrivates)) {
|
|
|
throw new ServiceException("当前项目没有相同实体表的其他表单");
|
|
|
}
|
|
|
//清表也相同的数据
|
|
@@ -381,35 +381,33 @@ public class WbsSynchronousServiceImpl {
|
|
|
//绑定实体表
|
|
|
editPrivateNode.setInitTableName(templateNode.getInitTableName());
|
|
|
|
|
|
- if(StringUtil.isBlank(templateNode.getHtmlUrl())){
|
|
|
+ if (StringUtil.isBlank(templateNode.getHtmlUrl())) {
|
|
|
throw new ServiceException(templateNode.getNodeName() + "HTML文件不存在");
|
|
|
}
|
|
|
//封装Html路径 根据模板html copy一份到自己项目节点上
|
|
|
- if (StringUtil.isNotBlank(editPrivateNode.getHtmlUrl()) && (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());
|
|
|
+ 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文件不存在");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- if (templateNode.getExcelId() != null) {
|
|
|
- editPrivateNode.setIsLinkTable(2);
|
|
|
+ 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(htmlUrl);
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
+ if (templateNode.getExcelId() != null) {
|
|
|
+ editPrivateNode.setIsLinkTable(2);
|
|
|
}
|
|
|
+
|
|
|
//元素 是与表绑定的
|
|
|
if (collect.contains(3)) {
|
|
|
editPrivateNode.setInitTableName(templateNode.getInitTableName());
|