|
|
@@ -1,6 +1,8 @@
|
|
|
package org.sky.scientific.service.impl;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
+import cn.hutool.core.io.IORuntimeException;
|
|
|
+import cn.hutool.core.util.ZipUtil;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
@@ -18,6 +20,7 @@ import org.sky.core.secure.utils.SecureUtil;
|
|
|
import org.sky.core.tool.utils.DateUtil;
|
|
|
import org.sky.core.tool.utils.Func;
|
|
|
import org.sky.scientific.mapper.ArchiveAttachMapper;
|
|
|
+import org.sky.scientific.mapper.DownloadTaskMapper;
|
|
|
import org.sky.scientific.mapper.SettingMapper;
|
|
|
import org.sky.scientific.pojo.dto.*;
|
|
|
import org.sky.scientific.pojo.entity.*;
|
|
|
@@ -27,6 +30,8 @@ import org.sky.scientific.utils.ZipDir;
|
|
|
import org.sky.scientific.utils.ZipDownloadUtils;
|
|
|
import org.sky.scientific.utils.ZipFileRef;
|
|
|
import org.sky.system.cache.DictCache;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -37,6 +42,7 @@ import java.io.IOException;
|
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.zip.Deflater;
|
|
|
@@ -44,6 +50,7 @@ import java.util.zip.Deflater;
|
|
|
@Service
|
|
|
public class ArchiveServiceImpl implements IArchiveService {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(ArchiveServiceImpl.class);
|
|
|
@Value("${archive.dir}")
|
|
|
private String archiveDir;
|
|
|
|
|
|
@@ -109,6 +116,8 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
private ICgRjzzqService rjzzqService;
|
|
|
@Resource
|
|
|
private ICgQtService qtService;
|
|
|
+ @Resource
|
|
|
+ private DownloadTaskMapper downloadTaskMapper;
|
|
|
|
|
|
@Override
|
|
|
public ArchiveAttachEntity fjbczl(String year) {
|
|
|
@@ -251,7 +260,7 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void downloadCenterZipFiles(HttpServletRequest request, HttpServletResponse response, String year) {
|
|
|
+ public void downloadCenterZipFiles(String year, Long taskId) {
|
|
|
if (Func.isBlank(year)) {
|
|
|
throw new ServiceException("参数year不能为空");
|
|
|
}
|
|
|
@@ -260,68 +269,123 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
if (archiveAttach == null) {
|
|
|
archiveAttach = new ArchiveAttachEntity();
|
|
|
}
|
|
|
-
|
|
|
Path basePath = Paths.get(archiveDir, SecureUtil.getTenantId(), year);
|
|
|
|
|
|
- //1 高新技术企业资格证书:基础资源管理-企业基本信息-高企证书上传(按年度)。未上传则为空
|
|
|
- generateD1(Paths.get(basePath.toString(), "1.高新技术企业资格证书"), year);
|
|
|
- //2 高新技术企业认定资料:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "2.高新技术企业认定资料"), Collections.singletonList(archiveAttach.getD3()));
|
|
|
- //3 加计扣除情况说明:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "3.加计扣除情况说明"), Collections.singletonList(archiveAttach.getD10()));
|
|
|
- //4 研发立项决议文件:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "4.研发立项决议文件"), Collections.singletonList(archiveAttach.getD13()));
|
|
|
- //5 高新研发项目汇总表:对外报表-高新口径研发费用报表-高新-研发项目清单表
|
|
|
- generateD5(Paths.get(basePath.toString(), "5.高新研发项目汇总表"), year, 2);
|
|
|
- //6 加计扣除研发项目汇总表:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单表
|
|
|
- generateD5(Paths.get(basePath.toString(), "6.加计扣除研发项目汇总表"), year, 3);
|
|
|
- //7.高新研发项目全套技术资料:对外报表-高新口径研发费用报表-高新-研发项目清单中的所有研发项目的全套技术资料,每一个项目,都包括:项目立项表+上传的所有附件;项目实施表(含多个表)+所有附件;项目变更(多个表)+所有附件;项目结题(多个表)+所有附件;委外项目表+所有附件。
|
|
|
- generateD7(Paths.get(basePath.toString(), "7.高新研发项目全套技术资料"), year, 2);
|
|
|
- //8 加计扣除研发项目全套技术资料:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单中的所有研发项目的全套技术资料,每一个项目,都包括:项目立项表+上传的所有附件;项目实施表(含多个表)+所有附件;项目变更(多个表)+所有附件;项目结题(多个表)+所有附件;委外项目表+所有附件。
|
|
|
- generateD7(Paths.get(basePath.toString(), "8.加计扣除研发项目全套技术资料"), year, 3);
|
|
|
- //9 高新研发人员与科技人员资料:改成高新科技人员资料:即科技人员管理-年高新科技人员汇总表资料表,选出:对外报表-高新口径研发费用报表-高新-研发项目清单中项目人员汇总
|
|
|
- generateD9(Paths.get(basePath.toString(), "9.高新科技人员资料"), year, archiveAttach.getD6());
|
|
|
- //10 加计扣除研发人员与科技人员资料:改成加计扣除项目科研人员资料:即科技人员管理-项目人员汇总表,选出:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单中项目人员汇总
|
|
|
- generateD10(Paths.get(basePath.toString(), "10.加计扣除项目科研人员资料"), year);
|
|
|
- //11 11.全部知识产权资料(汇总表、附件):当年度所有科研成果列表导出,及所有附件资料的下载
|
|
|
- generateD11(Paths.get(basePath.toString(), "11.全部知识产权资料"), 0, year);
|
|
|
- //12 高新项目知识产权资料(汇总表、附件):对外报表-高新口径研发费用报表-高新-研发项目清单中的科研成果列表及所有附件资料的下载
|
|
|
- generateD11(Paths.get(basePath.toString(), "12.高新项目知识产权资料"), 2, year);
|
|
|
- //13 加计扣除项目知识产权资料(汇总表、附件):对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单中的科研成果列表及所有附件资料的下载
|
|
|
- generateD11(Paths.get(basePath.toString(), "13.加计扣除项目知识产权资料"), 3, year);
|
|
|
- //14 会计口径研发费用辅助账:对外报表-会计加计扣除口径研发费用报表-会计-研发支出辅助账
|
|
|
- generateD14(Paths.get(basePath.toString(), "14.会计口径研发费用辅助账"), year);
|
|
|
- //15 高新口径研发费用辅助账:对外报表-高新口径研发费用报表-高新-研发支出辅助账
|
|
|
- generateD15(Paths.get(basePath.toString(), "15.高新口径研发费用辅助账"), year, archiveAttach.getD9());
|
|
|
- //16 加计扣除口径研发费用辅助账:对外报表-加计扣除口径研发费用报表-加计扣除-研发支出辅助账
|
|
|
- generateD16(Paths.get(basePath.toString(), "16.加计扣除口径研发费用辅助账"), year);
|
|
|
-
|
|
|
-
|
|
|
- //17.会计口径研发费用附件凭证资料及相关说明:对外报表-会计加计扣除口径研发费用报表-会计-研发项目(见列表详细)
|
|
|
- generateD17(year, 1, "17.会计口径研发费用附件支撑资料及相关说明");
|
|
|
- //18.高新研发费用附件凭证资料及相关说明:对外报表-高新口径研发费用报表-高新-研发项目(见列表详细)
|
|
|
- generateD17(year, 2, "18.高新研发费用附件支持资料及相关说明");
|
|
|
- //19.加计扣除研发费用附件凭证资料及相关说明:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目(见列表详细)
|
|
|
- generateD17(year, 3, "19.加计扣除研发费用附件支撑资料及相关说明");
|
|
|
-
|
|
|
- //20.A107012研发费用加计扣除优惠明细表:A107012导出表
|
|
|
- generateD20(year, "20.A107012研发费用加计扣除优惠明细表");
|
|
|
- //21.当年和前两个会计年度研发费用总额及占同期销售收入比例的说明:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "21.当年和前两个会计年度研发费用总额及占同期销售收入比例的说明"), Collections.singletonList(archiveAttach.getD7()));
|
|
|
- //22.年度主要产品(服务)发挥核心支持作用的技术属于《国家重点支持的高新技术领域》规定范围的说明:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "22.年度主要产品(服务)发挥核心支持作用的技术属于《国家重点支持的高新技术领域》规定范围的说明"), Collections.singletonList(archiveAttach.getD4()));
|
|
|
- //23.高新技术产品(服务)及对应收入资料:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "23.高新技术产品(服务)及对应收入资料"), Collections.singletonList(archiveAttach.getD5()));
|
|
|
- //24.研发管理制度:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "24.研发管理制度"), Collections.singletonList(archiveAttach.getD8()));
|
|
|
- //25.高新项目技术鉴定资料:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "25.高新项目技术鉴定资料"), Collections.singletonList(archiveAttach.getD1()));
|
|
|
- //26.加计扣除项目技术鉴定资料:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "26.加计扣除项目技术鉴定资料"), Collections.singletonList(archiveAttach.getD2()));
|
|
|
- //27.其他高新备查资料:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "27.其他高新备查资料"), Collections.singletonList(archiveAttach.getD11()));
|
|
|
- //28.其他加计扣除备查资料:附件补充
|
|
|
- this.downloadAttachFiles(Paths.get(basePath.toString(), "28.其他加计扣除备查资料"), Collections.singletonList(archiveAttach.getD12()));
|
|
|
+ ArchiveAttachEntity finalArchiveAttach = archiveAttach;
|
|
|
+ CompletableFuture<Void> task1 = CompletableFuture.runAsync(() -> {
|
|
|
+ //1 高新技术企业资格证书:基础资源管理-企业基本信息-高企证书上传(按年度)。未上传则为空
|
|
|
+ generateD1(Paths.get(basePath.toString(), "1.高新技术企业资格证书"), year);
|
|
|
+ //2 高新技术企业认定资料:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "2.高新技术企业认定资料"), Collections.singletonList(finalArchiveAttach.getD3()));
|
|
|
+ //3 加计扣除情况说明:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "3.加计扣除情况说明"), Collections.singletonList(finalArchiveAttach.getD10()));
|
|
|
+ //4 研发立项决议文件:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "4.研发立项决议文件"), Collections.singletonList(finalArchiveAttach.getD13()));
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task2 = CompletableFuture.runAsync(() -> {
|
|
|
+ //5 高新研发项目汇总表:对外报表-高新口径研发费用报表-高新-研发项目清单表
|
|
|
+ generateD5(Paths.get(basePath.toString(), "5.高新研发项目汇总表"), year, 2);
|
|
|
+ //6 加计扣除研发项目汇总表:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单表
|
|
|
+ generateD5(Paths.get(basePath.toString(), "6.加计扣除研发项目汇总表"), year, 3);
|
|
|
+ });
|
|
|
+//
|
|
|
+// CompletableFuture<Void> task3 = CompletableFuture.runAsync(() -> {
|
|
|
+// //7.高新研发项目全套技术资料:对外报表-高新口径研发费用报表-高新-研发项目清单中的所有研发项目的全套技术资料,每一个项目,都包括:项目立项表+上传的所有附件;项目实施表(含多个表)+所有附件;项目变更(多个表)+所有附件;项目结题(多个表)+所有附件;委外项目表+所有附件。
|
|
|
+// generateD7(Paths.get(basePath.toString(), "7.高新研发项目全套技术资料"), year, 2);
|
|
|
+// });
|
|
|
+// CompletableFuture<Void> task4 = CompletableFuture.runAsync(() -> {
|
|
|
+// //8 加计扣除研发项目全套技术资料:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单中的所有研发项目的全套技术资料,每一个项目,都包括:项目立项表+上传的所有附件;项目实施表(含多个表)+所有附件;项目变更(多个表)+所有附件;项目结题(多个表)+所有附件;委外项目表+所有附件。
|
|
|
+// generateD7(Paths.get(basePath.toString(), "8.加计扣除研发项目全套技术资料"), year, 3);
|
|
|
+// });
|
|
|
+
|
|
|
+ CompletableFuture<Void> task5 = CompletableFuture.runAsync(() -> {
|
|
|
+ //9 高新研发人员与科技人员资料:改成高新科技人员资料:即科技人员管理-年高新科技人员汇总表资料表,选出:对外报表-高新口径研发费用报表-高新-研发项目清单中项目人员汇总
|
|
|
+ generateD9(Paths.get(basePath.toString(), "9.高新科技人员资料"), year, finalArchiveAttach.getD6());
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task6 = CompletableFuture.runAsync(() -> {
|
|
|
+ //10 加计扣除研发人员与科技人员资料:改成加计扣除项目科研人员资料:即科技人员管理-项目人员汇总表,选出:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单中项目人员汇总
|
|
|
+ generateD10(Paths.get(basePath.toString(), "10.加计扣除项目科研人员资料"), year);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task7 = CompletableFuture.runAsync(() -> {
|
|
|
+ //11 全部知识产权资料(汇总表、附件):当年度所有科研成果列表导出,及所有附件资料的下载
|
|
|
+ generateD11(Paths.get(basePath.toString(), "11.全部知识产权资料"), 0, year);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task8 = CompletableFuture.runAsync(() -> {
|
|
|
+ //12 高新项目知识产权资料(汇总表、附件):对外报表-高新口径研发费用报表-高新-研发项目清单中的科研成果列表及所有附件资料的下载
|
|
|
+ generateD11(Paths.get(basePath.toString(), "12.高新项目知识产权资料"), 2, year);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task9 = CompletableFuture.runAsync(() -> {
|
|
|
+ //13 加计扣除项目知识产权资料(汇总表、附件):对外报表-加计扣除口径研发费用报表-加计扣除-研发项目清单中的科研成果列表及所有附件资料的下载
|
|
|
+ generateD11(Paths.get(basePath.toString(), "13.加计扣除项目知识产权资料"), 3, year);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task10 = CompletableFuture.runAsync(() -> {
|
|
|
+ //14 会计口径研发费用辅助账:对外报表-会计加计扣除口径研发费用报表-会计-研发支出辅助账
|
|
|
+ generateD14(Paths.get(basePath.toString(), "14.会计口径研发费用辅助账"), year);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task11 = CompletableFuture.runAsync(() -> {
|
|
|
+ //15 高新口径研发费用辅助账:对外报表-高新口径研发费用报表-高新-研发支出辅助账
|
|
|
+ generateD15(Paths.get(basePath.toString(), "15.高新口径研发费用辅助账"), year, finalArchiveAttach.getD9());
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task12 = CompletableFuture.runAsync(() -> {
|
|
|
+ //16 加计扣除口径研发费用辅助账:对外报表-加计扣除口径研发费用报表-加计扣除-研发支出辅助账
|
|
|
+ generateD16(Paths.get(basePath.toString(), "16.加计扣除口径研发费用辅助账"), year);
|
|
|
+ });
|
|
|
+ //todo 开始
|
|
|
+ CompletableFuture<Void> task13 = CompletableFuture.runAsync(() -> {
|
|
|
+ //17.会计口径研发费用附件凭证资料及相关说明:对外报表-会计加计扣除口径研发费用报表-会计-研发项目(见列表详细)
|
|
|
+ generateD17(Paths.get(basePath.toString(), "17.会计口径研发费用附件支撑资料及相关说明"),year, 1);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task14 = CompletableFuture.runAsync(() -> {
|
|
|
+ //18.高新研发费用附件凭证资料及相关说明:对外报表-高新口径研发费用报表-高新-研发项目(见列表详细)
|
|
|
+ generateD17(Paths.get(basePath.toString(), "18.高新研发费用附件支持资料及相关说明"),year, 2);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task15 = CompletableFuture.runAsync(() -> {
|
|
|
+ //19.加计扣除研发费用附件凭证资料及相关说明:对外报表-加计扣除口径研发费用报表-加计扣除-研发项目(见列表详细)
|
|
|
+ generateD17(Paths.get(basePath.toString(), "19.加计扣除研发费用附件支撑资料及相关说明"),year, 3);
|
|
|
+ });
|
|
|
+ //todo 结束
|
|
|
+ CompletableFuture<Void> task16 = CompletableFuture.runAsync(() -> {
|
|
|
+ //20.A107012研发费用加计扣除优惠明细表:A107012导出表
|
|
|
+ generateD20(Paths.get(basePath.toString(), "20.A107012研发费用加计扣除优惠明细表"),year);
|
|
|
+ });
|
|
|
+ CompletableFuture<Void> task17 = CompletableFuture.runAsync(() -> {
|
|
|
+ //21.当年和前两个会计年度研发费用总额及占同期销售收入比例的说明:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "21.当年和前两个会计年度研发费用总额及占同期销售收入比例的说明"), Collections.singletonList(finalArchiveAttach.getD7()));
|
|
|
+ //22.年度主要产品(服务)发挥核心支持作用的技术属于《国家重点支持的高新技术领域》规定范围的说明:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "22.年度主要产品(服务)发挥核心支持作用的技术属于《国家重点支持的高新技术领域》规定范围的说明"), Collections.singletonList(finalArchiveAttach.getD4()));
|
|
|
+ //23.高新技术产品(服务)及对应收入资料:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "23.高新技术产品(服务)及对应收入资料"), Collections.singletonList(finalArchiveAttach.getD5()));
|
|
|
+ //24.研发管理制度:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "24.研发管理制度"), Collections.singletonList(finalArchiveAttach.getD8()));
|
|
|
+ //25.高新项目技术鉴定资料:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "25.高新项目技术鉴定资料"), Collections.singletonList(finalArchiveAttach.getD1()));
|
|
|
+ //26.加计扣除项目技术鉴定资料:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "26.加计扣除项目技术鉴定资料"), Collections.singletonList(finalArchiveAttach.getD2()));
|
|
|
+ //27.其他高新备查资料:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "27.其他高新备查资料"), Collections.singletonList(finalArchiveAttach.getD11()));
|
|
|
+ //28.其他加计扣除备查资料:附件补充
|
|
|
+ this.downloadAttachFiles(Paths.get(basePath.toString(), "28.其他加计扣除备查资料"), Collections.singletonList(finalArchiveAttach.getD12()));
|
|
|
+ });
|
|
|
+ Date date = new Date();
|
|
|
+// CompletableFuture.allOf(task1, task2, task3,task4,task5,task6,task7,task8,task9,task10,task11,task12,task13,task14,task15,task16,task17).join();
|
|
|
+ CompletableFuture.allOf(task1, task2, task5,task6,task7,task8,task9,task10,task11,task12,task13,task14,task15,task16,task17).join();
|
|
|
+// CompletableFuture.allOf(task1, task2, task5, task6).join();
|
|
|
+ long l = new Date().getTime() - date.getTime();
|
|
|
+
|
|
|
+ String zipPath = basePath+".zip";
|
|
|
+ try {
|
|
|
+ ZipUtil.zip(basePath.toString(), zipPath);
|
|
|
+ } catch (IORuntimeException e) {
|
|
|
+ log.error("创建zip文件失败,{}",e.getLocalizedMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ DownloadTask task = new DownloadTask();
|
|
|
+ task.setId(taskId);
|
|
|
+ //设置任务状态为 已完成
|
|
|
+ task.setStatus(2);
|
|
|
+ task.setZipUrl(zipPath);
|
|
|
+ downloadTaskMapper.updateById(task);
|
|
|
+ System.out.println("一键导出耗时:" + l / 1000 + "秒");
|
|
|
}
|
|
|
|
|
|
private boolean generateD14(Path path, String year) {
|
|
|
@@ -404,7 +468,7 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
private boolean generateD1(Path path, String year) {
|
|
|
try {
|
|
|
FileUtil.mkdir(path);
|
|
|
- SettingEntity one = settingMapper.selectOne(Wrappers.<SettingEntity>lambdaQuery().eq(SettingEntity::getYearAndMonth, year));
|
|
|
+ SettingEntity one = settingMapper.selectOne(Wrappers.<SettingEntity>lambdaQuery().eq(SettingEntity::getYearAndMonth, year).eq(SettingEntity::getTenantId, SecureUtil.getTenantId()));
|
|
|
if (Func.notNull(one) && Func.isNotBlank(one.getHighTechUrl())) {
|
|
|
String[] urlList = one.getHighTechUrl().split(",");
|
|
|
int i = 1;
|
|
|
@@ -516,7 +580,6 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
List<XmJdxbgVO> xmJdxbgVOList = xmJdxbgService.selectByCondition(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), xmJdxbgEntity).getRecords();
|
|
|
|
|
|
Map<String, Integer> fileNameMap = new ConcurrentHashMap<>();
|
|
|
-
|
|
|
List<String> attachList = new ArrayList<>();
|
|
|
for (XmJdxbgVO vo : xmJdxbgVOList) {
|
|
|
XmEntity xmEntity = vo.getXmEntity();
|
|
|
@@ -541,7 +604,6 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
XmBgrzEntity xmBgrzEntity = new XmBgrzEntity();
|
|
|
xmBgrzEntity.setXmId(xm.getXmId());
|
|
|
List<XmBgrzVO> xmBgrzVOList = xmBgrzService.selectBgrzPage(xmBgrzEntity, Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE))).getRecords();
|
|
|
-
|
|
|
attachList = new ArrayList<>();
|
|
|
for (XmBgrzVO vo : xmBgrzVOList) {
|
|
|
String fileName = xm.getXmmc() + "-" + vo.getZdmcStr() + "变更" + DateUtil.format(vo.getBgsxsj(), DateUtil.PATTERN_YYYYMMDD) + ".doc";
|
|
|
@@ -755,15 +817,12 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- private boolean generateD17(String year, Integer type, String title) {
|
|
|
+ private boolean generateD17(Path path, String year, Integer type) {
|
|
|
//17 会计口径研发费用附件凭证资料及相关说明
|
|
|
//18 高新研发费用附件凭证资料及相关说明
|
|
|
//19 加计扣除研发费用附件凭证资料及相关说明
|
|
|
- Path path = Paths.get(archiveDir, SecureUtil.getTenantId(), year, title);
|
|
|
-
|
|
|
try {
|
|
|
FileUtil.mkdir(path);
|
|
|
-
|
|
|
XmFinanceEntity dto = new XmFinanceEntity();
|
|
|
dto.setYearAndMonth(year);
|
|
|
dto.setType(type);
|
|
|
@@ -919,13 +978,11 @@ public class ArchiveServiceImpl implements IArchiveService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private boolean generateD20(String year, String title) {
|
|
|
+ private boolean generateD20(Path path, String year) {
|
|
|
//A107012研发费用加计扣除优惠明细表
|
|
|
- Path path = Paths.get(archiveDir, SecureUtil.getTenantId(), year, title);
|
|
|
- try {
|
|
|
+ try {
|
|
|
FileUtil.mkdir(path);
|
|
|
-
|
|
|
- try (FileOutputStream out = new FileOutputStream(Paths.get(path.toString(), title + ".xlsx").toString())) {
|
|
|
+ try (FileOutputStream out = new FileOutputStream(Paths.get(path.toString(), "A107012研发费用加计扣除优惠明细表.xlsx").toString())) {
|
|
|
enterpriseInfoService.exportYffyjjkcyhmxbA107012(out, year);
|
|
|
}
|
|
|
} catch (Exception e) {
|