风速仪和门口门禁数据定时器重命名

pull/15/head
songwenxuan 2024-02-04 11:56:25 +08:00
parent 989174104c
commit c919faaf5f
2 changed files with 8 additions and 9 deletions

View File

@ -16,7 +16,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Component @Component
public class SaveAnemometerInfo { public class SaveAnemometerInfoScheduled {
@Autowired @Autowired
private AnemometerService anemometerService; private AnemometerService anemometerService;
@Autowired @Autowired
@ -26,7 +26,6 @@ public class SaveAnemometerInfo {
// @Scheduled(cron ="*/5 * * * * ? ") // @Scheduled(cron ="*/5 * * * * ? ")
public void scheduled() throws Exception{ public void scheduled() throws Exception{
//存储车辆进出记录信息
saveAnemometerInfo(); saveAnemometerInfo();
} }

View File

@ -17,14 +17,14 @@ import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@Component @Component
public class SaveMachineInfo { public class SaveMachineInfoScheduled {
@Autowired @Autowired
private GateMachineInfoService gateMachineInfoService; private GateMachineInfoService gateMachineInfoService;
@Autowired @Autowired
private GateCarMachineInfoService gateCarMachineInfoService; private GateCarMachineInfoService gateCarMachineInfoService;
@Scheduled(cron ="0 0 0/1 * * ?") // @Scheduled(cron ="0 0 0/1 * * ?")
// @Scheduled(cron ="*/5 * * * * ?") // @Scheduled(cron ="0/30 * * * * ?")
public void scheduled() { public void scheduled() {
//存储人员进出记录信息 //存储人员进出记录信息
savePersonMachineInfo(); savePersonMachineInfo();
@ -39,8 +39,8 @@ public class SaveMachineInfo {
String fendDate = dft.format(new Date())+"+08:00"; String fendDate = dft.format(new Date())+"+08:00";
String fstartDate = ""; String fstartDate = "";
Calendar now = Calendar.getInstance(); Calendar now = Calendar.getInstance();
now.add(Calendar.HOUR, -1); // now.add(Calendar.HOUR, -1);
// now.add(Calendar.SECOND, -30); now.add(Calendar.SECOND, -30);
Date before = now.getTime(); Date before = now.getTime();
fstartDate = dft.format(before)+"+08:00"; fstartDate = dft.format(before)+"+08:00";
int pageNo = 1; //第几页 int pageNo = 1; //第几页
@ -84,8 +84,8 @@ public class SaveMachineInfo {
String fendDate = dft.format(new Date())+"+08:00"; String fendDate = dft.format(new Date())+"+08:00";
String fstartDate = ""; String fstartDate = "";
Calendar now = Calendar.getInstance(); Calendar now = Calendar.getInstance();
now.add(Calendar.HOUR, -1); // now.add(Calendar.HOUR, -1);
// now.add(Calendar.SECOND, -30); now.add(Calendar.SECOND, -30);
Date before = now.getTime(); Date before = now.getTime();
fstartDate = dft.format(before)+"+08:00"; fstartDate = dft.format(before)+"+08:00";
int pageNo = 1; //第几页 int pageNo = 1; //第几页