燕山石化溯源三维电子沙盘-【后端】-服务
2
13693261870
2023-07-29 5145384586f87e6c39b13fdac8180007582fee57
src/main/java/com/yssh/controller/WarningAnalyseController.java
@@ -69,24 +69,10 @@
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "三小时监测站点数据变化趋势", notes = "返回值为三小时监测站点监测数据,返回值为map集合,其中key为站点名称,value为list集合,保存每天监测数值数据")
    @GetMapping("/locationDataChange")
    public Result locationDataChange() {
        //return Result.OK(warningService.selectEachLocationDataChange());
    public Result locationDataChange(@RequestParam(value = "end", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) {
        Date endDate = null == date ? new Date() : date;
        String key = DateUtils.getYyyyMmDd(new Date()) + "_local";
        Object obj = CacheUtils.get(key);
        Map<String, List<Double>> map;
        //if (null != obj) {
        //    map = (Map<String, List<Double>>) obj;
        //} else {
        //map = warningService.selectEachLocationDataChange();
        map = warningService.select3Hours();
        //    if (null != map && map.size() > 0) {
        //        CacheUtils.put(key, map);
        //    }
        //}
        return Result.ok(map);
        return Result.OK(warningService.select3Hours(endDate));
    }
    @ApiOperationSupport(order = 4)