|
@@ -1840,6 +1840,31 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //重置html路径
|
|
|
+ if (!insertDataPrivateList.isEmpty()) {
|
|
|
+ try {
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ Set<String> urls = new HashSet<>();
|
|
|
+ for (WbsTreePrivate tree : insertDataPrivateList) {
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(tree.getHtmlUrl())) {
|
|
|
+ String[] split = tree.getHtmlUrl().split("/");
|
|
|
+ String htmlUrl = file_path + "privateUrlCopy/" + projectInfo.getId() + "/" + split[split.length - 1];
|
|
|
+ if (!urls.contains(tree.getHtmlUrl())) {
|
|
|
+ urls.add(tree.getHtmlUrl());
|
|
|
+ File file_in = ResourceUtil.getFile(tree.getHtmlUrl());
|
|
|
+ if (!file_in.exists() || file_in.length() == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ File file_out = ResourceUtil.getFile(htmlUrl);
|
|
|
+ FileUtil.copy(file_in, file_out);
|
|
|
+ }
|
|
|
+ tree.setHtmlUrl(htmlUrl);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new ServiceException("重置表单路径错误");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//新增同步到项目
|
|
|
if (!insertDataPrivateList.isEmpty()) {
|