diff --git a/src/main/java/com/dbnt/faisp/kwms/service/KwmsService.java b/src/main/java/com/dbnt/faisp/kwms/service/KwmsService.java index 0af5fb9d..28375fc9 100644 --- a/src/main/java/com/dbnt/faisp/kwms/service/KwmsService.java +++ b/src/main/java/com/dbnt/faisp/kwms/service/KwmsService.java @@ -37,10 +37,12 @@ public class KwmsService { userInfo.setUserId(empInfo.getUserid()); userInfo.setUserNm(empInfo.getName()); userInfo.setSex(empInfo.getSexcd().strip().equals("F")?"SEX001":"SEX002"); - String[] positionAry = empInfo.getLdeptnm().split(" "); - userInfo.setOgCd(codeMgtService.searchCodeToCategoryAndValue("OG", positionAry[0])); - if (positionAry.length>1){ - userInfo.setOfcCd(codeMgtService.searchCodeToCategoryAndValue("OFC", positionAry[1])); + if(empInfo.getLdeptnm()!=null){ + String[] positionAry = empInfo.getLdeptnm().split(" "); + userInfo.setOgCd(codeMgtService.searchCodeToCategoryAndValue("OG", positionAry[0])); + if (positionAry.length>1){ + userInfo.setOfcCd(codeMgtService.searchCodeToCategoryAndValue("OFC", positionAry[1])); + } } userInfo.setTitleCd(codeMgtService.searchCodeToCategoryAndValue("JT", empInfo.getJikgubnm())); if(empInfo.getKyunggwa()!=null){ diff --git a/src/main/resources/static/js/login/login.js b/src/main/resources/static/js/login/login.js index 4b0eeaeb..0a885581 100644 --- a/src/main/resources/static/js/login/login.js +++ b/src/main/resources/static/js/login/login.js @@ -13,6 +13,7 @@ $(document).on('click', '#dicCodeSearchBtn', function (){ }) $(document).on('click', '#saveBtn', function (){ + $(this).attr('disabled', 'disabled'); if(valueCheck()){ if(confirm("저장하시겠습니까?")){ contentFade("in"); @@ -28,6 +29,7 @@ $(document).on('click', '#saveBtn', function (){ success : function(result) { if(result === "userIdDuplication"){ alert("등록된 아이디입니다.") + $(this).removeAttr('disabled', 'disabled'); }else{ alert("저장되었습니다.\n담당자 승인 후 로그인 가능합니다.") $("#closeModalBtn").click(); @@ -35,7 +37,8 @@ $(document).on('click', '#saveBtn', function (){ contentFade("out"); }, error : function(xhr, status) { - alert("저장에 실패하였습니다.") + alert("저장에 실패하였습니다."); + $(this).removeAttr('disabled', 'disabled'); contentFade("out"); } }) diff --git a/src/main/resources/templates/login/joinForm.html b/src/main/resources/templates/login/joinForm.html index 3acc0738..aba353ea 100644 --- a/src/main/resources/templates/login/joinForm.html +++ b/src/main/resources/templates/login/joinForm.html @@ -3,7 +3,7 @@