zss
6 天以前 51ec98113c6d49d0f7eec4e3c030e55e337e97db
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package com.yuanchu.mom.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.annotation.ValueAuth;
import com.yuanchu.mom.dto.InternalWastesDto;
import com.yuanchu.mom.pojo.InternalWastes;
import com.yuanchu.mom.service.InternalWastesService;
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.*;
 
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
 
/**
 * <p>
 * 安全内务三废登记 前端控制器
 * </p>
 *
 * @author
 * @since 2024-11-19 06:39:27
 */
@Api(tags = "安全内务三废登记")
@AllArgsConstructor
@RestController
@RequestMapping("/internalWastes")
public class InternalWastesController {
 
    private InternalWastesService internalWastesService;
 
    /**
     * 安全内务三废处理分页查询
     * @param data
     * @return
     */
    @ValueAuth
    @ApiOperation(value = "安全内务三废处理分页查询")
    @PostMapping("/pageInternalWastes")
    public Result<IPage<InternalWastesDto>> pageInternalWastes(@RequestBody Map<String, Object> data) throws Exception {
        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
        InternalWastes internalWastes = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalWastes.class);
        return Result.success(internalWastesService.pageInternalWastes(page, internalWastes));
    }
 
    /**
     * 安全内务三废处理新增
     * @return
     */
    @ValueAuth
    @ApiOperation(value = "安全内务三废处理新增")
    @PostMapping("/addInternalWastes")
    public Result addInternalWastes(@RequestBody InternalWastesDto internalWastes){
        return Result.success(internalWastesService.addInternalWastes(internalWastes));
    }
 
    /**
     * 安全内务三废处理修改
     * @return
     */
    @ValueAuth
    @ApiOperation(value = "安全内务三废处理修改")
    @PostMapping("/updateInternalWastes")
    public Result updateInternalWastes(@RequestBody InternalWastesDto internalWastes){
        return Result.success(internalWastesService.updateInternalWastes(internalWastes));
    }
 
    /**
     * 安全内务三废处理删除
     * @return
     */
    @ValueAuth
    @ApiOperation(value = "安全内务三废处理删除")
    @GetMapping("/delInternalWastes")
    public Result delInternalWastes(Integer wastesId){
        return Result.success(internalWastesService.delInternalWastes(wastesId));
    }
 
    /**
     * 安全内务三废处理查看详情
     * @return
     */
    @ValueAuth
    @ApiOperation(value = "安全内务三废处理查看详情")
    @GetMapping("/getInternalWastesOne")
    public Result<InternalWastesDto> getInternalWastesOne(Integer wastesId){
        return Result.success(internalWastesService.getInternalWastesOne(wastesId));
    }
 
    /**
     * 导出三废处理
     * @return
     */
    @ValueAuth
    @ApiOperation(value = "导出三废处理")
    @GetMapping("/exportInternalWastes")
    public void exportInternalWastes(Integer wastesId, HttpServletResponse response){
        internalWastesService.exportInternalWastes(wastesId, response);
    }
 
}