기관장 반환 함수 수정

main
이범준 8 months ago
parent 1b3ee8a13c
commit 20f52068cb

@ -7,10 +7,10 @@ public class FactionUtil {
return splitString[splitString.length-1]; return splitString[splitString.length-1];
} }
public static String getInstituteLeader(String instNm, boolean person) { public static String getInstituteLeader(String instNm, boolean lastChar) {
String result = ""; String result = "";
if(person) {
if(instNm.endsWith("시청") || instNm.endsWith("군청")) { if(instNm.endsWith("시청") || instNm.endsWith("군청")) {
result = instNm.substring(0, instNm.length()-1); result = instNm.substring(0, instNm.length()-1);
} else if(instNm.endsWith("구")) { } else if(instNm.endsWith("구")) {
@ -25,14 +25,8 @@ public class FactionUtil {
result += "장"; result += "장";
} }
} else { if(!lastChar) {
result = result.substring(0, result.length()-1);
if(instNm.endsWith("시") || instNm.endsWith("군") || instNm.endsWith("구")) {
result = instNm+"청";
} else {
result = instNm;
}
} }
return result; return result;

Loading…
Cancel
Save