whyclxw
7 天以前 cfdb274a6e9303f78315b21c2dc66c2a2839fb39
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
47
48
49
50
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParamStand;
import com.whyc.service.PwrdevAlarmParamStandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
import java.io.IOException;
 
@RestController
@Api(tags = "标准参数管理")
@RequestMapping("stand")
public class PwrdevAlarmParamStandController {
    @Autowired
    private PwrdevAlarmParamStandService service;
 
    @ApiOperation(value = "查询标准参数")
    @GetMapping("getPwrStandParam")
    public Response getPwrStandParam(@RequestParam Integer powerType){
        return service.getPwrStandParam(powerType);
    }
 
    @ApiOperation(value = "设置标准参数")
    @PostMapping("setPwrStandParam")
    public Response setPwrStandParam(@RequestBody PwrdevAlarmParamStand stand){
        return service.setPwrStandParam(stand);
    }
 
    @ApiOperation(value = "查询规范文件")
    @GetMapping("getStandFile")
    public Response getStandFile(@RequestParam Integer powerType,@RequestParam String fileName){
        return service.getStandFile(powerType,fileName);
    }
    @ApiOperation(value = "上传规范文件")
    @PostMapping("uploadStandFile")
    public Response uploadStandFile(@RequestParam MultipartFile multipartFile,@RequestParam String num) throws IOException {
        return service.uploadStandFile(multipartFile,num);
    }
 
    @ApiOperation(value = "添加标准参数")
    @PostMapping("addPwrStandParam")
    public Response addPwrStandParam(@RequestBody PwrdevAlarmParamStand stand){
        return service.addPwrStandParam(stand);
    }
}