|
@@ -0,0 +1,64 @@
|
|
|
|
|
+package com.yunfeiyun.agmp.iotm.device.controller;
|
|
|
|
|
+
|
|
|
|
|
+import com.yunfeiyun.agmp.common.annotation.Log;
|
|
|
|
|
+import com.yunfeiyun.agmp.common.core.controller.BaseController;
|
|
|
|
|
+import com.yunfeiyun.agmp.common.core.domain.AjaxResult;
|
|
|
|
|
+import com.yunfeiyun.agmp.common.core.page.TableDataInfo;
|
|
|
|
|
+import com.yunfeiyun.agmp.common.enums.BusinessType;
|
|
|
|
|
+import com.yunfeiyun.agmp.common.utils.poi.ExcelUtil;
|
|
|
|
|
+import com.yunfeiyun.agmp.iot.common.domain.TosDeviceclass;
|
|
|
|
|
+import com.yunfeiyun.agmp.iotm.device.service.ITosDeviceclassService;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 设备类型Controller
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author 杨晓辉
|
|
|
|
|
+ * @date 2024-11-06
|
|
|
|
|
+ */
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/iot/deviceclass")
|
|
|
|
|
+public class IotDeviceclassController extends BaseController
|
|
|
|
|
+{
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ITosDeviceclassService tosDeviceclassService;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询设备类型列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('iot:deviceclass:list')")
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
|
+ public TableDataInfo list(TosDeviceclass reqVo) {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ List<TosDeviceclass> list = tosDeviceclassService.selectTosDeviceclassList(reqVo);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 导出设备类型列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('yunfeiyun:TosDeviceclass:export')")
|
|
|
|
|
+ @Log(title = "设备类型", businessType = BusinessType.EXPORT)
|
|
|
|
|
+ @PostMapping("/export")
|
|
|
|
|
+ public void export(HttpServletResponse response, TosDeviceclass tosDeviceclass) {
|
|
|
|
|
+ List<TosDeviceclass> list = tosDeviceclassService.selectTosDeviceclassList(tosDeviceclass);
|
|
|
|
|
+ ExcelUtil<TosDeviceclass> util = new ExcelUtil<TosDeviceclass>(TosDeviceclass.class);
|
|
|
|
|
+ util.exportExcel(response, list, "设备类型数据");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取设备类型详细信息
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('yunfeiyun:TosDeviceclass:query')")
|
|
|
|
|
+ @GetMapping(value = "/info/{devclassBid}")
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("devclassBid") String devclassBid) {
|
|
|
|
|
+ return success(tosDeviceclassService.selectTosDeviceclassByDevclassBid(devclassBid));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+}
|