huminmin
2026-06-05 24019a8c1d8e78656e85b29ee7be223e0dd253a0
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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));
    }
 
}