TCgglScmxController.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package com.onemap.system.controller;
  2. import java.util.List;
  3. import java.io.IOException;
  4. import javax.servlet.http.HttpServletResponse;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.PutMapping;
  9. import org.springframework.web.bind.annotation.DeleteMapping;
  10. import org.springframework.web.bind.annotation.PathVariable;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import com.onemap.common.log.annotation.Log;
  15. import com.onemap.common.log.enums.BusinessType;
  16. import com.onemap.common.security.annotation.RequiresPermissions;
  17. import com.onemap.system.domain.TCgglScmx;
  18. import com.onemap.system.service.ITCgglScmxService;
  19. import com.onemap.common.core.web.controller.BaseController;
  20. import com.onemap.common.core.web.domain.AjaxResult;
  21. import com.onemap.common.core.utils.poi.ExcelUtil;
  22. import com.onemap.common.core.web.page.TableDataInfo;
  23. /**
  24. * 规划成果审查模型配置Controller
  25. *
  26. * @author siwei
  27. * @date 2025-02-07
  28. */
  29. @RestController
  30. @RequestMapping("/scmx")
  31. public class TCgglScmxController extends BaseController
  32. {
  33. @Autowired
  34. private ITCgglScmxService tCgglScmxService;
  35. /**
  36. * 查询规划成果审查模型配置列表
  37. */
  38. @RequiresPermissions("system:scmx:list")
  39. @GetMapping("/list")
  40. public TableDataInfo list(TCgglScmx tCgglScmx)
  41. {
  42. startPage();
  43. List<TCgglScmx> list = tCgglScmxService.selectTCgglScmxList(tCgglScmx);
  44. return getDataTable(list);
  45. }
  46. /**
  47. * 导出规划成果审查模型配置列表
  48. */
  49. @RequiresPermissions("system:scmx:export")
  50. @Log(title = "规划成果审查模型配置", businessType = BusinessType.EXPORT)
  51. @PostMapping("/export")
  52. public void export(HttpServletResponse response, TCgglScmx tCgglScmx)
  53. {
  54. List<TCgglScmx> list = tCgglScmxService.selectTCgglScmxList(tCgglScmx);
  55. ExcelUtil<TCgglScmx> util = new ExcelUtil<TCgglScmx>(TCgglScmx.class);
  56. util.exportExcel(response, list, "规划成果审查模型配置数据");
  57. }
  58. /**
  59. * 获取规划成果审查模型配置详细信息
  60. */
  61. @RequiresPermissions("system:scmx:query")
  62. @GetMapping(value = "/{id}")
  63. public AjaxResult getInfo(@PathVariable("id") String id)
  64. {
  65. return success(tCgglScmxService.selectTCgglScmxById(id));
  66. }
  67. /**
  68. * 新增规划成果审查模型配置
  69. */
  70. @RequiresPermissions("system:scmx:add")
  71. @Log(title = "规划成果审查模型配置", businessType = BusinessType.INSERT)
  72. @PostMapping
  73. public AjaxResult add(@RequestBody TCgglScmx tCgglScmx)
  74. {
  75. return toAjax(tCgglScmxService.insertTCgglScmx(tCgglScmx));
  76. }
  77. /**
  78. * 修改规划成果审查模型配置
  79. */
  80. @RequiresPermissions("system:scmx:edit")
  81. @Log(title = "规划成果审查模型配置", businessType = BusinessType.UPDATE)
  82. @PutMapping
  83. public AjaxResult edit(@RequestBody TCgglScmx tCgglScmx)
  84. {
  85. return toAjax(tCgglScmxService.updateTCgglScmx(tCgglScmx));
  86. }
  87. /**
  88. * 删除规划成果审查模型配置
  89. */
  90. @RequiresPermissions("system:scmx:remove")
  91. @Log(title = "规划成果审查模型配置", businessType = BusinessType.DELETE)
  92. @DeleteMapping("/{ids}")
  93. public AjaxResult remove(@PathVariable String[] ids)
  94. {
  95. return toAjax(tCgglScmxService.deleteTCgglScmxByIds(ids));
  96. }
  97. }