From 239927b057f65a040594f7a4cb08c8881b303797 Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Fri, 18 Aug 2023 14:52:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cjl-230812' into cjl-230812
---
screen-api/src/main/java/com/moral/api/controller/ProfessionController.java | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/ProfessionController.java b/screen-api/src/main/java/com/moral/api/controller/ProfessionController.java
index 33c95c7..5ed4c4e 100644
--- a/screen-api/src/main/java/com/moral/api/controller/ProfessionController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/ProfessionController.java
@@ -1,6 +1,8 @@
package com.moral.api.controller;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -42,9 +44,13 @@
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(),
@@ -53,4 +59,28 @@
Set<Map<String, Object>> response = professionService.getSensorByProfessionsAndOrganizationId(params);
return ResultMessage.ok(response);
}
+
+ @ApiOperation(value = "���������������", notes = "���������������")
+ @GetMapping("professionContribution")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "organizationId", value = "������id", required = true, paramType = "query", dataType = "Integer"),
+ @ApiImplicitParam(name = "profession", value = "������key���������������������", required = true, paramType = "query", dataType = "String"),
+ @ApiImplicitParam(name = "type", value = "���������������2021-12������������2021-12-24���", required = true, paramType = "query", dataType = "String"),
+ @ApiImplicitParam(name = "time", value = "������", required = true, paramType = "query", dataType = "String"),
+ @ApiImplicitParam(name = "sensorCode", value = "���������code", required = true, paramType = "query", dataType = "String")
+ })
+ 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("type"))
+ || ObjectUtils.isEmpty(params.get("time"))
+ || ObjectUtils.isEmpty(params.get("sensorCode"))) {
+ return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
+ ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
+ }
+ Map<String, Object> response = professionService.professionContribution(params);
+ return ResultMessage.ok(response);
+ }
+
}
--
Gitblit v1.8.0