From 23ad681499f8652fe4e2084e6492ececb6fc7551 Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Wed, 01 Nov 2023 16:56:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cjl' into qa

---
 screen-api/src/main/java/com/moral/api/controller/AppDevicController.java |   72 ++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/controller/AppDevicController.java b/screen-api/src/main/java/com/moral/api/controller/AppDevicController.java
new file mode 100644
index 0000000..17b65e8
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/controller/AppDevicController.java
@@ -0,0 +1,72 @@
+package com.moral.api.controller;
+
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+import com.moral.api.entity.Device;
+import com.moral.api.entity.MonitorPoint;
+import com.moral.api.pojo.vo.device.AppDeviceVo;
+import com.moral.api.service.DeviceService;
+import com.moral.api.service.MonitorPointService;
+import com.moral.api.service.SpecialDeviceService;
+import com.moral.constant.ResultMessage;
+
+
+@Slf4j
+@Api(tags = {"���������������������"})
+@RestController
+@RequestMapping("/AppDevice")
+public class AppDevicController {
+
+    @Autowired
+    private MonitorPointService monitorPointService;
+
+    @Autowired
+    private DeviceService deviceService;
+
+    @Autowired
+    private SpecialDeviceService specialDeviceService;
+
+
+
+    @GetMapping("selectOrganization")
+    @ApiOperation(value = "���������������������")
+    public ResultMessage selectOrganization(){
+        List<MonitorPoint> monitorPoints = monitorPointService.getOrganizations();
+        return ResultMessage.ok(monitorPoints);
+    }
+
+
+    @GetMapping("selectDevice")
+    @ApiOperation(value = "���������������������")
+    public ResultMessage selectDevice(@RequestParam @ApiParam(value = "monitorPointId",name = "������ID") Integer monitorPointId){
+        List<Device> organizationDevice = deviceService.getOrganizationDevice(monitorPointId);
+        return ResultMessage.ok(ObjectUtils.isEmpty(organizationDevice)?null:organizationDevice);
+    }
+
+    @GetMapping("fuzzySearch")
+    @ApiOperation(value = "���������������������")
+    public ResultMessage fuzzySearch(@RequestParam @ApiParam(value = "mac",name = "������mac���") String mac){
+        List<AppDeviceVo> devices = deviceService.getFuzzySearch(mac);
+        return ResultMessage.ok(devices);
+    }
+
+
+    @GetMapping("specialDevice")
+    @ApiOperation(value = "������������������")
+    public ResultMessage selectSpecialDevice(){
+        List<AppDeviceVo> appDeviceVos = specialDeviceService.selectSpecialDevice();
+        return ResultMessage.ok(appDeviceVos);
+    }
+}

--
Gitblit v1.8.0