选煤厂生产管理平台后台代码
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.QualityTailingDTO;
7 import com.iailab.module.pms.coalquality.modules.detection.service.QualityTailingService;
8 import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO;
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 PanZhibao
19  * @Description
20  * @createTime 2023年02月07日 17:37:00
21  */
22 @Slf4j
23 @RestController
8d3ff6 24 @RequestMapping("/coal-quality/quality/tailing")
7e21bc 25 @Tag(name = "尾矿检测")
J 26 public class QualityTailingController {
27     @Autowired
28     private QualityTailingService qualityTailingService;
29
30     @GetMapping("page")
31     @Operation(summary = "分页")
32     public CommonResult<PageResult<QualityTailingDTO>> page(TailingPageReqVO tailingPageReqVO){
33         PageResult<QualityTailingDTO> page = qualityTailingService.page(tailingPageReqVO);
34
35         return success(page);
36     }
37
8d3ff6 38     @GetMapping("/get")
7e21bc 39     @Operation(summary ="信息")
8d3ff6 40     public CommonResult<QualityTailingDTO> get(String id){
7e21bc 41         QualityTailingDTO data = qualityTailingService.get(id);
J 42         return success(data);
43     }
44
8d3ff6 45     @PostMapping("/create")
7e21bc 46     @Operation(summary ="保存")
8d3ff6 47     public CommonResult<Boolean> create(@RequestBody QualityTailingDTO dto){
7e21bc 48
J 49         qualityTailingService.save(dto);
50
51         return success(true);
52     }
53
8d3ff6 54     @PutMapping("/update")
7e21bc 55     @Operation(summary ="修改")
J 56     public CommonResult<Boolean> update(@RequestBody QualityTailingDTO dto){
57 //
58 //        if (qualityTailingService.cheack(dto) > 0) {
59 //            return new CommonResult().error("编号重复");
60 //        }
61
62         qualityTailingService.update(dto);
63
64         return success(true);
65     }
66
8d3ff6 67     @DeleteMapping("/delete")
7e21bc 68     @Operation(summary ="删除")
J 69     public CommonResult<Boolean> delete(@RequestBody String[] ids){
70
71         qualityTailingService.delete(ids);
72
73         return success(true);
74     }
75
76 }