浏览代码

20240819 数据同步nodePDfURl

zhuwei 3 月之前
父节点
当前提交
9583111d42
共有 16 个文件被更改,包括 350 次插入185 次删除
  1. 2 2
      blade-common/src/main/java/org/springblade/common/utils/AsyncConfigurer.java
  2. 28 6
      blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java
  3. 1 0
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/MinioOssBuilder.java
  4. 1 6
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/LargeFileEndpoint.java
  5. 0 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/CommonFileClientImpl.java
  6. 2 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml
  7. 42 4
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java
  8. 31 4
      blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java
  9. 5 2
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java
  10. 1 0
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/utils/PDFUtils.java
  11. 205 123
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  12. 8 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java
  13. 10 5
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractSyncImpl.java
  14. 4 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  15. 4 20
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java
  16. 6 3
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java

+ 2 - 2
blade-common/src/main/java/org/springblade/common/utils/AsyncConfigurer.java

@@ -15,7 +15,7 @@ public class AsyncConfigurer {
     /**
      * cpu 核心数量
      */
-    public static final int cpuNum =2 ;//Runtime.getRuntime().availableProcessors();
+    public static final int cpuNum =1 ;//Runtime.getRuntime().availableProcessors();
 
     /**
      * 线程池配置
@@ -25,7 +25,7 @@ public class AsyncConfigurer {
     @Bean("taskExecutor1")
     public ThreadPoolExecutor getAsyncExecutor() {
         return new ThreadPoolMonitor(cpuNum
-                , 4
+                , 12
                 , 30
                 , TimeUnit.SECONDS
                 , new LinkedBlockingQueue<>(2000)

+ 28 - 6
blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java

@@ -4,6 +4,7 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.aliyuncs.utils.IOUtils;
 import com.drew.imaging.ImageMetadataReader;
 import com.drew.imaging.ImageProcessingException;
 import com.drew.metadata.Metadata;
@@ -37,7 +38,7 @@ import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
 import com.drew.metadata.MetadataException;
-import org.springframework.web.multipart.MultipartFile;
+import org.springframework.util.ResourceUtils;
 
 /**
  * 通用工具类
@@ -486,12 +487,30 @@ public class CommonUtil {
     /**
      * 图片缩放、压缩、旋转处理
      *
-     * @param imageData
      * @return
      * @throws IOException
      * @throws ImageProcessingException
      * @throws MetadataException
      */
+
+    public static void main(String[] args) throws IOException, ImageProcessingException, MetadataException {
+        String imgurl = "/Users/hongchuangyanfa/Desktop/excel/7777.jpg";
+        File file = ResourceUtils.getFile(imgurl);
+        byte[] bytes = InputStreamToBytes(new FileInputStream(file));
+        byte[] bytes1 = compressImage(bytes);
+
+        ByteArrayInputStream bis = new ByteArrayInputStream(bytes1);
+        BufferedImage image = ImageIO.read(bis);
+
+        // 确定保存图片的路径和文件名
+        File outputFile = new File("/Users/hongchuangyanfa/Desktop/excel/8888.jpg");
+
+        // 使用ImageIO将BufferedImage保存到磁盘
+        ImageIO.write(image, "png", outputFile);
+
+        System.out.println("图片转换并保存成功!");
+    }
+
     public static byte[] compressImage(byte[] imageData) throws IOException, ImageProcessingException, MetadataException {
         // 读取原始图像(处理旋转问题)
         Metadata metadata = ImageMetadataReader.readMetadata(new ByteArrayInputStream(imageData));
@@ -501,9 +520,13 @@ public class CommonUtil {
                 // 获取 Orientation 标签的值
                 int orientation = exifIFD0Directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);
                 // 需要旋转图片
+                // 1 无需纠正 2 水平翻转(镜像)3 垂直翻转(旋转180°) 4 水平翻转+垂直翻转 5 水平翻转+旋转90°
+                // 6 旋转90° 7 水平翻转+旋转270° 8 +旋转270°
                 BufferedImage originalImage = ImageIO.read(new ByteArrayInputStream(imageData));
                 AffineTransform transform = new AffineTransform();
-                if (orientation == 6) {
+                if (orientation == 3) {
+                    transform.rotate(Math.PI , originalImage.getWidth() / 2, originalImage.getHeight() / 2);
+                }else if (orientation == 6) {
                     transform.rotate(Math.PI / 2, originalImage.getWidth() / 2, originalImage.getHeight() / 2);
                 } else if (orientation == 8) {
                     transform.rotate(-Math.PI / 2, originalImage.getWidth() / 2, originalImage.getHeight() / 2);
@@ -517,11 +540,10 @@ public class CommonUtil {
         }
 
         // 缩放图像
-       // String formatName = "JPEG";
-        String formatName = "JPG";
+        String formatName = "JPEG";
         ByteArrayInputStream bais = new ByteArrayInputStream(imageData);
         BufferedImage originalImage = ImageIO.read(bais);
-        long sizeLimit = 366912; //358KB
+        long sizeLimit = 366912000; //358KB
         int width = 768;
         int height = 1024;
         Image scaledImage = originalImage.getScaledInstance(width, height, Image.SCALE_SMOOTH);

+ 1 - 0
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/MinioOssBuilder.java

@@ -40,6 +40,7 @@ public class MinioOssBuilder {
                 .build();
         OssProperties ossProperties = new OssProperties();
         ossProperties.setEndpoint(oss.getEndpoint());
+        ossProperties.setEndpoint("http://183.247.216.148:9000/");
         ossProperties.setAccessKey(oss.getAccessKey());
         ossProperties.setSecretKey(oss.getSecretKey());
         ossProperties.setBucketName(oss.getBucketName());

+ 1 - 6
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/LargeFileEndpoint.java

@@ -401,12 +401,7 @@ public class LargeFileEndpoint {
             /**每个文件保存到本地所使用的合并各个文件**/
             merge(largeFile, filePath);
             String path = largeFile.getPath(); //获取到的路径 没有.1 .2 这样的东西
-            //截取视频所在的路径
-//            path = path.replace(filePath, "");
-//            File file = new File(filePath + path);
-//            //修改成原来的文件名
-//            renameFile(file, param.getFilename());
-//            FileInputStream inputStream = new FileInputStream(filePath + param.getFilename());
+
             FileInputStream inputStream = new FileInputStream(path);
             //上传oss
             BladeFile bladeFile = ossBuilder.template().putFile(param.getFilename(), inputStream);

+ 0 - 4
blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/CommonFileClientImpl.java

@@ -19,10 +19,6 @@ import org.springblade.resource.vo.NewBladeFile;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.imageio.ImageIO;
-import javax.imageio.ImageReader;
-import javax.imageio.stream.FileImageInputStream;
-import java.awt.image.BufferedImage;
 import java.io.*;
 import java.util.List;
 import java.util.Objects;

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -960,7 +960,8 @@
         business_time,
         classify,
         e_visa_pdf_page,
-        e_visa_pdf_size
+        e_visa_pdf_size,
+        node_pdf_url
         from u_information_query
         where is_deleted = 0
           and contract_id = #{contractId} and classify = #{classify} and status = 2 and is_deleted = 0;

+ 42 - 4
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -25,6 +25,7 @@ import org.springblade.core.cloud.feign.EnableBladeFeign;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.secure.utils.SecureUtil;
 import org.springblade.core.tool.api.R;
@@ -32,6 +33,7 @@ import org.springblade.core.tool.support.Kv;
 import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.ResourceUtil;
 import org.springblade.evisa.feign.EVisaClient;
 import org.springblade.evisa.redissionUtil.DistributedRedisLock;
 import org.springblade.evisa.vo.EVisaTaskApprovalVO;
@@ -45,7 +47,9 @@ import org.springblade.flow.core.vo.FlowProcessVO;
 import org.springblade.manager.entity.*;
 import org.springblade.manager.feign.*;
 import org.springblade.manager.vo.AppWbsTreeContractVO;
+import org.springblade.manager.vo.TableFileVO;
 import org.springblade.resource.feign.CommonFileClient;
+import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.cache.ParamCache;
 import org.springblade.system.user.cache.UserCache;
 import org.springblade.system.user.entity.User;
@@ -63,6 +67,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.nio.file.Watchable;
 import java.util.*;
@@ -125,6 +130,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
 
     private final ExcelTabClient excelTabClient;
 
+    private final NewIOSSClient newIOSSClient;
+
     @Autowired
     StringRedisTemplate RedisTemplate;
 
@@ -1125,13 +1132,44 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
      */
     @Transactional
     public void updateWriteBusinessDataStatus(String formDataId, Integer status, String newFileUrl, Long userId) {
+        String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
         String pdfPage = "";
         Long pdfSize = 0L;
         String dateInfo = "";
+        String nodePdfUrl = "";
         try {
             System.out.println("----- 电签成功--------");
-            pdfPage = commonFileClient.getPdfNum(newFileUrl);
-            pdfSize = CommonUtil.getResourceLength(newFileUrl);
+            //添加nodePdf的值
+            List<Map<String, Object>> mapList = jdbcTemplate.queryForList("select *,domain_url as url from m_table_file where is_deleted = 0 and type in (10,11,12) and tab_id = " + formDataId + "");
+            if(Func.isNotEmpty(mapList)&&mapList.size()>=1){
+                String file_path = org.springblade.business.utils.FileUtils.getSysLocalFileUrl();
+                List<String> datainfo = new ArrayList<>();
+                datainfo.add(newFileUrl);
+                for (Map<String, Object> tabsx : mapList) {
+                    datainfo.add(tabsx.get("url")+"");
+                }
+                String listPdf = file_path + "/nodePDF/" + formDataId + ".pdf";
+                File tabpdf2 = ResourceUtil.getFile(listPdf);
+                if (tabpdf2.exists()) {
+                    tabpdf2.delete();
+                }
+
+                org.springblade.business.utils.FileUtils.mergePdfPublicMethods(datainfo, listPdf);
+                if(sys_isonline.equals("20")){
+                    BladeFile bladeFile = this.newIOSSClient.uploadFile(formDataId + ".pdf", listPdf);
+                    if (bladeFile != null && Func.isNotEmpty(bladeFile.getLink())) {
+                        nodePdfUrl = bladeFile.getLink();
+                    }
+                }else{
+                    nodePdfUrl = org.springblade.business.utils.FileUtils.getNetUrl(listPdf);
+                }
+
+            }else{
+                nodePdfUrl = newFileUrl;
+            }
+
+            pdfPage = commonFileClient.getPdfNum(nodePdfUrl);
+            pdfSize = CommonUtil.getResourceLength(nodePdfUrl);
             System.out.println("----- 电签成功--------==pdfPage" + pdfPage);
             System.out.println("----- 电签成功--------==pdfSize" + pdfSize);
             List<String> list = Arrays.asList(formDataId.split(","));
@@ -1180,7 +1218,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                         .set(InformationQuery::getEVisaPdfPage, pdfPage)
                         .set(InformationQuery::getEVisaPdfSize, pdfSize)
                         .set(InformationQuery::getBusinessTime, dateInfo)
-                        .set(InformationQuery::getNodePdfUrl, newFileUrl)
+                        .set(InformationQuery::getNodePdfUrl, nodePdfUrl)
                         .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
                 //修改试验业务状态(已审批的情况下修改)
                 if (new Integer(2).equals(queryinfo.getType()) && ObjectUtil.isNotEmpty(queryinfo.getWbsId()) && status != 3) {
@@ -1196,7 +1234,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     .set(InformationQuery::getEVisaPdfPage, pdfPage)
                     .set(InformationQuery::getEVisaPdfSize, pdfSize)
                     .set(InformationQuery::getBusinessTime, dateInfo)
-                    .set(InformationQuery::getNodePdfUrl, newFileUrl)
+                    .set(InformationQuery::getNodePdfUrl, nodePdfUrl)
                     .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
         }
 

+ 31 - 4
blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java

@@ -323,11 +323,38 @@ public class FileUtils {
 
     public static String getSysLocalFileUrl() {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        if (SystemUtils.isMacOs()) {
-            file_path = "/Users/hongchuangyanfa/Desktop/";
-        } else if (SystemUtils.isWindows()) {
-            file_path = "C://upload//";
+        String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
+
+        if(sys_isonline.equals("3")){ //正式环境
+            if (SystemUtils.isMacOs()) {
+                file_path = "/Users/hongchuangyanfa/Desktop/";
+            } else if (SystemUtils.isWindows()) {
+                file_path = "C://upload//";
+            }
+        }else if(sys_isonline.equals("2")){ //109测试环境
+            if (SystemUtils.isMacOs()) {
+                file_path = "/Users/hongchuangyanfa/Desktop/";
+            } else if (SystemUtils.isWindows()) {
+                file_path = "C://upload//";
+            }
+        }else{  //本地环境
+            if (SystemUtils.isMacOs()) {
+                file_path = "/Users/hongchuangyanfa/Desktop/";
+            } else if (SystemUtils.isWindows()) {
+                file_path = "C://upload//";
+            }
         }
         return file_path;
     }
+
+    public static String getNetUrl(String fileUrl){
+        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path2 = getSysLocalFileUrl();
+        String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
+        if(fileUrl.indexOf("/www/wwwroot")>=0){
+            file_path2 = file_path;
+        }
+        String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path2, "");
+        return path;
+    }
 }

+ 5 - 2
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java

@@ -14,6 +14,7 @@ import org.springblade.business.feign.TaskClient;
 import org.springblade.business.vo.TaskApprovalVO;
 import org.springblade.evisa.service.EVisaService;
 import org.springblade.evisa.vo.EVisaTaskApprovalVO;
+import org.springblade.resource.feign.NewIOSSClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -54,14 +55,16 @@ public class EVisaController {
 
     private final TaskClient taskClient;
 
+    private final NewIOSSClient newIOSSClient;
+
     // 电签主类
 
-    @Scheduled(cron = "0/5 * * * * ?")
+   // @Scheduled(cron = "0/30 * * * * ?")
     public void SignInfo() {
         //执行代码
         log.info("扫描开始");
         //String sql = "SELECT * from u_task_batch where json_data like '%1821798868568768512%' and is_deleted<>5  LIMIT 10";
-        String sql = "SELECT * from u_task_batch where is_deleted<>5  LIMIT 5";
+        String sql = "SELECT * from u_task_batch where is_deleted<>5 and id=1684040525583613953 LIMIT 5";
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps != null && maps.size() >= 1) {
             for (Map<String, Object> dataInfo : maps) {

+ 1 - 0
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/utils/PDFUtils.java

@@ -28,6 +28,7 @@ public class PDFUtils {
         PdfDocument pdf = new PdfDocument();
         List<String> eVisaConfigList = new ArrayList<>();
         try {
+            pdfUrl = CommonUtil.replaceOssUrl(pdfUrl);
             URL url =new URL(pdfUrl);
             byte[] byteArray = IOUtils.toByteArray(url);
             pdf.loadFromBytes(byteArray);

+ 205 - 123
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -72,10 +72,12 @@ import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
@@ -91,7 +93,9 @@ import java.nio.file.StandardCopyOption;
 import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.*;
+import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.regex.Matcher;
@@ -162,6 +166,11 @@ public class ExcelTabController extends BladeController {
     private final TaskClient taskClient;
 
 
+    // 线程池
+    @Resource(name = "taskExecutor1")
+    private ThreadPoolExecutor executor;
+
+
     @Autowired
     StringRedisTemplate RedisTemplate;
 
@@ -1746,7 +1755,6 @@ public class ExcelTabController extends BladeController {
             informationQueryClient.saveInfo(query);
         }
         excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
-
         return R.data(tableFile.getId());
     }
 
@@ -1771,6 +1779,8 @@ public class ExcelTabController extends BladeController {
         return R.data("成功");
     }
 
+
+
     @GetMapping("/get-buss-pdfs")
     @ApiOperationSupport(order = 21)
     @ApiOperation(value = "多表预览", notes = "多表预览")
@@ -1816,7 +1826,7 @@ public class ExcelTabController extends BladeController {
                     for (TableFileVO tabsx : data) {
                         datainfo.add(tabsx.getUrl());
                     }
-                    String listPdf = file_path + "/pdf/" + nodeId + ".pdf";
+                    String listPdf = file_path + "/nodePDF/" + nodeId + ".pdf";
                     File tabpdf2 = ResourceUtil.getFile(listPdf);
                     if (tabpdf2.exists()) {
                         tabpdf2.delete();
@@ -1832,9 +1842,10 @@ public class ExcelTabController extends BladeController {
                     }else{
                         netUrl = FileUtils.getNetUrl(listPdf);
                     }
-
+                    jdbcTemplate.execute(" update  u_information_query set node_pdf_url='"+netUrl+"' where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'");
                     return R.data(netUrl);
                 } else {
+                    jdbcTemplate.execute(" update  u_information_query set node_pdf_url='"+pdfUrl+"' where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'");
                     return R.data(pdfUrl);
                 }
             }
@@ -2662,6 +2673,29 @@ public class ExcelTabController extends BladeController {
                                     }
                                 }
                             }
+
+                            // 日期默认值
+                            Elements dateTitle = doc.select("el-date-picker[placeholder~=日期]");
+                            //日期默认
+                            if (dateTitle.size() >= 1) {
+                                for (Element element : dateTitle) {
+                                    int trindex = Integer.parseInt(element.attr("trindex"));
+                                    if (trindex <= 10) {
+                                        reData.put(element.attr("keyName"), recordTime);
+                                    }
+                                }
+                            }
+
+                            // 添加默认值
+                            Elements elements = doc.getElementsByAttribute("defText");
+                            if(Func.isNotEmpty(elements) && elements.size()>=1){
+                                for(Element eleme: elements){
+                                    String id = Func.isNull(eleme.attr("id"))?eleme.attr("keyname"):eleme.attr("id");
+                                    if(Func.isNotEmpty(id)){
+                                        reData.put(id, eleme.attr("defText"));
+                                    }
+                                }
+                            }
                         }
                     } catch (Exception e) {
                         e.printStackTrace();
@@ -2713,20 +2747,6 @@ public class ExcelTabController extends BladeController {
                             }
                         }
 
-                        // 获取默认值
-                        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
-                        queryWrapper.eq("type", 4);
-                        queryWrapper.eq("tab_id", node.getPKeyId());
-                        final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
-                        if (!textDictInfos.isEmpty()) {
-                            for (TextdictInfo textdictInfo : textDictInfos) {
-                                if (reData.containsKey(textdictInfo.getColKey())) {
-                                    String keyVal = reData.get(textdictInfo.getColKey()) + "";
-                                } else {
-                                    reData.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
-                                }
-                            }
-                        }
                         //移除id和p_key_id
                         reData.remove("p_key_id");
                         reData.remove("classify");
@@ -2741,18 +2761,7 @@ public class ExcelTabController extends BladeController {
                 } else {
                     Map<String, Object> reData2 = new HashMap<>();
                     //获取默认值
-                    QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("type", 4);
-                    queryWrapper.eq("tab_id", tableNode2.getPKeyId());
-                    final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
-                    if (!textDictInfos.isEmpty()) {
-                        for (TextdictInfo textdictInfo : textDictInfos) {
-                            reData2.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
-                        }
-                        if (reData2.size() > 0) {
-                            resultMapList.add(reData2);
-                        }
-                    }
+
                 }
             }
         }else{
@@ -2775,6 +2784,8 @@ public class ExcelTabController extends BladeController {
                     htdtitle.addAll(htdtitle1);
 
                     Elements jltitle = doc.select("el-input[placeholder~=监理单位.*]");
+                    Elements jltit = doc.select("el-input[placeholder~=监理机构.*]");
+                    jltitle.addAll(jltit);
 
                     Elements bhtitle = doc.select("el-input[placeholder~=^编号]");
                     Elements bhtitle1 = doc.select("el-input[placeholder~=合同编号.*]");
@@ -2783,6 +2794,9 @@ public class ExcelTabController extends BladeController {
 
                     Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
 
+                    // 日期默认值
+                    Elements dateTitle = doc.select("el-date-picker[placeholder~=日期]");
+
 
                     /**
                      * 承包单位 承包单位、施工单位:引用施工单位名称 ,
@@ -2838,6 +2852,28 @@ public class ExcelTabController extends BladeController {
                             }
                         }
                     }
+
+                    //日期默认
+                    if (dateTitle.size() >= 1) {
+                        for (Element element : dateTitle) {
+                            int trindex = Integer.parseInt(element.attr("trindex"));
+                            if (trindex <= 10) {
+                                reData.put(element.attr("keyName"), recordTime);
+                            }
+                        }
+                    }
+
+
+                    // 添加默认值
+                    Elements elements = doc.getElementsByAttribute("defText");
+                    if(Func.isNotEmpty(elements) && elements.size()>=1){
+                        for(Element eleme: elements){
+                            String id = Func.isNull(eleme.attr("id"))?eleme.attr("keyname"):eleme.attr("id");
+                            if(Func.isNotEmpty(id)){
+                                reData.put(id, eleme.attr("defText"));
+                            }
+                        }
+                    }
                 }
             } catch (Exception e) {
                 e.printStackTrace();
@@ -3558,21 +3594,8 @@ public class ExcelTabController extends BladeController {
     @ApiOperationSupport(order = 32)
     @ApiOperation(value = "表单填写图片上传", notes = "表单填写图片上传")
     public R addBussFile(@RequestParam MultipartFile file) {
-        /*String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        //String file_path = "/Users/hongchuangyanfa/Desktop/";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        BladeFile bladeFile = new BladeFile();
-        if (file.getSize() >= 1024) {
-            String filecode = SnowFlakeUtil.getId() + "";
-            String imgUrl = file_path + "/pdf/" + filecode + ".jpg";
-            FileUtils.CompressImage(imgUrl, file.getInputStream());
-            bladeFile = this.newIOSSClient.uploadFile(file.getOriginalFilename(), imgUrl);
-            File imgFile = ResourceUtil.getFile(imgUrl);
-            imgFile.delete();
-        } else {*/
-        //   bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
-        // }
-        BladeFile bladeFile = new BladeFile();
-        bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
+
+        BladeFile bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
         return R.data(bladeFile);
     }
 
@@ -3742,64 +3765,6 @@ public class ExcelTabController extends BladeController {
         return R.data("成功!");
     }
 
-//    @PostMapping("/batchUploadExcelTab")
-//    @ApiOperationSupport(order = 39)
-//    @ApiOperation(value = "批量上传清表", notes = "传入id、fileList")
-//    public R<Object> batchUploadExcelTab(@RequestParam Long id, @RequestPart("file") MultipartFile[] file) throws IOException {
-//        if (ObjectUtil.isEmpty(id)) {
-//            throw new ServiceException("获取节点信息失败");
-//        }
-//        if (file.length <= 0) {
-//            throw new ServiceException("未获取到需要上传的文件信息");
-//        }
-//        ExcelTab excelTabParentNode = excelTabService.getBaseMapper().selectById(id);
-//        List<ExcelTab> excelTabs = excelTabService.getBaseMapper().selectList(Wrappers.<ExcelTab>lambdaQuery().select(ExcelTab::getSort).eq(ExcelTab::getParentId, excelTabParentNode.getId()));
-//        Optional<Integer> maxSort = excelTabs.stream().map(ExcelTab::getSort).max(Integer::compare);
-//        int maxValue = 1;
-//        if (maxSort.isPresent()) {
-//            maxValue = maxSort.get();
-//        }
-//        for (MultipartFile fileDTO : file) {
-//            if (ObjectUtil.isEmpty(fileDTO.getOriginalFilename())) {
-//                throw new ServiceException("文件名不能为空");
-//            }
-//            if (!this.isExcelFormat(fileDTO.getOriginalFilename())) {
-//                throw new ServiceException("文件名后缀不是.xlsx或者.xls格式,请重新填写");
-//            }
-//            if (!this.isExcelFile(fileDTO)) {
-//                throw new ServiceException("【" + fileDTO.getOriginalFilename() + "】文件不是excel格式文件,上传终止");
-//            }
-//            try {
-//                R<BladeFile> bladeFile = iossClient.addFileInfo(fileDTO);
-//                if (ObjectUtil.isNotEmpty(bladeFile.getData())) {
-//                    //创建节点,并上传excel文件到节点上
-//                    ExcelTab excelTabNode = new ExcelTab();
-//                    excelTabNode.setId(SnowFlakeUtil.getId());
-//                    excelTabNode.setParentId(excelTabParentNode.getId());
-//                    excelTabNode.setFileType(3); //不要上传按钮 默认=3
-//                    excelTabNode.setName(fileDTO.getOriginalFilename().split(".xls")[0]);
-//                    excelTabNode.setAlias(excelTabParentNode.getAlias() + "," + excelTabParentNode.getId());
-//                    excelTabNode.setFileUrl(bladeFile.getData().getLink());
-//                    excelTabNode.setExtension(fileDTO.getOriginalFilename());
-//                    excelTabNode.setCreateTime(new Date());
-//                    excelTabNode.setUpdateTime(new Date());
-//                    excelTabNode.setCreateUser(SecureUtil.getUserId());
-//                    excelTabNode.setUpdateUser(SecureUtil.getUserId());
-//                    excelTabNode.setCreateDept(SecureUtil.getUser().getDeptId().contains(",") ? Long.parseLong(SecureUtil.getUser().getDeptId().split(",")[0]) : Long.parseLong(SecureUtil.getUser().getDeptId()));
-//                    excelTabNode.setStatus(1);
-//                    excelTabNode.setIsDeleted(0);
-//                    excelTabNode.setTabType(excelTabParentNode.getTabType());
-//                    excelTabNode.setTenantId(SecureUtil.getTenantId());
-//                    excelTabNode.setSort(maxValue++);
-//                    excelTabService.save(excelTabNode);
-//                }
-//            } catch (Exception e) {
-//                throw new ServiceException("【" + fileDTO.getOriginalFilename() + "】文件上传失败,上传终止" + e.getMessage());
-//            }
-//        }
-//        return R.success("操作成功");
-//    }
-
 
     @PostMapping("/batchUploadExcelTab")
     @ApiOperationSupport(order = 39)
@@ -3937,7 +3902,6 @@ public class ExcelTabController extends BladeController {
                 }
             }
         }
-
     }
 
 
@@ -4044,26 +4008,6 @@ public class ExcelTabController extends BladeController {
                 List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(noId, classify, contractId, projectId, null);
                 JSONArray array = new JSONArray();
                 if (tableAll != null && tableAll.size() >= 1) {
-                  /*  for (AppWbsTreeContractVO tab : tableAll) {
-                        try {
-                            Map<String, Object> jo = excelTabService.getBussDataInfo(tab.getPKeyId(), 0);
-                            String s = new Gson().toJson(jo);
-                            //字符串转jsonobject
-                            JSONObject obj = JSON.parseObject(s);
-                            obj.put("classify", classify);
-                            obj.put("nodeId", noId);
-                            obj.put("contractId", contractId);
-                            obj.put("pkeyId", tab.getPKeyId());
-                            obj.put("projectId", projectId);
-                            obj.put("isCollapseLoad", true);
-                            obj.put("isRenderForm", true);
-                            array.add(obj);
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        } finally {
-                            continue;
-                        }
-                    }*/
                     /*只需加载第一张即可,生效会自动补全*/
                     AppWbsTreeContractVO tab =tableAll.get(0);
                     Map<String, Object> jo = excelTabService.getBussDataInfo(tab.getPKeyId(), 0);
@@ -4155,4 +4099,142 @@ public class ExcelTabController extends BladeController {
         List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId);
         return R.data(bussDataInfoTrial);
     }
+
+
+    @Scheduled(cron = "0/20 * * * * ?")
+    public void SignInfo() {
+        //执行代码
+        String sql = "SELECT a.* from u_information_query a,m_wbs_tree_contract b  where a.wbs_id=b.p_key_id and  a.project_id='1681859557657550850' and  a.create_dept=100 LIMIT 5";
+        List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
+        if (maps != null && maps.size() >= 1) {
+            for (Map<String, Object> dataInfo : maps) {
+                if (executor.getQueue().size()<=40 ) {
+                    String idkey = dataInfo.get("id")+"";
+                    Boolean aBoolean = RedisTemplate.hasKey("sign-" + idkey);
+                    if(!aBoolean){
+                        RedisTemplate.opsForValue().set("sign-" + idkey, "1",30, TimeUnit.SECONDS);
+                        CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
+                            try {
+                                /*===============执行批量任务===============*/
+                                this.checkIsExsitTaskBatch(dataInfo);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }, executor);
+                    }
+
+                }
+            }
+        }
+        System.out.println("队列数量" + executor.getQueue().size());
+        System.out.println("活跃数量" + executor.getActiveCount());
+        System.out.println("总共数量" + executor.getTaskCount());
+        System.out.println("完成数量" + executor.getCompletedTaskCount());
+    }
+
+    public void checkIsExsitTaskBatch(Map<String, Object> dataInfo) {
+        // 数据
+        String file_path = "/Users/hongchuangyanfa/Desktop/";
+        String nodeId = dataInfo.get("wbs_id")+"";
+        String classify = dataInfo.get("classify")+"";
+        String contractId = dataInfo.get("contract_id")+"";
+        String projectId = dataInfo.get("project_id")+"";
+        String pdfUrl = dataInfo.get("pdf_url") + "";
+        try {
+
+            if (dataInfo.get("e_visa_pdf_url") != null) {
+                //优先使用电签的pdf
+                pdfUrl = dataInfo.get("e_visa_pdf_url") + "";
+            }
+
+            if (dataInfo.get("pdf_trial_url") != null || dataInfo.get("pdf_trial_url_position") != null) {
+                //合并试验关联文件、试验工程部位信息的pdf
+                pdfUrl = this.mergePdfShow(pdfUrl, dataInfo) + "";
+            }
+
+            if (StringUtils.isEmpty(pdfUrl) || pdfUrl.equals("null")) {
+                System.out.println("");
+            } else {
+                // 由于独立附件 需要追加最后
+                List<TableFileVO> data = tableFileService.selectTableFileListByTen(Long.valueOf(nodeId + ""));
+                List<String> datainfo = new ArrayList<>();
+                datainfo.add(pdfUrl);
+                if (data != null && data.size() >= 1) {
+                    for (TableFileVO tabsx : data) {
+                        datainfo.add(tabsx.getUrl());
+                    }
+                    String listPdf = file_path + "/nodePDF/" + nodeId + ".pdf";
+                    File tabpdf2 = ResourceUtil.getFile(listPdf);
+                    if (tabpdf2.exists()) {
+                        tabpdf2.delete();
+                    }
+
+                    FileUtils.mergePdfPublicMethods(datainfo, listPdf);
+                    String netUrl = "";
+
+                    BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
+                    if (bladeFile != null && ObjectUtils.isNotEmpty(bladeFile.getLink())) {
+                            netUrl = bladeFile.getLink();
+                    }
+                }
+            }
+
+
+            List<String> list = Arrays.asList(nodeId.split(","));
+            Long userId = 1777156889464066049L;
+            String dateInfo = "";
+            for (String iId : list) {
+                //获取
+               /* if(StringUtils.isNotBlank(dataInfo.get("file_user_id_and_name")+"")){
+                    String userIdAndName = dataInfo.get("file_user_id_and_name")+"";
+                    String[] split = userIdAndName.split("-");
+                    userId = Long.parseLong(split[0]);
+                }*/
+
+                List<AppWbsTreeContractVO> WbsTreeContract = wbsTreeContractService.searchNodeAllTable(nodeId+":"+userId, classify, contractId, projectId ,null);
+
+                Map<String, String> idMap = new HashMap<>();
+                String wbsSql  = "select * from m_tab_busstime_info where is_deleted = 0 and tab_en_name IN('111111'";
+
+                for (AppWbsTreeContractVO appWbsTreeContractVO : WbsTreeContract) {
+
+                    wbsSql+=",'"+appWbsTreeContractVO.getInitTableName()+"'";
+                    idMap.put(appWbsTreeContractVO.getInitTableName(), appWbsTreeContractVO.getPKeyId() + "");
+                }
+                wbsSql+=")";
+                List<Map<String, Object>> tabussTimeInfo = jdbcTemplate.queryForList(wbsSql);
+
+
+                if (tabussTimeInfo != null && tabussTimeInfo.size() >= 1) {
+                    Map<String, Object> tabBusstimeInfo = tabussTimeInfo.get(0);
+
+                    String querySql = "select " + tabBusstimeInfo.get("col_key") + " from " + tabBusstimeInfo.get("tab_en_name") + " where p_key_id=" + idMap.get(tabBusstimeInfo.get("tab_en_name"));
+                    Map<String, Object> maps = jdbcTemplate.queryForMap(querySql);
+                    if (maps != null) {
+                        String keyData = maps.get(tabBusstimeInfo.get("col_key")) + "";
+                        if (StringUtils.isNotEmpty(keyData)) {
+                            dateInfo = keyData.split("_\\^_")[0];
+                            if (dateInfo.indexOf("年") >= 0) {
+                                dateInfo = dateInfo.replace("年", "-");
+                            }
+                            if (dateInfo.indexOf("月") >= 0) {
+                                dateInfo = dateInfo.replace("月", "-");
+                            }
+                            if (dateInfo.indexOf("日") >= 0) {
+                                dateInfo = dateInfo.replace("日", "");
+                            }
+                        }
+                    }
+                }
+            }
+
+            if(pdfUrl!=null && pdfUrl.length()>=20){
+                String pdfPage = commonFileClient.getPdfNum(pdfUrl);
+                long  pdfSize = CommonUtil.getResourceLength(pdfUrl);
+                jdbcTemplate.execute(" update  u_information_query set e_visa_pdf_size="+pdfSize+",e_visa_pdf_page="+pdfPage+", node_pdf_url='" + pdfUrl + "',create_dept=11 where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'");
+            }
+        }catch (Exception e) {
+             throw new RuntimeException(e);
+        }
+    }
 }

+ 8 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java

@@ -193,7 +193,7 @@ public class TextdictInfoController extends BladeController {
             }
         }
 
-        if (textdictInfo.getType() == 2 || textdictInfo.getType() == 5) {
+        if (textdictInfo.getType() == 2 || textdictInfo.getType() == 5 || textdictInfo.getType() == 4) {
             //读取html页面信息
             File file1 = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
             String htmlString = IoUtil.readToString(new FileInputStream(file1));
@@ -218,6 +218,13 @@ public class TextdictInfoController extends BladeController {
                         child.removeAttr(":readonly");
                     }
                 }
+            } else if(textdictInfo.getType() == 4){ // 默认值
+                Elements elements = element.getElementsByAttribute("defText");
+                if(Func.isNotEmpty(elements) && elements.size()>=1){
+                    for(Element eleme: elements){
+                        eleme.removeAttr("defText");
+                    }
+                }
             }
             //重写html
             File writeFile = new File(wbsTreePrivate.getHtmlUrl());

+ 10 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractSyncImpl.java

@@ -541,21 +541,26 @@ public class ArchiveTreeContractSyncImpl {
                         }
                         newInformationQueryList.add(info);
                     }//文件不同,则说明重签过,需要更新,顺序不同也更新
-                    else  if (info.getEVisaPdfUrl() != null && !info.getEVisaPdfUrl().equals(archiveFile.getPdfFileUrl())
-                            || sort != null && !sort.equals(archiveFile.getSort())) {
+                    // 2024 08 19
+                    // else  if (info.getEVisaPdfUrl() != null && !info.getEVisaPdfUrl().equals(archiveFile.getPdfFileUrl())
+                    //         || sort != null && !sort.equals(archiveFile.getSort())) {
+                    else  if (info.getNodePdfUrl() != null && !info.getNodePdfUrl().equals(archiveFile.getPdfFileUrl())
+                                || sort != null && !sort.equals(archiveFile.getSort())) {
 
                         if (updateMap.get(archiveFile.getId())!= null) {
                             continue;
                         }
 
-                        if (StringUtils.isEmpty(info.getEVisaPdfUrl())) {
+                        if (StringUtils.isEmpty(info.getNodePdfUrl())) {
                             continue;
                         }
 
                         //需要更新的
                         //todo 后续需增加判断已组件或者锁定的不要更新?
-                        archiveFile.setPdfFileUrl(info.getEVisaPdfUrl());
-                        archiveFile.setEVisaFile(info.getEVisaPdfUrl());
+                       // archiveFile.setPdfFileUrl(info.getEVisaPdfUrl());
+                       // archiveFile.setEVisaFile(info.getEVisaPdfUrl());
+                        archiveFile.setPdfFileUrl(info.getNodePdfUrl());
+                         archiveFile.setEVisaFile(info.getNodePdfUrl());
 
                         archiveFile.setFilePage(info.getEVisaPdfPage());
                         archiveFile.setFileSize(info.getEVisaPdfSize());

+ 4 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -2083,9 +2083,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
                                 InputStream imageIn = CommonUtil.getOSSInputStream(myData);
                                 if (imageIn != null) {
-                                  //  byte[] byteNew = IOUtils.toByteArray(imageIn);
-                                    byte[] bytes = IOUtils.toByteArray(imageIn);
-                                //    byte[] bytes = CommonUtil.compressImage(byteNew);
+                                    byte[] byteNew = IOUtils.toByteArray(imageIn);
+                                    byte[] bytes = CommonUtil.compressImage(byteNew);
                                     // 这里根据实际需求选择图片类型
                                     int pictureIdx = workbook.addPicture(bytes, 6);
                                     CreationHelper helper = workbook.getCreationHelper();
@@ -2293,8 +2292,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
 
             //获取当前填报节点sort
+            System.out.println("pdfs__"+listPdf+"___"+bladeFile);
             WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
-            System.out.println("wbsTreeContract==" + wbsTreeContract);
+            System.out.println(" " + wbsTreeContract);
             //获取顺序
             int sort = 0;
             if (ObjectUtil.isNotEmpty(wbsTreeContract)) {

+ 4 - 20
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java

@@ -34,10 +34,12 @@ import org.springblade.core.tool.utils.*;
 import org.springblade.system.cache.ParamCache;
 import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletResponse;
+import java.awt.*;
 import java.awt.image.BufferedImage;
 import java.io.*;
 import java.net.URLEncoder;
 import java.util.*;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
@@ -207,20 +209,6 @@ public class FileUtils {
         }
     }
 
-/*    public static void main(String[] args) throws FileNotFoundException {
-        ArrayList<String>  data = new ArrayList<>();
-        String listPdf ="/Users/hongchuangyanfa/Desktop/pdf/123456.pdf";
-        File tabpdf2 = ResourceUtil.getFile(listPdf);
-        if (tabpdf2.exists()) {
-            tabpdf2.delete();
-        }
-        data.add("http://183.247.216.148:9000/minio-oss-chongqing/upload/20240802/f5745a5a785a23fbea576e0dfd494864.pdf");
-        data.add("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240708/dde27fe7d38520573ff1eb2014f01287.pdf");
-        data.add("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240708/b1091cee377a5ca6874a4c00b259535e.pdf");
-        data.add("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240708/b630ebfb0347e27e312f3c1c7db096e4.pdf");
-        mergePdfPublicMethods(data,listPdf);
-
-    }*/
 
     /**
      * excel 转pdf
@@ -290,11 +278,7 @@ public class FileUtils {
             int width = templateImage.getWidth();
 
             //通过比例压缩
-            float scale = 0.5f;
-
-            //通过固定长度压缩
-            /*int doWithHeight = 100;
-            int dowithWidth = 300;*/
+            float scale = 1.2f;
 
             //压缩之后的长度和宽度
             int doWithHeight = (int) (scale * height);
@@ -302,7 +286,7 @@ public class FileUtils {
 
             BufferedImage finalImage = new BufferedImage(dowithWidth, doWithHeight, BufferedImage.TYPE_INT_RGB);
 
-            finalImage.getGraphics().drawImage(templateImage.getScaledInstance(dowithWidth, doWithHeight, java.awt.Image.SCALE_SMOOTH), 0, 0, null);
+            finalImage.getGraphics().drawImage(templateImage.getScaledInstance(dowithWidth, doWithHeight, Image.SCALE_DEFAULT), 0, 0, null);
 
 
             //图片输出路径,以及图片名

+ 6 - 3
blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java

@@ -1153,13 +1153,16 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
     public List<PrivateTreeVO2> treePrivate2(String projectId) {
         //查询出所有节点
         List<PrivateTreeVO2> vos = baseMapper.getAllNode(projectId);
+        List<PrivateTreeVO2> vo2 = new ArrayList<>();
         //转换为树
         List<PrivateTreeVO2> list = ForestNodeMerger.merge(vos);
-        if (list.size() != 1){
+        if (Func.isNull(list)){
             throw new ServiceException("当前项目级节点修改中,请联系管理员");
+        }else{
+            vo2.add(list.get(0));
         }
-        list.get(0).setNodeName( jdbcTemplate.queryForObject("SELECT project_name FROM m_project_info WHERE is_deleted = 0 and id = " + projectId, String.class));
-        return list;
+        vo2.get(0).setNodeName( jdbcTemplate.queryForObject("SELECT project_name FROM m_project_info WHERE is_deleted = 0 and id = " + projectId, String.class));
+        return vo2;
     }
 
     private List<PrivateTreeVO> buildTree(List<WbsTreePrivate> wbsTreePrivatesNodes, String projectId) {