Просмотр исходного кода

修改费用报销导入 工时导入

yurk 2 лет назад
Родитель
Сommit
4dea3479bc

+ 6 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -286,10 +286,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             }
             if(!StringUtils.isEmpty(participation)){
                 List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("user_id", participation).select("project_id"));
+                List<Integer> collect;
                 if(participationList.size()>0){
-                    List<Integer> collect = participationList.stream().map(Participation::getProjectId).collect(Collectors.toList());
-                    queryWrapper.in("id",collect);
+                    collect = participationList.stream().map(Participation::getProjectId).collect(Collectors.toList());
+                }else {
+                    collect=new ArrayList<>();
+                    collect.add(-1);
                 }
+                queryWrapper.in("id",collect);
             }
             if (status != null && status != 0) {
                 queryWrapper.eq("status", status);