liuyc 2 лет назад
Родитель
Сommit
55a5472894

+ 7 - 5
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/AttendanceTripServiceImpl.java

@@ -50,11 +50,13 @@ public class AttendanceTripServiceImpl extends BaseServiceImpl<AttendanceTripMap
             BeanUtils.copyProperties(obj, vo);
 
             Set<String> names = new HashSet<>();
-            String[] userIds = vo.getFellowTravelerUserIds().split(",");
-            for (String id : userIds) {
-                String userName = userMap.get(Long.parseLong(id));
-                if (StringUtils.isNotEmpty(userName)) {
-                    names.add(userName);
+            if (ObjectUtil.isNotEmpty(vo.getFellowTravelerUserIds())) {
+                String[] userIds = vo.getFellowTravelerUserIds().split(",");
+                for (String id : userIds) {
+                    String userName = userMap.get(Long.parseLong(id));
+                    if (StringUtils.isNotEmpty(userName)) {
+                        names.add(userName);
+                    }
                 }
             }
             vo.setFellowTravelerUserNames(StringUtils.join(names, "、"));

+ 1 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreePrivateServiceImpl.java

@@ -468,6 +468,7 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
     @Async
     public void refreshRedisCache(List<WbsTreeContract> listContractAdd) {
         Map<Long, List<String>> contractIdByParentIds = listContractAdd.stream()
+                .filter(contract -> contract.getParentId() != null)
                 .collect(Collectors.groupingBy(WbsTreeContract::getParentId,
                         Collectors.mapping(WbsTreeContract::getContractId, Collectors.toList())));
         Set<Long> parentIds = contractIdByParentIds.keySet();