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.VExpertfeeTotal; import com.ruoyi.project.service.IVExpertfeeTotalService; 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/feetotal") public class VExpertfeeTotalController extends BaseController { @Autowired private IVExpertfeeTotalService vExpertfeeTotalService; /** * 查询VIEW列表 */ @ApiOperation("查询VIEW列表") @PreAuthorize("@ss.hasPermi('system:total:list')") @GetMapping("/list") public TableDataInfo list(VExpertfeeTotal vExpertfeeTotal) { startPage(); List list = vExpertfeeTotalService.queryList(vExpertfeeTotal); return getDataTable(list); } /** * 导出VIEW列表 */ @ApiOperation("导出VIEW列表") @PreAuthorize("@ss.hasPermi('system:total:export')") @Log(title = "VIEW", businessType = BusinessType.EXPORT) @GetMapping("/export") public AjaxResult export(VExpertfeeTotal vExpertfeeTotal) { List list = vExpertfeeTotalService.queryList(vExpertfeeTotal); ExcelUtil util = new ExcelUtil(VExpertfeeTotal.class); return util.exportExcel(list, "VIEW数据"); } /** * 获取VIEW详细信息 */ @ApiOperation("获取VIEW详细信息") @PreAuthorize("@ss.hasPermi('system:total:query')") @GetMapping(value = "/{fundTaxId}") public AjaxResult getInfo(@PathVariable("fundTaxId") Long fundTaxId) { return AjaxResult.success(vExpertfeeTotalService.getById(fundTaxId)); } /** * 新增VIEW */ @ApiOperation("新增VIEW") @PreAuthorize("@ss.hasPermi('system:total:add')") @Log(title = "VIEW", businessType = BusinessType.INSERT) @PostMapping @RepeatSubmit public AjaxResult add(@RequestBody VExpertfeeTotal vExpertfeeTotal) { return toAjax(vExpertfeeTotalService.save(vExpertfeeTotal)); } /** * 修改VIEW */ @ApiOperation("修改VIEW") @PreAuthorize("@ss.hasPermi('system:total:edit')") @Log(title = "VIEW", businessType = BusinessType.UPDATE) @PutMapping @RepeatSubmit public AjaxResult edit(@RequestBody VExpertfeeTotal vExpertfeeTotal) { return toAjax(vExpertfeeTotalService.updateById(vExpertfeeTotal)); } /** * 删除VIEW */ @ApiOperation("删除VIEW") @PreAuthorize("@ss.hasPermi('system:total:remove')") @Log(title = "VIEW", businessType = BusinessType.DELETE) @DeleteMapping("/{fundTaxIds}") public AjaxResult remove(@PathVariable Long[] fundTaxIds) { return toAjax(vExpertfeeTotalService.removeByIds(Arrays.asList(fundTaxIds))); } }