Merge branch 'feature/SUPPORT-9360_fix_clear_and_load_ac' into develop
This commit is contained in:
commit
83d3aa6eb3
131 changed files with 355 additions and 284 deletions
|
|
@ -20,7 +20,6 @@ import ru.micord.ervu.account_applications.dao.RecruitmentDao;
|
|||
import ru.micord.ervu.account_applications.security.context.SecurityContext;
|
||||
import ru.micord.ervu.account_applications.security.model.role.ErvuPermissionAuthority;
|
||||
import ru.micord.ervu.account_applications.service.AccountFetchService;
|
||||
import ru.micord.ervu.account_applications.util.StringUtils;
|
||||
import service.GridService;
|
||||
|
||||
import ru.cg.webbpm.modules.webkit.beans.Behavior;
|
||||
|
|
@ -88,11 +87,9 @@ public class AccountGridLoadService extends Behavior implements GridService {
|
|||
gridRow.put("login", person.getLogin());
|
||||
gridRow.put("snils", person.getSnils());
|
||||
gridRow.put("personEnabled", !person.isBlocked());
|
||||
|
||||
String fullName = person.getFullName();
|
||||
if (fullName != null) {
|
||||
gridRow.putAll(StringUtils.splitFio(fullName));
|
||||
}
|
||||
gridRow.put("lastName", person.getLastName());
|
||||
gridRow.put("firstName", person.getFirstName());
|
||||
gridRow.put("middleName", person.getMiddleName());
|
||||
}
|
||||
|
||||
if (account.getDomain() != null && account.getDomain().getName() != null) {
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
package ru.micord.ervu.account_applications.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public final class StringUtils {
|
||||
|
||||
private StringUtils() {
|
||||
}
|
||||
|
||||
public static Map<String, String> splitFio(String fio) {
|
||||
String[] parts = fio.trim().split(" ", 3);
|
||||
Map<String, String> result = new HashMap<>();
|
||||
result.put("lastName", parts.length > 0 ? parts[0] : "");
|
||||
result.put("firstName", parts.length > 1 ? parts[1] : "");
|
||||
result.put("middleName", parts.length > 2 ? parts[2] : "");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue