package com.ruoyi.report.controller;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.common.core.domain.Result;
|
import com.ruoyi.report.dto.TestItemDataDto;
|
import com.ruoyi.report.service.TestItemDataService;
|
import com.ruoyi.report.vo.TestItemDataVo;
|
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.List;
|
import java.util.Map;
|
|
/**
|
* 检测项目数据控制器
|
*/
|
@RequestMapping("/report/testItemData")
|
@RestController
|
@AllArgsConstructor
|
@Api(tags = "检测项目数据")
|
public class TestItemDataController {
|
|
private TestItemDataService testItemDataService;
|
|
/**
|
* 分页查询检测项目数据
|
*/
|
@ApiOperation(value = "分页查询检测项目数据")
|
@GetMapping("/page")
|
public Result page(TestItemDataDto dto, Page page) {
|
return Result.success(testItemDataService.pageTestItemData(page, dto));
|
}
|
|
/**
|
* 查询检测项目详情
|
*/
|
@ApiOperation(value = "查询检测项目详情")
|
@GetMapping("/detail")
|
public Result detail(@RequestParam Long sampleId) {
|
return Result.success(testItemDataService.getDetail(sampleId));
|
}
|
|
/**
|
* 数据横向比较
|
*/
|
@ApiOperation(value = "数据横向比较")
|
@PostMapping("/compare")
|
public Result compare(@RequestBody TestItemDataDto dto) {
|
return Result.success(testItemDataService.compare(dto));
|
}
|
|
/**
|
* 导出数据
|
*/
|
@ApiOperation(value = "导出数据")
|
@GetMapping("/export")
|
public void export(TestItemDataDto dto, HttpServletResponse response) {
|
testItemDataService.exportTestItemData(dto, response);
|
}
|
|
/**
|
* 查询检测项名称列表
|
*/
|
@ApiOperation(value = "查询检测项名称列表")
|
@GetMapping("/itemNames")
|
public Result getItemNames(TestItemDataDto dto) {
|
return Result.success(testItemDataService.getItemNames(dto));
|
}
|
|
}
|