hsy
2026-08-28 a8e4132c3e2e9c3b3fcb0360901b35571b6464ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.ruoyi.sales.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.sales.dto.BiddingManagementDto;
import com.ruoyi.sales.pojo.BiddingManagement;
import com.ruoyi.sales.service.IBiddingManagementService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * 招投标管理Controller
 */
@RestController
@RequestMapping("/sales/bidding")
@AllArgsConstructor
@Tag(name = "招投标管理")
public class BiddingManagementController extends BaseController {
 
    private final IBiddingManagementService biddingManagementService;
 
    /**
     * 查询招投标管理列表
     */
    @GetMapping("/listPage")
    @Operation(summary = "查询招投标管理列表(分页)")
    public AjaxResult listPage(Page<BiddingManagement> page, BiddingManagementDto dto) {
        IPage<BiddingManagement> iPage = biddingManagementService.selectBiddingManagementList(page, dto);
        return AjaxResult.success(iPage);
    }
 
    /**
     * 获取招投标管理详细信息
     */
    @GetMapping("/getDetail")
    @Operation(summary = "获取招投标管理详细信息")
    public AjaxResult getDetail(@RequestParam("id") Long id) {
        return AjaxResult.success(biddingManagementService.getById(id));
    }
 
    /**
     * 新增或修改招投标管理
     */
    @Log(title = "招投标管理", businessType = BusinessType.INSERT)
    @PostMapping("/addOrUpdate")
    @Operation(summary = "新增或修改招投标管理")
    public AjaxResult addOrUpdate(@RequestBody BiddingManagementDto dto) {
        return toAjax(biddingManagementService.addOrUpdateBiddingManagement(dto));
    }
 
    /**
     * 删除招投标管理
     */
    @Log(title = "招投标管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/del")
    @Operation(summary = "删除招投标管理")
    public AjaxResult remove(@RequestBody Long[] ids) {
        if (ids == null || ids.length == 0) {
            return AjaxResult.error("请传入要删除的ID");
        }
        return toAjax(biddingManagementService.deleteBiddingManagementByIds(ids));
    }
 
    /**
     * 导出招投标管理列表
     */
    @Log(title = "招投标管理", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @Operation(summary = "导出招投标管理")
    public void export(HttpServletResponse response, BiddingManagementDto dto) {
        List<BiddingManagement> list = biddingManagementService.selectBiddingManagementList(dto);
        ExcelUtil<BiddingManagement> util = new ExcelUtil<>(BiddingManagement.class);
        util.exportExcel(response, list, "招投标管理数据");
    }
}