|
@@ -1259,6 +1259,11 @@ public class ProjectController {
|
|
|
item.setInchargerId(first.get().getId())
|
|
|
.setInchargerName(first.get().getName());
|
|
|
}
|
|
|
+ boolean isUpdate=false;
|
|
|
+ if(!item.getInchargerId().equals(first.get().getId())){
|
|
|
+ update++;
|
|
|
+ isUpdate=true;
|
|
|
+ }
|
|
|
projectService.updateById(item);
|
|
|
List<Participation> allParticipations = participationService.list(new QueryWrapper<Participation>().eq("project_id", item.getId()));
|
|
|
if(map.get("xmcygs")!=null&&!map.get("xmcygs").equals("")){
|
|
@@ -1273,19 +1278,21 @@ public class ProjectController {
|
|
|
participationList.add(p);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- 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());
|
|
|
- System.out.println("之前的数据:"+collect);
|
|
|
- System.out.println("之后的数据:"+collect1);
|
|
|
- if(collect.size()!=collect1.size()){
|
|
|
- sb.append("["+item.getProjectName()+"/"+item.getProjectCode()+"]"+"\n");
|
|
|
- update++;
|
|
|
- }else if(!collect.containsAll(collect1)){
|
|
|
- sb.append("["+item.getProjectName()+"/"+item.getProjectCode()+"]"+"\n");
|
|
|
- update++;
|
|
|
- }else if(first.isPresent()&&!item.getInchargerId().equals(first.get().getId())){
|
|
|
- update++;
|
|
|
+ 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());
|
|
|
+ System.out.println("之前的数据:"+collect);
|
|
|
+ System.out.println("之后的数据:"+collect1);
|
|
|
+ if(collect.size()!=collect1.size()){
|
|
|
+ sb.append("["+item.getProjectName()+"/"+item.getProjectCode()+"]"+"\n");
|
|
|
+ if(!isUpdate){
|
|
|
+ update++;
|
|
|
+ }
|
|
|
+ }else if(!collect.containsAll(collect1)){
|
|
|
+ sb.append("["+item.getProjectName()+"/"+item.getProjectCode()+"]"+"\n");
|
|
|
+ if(!isUpdate){
|
|
|
+ update++;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if(participationList.size()>0){
|
|
|
participationService.saveBatch(participationList);
|