¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.device.pojo.DeviceScrapped; |
| | | import com.ruoyi.device.service.DeviceScrappedService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ¥åºç³è¯·è¡¨") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceScrapped") |
| | | public class DeviceScrappedController { |
| | | |
| | | private DeviceScrappedService deviceScrappedService; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ¥åºç³è¯·å表") |
| | | @GetMapping("/pageDeviceScrapped") |
| | | public Result<IPage<DeviceScrapped>> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped) { |
| | | return Result.success(deviceScrappedService.pageDeviceScrapped(page, deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ¥åºç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/getDeviceScrapped") |
| | | public Result getDeviceScrapped(Integer scrappedId){ |
| | | return Result.success(deviceScrappedService.getById(scrappedId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ¥åºç³è¯·") |
| | | @DeleteMapping("/delDeviceScrapped") |
| | | public Result delDeviceScrapped(Integer scrappedId){ |
| | | return Result.success(deviceScrappedService.removeById(scrappedId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ¥åºç³è¯·") |
| | | @PostMapping("/addDeviceScrapped") |
| | | public Result addDeviceScrapped(@RequestBody DeviceScrapped deviceScrapped){ |
| | | return Result.success(deviceScrappedService.addDeviceScrapped(deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ¥åºç³è¯· |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/exportDeviceScrapped") |
| | | public Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) { |
| | | return deviceScrappedService.exportDeviceScrapped(scrappedId, response); |
| | | } |
| | | |
| | | } |