package com.whyc.controller; 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @Api(tags = "消防机器人接口") @RequestMapping("fireRobot") public class InterfaceFireRobotController { @Autowired private FireRobotService service; /** * opendoor 打开卷帘门、closedoor 关闭卷帘门;openfire 打开七氟丙烷灭火器、closefire 关闭七氟丙烷灭火器; * API:http://192.168.10.45:8085/ControlInterfaceHandler?command=opendoor * @return */ @PostMapping("control") public Response control(@RequestParam String command){ return service.control(command); } /** * 指定任务点巡检接口示例 * API:http://192.168.10.45:8085/SpecifyTask?interval=0-1&progress=88&direction=0 * 请求参数 参数1 interval(string):巡检房间区间 是 ON * 参数2 progress(int):巡检位置百分比 是 * 参数3 direction(int):巡检方向 是 * 参数示例 * * ["interval 格式示例:0-1 ; progress 必须是 0-100 的整数; direction 必须是 0 或 1] */ @PostMapping("specifyTask") public Response specifyTask(@RequestParam String interval,@RequestParam Integer progress,@RequestParam Integer direction){ return service.specifyTask(interval,progress,direction); } }