提交 | 用户 | 时间
|
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.CoalWashCurvesDTO; |
|
8 |
import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesService; |
|
9 |
import com.iailab.module.pms.coalquality.modules.analysis.vo.WashCurvesPageReqVO; |
|
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 java.util.Map; |
|
16 |
|
|
17 |
import static com.iailab.framework.common.pojo.CommonResult.success; |
|
18 |
|
|
19 |
/** |
|
20 |
* @author PanZhibao |
|
21 |
* @Description |
|
22 |
* @createTime 2023年01月16日 16:25:00 |
|
23 |
*/ |
|
24 |
@RestController |
e16f4e
|
25 |
@RequestMapping("/xmcpms/coal-quality/analysis/wash-curves") |
7e21bc
|
26 |
@Tag(name="可选性曲线台账") |
J |
27 |
public class CoalWashCurvesController { |
|
28 |
|
|
29 |
@Autowired |
|
30 |
private CoalWashCurvesService coalWashCurvesService; |
|
31 |
|
|
32 |
@GetMapping("/page") |
|
33 |
@AutoDict |
|
34 |
public CommonResult<PageResult<CoalWashCurvesDTO>> page(WashCurvesPageReqVO washCurvesPageReqVO){ |
|
35 |
PageResult<CoalWashCurvesDTO> page = coalWashCurvesService.page(washCurvesPageReqVO); |
|
36 |
|
|
37 |
return success(page); |
|
38 |
} |
|
39 |
|
|
40 |
@GetMapping("/info") |
8d3ff6
|
41 |
@Operation(summary = "信息") |
7e21bc
|
42 |
@AutoDict |
J |
43 |
public CommonResult<CoalWashCurvesDTO> getByMzAndRq(@RequestParam Map<String, Object> params){ |
|
44 |
String mz = (String)params.get("mz"); |
|
45 |
String syrq = (String)params.get("syrq"); |
|
46 |
CoalWashCurvesDTO data = coalWashCurvesService.getByMzAndRq(mz,syrq); |
|
47 |
return success(data); |
|
48 |
} |
|
49 |
|
|
50 |
@GetMapping("/last") |
|
51 |
@Operation(summary ="信息") |
|
52 |
@AutoDict |
|
53 |
public CommonResult<Boolean> last(@RequestParam Map<String, Object> params){ |
|
54 |
String mz = (String)params.get("mz"); |
|
55 |
CoalWashCurvesDTO data = coalWashCurvesService.getLastByMz(mz); |
|
56 |
return success(true); |
|
57 |
} |
|
58 |
|
|
59 |
@GetMapping("/get") |
|
60 |
@Operation(summary ="信息") |
|
61 |
@AutoDict |
|
62 |
public CommonResult<CoalWashCurvesDTO> get(String id){ |
|
63 |
CoalWashCurvesDTO data = coalWashCurvesService.get(id); |
|
64 |
return success(data); |
|
65 |
} |
|
66 |
|
|
67 |
@PostMapping("/create") |
|
68 |
@Operation(summary = "保存") |
|
69 |
public CommonResult<Boolean> create(@RequestBody CoalWashCurvesDTO dto){ |
|
70 |
coalWashCurvesService.save(dto); |
|
71 |
|
|
72 |
return success(true); |
|
73 |
} |
|
74 |
|
|
75 |
@PutMapping("/update") |
|
76 |
@Operation(summary ="修改") |
|
77 |
public CommonResult<Boolean> update(@RequestBody CoalWashCurvesDTO dto){ |
|
78 |
coalWashCurvesService.update(dto); |
|
79 |
|
|
80 |
return success(true); |
|
81 |
} |
|
82 |
|
|
83 |
@DeleteMapping("/delete") |
|
84 |
@Operation(summary = "删除") |
|
85 |
public CommonResult<Boolean> delete(@RequestBody String[] ids){ |
|
86 |
coalWashCurvesService.delete(ids); |
|
87 |
|
|
88 |
return success(true); |
|
89 |
} |
|
90 |
|
|
91 |
} |