|
|
@@ -35,6 +35,7 @@ import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
@@ -45,6 +46,8 @@ import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resources; |
|
|
|
import java.io.BufferedOutputStream; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileOutputStream; |
|
|
@@ -86,7 +89,8 @@ public class GovProjectCollectionManage { |
|
|
|
|
|
|
|
private final WpsConvertManage wpsConvertManage; |
|
|
|
|
|
|
|
private final ThreadPoolTaskExecutor threadPoolTaskExecutor; |
|
|
|
@Resource(name = "projectThreadPool") |
|
|
|
private ThreadPoolTaskExecutor projectThreadPool; |
|
|
|
|
|
|
|
@Value("${project.push-url}") |
|
|
|
private String pushUrl; |
|
|
@@ -441,7 +445,7 @@ public class GovProjectCollectionManage { |
|
|
|
saveApply.setUpdateBy(user.getUsername()); |
|
|
|
saveApply.setUpdateOn(LocalDateTime.now()); |
|
|
|
if(projectApplyService.saveOrUpdate(saveApply)){ |
|
|
|
threadPoolTaskExecutor.execute(() -> uploadFileToProvincialOssApply(apply,oldApply,saveApply)); |
|
|
|
projectThreadPool.execute(() -> uploadFileToProvincialOssApply(apply,oldApply,saveApply)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -466,7 +470,7 @@ public class GovProjectCollectionManage { |
|
|
|
saveApprove.setUpdateBy(user.getUsername()); |
|
|
|
saveApprove.setUpdateOn(LocalDateTime.now()); |
|
|
|
if(approveService.saveOrUpdate(saveApprove)){ |
|
|
|
threadPoolTaskExecutor.execute(() -> uploadFileToProvincialOssApprove(approve,oldApprove,saveApprove)); |
|
|
|
projectThreadPool.execute(() -> uploadFileToProvincialOssApprove(approve,oldApprove,saveApprove)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -492,7 +496,7 @@ public class GovProjectCollectionManage { |
|
|
|
saveCimplement.setUpdateBy(user.getUsername()); |
|
|
|
saveCimplement.setUpdateOn(LocalDateTime.now()); |
|
|
|
if(cimplementService.saveOrUpdate(saveCimplement)){ |
|
|
|
threadPoolTaskExecutor.execute(() -> uploadFileToProvincialOssCimplement(cimplement,oldCimplement,saveCimplement)); |
|
|
|
projectThreadPool.execute(() -> uploadFileToProvincialOssCimplement(cimplement,oldCimplement,saveCimplement)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|