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