|
@@ -44,8 +44,6 @@ import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.ZoneOffset;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -1568,51 +1566,6 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
return tOeExamRecord;
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- Integer breakExpireSeconds = 600;
|
|
|
- String level = null;
|
|
|
- if (breakExpireSeconds.intValue() > 0) {
|
|
|
- List<String> list = SystemConstant.mqDelayLevelList.subList(4, 16);
|
|
|
- if (breakExpireSeconds.intValue() <= 60) {
|
|
|
- level = "1m";
|
|
|
- } else {
|
|
|
- Integer time = breakExpireSeconds.intValue() / 60;
|
|
|
- if (time.intValue() >= 30) {
|
|
|
- if (time.intValue() >= 30 && time.intValue() < 60) {
|
|
|
- level = "30m";
|
|
|
- } else if (time.intValue() >= 60 && time.intValue() < 120) {
|
|
|
- level = "1h";
|
|
|
- } else {
|
|
|
- level = "2h";
|
|
|
- }
|
|
|
- } else {
|
|
|
- for (String s : list) {
|
|
|
- Integer value = Integer.parseInt(s.substring(0, s.length() - 1));
|
|
|
- if (time.intValue() <= value.intValue()) {
|
|
|
- level = value + "m";
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- System.out.println(level);
|
|
|
- Map<String, Object> tranMap = new HashMap<>();
|
|
|
- //发送延时mq消息start
|
|
|
- Integer time = SystemConstant.mqDelayLevel.get(level);
|
|
|
- LocalDateTime dt = LocalDateTime.now();
|
|
|
- if (level.contains("m")) {
|
|
|
- dt = dt.plusMinutes(Long.parseLong(level.replace("m", "")));
|
|
|
- } else if (level.contains("s")) {
|
|
|
- dt = dt.plusSeconds(Long.parseLong(level.replace("s", "")));
|
|
|
- } else if (level.contains("h")) {
|
|
|
- dt = dt.plusHours(Long.parseLong(level.replace("h", "")));
|
|
|
- }
|
|
|
- tranMap.put("timeOut", time);
|
|
|
- tranMap.put("mqExecTime", dt.toInstant(ZoneOffset.of("+8")).toEpochMilli());
|
|
|
- System.out.println(tranMap);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 发送断点延时mq消息
|
|
|
*
|