提交 325ab8a6 authored 作者: ljj's avatar ljj

feat(screen): 新增自核查展示

上级 f0458619
......@@ -2,6 +2,7 @@ package com.tykj.dev.device.confirmcheck;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* ConfirmCheckApp.
......@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*/
@SpringBootApplication(scanBasePackages = {"com.tykj.dev.*"}
)
@EnableScheduling
public class ConfirmCheckApp {
public static void main(String[] args) {
SpringApplication.run(ConfirmCheckApp.class, args);
......
......@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.CommandLineRunner;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.*;
......@@ -85,4 +86,7 @@ public class ConfirmCheckTask implements CommandLineRunner {
hisNotInLib.put(deviceCheckDetail.getId(), devNotInLibrary);
}
}
}
......@@ -128,8 +128,8 @@ public class CheckMapTask implements CommandLineRunner {
public Map<Integer, List<CheckUnitInfo>> init() {
List<CheckUnitInfo> checkUnitInfos = checkScreenService.statMapData();
List<CheckUnitInfo> selfExamination = selfCheckBillService.selectNoFinSh2Weeks();
checkUnitInfos.addAll(selfExamination);
// List<CheckUnitInfo> selfExamination = selfCheckBillService.selectNoFinSh2Weeks();
// checkUnitInfos.addAll(selfExamination);
collect = checkUnitInfos.stream().collect(Collectors.groupingBy(CheckUnitInfo::getUnitId));
return collect;
}
......@@ -150,12 +150,14 @@ public class CheckMapTask implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
initShi();
}
public void initAll() {
init();
long startTime = System.currentTimeMillis();
log.info("开始计算数据", System.currentTimeMillis() - startTime);
initArea();
log.info("计算数据,用时:{}ms", System.currentTimeMillis() - startTime);
log.info("打印{}",rs.toString());
}
}
package com.tykj.dev.device.screen.subject.task;
import com.tykj.dev.device.screen.subject.service.CheckMapTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @AUTHOR: cnljj1995@gmail.com
* @DATE: 2022/11/28
*/
@Slf4j
@Component
public class CheckScreenTask {
@Autowired
private CheckMapTask checkMapTask;
@Scheduled(cron = "* 15 * * * ? ")
public void checkMap() {
long startTime = System.currentTimeMillis();
log.info("大屏自核查定时任务开始");
checkMapTask.initAll();
log.info("大屏自核查定时任务完成,用时:{}", System.currentTimeMillis() - startTime);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论