BmCompanyShareholderController.java 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package com.ruoyi.web.controller.project;
  2. import java.util.List;
  3. import com.ruoyi.common.annotation.RepeatSubmit;
  4. import com.ruoyi.system.domain.project.BmCompanyShareholder;
  5. import com.ruoyi.system.service.project.IBmCompanyShareholderService;
  6. import org.springframework.security.access.prepost.PreAuthorize;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.GetMapping;
  9. import org.springframework.web.bind.annotation.PostMapping;
  10. import org.springframework.web.bind.annotation.PutMapping;
  11. import org.springframework.web.bind.annotation.DeleteMapping;
  12. import org.springframework.web.bind.annotation.PathVariable;
  13. import org.springframework.web.bind.annotation.RequestBody;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RestController;
  16. import com.ruoyi.common.annotation.Log;
  17. import com.ruoyi.common.core.controller.BaseController;
  18. import com.ruoyi.common.core.domain.AjaxResult;
  19. import com.ruoyi.common.enums.BusinessType;
  20. import com.ruoyi.common.utils.poi.ExcelUtil;
  21. import com.ruoyi.common.core.page.TableDataInfo;
  22. /**
  23. * 注册企业股东构成Controller
  24. *
  25. * @author ruoyi
  26. * @date 2021-03-05
  27. */
  28. @RestController
  29. @RequestMapping("/shareholder/shareholder")
  30. public class BmCompanyShareholderController extends BaseController
  31. {
  32. @Autowired
  33. private IBmCompanyShareholderService bmCompanyShareholderService;
  34. /**
  35. * 查询注册企业股东构成列表
  36. */
  37. @PreAuthorize("@ss.hasPermi('shareholder:shareholder:list')")
  38. @GetMapping("/list")
  39. public TableDataInfo list(BmCompanyShareholder bmCompanyShareholder)
  40. {
  41. startPage();
  42. List<BmCompanyShareholder> list = bmCompanyShareholderService.selectBmCompanyShareholderList(bmCompanyShareholder);
  43. return getDataTable(list);
  44. }
  45. /**
  46. * 导出注册企业股东构成列表
  47. */
  48. @PreAuthorize("@ss.hasPermi('shareholder:shareholder:export')")
  49. @Log(title = "注册企业股东构成", businessType = BusinessType.EXPORT)
  50. @GetMapping("/export")
  51. public AjaxResult export(BmCompanyShareholder bmCompanyShareholder)
  52. {
  53. List<BmCompanyShareholder> list = bmCompanyShareholderService.selectBmCompanyShareholderList(bmCompanyShareholder);
  54. ExcelUtil<BmCompanyShareholder> util = new ExcelUtil<BmCompanyShareholder>(BmCompanyShareholder.class);
  55. return util.exportExcel(list, "shareholder");
  56. }
  57. /**
  58. * 获取注册企业股东构成详细信息
  59. */
  60. @PreAuthorize("@ss.hasPermi('shareholder:shareholder:query')")
  61. @GetMapping(value = "/{id}")
  62. public AjaxResult getInfo(@PathVariable("id") Long id)
  63. {
  64. return AjaxResult.success(bmCompanyShareholderService.selectBmCompanyShareholderById(id));
  65. }
  66. /**
  67. * 新增注册企业股东构成
  68. */
  69. @PreAuthorize("@ss.hasPermi('shareholder:shareholder:add')")
  70. @Log(title = "注册企业股东构成", businessType = BusinessType.INSERT)
  71. @PostMapping
  72. @RepeatSubmit
  73. public AjaxResult add(@RequestBody BmCompanyShareholder bmCompanyShareholder)
  74. {
  75. return toAjax(bmCompanyShareholderService.insertBmCompanyShareholder(bmCompanyShareholder));
  76. }
  77. /**
  78. * 修改注册企业股东构成
  79. */
  80. @PreAuthorize("@ss.hasPermi('shareholder:shareholder:edit')")
  81. @Log(title = "注册企业股东构成", businessType = BusinessType.UPDATE)
  82. @PutMapping
  83. public AjaxResult edit(@RequestBody BmCompanyShareholder bmCompanyShareholder)
  84. {
  85. return toAjax(bmCompanyShareholderService.updateBmCompanyShareholder(bmCompanyShareholder));
  86. }
  87. /**
  88. * 删除注册企业股东构成
  89. */
  90. @PreAuthorize("@ss.hasPermi('shareholder:shareholder:remove')")
  91. @Log(title = "注册企业股东构成", businessType = BusinessType.DELETE)
  92. @DeleteMapping("/{ids}")
  93. public AjaxResult remove(@PathVariable Long[] ids)
  94. {
  95. return toAjax(bmCompanyShareholderService.deleteBmCompanyShareholderByIds(ids));
  96. }
  97. }