Browse Source

计划单统计表查询

zengtx 1 năm trước cách đây
mục cha
commit
01b6efd4e2

+ 35 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/controller/SyCostLossReviewController.java

@@ -45,10 +45,8 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.sql.Wrapper;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 
 @Slf4j
@@ -115,7 +113,17 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                if(sumList.size()<1){
                    sumList=list;
                }else {
-                   sumList.retainAll(list);
+                   Set<String> lowercaseSet1 = sumList.stream()
+                           .map(String::toLowerCase)
+                           .collect(Collectors.toSet());
+
+                   Set<String> lowercaseSet2 = list.stream()
+                           .map(String::toLowerCase)
+                           .collect(Collectors.toSet());
+
+                   lowercaseSet1.retainAll(lowercaseSet2);
+                   sumList.clear();
+                   sumList.addAll(lowercaseSet1);
                    if(sumList.size()<1){
                        return Result.OK(nullList);
                    }
@@ -129,7 +137,17 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                if(sumList.size()<1){
                    sumList=list;
                }else {
-                   sumList.retainAll(list);
+                   Set<String> lowercaseSet1 = sumList.stream()
+                           .map(String::toLowerCase)
+                           .collect(Collectors.toSet());
+
+                   Set<String> lowercaseSet2 = list.stream()
+                           .map(String::toLowerCase)
+                           .collect(Collectors.toSet());
+
+                   lowercaseSet1.retainAll(lowercaseSet2);
+                   sumList.clear();
+                   sumList.addAll(lowercaseSet1);
                    if(sumList.size()<1){
                        return Result.OK(nullList);
                    }
@@ -144,7 +162,17 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                    if(sumList.size()<1){
                        sumList=list;
                    }else {
-                       sumList.retainAll(list);
+                       Set<String> lowercaseSet1 = sumList.stream()
+                               .map(String::toLowerCase)
+                               .collect(Collectors.toSet());
+
+                       Set<String> lowercaseSet2 = list.stream()
+                               .map(String::toLowerCase)
+                               .collect(Collectors.toSet());
+
+                       lowercaseSet1.retainAll(lowercaseSet2);
+                       sumList.clear();
+                       sumList.addAll(lowercaseSet1);
                        if(sumList.size()<1){
                            return Result.OK(nullList);
                        }