1
0

2 Commits 01da59de66 ... 9310461530

Autor SHA1 Nachricht Datum
  huangtf 9310461530 Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex vor 6 Tagen
  huangtf c8e0e542a7 同步问题 vor 6 Tagen

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeContractController.java

@@ -256,6 +256,12 @@ public class ArchiveTreeContractController extends BladeController {
 //		if (projectId == null) {tree = {ArrayList@17448}  size = 1
 //			projectId = 1578599210897772545L;
 //		}
+//        int i = 0;
+//        if (i == 1){
+//            archiveTreeContractService.writeBusinessData(1853317890158100515L,1853316182172528641L,null,1);
+//        }
+
+
         List<ArchiveTreeContractVO2> tree = archiveTreeContractService.lazyTree2(AuthUtil.getTenantId(), parentId, projectId, contractId);
         if (tree != null && tree.size() > 0) {
             List<ArchiveTreeContractVO2> newTrees = new ArrayList<>();

+ 12 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractSyncImpl.java

@@ -534,6 +534,11 @@ public class ArchiveTreeContractSyncImpl {
                 //业内类型不匹配则不处理  treeContractVO6判空
                 WbsTreeContractVO6 treeContractVO6 = wbsTreeContractVO6Map.get(id);
 
+                Long levelKeyId = findPKeyIdByNodeType(wbsTreeContractVO6Map,id,level);
+
+                //根据map获取到对应的归档树节点nodeid
+                Long nodeId = archiveTreeContractIdMap.get(levelKeyId);
+
                 if (treeContractVO6 == null ) {
                     continue;
                 }
@@ -556,7 +561,8 @@ public class ArchiveTreeContractSyncImpl {
                     // 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())) {
+                                || sort != null && !sort.equals(archiveFile.getSort())
+                                || nodeId != null && !nodeId.toString().equals(archiveFile.getNodeId())) {
 
                         if (updateMap.get(archiveFile.getId())!= null) {
                             continue;
@@ -571,7 +577,7 @@ public class ArchiveTreeContractSyncImpl {
                        // archiveFile.setPdfFileUrl(info.getEVisaPdfUrl());
                        // archiveFile.setEVisaFile(info.getEVisaPdfUrl());
                         archiveFile.setPdfFileUrl(info.getNodePdfUrl());
-                         archiveFile.setEVisaFile(info.getNodePdfUrl());
+                        archiveFile.setEVisaFile(info.getNodePdfUrl());
 
                         archiveFile.setFilePage(info.getEVisaPdfPage());
                         archiveFile.setFileSize(info.getEVisaPdfSize());
@@ -579,6 +585,10 @@ public class ArchiveTreeContractSyncImpl {
                         archiveFile.setCertificationTime(info.getBusinessTime());
                         archiveFile.setFileTime(info.getBusinessTime());
                         archiveFile.setSort(sort);
+                        if (nodeId != null && !nodeId.toString().equals(archiveFile.getNodeId())) {
+                            archiveFile.setNodeId(nodeId.toString());
+                        }
+
                         updateArchiveFiles.add(archiveFile);
 
                         updateMap.put(archiveFile.getId(),"1");