Переглянути джерело

提交 美莱德项目同步问题

Min 1 рік тому
батько
коміт
c0cb2bcc8f

+ 6 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -1275,8 +1275,12 @@ public class ProjectController {
                             }
                         }
                     }
-                    boolean equals = allParticipations.stream().map(al -> al.getUserId()).sorted().collect(Collectors.joining()).equals(participationList.stream().sorted().map(pl -> pl.getUserId()).sorted().collect(Collectors.joining()));
-                    if(!equals){
+                    List<String> collect = allParticipations.stream().map(al -> al.getUserId()).distinct().collect(Collectors.toList());
+                    List<String> collect1 = participationList.stream().map(pl -> pl.getUserId()).distinct().collect(Collectors.toList());
+
+                    if(collect.size()!=collect1.size()){
+                        sb.append("["+item.getProjectCode()+"/"+item.getProjectCode()+"]"+"\n");
+                    }else if(!collect.containsAll(collect1)){
                         sb.append("["+item.getProjectCode()+"/"+item.getProjectCode()+"]"+"\n");
                     }
                     if(participationList.size()>0){

+ 6 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -607,8 +607,12 @@ public class TimingTask {
                                 }
                             }
                         }
-                        boolean equals = allParticipations.stream().map(al -> al.getUserId()).sorted().collect(Collectors.joining()).equals(participationList.stream().sorted().map(pl -> pl.getUserId()).sorted().collect(Collectors.joining()));
-                        if(!equals){
+                        List<String> collect = allParticipations.stream().map(al -> al.getUserId()).distinct().collect(Collectors.toList());
+                        List<String> collect1 = participationList.stream().map(pl -> pl.getUserId()).distinct().collect(Collectors.toList());
+
+                        if(collect.size()!=collect1.size()){
+                            sb.append("["+item.getProjectCode()+"/"+item.getProjectCode()+"]"+"\n");
+                        }else if(!collect.containsAll(collect1)){
                             sb.append("["+item.getProjectCode()+"/"+item.getProjectCode()+"]"+"\n");
                         }
                         if(participationList.size()>0){