燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-06-06 77845740038399b2f41f5daa8d25d42823d21df0
根据时间查询Voc值
已修改1个文件
18 ■■■■■ 文件已修改
src/main/java/com/yssh/controller/SuYuanController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/controller/SuYuanController.java
@@ -2,10 +2,12 @@
import com.yssh.entity.*;
import com.yssh.service.ICommonService;
import com.yssh.service.VocValsService;
import com.yssh.utils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@@ -38,8 +40,13 @@
    @Resource
    private ICommonService commonService;
    @Autowired
    @Resource
    private ISuYuanService suYuanService;
    @Resource
    private VocValsService vocValsService;
    private final static SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHH");
    @ApiOperation(value = "查询2d热力图数据", notes = "根据时间查询2d热力图数据")
    @ApiOperationSupport(order = 1)
@@ -135,4 +142,13 @@
        return Result.OK(list);
    }
    @ApiOperation(value = "根据时间查询Voc值", notes = "根据时间查询Voc值")
    @ApiOperationSupport(order = 11)
    @GetMapping("/selectVocByTime")
    public Result selectVocByTime(@RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) {
        List<VocVals> list = vocValsService.selectByTime(format.format(date));
        return Result.OK(list);
    }
}