WryController.java 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.goldenwater.slgc.controller;
  2. import java.util.List;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.web.bind.annotation.DeleteMapping;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.PutMapping;
  9. import org.springframework.web.bind.annotation.RequestBody;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RestController;
  12. import com.goldenwater.common.annotation.Log;
  13. import com.goldenwater.common.core.controller.BaseController;
  14. import com.goldenwater.common.core.domain.AjaxResult;
  15. import com.goldenwater.common.core.page.TableDataInfo;
  16. import com.goldenwater.common.enums.BusinessType;
  17. import com.goldenwater.slgc.domain.Wry;
  18. import com.goldenwater.slgc.service.WryService;
  19. import io.swagger.v3.oas.annotations.Operation;
  20. import io.swagger.v3.oas.annotations.tags.Tag;
  21. @Tag(name = "18. 污染源环保统计管理")
  22. @RestController
  23. @RequestMapping("/slgc/wry")
  24. public class WryController extends BaseController {
  25. @Autowired
  26. private WryService wryService;
  27. @Operation(summary = "18.01 查询污染源环保统计列表")
  28. @GetMapping("/list")
  29. public TableDataInfo list(Wry wry) {
  30. startPage();
  31. List<Wry> list = wryService.selectWryList(wry);
  32. return getDataTable(list);
  33. }
  34. @Operation(summary = "18.02 获取污染源环保统计详细信息")
  35. @GetMapping(value = "/{id}")
  36. public AjaxResult getInfo(@PathVariable String id) {
  37. return success(wryService.selectWryById(id));
  38. }
  39. @Operation(summary = "18.03 新增污染源环保统计")
  40. @Log(title = "污染源环保统计管理", businessType = BusinessType.INSERT)
  41. @PostMapping
  42. public AjaxResult add(@RequestBody Wry wry) {
  43. return toAjax(wryService.insertWry(wry));
  44. }
  45. @Operation(summary = "18.04 修改污染源环保统计")
  46. @Log(title = "污染源环保统计管理", businessType = BusinessType.UPDATE)
  47. @PutMapping
  48. public AjaxResult edit(@RequestBody Wry wry) {
  49. return toAjax(wryService.updateWry(wry));
  50. }
  51. @Operation(summary = "18.05 删除污染源环保统计")
  52. @Log(title = "污染源环保统计管理", businessType = BusinessType.DELETE)
  53. @DeleteMapping("/{ids}")
  54. public AjaxResult remove(@PathVariable String[] ids) {
  55. return toAjax(wryService.deleteWryByIds(ids));
  56. }
  57. }