whyclxw
2024-12-04 6f01a484270b3a1fbe3e34bd17d5e3b676f9c626
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
51
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.MonInf;
import com.whyc.service.MonInfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletRequest;
 
@RequestMapping("mon")
@RestController
@Api(tags = "备用蓄电池管理")
public class MonInfController {
 
    @Autowired
    private MonInfService service;
 
 
    @PostMapping("addLaidUp")
    @ApiOperation("入库")
    public Response addLaidUp(@RequestBody MonInf monInf){
        return service.addLaidUp(monInf);
    }
 
    @PostMapping("updateMon")
    @ApiOperation("修改单体信息")
    public Response updateMonInf(@RequestBody MonInf monInf){
        return service.updateMonInf(monInf);
    }
 
    @GetMapping("updateType")
    @ApiOperation("修改单体分类")
    public Response updateMonType(@RequestParam int monId,@RequestParam String monType){
        return service.updateMonType(monId,monType);
    }
 
    @GetMapping("updateMonBad")
    @ApiOperation("报废单体")
    public Response updateMonBad(@RequestParam int monId){
        return service.updateMonBad(monId);
    }
 
    @GetMapping("getAllMon")
    @ApiOperation("查询单体信息")
    public Response getAllMon(@RequestParam(required = false) String monType,@RequestParam int pageNum,@RequestParam int pageSize){
        return service.getAllMon(monType,pageNum,pageSize);
    }
}