jinpengyong
2022-04-08 fdbef2a3293e536be6b119e4e1e67cc8cc9842f0
screen-api/src/main/java/com/moral/api/controller/ChartController.java
@@ -235,6 +235,22 @@
        return ResultMessage.ok(resultMap);
    }
    @GetMapping("honeycombDiagram")
    public ResultMessage honeycombDiagram (HttpServletRequest httpServletRequest){
        Map<String, Object> params = WebUtils.getParametersStartingWith(httpServletRequest, null);
        Object serviceScopeId = params.get("serviceScopeId");
        Object sensor_code = params.get("sensor_code");
        Object type = params.get("type");
        Object time = params.get("time");
        Object distance = params.get("distance");
        if (ObjectUtils.isEmpty(serviceScopeId)){
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        }
        List<Map<String, Object>> resultList = servicesScopeService.honeycombDiagram(Integer.parseInt(serviceScopeId.toString()), Integer.parseInt(distance.toString()), type.toString(), time.toString(), sensor_code.toString());
        //List<Map<String, Object>> resultList = servicesScopeService.honeycombDiagram(6, 40, "monthly", "2022-02", "a34004");
        return ResultMessage.ok(resultList);
    }
    @RequestMapping(value = "returnDataTest", method = RequestMethod.GET)
    @ResponseBody
    public ResultMessage returnDataTest(HttpServletRequest request) throws ParseException {