|
@@ -88,7 +88,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
public List<WzOutboundOrderBNewExport> getClfDetailIfBoss1(String nowMonth) {
|
|
|
ArrayList<WzOutboundOrderBNewExport> resultList = new ArrayList<>();
|
|
|
|
|
|
- ExecutorService threadPoolExecutors = Executors.newFixedThreadPool(8);
|
|
|
+ ExecutorService clfThreadPoolExecutors = Executors.newFixedThreadPool(8);
|
|
|
|
|
|
int wzSize = orderBNewMapper.getCountClfDetail(nowMonth); // 当前月份一共有多少条物资数据
|
|
|
log.info("开始进行分片查询,共{}条数据",wzSize);
|
|
@@ -113,7 +113,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
try {
|
|
|
if (!map.get("0").isEmpty()){
|
|
|
String[] split = map.get("0").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -121,7 +121,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("1").isEmpty()){
|
|
|
String[] split = map.get("1").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -129,7 +129,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("2").isEmpty()){
|
|
|
String[] split = map.get("2").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -137,7 +137,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("3").isEmpty()){
|
|
|
String[] split = map.get("3").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -145,7 +145,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("4").isEmpty()){
|
|
|
String[] split = map.get("4").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -153,7 +153,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("5").isEmpty()){
|
|
|
String[] split = map.get("5").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -161,7 +161,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("6").isEmpty()){
|
|
|
String[] split = map.get("6").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
@@ -169,19 +169,19 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
|
|
|
|
|
|
if (!map.get("7").isEmpty()){
|
|
|
String[] split = map.get("7").split("-");
|
|
|
- threadPoolExecutors.submit(() -> {
|
|
|
+ clfThreadPoolExecutors.submit(() -> {
|
|
|
List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
|
|
|
resultList.addAll(list);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- threadPoolExecutors.shutdown();
|
|
|
- boolean b = threadPoolExecutors.awaitTermination(5, TimeUnit.HOURS);
|
|
|
+ clfThreadPoolExecutors.shutdown();
|
|
|
+ boolean b = clfThreadPoolExecutors.awaitTermination(5, TimeUnit.HOURS);
|
|
|
log.info("查询结束");
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
|
} finally {
|
|
|
- threadPoolExecutors.shutdown();
|
|
|
+ clfThreadPoolExecutors.shutdown();
|
|
|
}
|
|
|
|
|
|
return resultList;
|