liusheng
2024-03-05 0c5e744bd9b52147c7fc273ec8fe7bd7afea0ebb
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundflowController.java
@@ -2,8 +2,10 @@
import java.util.Arrays;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -26,15 +28,14 @@
/**
 * 资金审批流程Controller
 *
 *
 * @author ruoyi
 * @date 2022-04-27
 */
@Api("资金审批流程")
@RestController
@RequestMapping("/project/fundflow")
public class ServiceFundflowController extends BaseController
{
public class ServiceFundflowController extends BaseController {
    @Autowired
    private IServiceFundflowService serviceFundflowService;
@@ -43,8 +44,7 @@
     */
    @ApiOperation("查询资金审批流程列表")
    @GetMapping("/list")
    public TableDataInfo list(ServiceFundflow serviceFundflow)
    {
    public TableDataInfo list(ServiceFundflow serviceFundflow) {
        startPage();
        List<ServiceFundflow> list = serviceFundflowService.queryList(serviceFundflow);
        return getDataTable(list);
@@ -56,8 +56,7 @@
    @ApiOperation("导出资金审批流程列表")
    @Log(title = "资金审批流程", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(ServiceFundflow serviceFundflow)
    {
    public AjaxResult export(ServiceFundflow serviceFundflow) {
        List<ServiceFundflow> list = serviceFundflowService.queryList(serviceFundflow);
        ExcelUtil<ServiceFundflow> util = new ExcelUtil<ServiceFundflow>(ServiceFundflow.class);
        return util.exportExcel(list, "资金审批流程数据");
@@ -68,8 +67,7 @@
     */
    @ApiOperation("获取资金审批流程详细信息")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return AjaxResult.success(serviceFundflowService.getById(id));
    }
@@ -78,11 +76,11 @@
     */
    @ApiOperation("新增资金审批流程")
    @Log(title = "资金审批流程", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    @RepeatSubmit
    public AjaxResult add(@RequestBody ServiceFundflow serviceFundflow)
    {
        return toAjax(serviceFundflowService.save(serviceFundflow));
    public AjaxResult add(@RequestBody ServiceFundflow serviceFundflow) {
        boolean save = serviceFundflowService.save(serviceFundflow);
        return AjaxResult.success(serviceFundflow);
    }
    /**
@@ -90,10 +88,9 @@
     */
    @ApiOperation("修改资金审批流程")
    @Log(title = "资金审批流程", businessType = BusinessType.UPDATE)
    @PutMapping
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceFundflow serviceFundflow)
    {
    @PostMapping("/edit")
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceFundflow serviceFundflow) {
        return toAjax(serviceFundflowService.updateById(serviceFundflow));
    }
@@ -102,9 +99,8 @@
     */
    @ApiOperation("删除资金审批流程")
    @Log(title = "资金审批流程", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(serviceFundflowService.removeByIds(Arrays.asList(ids)));
    }
}