|
@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.investigate;
|
|
|
|
|
|
import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -23,14 +24,13 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
/**
|
|
|
* 考察主Controller
|
|
|
- *
|
|
|
+ *
|
|
|
* @author ruoyi
|
|
|
* @date 2023-10-10
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/investigate/table")
|
|
|
-public class InvestigateTableController extends BaseController
|
|
|
-{
|
|
|
+public class InvestigateTableController extends BaseController {
|
|
|
@Autowired
|
|
|
private IInvestigateTableService investigateTableService;
|
|
|
|
|
@@ -39,11 +39,9 @@ public class InvestigateTableController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('investigate:table:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(InvestigateTable investigateTable)
|
|
|
- {
|
|
|
+ public TableDataInfo list(InvestigateTable investigateTable) {
|
|
|
startPage();
|
|
|
- List<InvestigateTable> list = investigateTableService.selectInvestigateTableList(investigateTable);
|
|
|
- return getDataTable(list);
|
|
|
+ return investigateTableService.selectInvestigateTableListData(investigateTable);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -51,8 +49,7 @@ public class InvestigateTableController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('investigate:table:listPage')")
|
|
|
@GetMapping("/listPage")
|
|
|
- public TableDataInfo listPage(InvestigateTable investigateTable)
|
|
|
- {
|
|
|
+ public TableDataInfo listPage(InvestigateTable investigateTable) {
|
|
|
List<InvestigateTable> list = investigateTableService.selectInvestigateTableList(investigateTable);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
@@ -63,8 +60,7 @@ public class InvestigateTableController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('investigate:table:export')")
|
|
|
@Log(title = "考察主", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, InvestigateTable investigateTable)
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, InvestigateTable investigateTable) {
|
|
|
List<InvestigateTable> list = investigateTableService.selectInvestigateTableList(investigateTable);
|
|
|
ExcelUtil<InvestigateTable> util = new ExcelUtil<InvestigateTable>(InvestigateTable.class);
|
|
|
util.exportExcel(response, list, "考察主数据");
|
|
@@ -74,8 +70,7 @@ public class InvestigateTableController extends BaseController
|
|
|
* 获取考察主详细信息
|
|
|
*/
|
|
|
@GetMapping(value = "/{id}")
|
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
return success(investigateTableService.selectInvestigateTableById(id));
|
|
|
}
|
|
|
|
|
@@ -85,8 +80,7 @@ public class InvestigateTableController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('investigate:table:add')")
|
|
|
@Log(title = "考察主", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody InvestigateTable investigateTable)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody InvestigateTable investigateTable) {
|
|
|
investigateTable.setCreateBy(getUsername());
|
|
|
return toAjax(investigateTableService.insertInvestigateTable(investigateTable));
|
|
|
}
|
|
@@ -97,8 +91,7 @@ public class InvestigateTableController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('investigate:table:edit')")
|
|
|
@Log(title = "考察主", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/put")
|
|
|
- public AjaxResult edit(@RequestBody InvestigateTable investigateTable)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody InvestigateTable investigateTable) {
|
|
|
return toAjax(investigateTableService.updateInvestigateTable(investigateTable));
|
|
|
}
|
|
|
|
|
@@ -108,8 +101,7 @@ public class InvestigateTableController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('investigate:table:remove')")
|
|
|
@Log(title = "考察主", businessType = BusinessType.DELETE)
|
|
|
@GetMapping("/delete/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
- {
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
return toAjax(investigateTableService.deleteInvestigateTableByIds(ids));
|
|
|
}
|
|
|
|