|
@@ -3,6 +3,7 @@ package org.springblade.manager.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springblade.business.entity.ArchiveFile;
|
|
|
import org.springblade.business.entity.InformationQuery;
|
|
|
import org.springblade.business.feign.ArchiveFileClient;
|
|
@@ -452,6 +453,8 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
//更新的文件
|
|
|
List<ArchiveFile> updateArchiveFiles = new ArrayList<>();
|
|
|
|
|
|
+ Map<Long,String> updateMap = new HashMap<>();
|
|
|
+
|
|
|
//遍历,所有已归档文件
|
|
|
for (InformationQuery info: informationQueryList) {
|
|
|
Long keyId = info.getWbsId();
|
|
@@ -484,10 +487,19 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
else if (!archiveFile.getPdfFileUrl().equals(info.getEVisaPdfUrl())
|
|
|
|| (!sort.equals(archiveFile.getSort()))) {
|
|
|
|
|
|
+ if (updateMap.get(archiveFile.getId())!= null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(info.getEVisaPdfUrl())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
//需要更新的
|
|
|
//todo 后续需增加判断已组件或者锁定的不要更新?
|
|
|
archiveFile.setPdfFileUrl(info.getEVisaPdfUrl());
|
|
|
archiveFile.setEVisaFile(info.getEVisaPdfUrl());
|
|
|
+
|
|
|
archiveFile.setFilePage(info.getEVisaPdfPage());
|
|
|
archiveFile.setFileSize(info.getEVisaPdfSize());
|
|
|
archiveFile.setIsCertification(1);
|
|
@@ -495,6 +507,8 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
archiveFile.setFileTime(info.getBusinessTime());
|
|
|
archiveFile.setSort(sort);
|
|
|
updateArchiveFiles.add(archiveFile);
|
|
|
+
|
|
|
+ updateMap.put(archiveFile.getId(),"1");
|
|
|
}
|
|
|
}
|
|
|
}
|