|
@@ -0,0 +1,105 @@
|
|
|
+package com.hh.bidding.controller;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.io.IOException;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.ruoyi.common.log.annotation.Log;
|
|
|
+import com.ruoyi.common.log.enums.BusinessType;
|
|
|
+import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
|
+import com.hh.bidding.domain.QuoteInfo;
|
|
|
+import com.hh.bidding.service.IQuoteInfoService;
|
|
|
+import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
|
+import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * QuoteInfoController
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2024-09-28
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/quoteInfo")
|
|
|
+public class QuoteInfoController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IQuoteInfoService quoteInfoService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询QuoteInfo列表
|
|
|
+ */
|
|
|
+ // @RequiresPermissions("system:quoteInfo:list")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(QuoteInfo quoteInfo)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<QuoteInfo> list = quoteInfoService.selectQuoteInfoList(quoteInfo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出QuoteInfo列表
|
|
|
+ */
|
|
|
+ // @RequiresPermissions("system:quoteInfo:export")
|
|
|
+ @Log(title = "QuoteInfo", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, QuoteInfo quoteInfo)
|
|
|
+ {
|
|
|
+ List<QuoteInfo> list = quoteInfoService.selectQuoteInfoList(quoteInfo);
|
|
|
+ ExcelUtil<QuoteInfo> util = new ExcelUtil<QuoteInfo>(QuoteInfo.class);
|
|
|
+ util.exportExcel(response, list, "QuoteInfo数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取QuoteInfo详细信息
|
|
|
+ */
|
|
|
+ // @RequiresPermissions("system:quoteInfo:query")
|
|
|
+ @GetMapping(value = "/getInfo")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
+ {
|
|
|
+ return success(quoteInfoService.selectQuoteInfoById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增QuoteInfo
|
|
|
+ */
|
|
|
+ // @RequiresPermissions("system:quoteInfo:add")
|
|
|
+ @Log(title = "QuoteInfo", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/add")
|
|
|
+ public AjaxResult add(@RequestBody QuoteInfo quoteInfo)
|
|
|
+ {
|
|
|
+ return toAjax(quoteInfoService.insertQuoteInfo(quoteInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改QuoteInfo
|
|
|
+ */
|
|
|
+ // @RequiresPermissions("system:quoteInfo:edit")
|
|
|
+ @Log(title = "QuoteInfo", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody QuoteInfo quoteInfo)
|
|
|
+ {
|
|
|
+ return toAjax(quoteInfoService.updateQuoteInfo(quoteInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除QuoteInfo
|
|
|
+ */
|
|
|
+ // @RequiresPermissions("system:quoteInfo:remove")
|
|
|
+ @Log(title = "QuoteInfo", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
+ {
|
|
|
+ return toAjax(quoteInfoService.deleteQuoteInfoByIds(ids));
|
|
|
+ }
|
|
|
+}
|