whyclxw
2022-01-05 700d30d541fa85357fdd80cecb8ff8c5baff2ae8
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.FGCDFileDownload;
import com.whyc.service.FGCDFileDownloadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
@RestController
@RequestMapping("FGCDFileDownload")
@Api(tags = "在线监测-一体机导入记录")
public class FGCDFileDownloadController {
 
    @Autowired
    private FGCDFileDownloadService service;
 
    @GetMapping("listByDeviceId")
    @ApiOperation(value = "数据导入")
    public Response<List<FGCDFileDownload>> getListByDeviceId(@RequestParam Integer deviceId){
        List<FGCDFileDownload> downloadList = service.getListByDeviceId(deviceId);
        return new Response<List<FGCDFileDownload>>().set(1,downloadList);
    }
 
    @PostMapping("")
    @ApiOperation(value = "终止")
    public Response sendCmdToA059(@RequestParam Integer deviceId,@RequestParam Integer opCmd){
        service.sendCmdToA059(deviceId,opCmd);
        return new Response().setII(1,"指令发送成功");
    }
 
 
}