From 68e22957db996437fa20a9a4aa5ff37c54d4056f Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Wed, 27 Sep 2023 15:22:25 +0800
Subject: [PATCH] chore:补充提交

---
 screen-api/src/main/java/com/moral/api/controller/GovMonitorPointController.java |   63 +++++++++++++++++++++++++------
 1 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/controller/GovMonitorPointController.java b/screen-api/src/main/java/com/moral/api/controller/GovMonitorPointController.java
index a4db062..71296df 100644
--- a/screen-api/src/main/java/com/moral/api/controller/GovMonitorPointController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/GovMonitorPointController.java
@@ -8,13 +8,16 @@
 import com.moral.constant.ResponseCodeEnum;
 import com.moral.constant.ResultMessage;
 import com.moral.util.WebUtils;
+
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+
 import java.util.List;
 import java.util.Map;
 
@@ -41,39 +44,75 @@
 
     /**
      * @Description: ���������������������������������������
-     * @Param: [regionCode,sensorCode]
+     * @Param: [regionCode, sensorCode]
      * @return: com.moral.constant.ResultMessage
      * @Author: ���������
      * @Date: 2021/9/9
      */
     @GetMapping("queryStateControlStation")
-    public ResultMessage queryStateControlStation(Integer regionCode,String sensorCode) {
+    public ResultMessage queryStateControlStation(Integer regionCode, String sensorCode) {
 
-        List<GovMonitorPoint> govMonitorPoints = govMonitorPointService.queryGovMonitorPointAndDataByRegionCode(regionCode,sensorCode);
+        List<GovMonitorPoint> govMonitorPoints = govMonitorPointService.queryGovMonitorPointAndDataByRegionCode(regionCode, sensorCode);
 
         return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(), govMonitorPoints);
     }
 
     /**
-      *@Description: ������������id������������������
-      *@Param: [request]
-      *@return: com.moral.constant.ResultMessage 
-      *@Author: lizijie
-      *@Date: 2021/9/26 9:42
+     * @Description: ������������id������������������
+     * @Param: [request]
+     * @return: com.moral.constant.ResultMessage
+     * @Author: lizijie
+     * @Date: 2021/9/26 9:42
      **/
     @RequestMapping(value = "getGovMonitorPointsByOrgId", method = RequestMethod.GET)
     @ResponseBody
-    public ResultMessage getGovMonitorPointsByOrgId(HttpServletRequest request){
+    public ResultMessage getGovMonitorPointsByOrgId(HttpServletRequest request) {
         Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null);
         Object orgid = parameters.get("organization_id");
-        if (ObjectUtils.isEmpty(orgid)){
+        if (ObjectUtils.isEmpty(orgid)) {
             return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
         }
         Organization organization = organizationMapper.selectById(Integer.parseInt(orgid.toString()));
-        if (ObjectUtils.isEmpty(organization)){
+        if (ObjectUtils.isEmpty(organization)) {
             return ResultMessage.fail(ResponseCodeEnum.ORGANIZATION_NOT_EXIST.getCode(), ResponseCodeEnum.ORGANIZATION_NOT_EXIST.getMsg());
         }
         List<GovMonitorPoint> govMonitorPoints = govMonitorPointService.selectGovMonitorPointsByOrgid(parameters);
-        return  ResultMessage.ok(govMonitorPoints);
+        return ResultMessage.ok(govMonitorPoints);
+    }
+
+    /**
+     * @Description: ������guid���������id������������������������������������������
+     * @Param: [request]
+     * @return: com.moral.constant.ResultMessage
+     * @Author: lizijie
+     * @Date: 2021/9/26 10:06
+     **/
+    @RequestMapping(value = "queryGovMonitorPointHourlyDataByGuidsAndOrgid", method = RequestMethod.GET)
+    @ResponseBody
+    public ResultMessage queryGovMonitorPointHourlyDataByGuidsAndOrgid(HttpServletRequest request) {
+        Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null);
+        Object orgid = parameters.get("organization_id");
+        Object guids = parameters.get("guids");
+        Object date = parameters.get("date");
+        if (ObjectUtils.isEmpty(orgid) || ObjectUtils.isEmpty(guids) || ObjectUtils.isEmpty(date)) {
+            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
+        }
+        Organization organization = organizationMapper.selectById(Integer.parseInt(orgid.toString()));
+        if (ObjectUtils.isEmpty(organization)) {
+            return ResultMessage.fail(ResponseCodeEnum.ORGANIZATION_NOT_EXIST.getCode(), ResponseCodeEnum.ORGANIZATION_NOT_EXIST.getMsg());
+        }
+        Map<String, Object> resultMap = govMonitorPointService.queryGovMonitorPointHoutlyDatyByGuidsAndOrgid(parameters);
+        return ResultMessage.ok(resultMap);
+    }
+
+    @ApiOperation(value = "������������id���������������������", notes = "������������id���������������������")
+    @GetMapping(value = "getGovMonitorPointsByOrganizationId")
+    public ResultMessage delete(Integer organizationId) {
+        if (ObjectUtils.isEmpty(organizationId)) {
+            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
+                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
+        }
+        List<Map<String, Object>> response = govMonitorPointService.getGovMonitorPointsByOrganizationId(organizationId);
+        return ResultMessage.ok(response);
     }
 }

--
Gitblit v1.8.0