涉稳,列管人员清洗

develop
hanrenchun 10 months ago
parent 35a7e20edb
commit 7644ac767f

@ -88,8 +88,7 @@ public class VLgryGjxxTask {
lgryMap.put("minTime", oneYearLaterFormattedDate); lgryMap.put("minTime", oneYearLaterFormattedDate);
List<VLgryGjxxOracle> list = vLgryGjxxOracleService.getLgryListByTime(lgryMap); List<VLgryGjxxOracle> list = vLgryGjxxOracleService.getLgryListByTime(lgryMap);
CountDownLatch latch = new CountDownLatch(list.size()); CountDownLatch latch = new CountDownLatch(list.size());
ExecutorService LgryPool = Executors.newFixedThreadPool(5);
LgryPool.submit(() -> {
try { try {
for (VLgryGjxxOracle lgry : list) { for (VLgryGjxxOracle lgry : list) {
if ("10".equals(lgry.getYJLX())) { if ("10".equals(lgry.getYJLX())) {
@ -165,7 +164,7 @@ public class VLgryGjxxTask {
logger.info("Lgrys:" + StringKit.getTrace(e)); logger.info("Lgrys:" + StringKit.getTrace(e));
} }
latch.countDown(); latch.countDown();
});
try { try {
// Wait for all threads to complete // Wait for all threads to complete
@ -173,8 +172,6 @@ public class VLgryGjxxTask {
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
// 关闭线程池
LgryPool.shutdown();
} catch ( } catch (
Exception e) { Exception e) {

@ -88,8 +88,7 @@ public class VSwryGjxxTask {
SwryMap.put("minTime", oneYearLaterFormattedDate); SwryMap.put("minTime", oneYearLaterFormattedDate);
List<VSwryGjxxOracle> Swrys = vSySwryGjxxOracleService.getSwryListByTime(SwryMap); List<VSwryGjxxOracle> Swrys = vSySwryGjxxOracleService.getSwryListByTime(SwryMap);
CountDownLatch latch = new CountDownLatch(Swrys.size()); CountDownLatch latch = new CountDownLatch(Swrys.size());
ExecutorService SwryPool = Executors.newFixedThreadPool(5);
SwryPool.submit(() -> {
try { try {
for (VSwryGjxxOracle swry : Swrys) { for (VSwryGjxxOracle swry : Swrys) {
if ("02".equals(swry.getGJLX())) { if ("02".equals(swry.getGJLX())) {
@ -157,7 +156,7 @@ public class VSwryGjxxTask {
logger.info("Swrys:" + StringKit.getTrace(e)); logger.info("Swrys:" + StringKit.getTrace(e));
} }
latch.countDown(); latch.countDown();
});
try { try {
// Wait for all threads to complete // Wait for all threads to complete
@ -165,8 +164,6 @@ public class VSwryGjxxTask {
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
// 关闭线程池
SwryPool.shutdown();
} catch ( } catch (

Loading…
Cancel
Save