刷新执法记录仪状态

develop
hanrenchun 10 months ago
parent 007af4810f
commit 326058fa8c

@ -18,6 +18,9 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
@ -33,12 +36,17 @@ public class MetaImpUserModelInfoTask {
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) @Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transswzdry() { public void transswzdry() {
if (!"true".equals(ConfigParam.SwzdrySwitch)) { if (!"true".equals(ConfigParam.SwzdrySwitch)) {
return; return;
} }
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
LocalDateTime now = LocalDateTime.now();
String format = now.format(formatter);
String format1 = now.minusDays(1).format(formatter);
try { try {
int countTStrh = swzdryViewService.count(); int countTStrh = swzdryViewService.count();
if (countTStrh > 0) { if (countTStrh > 0) {
@ -47,8 +55,9 @@ public class MetaImpUserModelInfoTask {
for (int i = 0; i <= count; i++) { for (int i = 0; i <= count; i++) {
try { try {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
QueryWrapper<SwzdryView> wrapper = new QueryWrapper<>(); QueryWrapper<SwzdryView> wrapper = new QueryWrapper<>();
wrapper.between("HDFSSJ",format1,format);
List<SwzdryView> list = swzdryViewService.list(wrapper); List<SwzdryView> list = swzdryViewService.list(wrapper);
for (SwzdryView Info : list) { for (SwzdryView Info : list) {
MetaImpUserModelInfo modelInfo = new MetaImpUserModelInfo(); MetaImpUserModelInfo modelInfo = new MetaImpUserModelInfo();

Loading…
Cancel
Save