|
|
@@ -120,11 +120,11 @@ public class BCorpsServiceImpl extends ServiceImpl<CorpsMapper, BCorps> implemen
|
|
|
.eq(BCorps::getBranchId, deptUtils.getDeptPid())
|
|
|
.eq(BCorps::getIsDeleted, 0));
|
|
|
//首字母为空
|
|
|
- if (null == bCorps.getInitials() || bCorps.getInitials().isEmpty()) {
|
|
|
+ /* if (null == bCorps.getInitials() || bCorps.getInitials().isEmpty()) {
|
|
|
//获得名称首字母
|
|
|
String initials = getSpells(bCorps.getCnName());
|
|
|
bCorps.setInitials(initials.substring(0, 1));
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (bCorps.getId() == null) {
|
|
|
if (!cname.isEmpty()) {
|
|
|
throw new RuntimeException("中文名称不允许重复");
|
|
|
@@ -536,7 +536,6 @@ public class BCorpsServiceImpl extends ServiceImpl<CorpsMapper, BCorps> implemen
|
|
|
public static String getSpells(String characters) {
|
|
|
StringBuffer buffer = new StringBuffer();
|
|
|
characters = characters.replaceAll("[^a-zA-Z0-9]", "");
|
|
|
-
|
|
|
for (int i = 0; i < characters.length(); i++) {
|
|
|
char ch = characters.charAt(i);
|
|
|
if ((ch >> 7) == 0) {
|