whycxzp
2025-05-26 e7bd17e3a9377b0a513ff9e11f14c7b7dc7c383e
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);
    }
    /**
     * 巡检间隔接口
     * 请求参数   参数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<InspectionTask>> getPageOfInspectionRecord(@RequestParam int pageNum, @RequestParam int pageSize){
    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);
        return service.getPageOfInspectionRecord(pageNum,pageSize,startDate,endDate);
    }