dev_xd
姜玉琦 2025-04-30 00:05:02 +08:00
parent d649f22678
commit ef1f1ff326
3 changed files with 7 additions and 7 deletions

View File

@ -18,9 +18,9 @@ const getDaysTrendView = (projectId) => {
} }
// 统计AI预警数据 // 统计AI预警数据
const groupCountByAlarmType = (projectId, now) => { const groupCountByAlarmType = (projectId, toDay) => {
return request({ return request({
url: `/manage/devAiProjectData/groupCountByAlarmType/${projectId || 0}?now=${now}`, url: `/manage/devAiProjectData/groupCountByAlarmType/${projectId || 0}?toDay=${toDay}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -306,7 +306,7 @@ export default {
pageSize: this.todayPage.pageSize, pageSize: this.todayPage.pageSize,
projectId: this.selProject.id, projectId: this.selProject.id,
params: { params: {
date: new Date(), date: new Date().toLocaleDateString().replaceAll("/","-"),
}, },
}; };
this.$api.aiWarning this.$api.aiWarning

View File

@ -129,7 +129,7 @@ public class DevAiProjectDataController extends BaseController
dataQuery.setParams(params); dataQuery.setParams(params);
List<Map<String, Object>> list = devAiProjectDataService.findDaysTrendView(dataQuery); List<Map<String, Object>> list = devAiProjectDataService.findDaysTrendView(dataQuery);
List<Map<String, Object>> daysTrendList = new ArrayList<>(); /**List<Map<String, Object>> daysTrendList = new ArrayList<>();
for (LocalDate date = todayAgo; !date.isAfter(today); date = date.plusDays(1)) { for (LocalDate date = todayAgo; !date.isAfter(today); date = date.plusDays(1)) {
Map<String, Object> dayMap = new HashMap<>(); Map<String, Object> dayMap = new HashMap<>();
dayMap.put("createTime",date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); dayMap.put("createTime",date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
@ -143,10 +143,10 @@ public class DevAiProjectDataController extends BaseController
if (_list.size()>0) { if (_list.size()>0) {
date.put("total", _list.get(0).get("total")); date.put("total", _list.get(0).get("total"));
} }
} }*/
redisService.setCacheObject(key, daysTrendList, 2L, TimeUnit.MINUTES); redisService.setCacheObject(key, list, 2L, TimeUnit.MINUTES);
return success(daysTrendList); return success(list);
} }
/** /**