From eba011c9c3a25e73763eb420e9c3275cc1112bab Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 20 一月 2026 14:05:31 +0800
Subject: [PATCH] yys 1.回款提醒,人力资源优化

---
 src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java |   28 ++++++++++++----------------
 1 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
index c4cfc49..53eabdd 100644
--- a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
+++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -14,12 +14,14 @@
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.security.LoginUser;
+import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.sales.mapper.SalesLedgerMapper;
 import com.ruoyi.sales.pojo.SalesLedger;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.Arrays;
@@ -153,33 +155,27 @@
     }
 
     @Override
-    public Boolean importData(MultipartFile file) {
+    public AjaxResult importData(MultipartFile file) {
         try {
             ExcelUtil<Customer> util = new ExcelUtil<Customer>(Customer.class);
             List<Customer> userList = util.importExcel(file.getInputStream());
-
+            if(CollectionUtils.isEmpty(userList)){
+                return AjaxResult.warn("妯℃澘閿欒鎴栧鍏ユ暟鎹负绌�");
+            }
             this.saveOrUpdateBatch(userList);
-            return true;
+            return AjaxResult.success(true);
         }catch (Exception e){
             e.printStackTrace();
+            return AjaxResult.error("瀵煎叆澶辫触");
         }
-        return false;
+
     }
 
     @Override
-    public List<Map<String, Object>> customerList(Customer customer) {
+    public List<Customer> customerList(Customer customer) {
         LambdaQueryWrapper<Customer> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.select(Customer::getId, Customer::getCustomerName, Customer::getTaxpayerIdentificationNumber);
-
-        // 鑾峰彇鍘熷鏌ヨ缁撴灉
-        List<Map<String, Object>> result = customerMapper.selectMaps(queryWrapper);
-
-        // 灏嗕笅鍒掔嚎鍛藉悕杞崲涓洪┘宄板懡鍚�
-        return result.stream().map(map -> map.entrySet().stream()
-                .collect(Collectors.toMap(
-                        entry -> underlineToCamel(entry.getKey()),
-                        Map.Entry::getValue))
-        ).collect(Collectors.toList());
+        queryWrapper.select(Customer::getId, Customer::getCustomerName, Customer::getTaxpayerIdentificationNumber,Customer::getType);
+        return customerMapper.selectList(queryWrapper);
     }
 
     /**

--
Gitblit v1.9.3