刷新执法记录仪状态

develop
hanrenchun 8 months ago
parent 326058fa8c
commit 2a4bb10c97

@ -34,7 +34,7 @@ public class MetaImpUserModelInfoTask {
private final MetaImpUserModelInfoService metaimpUserModelInfoService;
final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
// final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
@Scheduled(initialDelay = 100, fixedDelay = 3000)
@ -47,13 +47,7 @@ public class MetaImpUserModelInfoTask {
LocalDateTime now = LocalDateTime.now();
String format = now.format(formatter);
String format1 = now.minusDays(1).format(formatter);
try {
int countTStrh = swzdryViewService.count();
if (countTStrh > 0) {
int count = countTStrh / oncesCounts;
CountDownLatch latch = new CountDownLatch(countTStrh);
for (int i = 0; i <= count; i++) {
try {
QueryWrapper<SwzdryView> wrapper = new QueryWrapper<>();
@ -135,18 +129,7 @@ public class MetaImpUserModelInfoTask {
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
}
latch.countDown();
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
}
}
}

Loading…
Cancel
Save