|
@@ -0,0 +1,65 @@
|
|
|
|
|
+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.TosDevicetype;
|
|
|
|
|
+import com.yunfeiyun.agmp.iotm.device.domain.resvo.IotDevicetypeListResVo;
|
|
|
|
|
+import com.yunfeiyun.agmp.iotm.device.domain.resvo.TosDevicetypeResVo;
|
|
|
|
|
+import com.yunfeiyun.agmp.iotm.device.service.ITosDevicetypeService;
|
|
|
|
|
+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/devicetype")
|
|
|
|
|
+public class IotDevicetypeController extends BaseController
|
|
|
|
|
+{
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ITosDevicetypeService tosDevicetypeService;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询设备类型列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('iot:devicetype:list')")
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
|
+ public TableDataInfo list(TosDevicetype tosDevicetype) {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ List<IotDevicetypeListResVo> list = tosDevicetypeService.list(tosDevicetype);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 导出设备类型列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('tos:devicetype:export')")
|
|
|
|
|
+ @Log(title = "设备类型", businessType = BusinessType.EXPORT)
|
|
|
|
|
+ @PostMapping("/export")
|
|
|
|
|
+ public void export(HttpServletResponse response, TosDevicetype tosDevicetype) {
|
|
|
|
|
+ List<TosDevicetype> list = tosDevicetypeService.selectTosDevicetypeList(tosDevicetype);
|
|
|
|
|
+ ExcelUtil<TosDevicetype> util = new ExcelUtil<TosDevicetype>(TosDevicetype.class);
|
|
|
|
|
+ util.exportExcel(response, list, "设备类型数据");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取设备类型详细信息
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('tos:devicetype:query')")
|
|
|
|
|
+ @GetMapping(value = "/info/{devtypeBid}")
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("devtypeBid") String devtypeBid) {
|
|
|
|
|
+ return success(tosDevicetypeService.selectTosDevicetypeByDevtypeBid(devtypeBid));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|