From 277b5047d00a3e9094bafd5ecb078976fbf6a92d Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期四, 08 一月 2026 18:59:04 +0800
Subject: [PATCH] 华玺砂浆转移-采购代码、发货和发货审核、报修和报修审核、采购模板,查询采购模板接口、财务管理的存货核算数据接口、财务管理的固定资产核算获取台账接口、采购审批,接口、客户分类字段、采购台账字段,实现采购异常记录的添加接口、黑名单,添加资质管理字段,可上传资质文件-至军泰伟业
---
src/main/java/com/ruoyi/basic/controller/CustomerController.java | 51 +++++++++++++++++++++++++++++++--------------------
1 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/src/main/java/com/ruoyi/basic/controller/CustomerController.java b/src/main/java/com/ruoyi/basic/controller/CustomerController.java
index cc94893..e89e203 100644
--- a/src/main/java/com/ruoyi/basic/controller/CustomerController.java
+++ b/src/main/java/com/ruoyi/basic/controller/CustomerController.java
@@ -1,24 +1,20 @@
package com.ruoyi.basic.controller;
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.basic.service.ICustomerService;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-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.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.common.utils.poi.ExcelUtil;
-import com.ruoyi.framework.web.page.TableDataInfo;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
/**
* 瀹㈡埛妗fController
@@ -36,10 +32,8 @@
* 鏌ヨ瀹㈡埛妗f鍒楄〃
*/
@GetMapping("/list")
- public TableDataInfo list(Customer customer) {
- startPage();
- List<Customer> list = customerService.selectCustomerList(customer);
- return getDataTable(list);
+ public IPage<Customer> list(Page page, Customer customer) {
+ return customerService.selectCustomerList(page, customer);
}
/**
@@ -53,11 +47,28 @@
if (ids != null && ids.length > 0) {
list = customerService.selectCustomerListByIds(ids);
} else {
-
- list = customerService.selectCustomerList(customer);
+ list = customerService.selectCustomerLists(customer);
}
ExcelUtil<Customer> util = new ExcelUtil<Customer>(Customer.class);
util.exportExcel(response, list, "瀹㈡埛妗f鏁版嵁");
+ }
+
+ @PostMapping("/downloadTemplate")
+ @Log(title = "瀹㈡埛妗f-涓嬭浇妯℃澘", businessType = BusinessType.EXPORT)
+ public void downloadTemplate(HttpServletResponse response) {
+ ExcelUtil<Customer> util = new ExcelUtil<Customer>(Customer.class);
+ util.importTemplateExcel(response, "瀹㈡埛妗f妯℃澘");
+ }
+
+
+ /**
+ * 瀵煎叆瀹㈡埛妗f
+ */
+ @Log(title = "瀹㈡埛妗f", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(MultipartFile file) throws Exception {
+
+ return customerService.importData(file);
}
/**
@@ -103,6 +114,6 @@
*/
@GetMapping("/customerList")
public List customerList(Customer customer) {
- return customerService.customerList(customer);
+ return customerService.customerList(customer);
}
}
--
Gitblit v1.9.3