选煤厂生产管理平台后台代码
Jay
6 天以前 8d3ff63ab144ad6b48015b01196bc901944a48f9
提交 | 用户 | 时间
7e21bc 1 package com.iailab.module.pms.coalquality.modules.detection.controller.admin;
J 2
3
4 import com.iailab.framework.common.pojo.CommonResult;
5 import com.iailab.framework.common.pojo.PageResult;
6 import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO;
7 import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickService;
8 import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO;
9 import io.swagger.v3.oas.annotations.Operation;
10 import io.swagger.v3.oas.annotations.tags.Tag;
11 import lombok.extern.slf4j.Slf4j;
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.web.bind.annotation.*;
14
15 import static com.iailab.framework.common.pojo.CommonResult.success;
16
17 /**
18  * @author DongYukun
19  * @Description
20  * @createTime 2023年12月27日 9:53:00
21  */
22 @Slf4j
23 @RestController
8d3ff6 24 @RequestMapping("/coal-quality/quality/quick")
7e21bc 25 @Tag(name = "生产快检")
J 26 public class QualityQuickController {
27     @Autowired
28     private QualityQuickService qualityQuickService;
29
30     @GetMapping("page")
31     @Operation(summary = "分页")
32     public CommonResult<PageResult<QualityQuickDTO>> page(QuickPageReqVO quickPageReqVO){
33         PageResult<QualityQuickDTO> page = qualityQuickService.page(quickPageReqVO);
34
35         return success(page);
36     }
37
8d3ff6 38     @GetMapping("/get")
7e21bc 39     @Operation(summary = "信息")
8d3ff6 40     public CommonResult<QualityQuickDTO> get(String id){
7e21bc 41         QualityQuickDTO data = qualityQuickService.get(id);
J 42         return success(data);
43     }
44
8d3ff6 45     @PostMapping("/create")
7e21bc 46     @Operation(summary = "保存")
J 47     public CommonResult<Boolean> save(@RequestBody QualityQuickDTO dto){
48
49         qualityQuickService.save(dto);
50
51         return success(true);
52     }
53
8d3ff6 54     @PutMapping("/update")
7e21bc 55     @Operation(summary = "修改")
J 56     public CommonResult<Boolean> update(@RequestBody QualityQuickDTO dto){
57
58         qualityQuickService.update(dto);
59
60         return success(true);
61     }
62
8d3ff6 63     @DeleteMapping("/delete")
7e21bc 64     @Operation(summary = "删除")
J 65     public CommonResult<Boolean> delete(@RequestBody String[] ids){
66
67         qualityQuickService.delete(ids);
68
69         return success(true);
70     }
71 }