|
@@ -0,0 +1,35 @@
|
|
|
|
|
+package com.zksy.pole.controller;
|
|
|
|
|
+
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
+import com.zksy.common.domain.Result;
|
|
|
|
|
+import com.zksy.common.utils.SearchUtil;
|
|
|
|
|
+import com.zksy.pole.domain.po.DgEquipmentAlarm;
|
|
|
|
|
+import com.zksy.pole.service.DgReportEnvironmentalDataService;
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/DgReportEnvironmentalData")
|
|
|
|
|
+@Api(tags = "网关以固定频率上报环境数据", description = "网关以固定频率上报环境数据")
|
|
|
|
|
+public class DgReportEnvironmentalDataController {
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DgReportEnvironmentalDataService dgReportEnvironmentalDataService;
|
|
|
|
|
+ @GetMapping("/findByPage")
|
|
|
|
|
+ @ApiOperation(value = "分页查询")
|
|
|
|
|
+ public Result getByConditionJsonPage(long pageNum, long pageSize, String conditionJson) throws Exception {
|
|
|
|
|
+ Page<DgEquipmentAlarm> page = dgReportEnvironmentalDataService.page(new Page<>(pageNum, pageSize), SearchUtil.parseWhereSql(conditionJson));
|
|
|
|
|
+ return Result.ok(page);
|
|
|
|
|
+ }
|
|
|
|
|
+ @GetMapping("/getAll")
|
|
|
|
|
+ @ApiOperation(value = "查询所有")
|
|
|
|
|
+ public Result getAllByConditionJson(String conditionJson) throws Exception {
|
|
|
|
|
+ List<DgEquipmentAlarm> list = dgReportEnvironmentalDataService.list(SearchUtil.parseWhereSql(conditionJson));
|
|
|
|
|
+ return Result.ok(list);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|