package com.ruoyi.web.controller.project; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.RepeatSubmit; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.project.domain.VExpertfeeExpert; import com.ruoyi.project.service.IVExpertfeeExpertService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.List; /** * VIEWController * * @author ruoyi * @date 2024-03-18 */ @Api("VIEW") @RestController @RequestMapping("/project/feeexpert") public class VExpertfeeExpertController extends BaseController { @Autowired private IVExpertfeeExpertService vExpertfeeExpertService; /** * 查询VIEW列表 */ @ApiOperation("查询VIEW列表") @PreAuthorize("@ss.hasPermi('system:expert:list')") @GetMapping("/list") public TableDataInfo list(VExpertfeeExpert vExpertfeeExpert) { startPage(); List list = vExpertfeeExpertService.queryList(vExpertfeeExpert); return getDataTable(list); } /** * 导出VIEW列表 */ @ApiOperation("导出VIEW列表") @PreAuthorize("@ss.hasPermi('system:expert:export')") @Log(title = "VIEW", businessType = BusinessType.EXPORT) @GetMapping("/export") public AjaxResult export(VExpertfeeExpert vExpertfeeExpert) { List list = vExpertfeeExpertService.queryList(vExpertfeeExpert); ExcelUtil util = new ExcelUtil(VExpertfeeExpert.class); return util.exportExcel(list, "VIEW数据"); } /** * 获取VIEW详细信息 */ @ApiOperation("获取VIEW详细信息") @PreAuthorize("@ss.hasPermi('system:expert:query')") @GetMapping(value = "/{fundTaxId}") public AjaxResult getInfo(@PathVariable("fundTaxId") Long fundTaxId) { return AjaxResult.success(vExpertfeeExpertService.getById(fundTaxId)); } /** * 新增VIEW */ @ApiOperation("新增VIEW") @PreAuthorize("@ss.hasPermi('system:expert:add')") @Log(title = "VIEW", businessType = BusinessType.INSERT) @PostMapping @RepeatSubmit public AjaxResult add(@RequestBody VExpertfeeExpert vExpertfeeExpert) { return toAjax(vExpertfeeExpertService.save(vExpertfeeExpert)); } /** * 修改VIEW */ @ApiOperation("修改VIEW") @PreAuthorize("@ss.hasPermi('system:expert:edit')") @Log(title = "VIEW", businessType = BusinessType.UPDATE) @PutMapping @RepeatSubmit public AjaxResult edit(@RequestBody VExpertfeeExpert vExpertfeeExpert) { return toAjax(vExpertfeeExpertService.updateById(vExpertfeeExpert)); } /** * 删除VIEW */ @ApiOperation("删除VIEW") @PreAuthorize("@ss.hasPermi('system:expert:remove')") @Log(title = "VIEW", businessType = BusinessType.DELETE) @DeleteMapping("/{fundTaxIds}") public AjaxResult remove(@PathVariable Long[] fundTaxIds) { return toAjax(vExpertfeeExpertService.removeByIds(Arrays.asList(fundTaxIds))); } }