From 73bb5617e6aeb4ee8f7dfd4ad54b61d477969d86 Mon Sep 17 00:00:00 2001 From: whycxzp <glperry@163.com> Date: 星期二, 10 六月 2025 20:22:06 +0800 Subject: [PATCH] 自动充放电自动化流程 --- src/main/java/com/whyc/controller/InterfaceFireRobotController.java | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/whyc/controller/InterfaceFireRobotController.java b/src/main/java/com/whyc/controller/InterfaceFireRobotController.java index c5c0a6f..10699ea 100644 --- a/src/main/java/com/whyc/controller/InterfaceFireRobotController.java +++ b/src/main/java/com/whyc/controller/InterfaceFireRobotController.java @@ -1,11 +1,10 @@ package com.whyc.controller; import com.github.pagehelper.PageInfo; -import com.whyc.dto.InspectionTask; +import com.whyc.dto.EnvironmentThreshold; +import com.whyc.dto.InspectionRecord; import com.whyc.dto.Response; -import com.whyc.dto.WmsPalletDto; import com.whyc.service.FireRobotService; -import com.whyc.service.WmsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +45,49 @@ return service.specifyTask(interval,progress,direction); } - @ApiOperation("鏌ヨ鍒嗛〉-宸℃浠诲姟") - @GetMapping("getPageOfInspectionTask") - public Response<PageInfo<InspectionTask>> getPageOfInspectionTask(@RequestParam int pageNum, @RequestParam int pageSize){ - return service.getPageOfInspectionTask(pageNum,pageSize); + /** + * 宸℃闂撮殧鎺ュ彛 + * 璇锋眰鍙傛暟 鍙傛暟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, + @RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate){ + + return service.getPageOfInspectionRecord(pageNum,pageSize,startDate,endDate); } -- Gitblit v1.9.1