| | |
| | | return ResultMessage.ok(response); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取该组织该行业所有设备的因子", notes = "获取该组织该行业所有设备的因子") |
| | | @ApiOperation(value = "获取该组织某些行业所有设备的因子", notes = "获取该组织某些行业所有设备的因子") |
| | | @GetMapping("getSensorByProfessions") |
| | | public ResultMessage getProfessions(HttpServletRequest request) { |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "organizationId", value = "组织id", required = true, paramType = "query", dataType = "Integer"), |
| | | @ApiImplicitParam(name = "professions", value = "行业key,多个逗号隔开", required = true, paramType = "query", dataType = "String") |
| | | }) |
| | | public ResultMessage getSensorByProfessions(HttpServletRequest request) { |
| | | Map<String, Object> params = WebUtils.getParametersStartingWith(request, null); |
| | | if (ObjectUtils.isEmpty(params.get("organizationId")) || ObjectUtils.isEmpty(params.get("professions"))) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), |
| | |
| | | public ResultMessage professionContribution(HttpServletRequest request) { |
| | | Map<String, Object> params = WebUtils.getParametersStartingWith(request, null); |
| | | if (ObjectUtils.isEmpty(params.get("organizationId")) |
| | | ||ObjectUtils.isEmpty(params.get("professions")) |
| | | || ObjectUtils.isEmpty(params.get("professions")) |
| | | || ObjectUtils.isEmpty(params.get("type")) |
| | | || ObjectUtils.isEmpty(params.get("time")) |
| | | || ObjectUtils.isEmpty(params.get("sensorCode"))) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), |
| | | ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | List<Map<String, Object>> response = professionService.professionContribution(params); |
| | | Map<String, Object> response = professionService.professionContribution(params); |
| | | return ResultMessage.ok(response); |
| | | } |
| | | |