From 87ce3b2705c814523a199572c77402b96801e794 Mon Sep 17 00:00:00 2001 From: whycxzp <glperry@163.com> Date: 星期日, 30 三月 2025 15:47:11 +0800 Subject: [PATCH] 灭火机器人相关接口 --- src/main/java/com/whyc/controller/InterfaceFireRobotController.java | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/whyc/controller/InterfaceFireRobotController.java b/src/main/java/com/whyc/controller/InterfaceFireRobotController.java index f74f5c1..10699ea 100644 --- a/src/main/java/com/whyc/controller/InterfaceFireRobotController.java +++ b/src/main/java/com/whyc/controller/InterfaceFireRobotController.java @@ -1,6 +1,7 @@ package com.whyc.controller; import com.github.pagehelper.PageInfo; +import com.whyc.dto.EnvironmentThreshold; import com.whyc.dto.InspectionRecord; import com.whyc.dto.Response; import com.whyc.service.FireRobotService; @@ -44,6 +45,43 @@ return service.specifyTask(interval,progress,direction); } + + /** + * 宸℃闂撮殧鎺ュ彛 + * 璇锋眰鍙傛暟 鍙傛暟1 hour(float)锛氬贰妫�闂撮殧 鏄� 2 + * 鍙傛暟绀轰緥 + * http://192.168.10.45:8085/InspectionIntervals?hour=2 + * 杩斿洖鍙傛暟 鍙傛暟1 + * 鍙傛暟绀轰緥 + * 宸℃闂撮殧宸茶缃�: 2.0 h/娆°�� + * + */ + @PostMapping("setInspectionInterval") + public Response setInspectionInterval(@RequestParam float hour){ + + return service.setInspectionInterval(hour); + } + + /** + * 宸℃闂撮殧鎺ュ彛 + * 璇锋眰鍙傛暟 鍙傛暟1 hour(float)锛氬贰妫�闂撮殧 鏄� 2 + * 鍙傛暟绀轰緥 + * http://192.168.10.45:8085/InspectionIntervals?hour=2 + * 杩斿洖鍙傛暟 鍙傛暟1 + * 鍙傛暟绀轰緥 + * 宸℃闂撮殧宸茶缃�: 2.0 h/娆°�� + * + */ + @PostMapping("setEnvironmentThreshold") + public Response setEnvironmentThreshold(@RequestBody EnvironmentThreshold threshold){ + return service.setEnvironmentThreshold(threshold); + } + + @GetMapping("getEnvironmentThreshold") + public Response getEnvironmentThreshold(){ + return service.getEnvironmentThreshold(); + } + @ApiOperation("鏌ヨ鍒嗛〉-宸℃璁板綍") @GetMapping("getPageOfInspectionRecord") public Response<PageInfo<InspectionRecord>> getPageOfInspectionRecord(@RequestParam int pageNum, @RequestParam int pageSize, -- Gitblit v1.9.1