From aadfcad256148eac32ae59b6365b660397d2a30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Mon, 6 Feb 2023 10:19:53 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=EB=8F=99=EC=9E=91=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dbnt/faisp/kwms/service/KwmsService.java | 10 ++++++---- src/main/resources/static/js/login/login.js | 5 ++++- src/main/resources/templates/login/joinForm.html | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) 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 @@