package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.pojo.db_batt.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.*;
|
|
@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);
|
}
|
}
|