|
@@ -75,6 +75,7 @@ import org.springblade.manager.feign.WbsInfoClient;
|
|
import org.springblade.manager.vo.ArchiveTreeContractVO2;
|
|
import org.springblade.manager.vo.ArchiveTreeContractVO2;
|
|
import org.springblade.manager.feign.ContractClient;
|
|
import org.springblade.manager.feign.ContractClient;
|
|
import org.springblade.manager.feign.ProjectClient;
|
|
import org.springblade.manager.feign.ProjectClient;
|
|
|
|
+import org.springblade.resource.feign.CommonFileClient;
|
|
import org.springblade.resource.feign.NewIOSSClient;
|
|
import org.springblade.resource.feign.NewIOSSClient;
|
|
import org.springblade.system.entity.DictBiz;
|
|
import org.springblade.system.entity.DictBiz;
|
|
import org.springblade.system.feign.IDictBizClient;
|
|
import org.springblade.system.feign.IDictBizClient;
|
|
@@ -150,7 +151,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
//表格宽度
|
|
//表格宽度
|
|
private static int widthPercentage = 100;
|
|
private static int widthPercentage = 100;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ private final CommonFileClient commonFileClient;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -479,6 +480,12 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
//分页
|
|
//分页
|
|
int current = (vo.getCurrent() - 1) * vo.getSize();
|
|
int current = (vo.getCurrent() - 1) * vo.getSize();
|
|
|
|
|
|
|
|
+ //修复代码后续删除
|
|
|
|
+ int test = 0 ;
|
|
|
|
+ if (test == 1) {
|
|
|
|
+ fixArchivesAutoFile(vo);
|
|
|
|
+ }
|
|
|
|
+
|
|
List<ArchivesAuto> pageList = this.baseMapper.selectArchivesAutoFilePage(current, vo.getSize(), vo);
|
|
List<ArchivesAuto> pageList = this.baseMapper.selectArchivesAutoFilePage(current, vo.getSize(), vo);
|
|
//设置分页信息
|
|
//设置分页信息
|
|
iPage.setTotal(total);
|
|
iPage.setTotal(total);
|
|
@@ -515,6 +522,41 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
return iPage.setRecords(pageVoList);
|
|
return iPage.setRecords(pageVoList);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ void fixArchivesAutoFile(ArchivesAutoVO vo) {
|
|
|
|
+ int current = 0;
|
|
|
|
+ vo.setSize(1000);
|
|
|
|
+ List<ArchivesAuto> pageList = this.baseMapper.selectArchivesAutoFilePageZero(current, vo.getSize(), vo);
|
|
|
|
+
|
|
|
|
+ if (pageList.size() > 0) {
|
|
|
|
+// String ids = pageList.stream()
|
|
|
|
+// .map(archivesAuto -> String.valueOf(archivesAuto.getId()))
|
|
|
|
+// .collect(Collectors.joining(","));
|
|
|
|
+ List<Long> idList = new ArrayList<>();
|
|
|
|
+ Map<Long, ArchivesAuto> map = new HashMap<>();
|
|
|
|
+ for (ArchivesAuto archivesAuto : pageList){
|
|
|
|
+ map.put(archivesAuto.getId(), archivesAuto);
|
|
|
|
+ idList.add(archivesAuto.getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<ArchiveFile> result = baseMapper.searchArchiveFileByArchivesId(idList);
|
|
|
|
+ for (ArchiveFile archiveFile : result){
|
|
|
|
+
|
|
|
|
+ String url = archiveFile.getFileUrl();
|
|
|
|
+ if (StringUtils.isNotEmpty(url)) {
|
|
|
|
+ String pdfPage = commonFileClient.getPdfNum(url);
|
|
|
|
+ archiveFile.setFilePage(Integer.valueOf(pdfPage));
|
|
|
|
+ }
|
|
|
|
+ archiveFileClient.updateById2(archiveFile);
|
|
|
|
+ ArchivesAuto archivesAuto = map.get(archiveFile.getArchiveId());
|
|
|
|
+ if (archivesAuto!= null) {
|
|
|
|
+ archivesAuto.setFileN(archiveFile.getFilePage());
|
|
|
|
+ save(archivesAuto);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public boolean updateArchivesAutoFileByNodeId(String ids, String nodeId,String nodeSort) {
|
|
public boolean updateArchivesAutoFileByNodeId(String ids, String nodeId,String nodeSort) {
|
|
try {
|
|
try {
|