| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.vo.ReportVo; |
| | | import com.yuanchu.limslaboratory.service.ReportService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-08-07 |
| | | */ |
| | | @Api(tags = "æ£éªæ¨¡å-->æ£éªæ¥å") |
| | | @RestController |
| | | @RequestMapping("/report") |
| | | public class ReportController { |
| | | /** |
| | | * æå¡å¯¹è±¡ |
| | | */ |
| | | @Resource |
| | | private ReportService reportService; |
| | | |
| | | @ApiOperation("æ¥è¯¢æ£éªæ¥å") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "page", value = "åå§é¡µ", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "pageSize", value = "æ¯ä¸é¡µæ°é", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "status", value = "ç¶æ(为空=å
¨é¨)", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "name", value = "æç´¢ä¿¡æ¯", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/selectAllReport") |
| | | public Result selectAllReport(Integer page, Integer pageSize, Integer status, String name) { |
| | | IPage<ReportVo> reportPage = reportService.selectAllReport(new Page<Object>(page, pageSize), status, name); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", reportPage.getTotal()); |
| | | map.put("row", reportPage.getRecords()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |
| | | |