value
2024-04-02 4c563cb7274be53e15f8ce5537ef6e57e15b6458
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
package com.yuanchu.mom.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.dto.ReportPageDto;
import com.yuanchu.mom.dto.SampleOrderDto;
import com.yuanchu.mom.service.InsReportService;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.Map;
 
@AllArgsConstructor
@RestController
@RequestMapping("/insReport")
@Api("检验报告")
public class InsReportController {
 
    private InsReportService insReportService;
 
    @ApiOperation(value = "查询检验报告数据")
    @PostMapping("/pageInsReport")
    public Result pageInsReport(@RequestBody Map<String, Object> data) throws Exception {
        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
        ReportPageDto reportPageDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), ReportPageDto.class);
        return Result.success(insReportService.pageInsReport(page, reportPageDto));
    }
 
}