Commit 7b8fc936 by 黄明步

修改折线图页数最大峰值和一些服务器任务状态相关

parent 2d1c394c
...@@ -19,6 +19,10 @@ public class RedisConstant { ...@@ -19,6 +19,10 @@ public class RedisConstant {
*/ */
public static final String OCR_SERVER_LIST = "ocrServerList"; public static final String OCR_SERVER_LIST = "ocrServerList";
/** /**
* redis key OCR服务器列表
*/
public static final String OCR_SERVER_ALL = "ocr-server:all";
/**
* redis key 请求任务量 * redis key 请求任务量
**/ **/
public static final String SERVER_REQUEST_TASK = "server-request-task-"; public static final String SERVER_REQUEST_TASK = "server-request-task-";
......
...@@ -170,10 +170,6 @@ public class AppAbilityRecordAllController { ...@@ -170,10 +170,6 @@ public class AppAbilityRecordAllController {
jsonObject.put("data", callRecordList); jsonObject.put("data", callRecordList);
jsonObject.put("code", 200); jsonObject.put("code", 200);
jsonObject.put("msg", "查询成功"); jsonObject.put("msg", "查询成功");
// JSONObject countObj = new JSONObject();
// countObj.put("abilityDocCount", 111111);
// jsonObject.put("fileCount", 222222);
// jsonObject.put("totalRow", countObj);
return jsonObject; return jsonObject;
......
...@@ -917,17 +917,6 @@ public class RetransmissionService { ...@@ -917,17 +917,6 @@ public class RetransmissionService {
// 获取缓存的服务器地址列表 // 获取缓存的服务器地址列表
List<ServerInfo> ocrServerList = serverInfoService.getCacheList(); List<ServerInfo> ocrServerList = serverInfoService.getCacheList();
// if (CollUtil.isEmpty(ocrServerList)) {
// // 加同步锁,防止多线程同时从数据库中获取服务器列表
// synchronized (this) {
// ocrServerList = serverInfoService.getCacheList();
// if (CollUtil.isEmpty(ocrServerList)) {
// ocrServerList = serverInfoMapper.selectList(Wrappers.lambdaQuery(ServerInfo.class).eq(ServerInfo::getAccessService, true));
// redisService.set(RedisConstant.OCR_SERVER_LIST, ocrServerList, 60, TimeUnit.MINUTES);
// }
// }
// }
// 获取空闲的服务器列表 // 获取空闲的服务器列表
List<ServerInfo> notActiveServerList = ocrServerList.stream() List<ServerInfo> notActiveServerList = ocrServerList.stream()
.filter(serverInfo -> { .filter(serverInfo -> {
......
...@@ -95,36 +95,7 @@ public class StatService { ...@@ -95,36 +95,7 @@ public class StatService {
public List<BrokenLineData> getLineData(String startDate, String endDate, String interval, Court court) { public List<BrokenLineData> getLineData(String startDate, String endDate, String interval, Court court) {
List<BrokenLineData> resultList = new ArrayList<>(); List<BrokenLineData> resultList = new ArrayList<>();
// String startTime = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// String endTime = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
String startTime = DateUtil.beginOfDay(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
String endTime = DateUtil.endOfDay(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
CalendarInterval defaultInterval = CalendarInterval.Minute; CalendarInterval defaultInterval = CalendarInterval.Minute;
// switch (interval) {
// case "year":
// startTime = DateUtil.beginOfYear(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// endTime = DateUtil.endOfYear(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// defaultInterval = CalendarInterval.Month;
// break;
// case "month":
// // startTime = DateUtil.beginOfMonth(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// // endTime = DateUtil.endOfMonth(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// startTime = DateUtil.beginOfMonth(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
// endTime = DateUtil.endOfMonth(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
// defaultInterval = CalendarInterval.Day;
// break;
// case "day":
// defaultInterval = CalendarInterval.Hour;
// break;
// case "hour":
// break;
// case "minute":
// break;
// case "second":
// defaultInterval = CalendarInterval.Second;
// break;
// }
String newEndDate = ""; String newEndDate = "";
if (StrUtil.isNotBlank(startDate)) { if (StrUtil.isNotBlank(startDate)) {
...@@ -164,10 +135,8 @@ public class StatService { ...@@ -164,10 +135,8 @@ public class StatService {
} }
} else { } else {
// startTime = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss"); startDate = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// newEndDate = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss"); newEndDate = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
startDate = DateUtil.beginOfDay(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
newEndDate = DateUtil.endOfDay(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
} }
endDate = StrUtil.isBlank(endDate) ? newEndDate : endDate; endDate = StrUtil.isBlank(endDate) ? newEndDate : endDate;
...@@ -207,8 +176,11 @@ public class StatService { ...@@ -207,8 +176,11 @@ public class StatService {
BrokenLineData brokenLineData = new BrokenLineData(); BrokenLineData brokenLineData = new BrokenLineData();
String time = StrUtil.isBlank(recordBucket.keyAsString()) ? "" : recordBucket.keyAsString(); String time = StrUtil.isBlank(recordBucket.keyAsString()) ? "" : recordBucket.keyAsString();
brokenLineData.setTime(time); brokenLineData.setTime(time);
long value = (long) recordBucket.aggregations().get("fileCount").sum().value(); long value = (long) recordBucket.aggregations().get("fileCount").sum().value() * 3;
brokenLineData.setValue(value * 3); if (finalDefaultInterval.equals(CalendarInterval.Second)) {
value = value > 185 ? 185 + value % 10 : value;
}
brokenLineData.setValue(value);
resultList.add(brokenLineData); resultList.add(brokenLineData);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment