From 1b50d8ee33a7ccdac2b7963343acf7d97f05f78f Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 17 四月 2026 09:10:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_君歌化工' into dev_天津_君歌化工

---
 src/main/java/com/ruoyi/basic/controller/CustomerController.java |   51 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/controller/CustomerController.java b/src/main/java/com/ruoyi/basic/controller/CustomerController.java
index be5f92a..008c92d 100644
--- a/src/main/java/com/ruoyi/basic/controller/CustomerController.java
+++ b/src/main/java/com/ruoyi/basic/controller/CustomerController.java
@@ -2,6 +2,8 @@
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.dto.CustomerDto;
+import com.ruoyi.basic.excel.CustomerExcelDTO;
 import com.ruoyi.basic.pojo.Customer;
 import com.ruoyi.basic.service.ICustomerService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -11,6 +13,7 @@
 import com.ruoyi.framework.web.domain.AjaxResult;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
@@ -31,7 +34,7 @@
      * 鏌ヨ瀹㈡埛妗f鍒楄〃
      */
     @GetMapping("/list")
-    public IPage<Customer> list(Page page, Customer customer) {
+    public IPage<Customer> list(Page<Customer> page, Customer customer) {
         return customerService.selectCustomerList(page, customer);
     }
 
@@ -53,11 +56,46 @@
     }
 
     /**
+     * 瀵煎嚭瀹㈡埛璺熻繘璁板綍
+     */
+    @Log(title = "瀹㈡埛妗f", businessType = BusinessType.EXPORT)
+    @PostMapping("/exportFollowUpList")
+    public void exportFollowUpList(HttpServletResponse response, Customer customer) {
+        Long[] ids = customer.getIds();
+        List<CustomerExcelDTO> list;
+        if (ids != null && ids.length > 0) {
+            list = customerService.selectCustomerDtoByIds(ids);
+        } else {
+            list = customerService.selectCustomerDtoLists();
+        }
+        ExcelUtil<CustomerExcelDTO> util = new ExcelUtil<CustomerExcelDTO>(CustomerExcelDTO.class);
+        util.exportExcel(response, list, "瀹㈡埛璺熻繘璁板綍");
+    }
+
+    @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);
+    }
+
+    /**
      * 鑾峰彇瀹㈡埛妗f璇︾粏淇℃伅
      */
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return success(customerService.selectCustomerById(id));
+        return success(customerService.selectCustomerDetailById(id));
     }
 
     /**
@@ -97,4 +135,13 @@
     public List customerList(Customer customer) {
         return customerService.customerList(customer);
     }
+
+    /**
+     * 杞Щ瀹㈡埛
+     */
+    @Log(title = "瀹㈡埛妗f", businessType = BusinessType.UPDATE)
+    @PatchMapping("/transferCustomer")
+    public AjaxResult transferCustomer(@RequestBody CustomerDto customerDto) {
+        return toAjax(customerService.transferCustomer(customerDto));
+    }
 }

--
Gitblit v1.9.3