zss
2025-02-14 f5114972497953a70772f202a8ae2a0bf96659b0
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
package com.ruoyi.basic.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.pojo.Laboratory;
import com.ruoyi.basic.pojo.Seal;
import com.ruoyi.basic.service.SealService;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.utils.JackSonUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
import java.util.List;
import java.util.Map;
 
/**
 * 印章管理(SealController)表控制层
 */
@Api(tags = "印章管理")
 
@RestController
@RequestMapping("/sealScope")
public class SealController {
 
    @Resource
    private SealService sealService;
 
    @ApiOperation(value = "添加印章参数")
    @PostMapping("/addSeal")
    public Result addSeal(@RequestBody Seal seal) {
        int i = sealService.addSeal(seal);
        if(i>0){
            Integer labId = seal.getLabId();
            List<Laboratory> laboratory = sealService.Laboratory(labId);
            return Result.success(laboratory);
        }else{
            return Result.fail();
        }
 
    }
    @ApiOperation(value="查询印章列表")
    @PostMapping("/selectSeal")
    public  Result selectSeal(Page page,Seal seal) {
        return Result.success(sealService.selectSeal(page,seal));
    }
}