|
@@ -5,14 +5,11 @@ import com.bizmatics.common.core.bean.ApiResult;
|
|
|
import com.bizmatics.common.core.bean.CommonPage;
|
|
|
import com.bizmatics.model.AlarmPower;
|
|
|
import com.bizmatics.service.AlarmPowerService;
|
|
|
+import com.bizmatics.service.vo.AlarmGradeVO;
|
|
|
import com.bizmatics.service.vo.ApCountVO;
|
|
|
import com.bizmatics.service.vo.CommonIcoVO;
|
|
|
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.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -81,6 +78,54 @@ public class AlarmPowerController {
|
|
|
return ApiResult.success(alarmPowerService.page(startTime, endTime, status, siteId, current, size));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 告警等级统计
|
|
|
+ * @param siteId 站点id
|
|
|
+ * @param startTime 开始时间
|
|
|
+ * @param endTime 结束时间
|
|
|
+ * @param current 页数
|
|
|
+ * @param size 条数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/alarmGradeCount")
|
|
|
+ public ApiResult<CommonPage<AlarmGradeVO>> alarmGradeCount(@RequestParam(required = false) Integer siteId,
|
|
|
+ @RequestParam(required = false) Date startTime,
|
|
|
+ @RequestParam(required = false) Date endTime,
|
|
|
+ @RequestParam Integer current,
|
|
|
+ @RequestParam Integer size){
|
|
|
+ return ApiResult.success(alarmPowerService.alarmGradeCount(siteId, startTime, endTime, current, size));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 告警等级集合
|
|
|
+ * @param siteId 站点id
|
|
|
+ * @param startTime 开始时间
|
|
|
+ * @param endTime 结束时间
|
|
|
+ * @param current 页数
|
|
|
+ * @param size 条数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/alarmGradeList")
|
|
|
+ public ApiResult<CommonPage<AlarmPower>> alarmGradeList(@RequestParam(required = false) Integer siteId,
|
|
|
+ @RequestParam(required = false) Date startTime,
|
|
|
+ @RequestParam(required = false) Date endTime,
|
|
|
+ @RequestParam Integer current,
|
|
|
+ @RequestParam Integer size,
|
|
|
+ @RequestParam(required = false) Integer type){
|
|
|
+
|
|
|
+ return ApiResult.success(alarmPowerService.alarmGradeList(siteId,startTime,endTime,current,size,type));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改数据
|
|
|
+ * @param alarmPower
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PutMapping
|
|
|
+ public ApiResult<Boolean> update(@RequestBody AlarmPower alarmPower){
|
|
|
+ return ApiResult.success(alarmPowerService.updateById(alarmPower));
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping("LoopStatusList")
|
|
|
public ApiResult<List<Map<String,Object>>> getLoopStatus(@RequestParam Integer siteId){
|
|
|
return ApiResult.success(alarmPowerService.getLoopStatusList(siteId));
|