From bd63dcea170b3ceb86851f56a7a53b85b77027c2 Mon Sep 17 00:00:00 2001
From: yinrw <2030349650@qq.com>
Date: 星期四, 23 七月 2026 15:03:25 +0800
Subject: [PATCH] 修改销售台账和生产订单绑定逻辑,修复销售台账和生产订单页面展示数据bug
---
src/main/java/com/ruoyi/sales/controller/SalesQuotationController.java | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/SalesQuotationController.java b/src/main/java/com/ruoyi/sales/controller/SalesQuotationController.java
index 6df2ede..40a490e 100644
--- a/src/main/java/com/ruoyi/sales/controller/SalesQuotationController.java
+++ b/src/main/java/com/ruoyi/sales/controller/SalesQuotationController.java
@@ -1,29 +1,67 @@
package com.ruoyi.sales.controller;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.sales.dto.SalesQuotationDto;
import com.ruoyi.sales.service.SalesQuotationService;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
@RestController
@RequestMapping("/sales/quotation")
public class SalesQuotationController {
@Autowired
private SalesQuotationService salesQuotationService;
+
@GetMapping("/list")
public AjaxResult getList(Page page, SalesQuotationDto salesQuotationDto) {
return AjaxResult.success(salesQuotationService.listPage(page, salesQuotationDto));
}
+
+
+ @PostMapping("/export")
+ public void export(HttpServletResponse response) {
+ Page page = new Page(-1, -1);
+ SalesQuotationDto afterSalesService = new SalesQuotationDto();
+ IPage<SalesQuotationDto> listPage = salesQuotationService.listPage(page, afterSalesService);
+ ExcelUtil<SalesQuotationDto> util = new ExcelUtil<SalesQuotationDto>(SalesQuotationDto.class);
+ util.exportExcel(response, listPage.getRecords(), "鍙嶉鐧昏");
+ }
+
+
@PostMapping("/add")
public AjaxResult add(@RequestBody SalesQuotationDto salesQuotationDto) {
return AjaxResult.success(salesQuotationService.add(salesQuotationDto));
}
+
@PostMapping("/update")
public AjaxResult update(@RequestBody SalesQuotationDto salesQuotationDto) {
return AjaxResult.success(salesQuotationService.edit(salesQuotationDto));
}
+
+ /**
+ * 璇︽儏 鏍规嵁瀹㈡埛绫诲瀷鍜屼骇鍝佽繑鍥炴姤浠峰崟浠�
+ *
+ * @param type 瀹㈡埛绫诲瀷
+ * @param productName 浜у搧鍚嶇О
+ * @param specification 瑙勬牸
+ * @return
+ */
+ @ApiOperation("璇︽儏")
+ @GetMapping("/detail")
+ public AjaxResult detail(@RequestParam(value = "type", required = false) String type,
+ @RequestParam("productName") String productName,
+ @RequestParam("specification") String specification) {
+ return AjaxResult.success(salesQuotationService.detail(type, productName, specification));
+ }
+
@DeleteMapping("/delete")
public AjaxResult delete(@RequestBody Long id) {
return AjaxResult.success(salesQuotationService.delete(id));
--
Gitblit v1.9.3