xiaochan 5 mesiacov pred
rodič
commit
0a40162d34

+ 4 - 2
src/main/java/thyyxxk/webserver/service/LoginService.java

@@ -66,11 +66,13 @@ public class LoginService {
         } catch (Exception ignored) {
         }
         tempUserInfo.setDeptName(deptCache.get(tempUserInfo.getDeptCode()).getName());
-        Set<String> deptList = publicServer.getDept(true, userInfo);
+        Set<String> deptList = publicServer.getDept(true, tempUserInfo);
         if (!deptList.isEmpty()) {
             Map<String, String> tempMap = new HashMap<>(deptList.size());
             deptList.forEach(item -> {
-                tempMap.put(item, deptCache.getDeptName(item));
+                if (item != null) {
+                    tempMap.put(item, deptCache.getDeptName(item));
+                }
             });
             tempUserInfo.setPartTimeDeptMap(tempMap);
         }