Commit 8d3bda64 by wangweidong

土工部分优化

parent caf22704
...@@ -14,7 +14,7 @@ public class ThreadPush { ...@@ -14,7 +14,7 @@ public class ThreadPush {
@Bean(name = "crawlExecutorPool") @Bean(name = "crawlExecutorPool")
public ExecutorService crawlExecutorPool() { public ExecutorService crawlExecutorPool() {
// 获取Java虚拟机的可用的处理器数,最佳线程个数,处理器数*2。根据实际情况调整 // 获取Java虚拟机的可用的处理器数,最佳线程个数,处理器数*2。根据实际情况调整
int curSystemThreads = Runtime.getRuntime().availableProcessors() * 2; int curSystemThreads = Runtime.getRuntime().availableProcessors() << 1;
System.out.println("------------系统可用线程池个数:" + curSystemThreads); System.out.println("------------系统可用线程池个数:" + curSystemThreads);
// 创建线程池 // 创建线程池
ExecutorService pool = Executors.newFixedThreadPool(curSystemThreads); ExecutorService pool = Executors.newFixedThreadPool(curSystemThreads);
......
...@@ -1915,7 +1915,7 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap ...@@ -1915,7 +1915,7 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
"APPENDIX "+sample.getSiteNo()+" "+testEnglish); "APPENDIX "+sample.getSiteNo()+" "+testEnglish);
try { try {
HSSFWorkbookUtil.replaceModel(replaceMap,xssfWorkbook); HSSFWorkbookUtil.replaceModel(replaceMap,xssfWorkbook);
HSSFWorkbookUtil.insertImageSelf(xssfWorkbook,fileMap,0,3,41,9,0,3,10,41); HSSFWorkbookUtil.insertImageSelf(xssfWorkbook,fileMap,2,3,41,8,2,3,9,41);
}catch (Exception e){ }catch (Exception e){
logger.error("generateExcelReport错误"+e.getMessage()); logger.error("generateExcelReport错误"+e.getMessage());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment