选煤厂生产管理平台后台代码
dongyukun
2024-12-11 e16f4e463a6a090798c189a78a4a8f08295d31a6
提交 | 用户 | 时间
7e21bc 1 package com.iailab.module.pms.coalquality.modules.analysis.controller.admin;
J 2
3
4 import com.iailab.framework.common.annotation.AutoDict;
5 import com.iailab.framework.common.pojo.CommonResult;
6 import com.iailab.framework.common.pojo.PageResult;
7 import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDTO;
8 import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullService;
9 import com.iailab.module.pms.coalquality.modules.analysis.vo.FullPageReqVO;
10 import io.swagger.v3.oas.annotations.Operation;
11 import io.swagger.v3.oas.annotations.tags.Tag;
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年01月12日 22:22:00
21  */
22 @RestController
e16f4e 23 @RequestMapping("/xmcpms/coal-quality/analysis/full")
7e21bc 24 @Tag(name ="全级浮沉实验台账")
J 25 public class CoalAnalysisFullController {
26
27     @Autowired
28     private CoalAnalysisFullService coalAnalysisFullService;
29
30     @GetMapping("/page")
31     @Operation(summary = "获取浮沉实验台账列表", description = "用于浮沉实验台账界面")
32 //    @PreAuthorize("@ss.hasPermission('data:ind-item:query')")
33     public CommonResult<PageResult<CoalAnalysisFullDTO>> page(FullPageReqVO fullPageReqVO){
34
35         PageResult<CoalAnalysisFullDTO> page = coalAnalysisFullService.page(fullPageReqVO);
36
37         return success(page);
38     }
39
40     @GetMapping("/get")
41     @Operation(summary = "信息")
42     @AutoDict
43     public CommonResult<CoalAnalysisFullDTO> get(String id){
44         CoalAnalysisFullDTO data = coalAnalysisFullService.get(id);
45         return success(data);
46     }
47
48     @PostMapping("/create")
49     @Operation(summary = "保存")
50     public CommonResult<Boolean> save(@RequestBody CoalAnalysisFullDTO dto){
51
52         coalAnalysisFullService.save(dto);
53
54         return success(true);
55     }
56
57     @PutMapping("/update")
58     @Operation(summary = "修改")
59     public CommonResult<Boolean> update(@RequestBody CoalAnalysisFullDTO dto){
60         //效验数据
61 //        ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
62 //
63 //        if (coalAnalysisFullService.cheack(dto) > 0) {
64 //            return new Result().error("编号重复");
65 //        }
66
67         coalAnalysisFullService.update(dto);
68
69         return success(true);
70     }
71
72     @DeleteMapping("/delete")
73     @Operation(summary = "删除")
74     public  CommonResult<Boolean> delete(@RequestBody String[] ids){
75
76         coalAnalysisFullService.delete(ids);
77
78         return success(true);
79     }
80 }