|
@@ -42,6 +42,7 @@ import org.springframework.http.HttpHeaders; |
|
|
import org.springframework.http.MediaType; |
|
|
import org.springframework.http.MediaType; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
|
|
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.web.client.RestTemplate; |
|
|
import org.springframework.web.client.RestTemplate; |
|
@@ -89,8 +90,8 @@ public class GovProjectCollectionManage { |
|
|
|
|
|
|
|
|
private final WpsConvertManage wpsConvertManage; |
|
|
private final WpsConvertManage wpsConvertManage; |
|
|
|
|
|
|
|
|
@Resource(name = "projectThreadPool") |
|
|
|
|
|
private ThreadPoolTaskExecutor projectThreadPool; |
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
private ThreadPoolTaskScheduler threadPoolTaskScheduler; |
|
|
|
|
|
|
|
|
@Value("${project.push-url}") |
|
|
@Value("${project.push-url}") |
|
|
private String pushUrl; |
|
|
private String pushUrl; |
|
@@ -445,7 +446,7 @@ public class GovProjectCollectionManage { |
|
|
saveApply.setUpdateBy(user.getUsername()); |
|
|
saveApply.setUpdateBy(user.getUsername()); |
|
|
saveApply.setUpdateOn(LocalDateTime.now()); |
|
|
saveApply.setUpdateOn(LocalDateTime.now()); |
|
|
if(projectApplyService.saveOrUpdate(saveApply)){ |
|
|
if(projectApplyService.saveOrUpdate(saveApply)){ |
|
|
projectThreadPool.execute(() -> uploadFileToProvincialOssApply(apply,oldApply,saveApply)); |
|
|
|
|
|
|
|
|
threadPoolTaskScheduler.execute(() -> uploadFileToProvincialOssApply(apply,oldApply,saveApply)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -470,7 +471,7 @@ public class GovProjectCollectionManage { |
|
|
saveApprove.setUpdateBy(user.getUsername()); |
|
|
saveApprove.setUpdateBy(user.getUsername()); |
|
|
saveApprove.setUpdateOn(LocalDateTime.now()); |
|
|
saveApprove.setUpdateOn(LocalDateTime.now()); |
|
|
if(approveService.saveOrUpdate(saveApprove)){ |
|
|
if(approveService.saveOrUpdate(saveApprove)){ |
|
|
projectThreadPool.execute(() -> uploadFileToProvincialOssApprove(approve,oldApprove,saveApprove)); |
|
|
|
|
|
|
|
|
threadPoolTaskScheduler.execute(() -> uploadFileToProvincialOssApprove(approve,oldApprove,saveApprove)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -496,7 +497,7 @@ public class GovProjectCollectionManage { |
|
|
saveCimplement.setUpdateBy(user.getUsername()); |
|
|
saveCimplement.setUpdateBy(user.getUsername()); |
|
|
saveCimplement.setUpdateOn(LocalDateTime.now()); |
|
|
saveCimplement.setUpdateOn(LocalDateTime.now()); |
|
|
if(cimplementService.saveOrUpdate(saveCimplement)){ |
|
|
if(cimplementService.saveOrUpdate(saveCimplement)){ |
|
|
projectThreadPool.execute(() -> uploadFileToProvincialOssCimplement(cimplement,oldCimplement,saveCimplement)); |
|
|
|
|
|
|
|
|
threadPoolTaskScheduler.execute(() -> uploadFileToProvincialOssCimplement(cimplement,oldCimplement,saveCimplement)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|