|
@@ -36,9 +36,7 @@ import java.time.DayOfWeek;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
-import java.util.concurrent.CompletableFuture;
|
|
|
-import java.util.concurrent.ExecutorService;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
+import java.util.concurrent.*;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -72,7 +70,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
private SysEmployeePositionService employeePositionService;
|
|
|
@Autowired
|
|
|
private MusicGroupCalenderRefundPeriodDao musicGroupCalenderRefundPeriodDao;
|
|
|
- private static final ExecutorService exportExecutorService = Executors.newFixedThreadPool(20);
|
|
|
+ private static final ExecutorService exportExecutorService = new ThreadPoolExecutor(
|
|
|
+ 20, 20, 0L, TimeUnit.MILLISECONDS,
|
|
|
+ new LinkedBlockingQueue<>(),
|
|
|
+ Executors.defaultThreadFactory(),
|
|
|
+ new ThreadPoolExecutor.CallerRunsPolicy()
|
|
|
+ );;
|
|
|
private static final Logger businessLogger = LoggerFactory.getLogger(IndexBaseMonthDataServiceImpl.class);
|
|
|
|
|
|
private static ThreadLocal<Set<Integer>> organIds = new ThreadLocal<Set<Integer>>(){
|