whycxzp
2025-03-21 303468c3060dd53003ea9e06c6f27478f8e151ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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);
    }
 
}