diff --git a/src/main/java/itn/com/cmm/util/MJUtil.java b/src/main/java/itn/com/cmm/util/MJUtil.java index a0dc9411..7029522a 100644 --- a/src/main/java/itn/com/cmm/util/MJUtil.java +++ b/src/main/java/itn/com/cmm/util/MJUtil.java @@ -318,4 +318,17 @@ public final class MJUtil { return dupliBlockList; } + /** + * 사업자등록번호 대시('-') 추가 + * 대시 유무 상관없음 + * 유효성 맞지 않을시 변환안됨. + */ + public static String bizNoAddDash(String str) { + if(str == null) { + return str; + } + String regExp = "(\\d{3})(\\d{2})(\\d{5})$"; + String chgf = "$1-$2-$3"; + return str.replaceFirst(regExp, chgf); + } } diff --git a/src/main/java/itn/let/mjo/event/service/MjonEventVO.java b/src/main/java/itn/let/mjo/event/service/MjonEventVO.java index 0a1d3ae5..6731d38b 100644 --- a/src/main/java/itn/let/mjo/event/service/MjonEventVO.java +++ b/src/main/java/itn/let/mjo/event/service/MjonEventVO.java @@ -38,5 +38,5 @@ public class MjonEventVO { private String point; //사용자 포인트 정보 private String userId; //사용자 아이디 private String frstRegisterId; //등록자 아이디 - + } diff --git a/src/main/java/itn/let/mjo/pay/service/MjonPayService.java b/src/main/java/itn/let/mjo/pay/service/MjonPayService.java index 2f8dd877..ab4db0a4 100644 --- a/src/main/java/itn/let/mjo/pay/service/MjonPayService.java +++ b/src/main/java/itn/let/mjo/pay/service/MjonPayService.java @@ -1,9 +1,12 @@ package itn.let.mjo.pay.service; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; +import itn.let.mjo.msg.service.MjonMsgVO; + public interface MjonPayService { List selectPayList(MjonPayVO mjonPayVO) throws Exception; @@ -140,4 +143,11 @@ public interface MjonPayService { //누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액) public String selectTotSumPaymentAfterPay(String userId) throws Exception; + Map payUserSWList(MjonPayVO mjonPayVO) throws Exception; + + Map payUserSWListAjax(MjonMsgVO mjonMsgVO) throws Exception; + + //거래명세서 상세 조회 + MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception; + } diff --git a/src/main/java/itn/let/mjo/pay/service/MjonPayVO.java b/src/main/java/itn/let/mjo/pay/service/MjonPayVO.java index 5846e56e..f6a39f41 100644 --- a/src/main/java/itn/let/mjo/pay/service/MjonPayVO.java +++ b/src/main/java/itn/let/mjo/pay/service/MjonPayVO.java @@ -241,5 +241,11 @@ public class MjonPayVO extends ComDefaultVO{ private String totChgPay; // 간편결제분류 + // 거래명세서 내용 + private String bizNo; // 사업자등록번호 + private String managerNm; // 담당자명 + private String prePaymentYn; // 선불결제여부 N:후불제고객 + private String dept; // 회원종류 p:개인 c:기업 + } diff --git a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java index ea5b7a39..d82c45e8 100644 --- a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java +++ b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayDAO.java @@ -358,5 +358,8 @@ public class MjonPayDAO extends EgovAbstractDAO { return result; } - + + public MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception{ + return (MjonPayVO)select("mjonPayDAO.selectPayDetail", mjonPayVO); + } } diff --git a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java index 60c9e645..14ab7f39 100644 --- a/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java +++ b/src/main/java/itn/let/mjo/pay/service/impl/MjonPayServiceImpl.java @@ -7,11 +7,16 @@ import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.security.MessageDigest; +import java.sql.Timestamp; import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -25,11 +30,15 @@ import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; import itn.com.cmm.LoginVO; +import itn.com.cmm.util.DateUtils; import itn.com.cmm.util.MJUtil; +import itn.com.cmm.util.PayUtils; import itn.com.utl.fcc.service.EgovStringUtil; import itn.let.mjo.event.service.MjonEventVO; import itn.let.mjo.event.service.impl.MjonEventDAO; import itn.let.mjo.msg.service.MjonMsgVO; +import itn.let.mjo.msgcampain.service.MjonCandidateVO; +import itn.let.mjo.msgcampain.service.impl.MjonCandidateDAO; import itn.let.mjo.msgdata.service.MjonMsgDataService; import itn.let.mjo.msgdata.service.impl.MjonMsgDataDAO; import itn.let.mjo.pay.service.MjonPayService; @@ -94,6 +103,10 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP @Resource(name = "mberGrdService") MberGrdService mberGrdService; + @Resource(name="mjonCandidateDAO") + private MjonCandidateDAO mjonCandidateDAO; + + @Override public List selectPayList(MjonPayVO mjonPayVO) throws Exception { return mjonPayDAO.selectPayList(mjonPayVO); @@ -2839,6 +2852,144 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP } - + @Override + public Map payUserSWList(MjonPayVO mjonPayVO) throws Exception{ + + + String userId = mjonPayVO.getUserId(); + // 총 사용금액 + List usedCashTotList = mjonPayDAO.selectUsedCashWithKakaoTotCnt(mjonPayVO); + + // 사용가능한 금액 + // mberManageVO.prePaymentYn 선불 후불 회원 구분으로 인해 select함 + MberManageVO mberManageVO = mjonMsgDataDAO.selectMberManageInfo(userId); + // 선거 후보자 정보 조회 + MjonCandidateVO mjonCandidateVO = new MjonCandidateVO(); + if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기 + mjonCandidateVO = mjonCandidateDAO.selectCandidateDataInfo(userId); + if(mjonCandidateVO != null) { + mjonCandidateVO.setRegidentNo1(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo1())); + mjonCandidateVO.setRegidentNo2(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo2())); + } + } + + + /** + * 후불제 회원 관련 사용 요금 내역 정보 조회하기 + * 20231228 우영두 추가 + * 누적사용금액, 누적 납부금액, 당월 납부 예상금액 정보 조회 + * + * */ + //누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-"로 사용된 금액만 합산) + String totSumCashAfterPay = mjonPayDAO.selectTotalSumCashForAfterPay(userId); + + //누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용) + String totSumPointAfterPay = mjonPayDAO.selectTotalSumPointForAfterPay(userId); + + //누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액) + String totSumPaymentAfterPay = mjonPayDAO.selectTotSumPaymentAfterPay(userId); + + //누적 납부 포인트 조회 ( 누적 납부금액 합산에 대한 2% 포인트 정보 계산) + float p_i_re_point = 0; + JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo(); + if (sysJoinSetVO != null) { + p_i_re_point = sysJoinSetVO.getPointPer(); + } + int paymentPointAfterPay = Math.round((Float.parseFloat(totSumPaymentAfterPay) * p_i_re_point / 100)); + + //당월 납부 예상금액 (누적 사용금액 합산 - 누적 납부금액 합산 정보 계산) + float unPaymentAfterPay = Float.parseFloat(totSumCashAfterPay) - Float.parseFloat(totSumPaymentAfterPay); + + //당월 납부 예상 포인트 (당월 납부 예상 금액에 대한 2% 포인트 정보 계산) + int unPaymentPointAfterPay = Math.round((unPaymentAfterPay * p_i_re_point / 100)); + + /* + * 2024.02.06 후불제 회원 중 협의단가를 사용하는 회원은 포인트 적립이 되지 않아야함. + * 후불제 협의 단가 여부 체크 + * 모든 협의 단가 금액을 합산하여 0보다 크면 협의단가 있음. + * */ + float shortPrice = mberManageVO.getShortPrice(); + float longPrice = mberManageVO.getLongPrice(); + float picturePrice = mberManageVO.getPicturePrice() + mberManageVO.getPicture2Price() + mberManageVO.getPicture3Price(); + float kakaoAtPrice = mberManageVO.getKakaoAtPrice(); + float kakaoFtPrice = mberManageVO.getKakaoFtPrice(); + float totPrice = shortPrice + longPrice + picturePrice + kakaoAtPrice + kakaoFtPrice; + String negoPriceYn = "N"; + + if(totPrice > 0) { + negoPriceYn = "Y"; + } + + + + Map returnData = new HashMap<>(); + + + returnData.put("usedCashTotList", usedCashTotList); + returnData.put("mberManageVO", mberManageVO); + returnData.put("mjonCandidateVO", mjonCandidateVO); + returnData.put("totSumCashAfterPay", totSumCashAfterPay); + returnData.put("totSumPointAfterPay", totSumPointAfterPay); + returnData.put("totSumPaymentAfterPay", totSumPaymentAfterPay); + returnData.put("sumPaymentPointAfterPay", paymentPointAfterPay); + returnData.put("unPaymentAfterPay", unPaymentAfterPay); + returnData.put("unPaymentPointAfterPay", unPaymentPointAfterPay); + returnData.put("negoPriceYn", negoPriceYn); + // 초기 날짜 셋팅 + returnData.put("startDate", DateUtils.getDateMonthsAgo(1)); + returnData.put("endDate", DateUtils.getCurrentDate()); + + + // TODO Auto-generated method stub + return returnData; + } + + @Override + public Map payUserSWListAjax(MjonMsgVO mjonMsgVO) throws Exception{ + + if("".equals(mjonMsgVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + mjonMsgVO.setSearchSortCnd("regDate"); + mjonMsgVO.setSearchSortOrd("desc"); + } + + Map returnData = new HashMap<>(); + + // 검색 데이터가 없거나 + // 시작일자가 종료일자보다 이후이거나 + // 총 기간이 365일이 넘으면 현재일부터 365일 전 날짜를 넣어서 검색 + if(!DateUtils.dateChkAndValueChk(mjonMsgVO.getStartDate(),mjonMsgVO.getEndDate(), 12 )) { + + mjonMsgVO.setStartDate(DateUtils.getDateMonthsAgo(12)); + mjonMsgVO.setEndDate(DateUtils.getCurrentDate()); + + }; + + + List payUserSWList = mjonMsgDataDAO.selectPayUserSWList(mjonMsgVO); + returnData.put("payUserSWList", payUserSWList); + returnData.put("totCnt", payUserSWList.size()> 0 ? payUserSWList.get(0).getTotCnt() : 0); + returnData.put("totSuccSendPrice", payUserSWList.size() > 0 ? PayUtils.getTrimToFirstDecimal(payUserSWList.get(0).getTotSuccSendPrice()) : 0); + + return returnData; + } + + @Override + public MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception { + + MjonPayVO result = mjonPayDAO.selectPayDetail(mjonPayVO); + /* 후불제 고객의 사용기한 조회(결제일의 전달 1일 ~ 말일) */ + if("N".equals(result.getPrePaymentYn())) { + String regDateStr = result.getRegDate(); + LocalDateTime regDate = Timestamp.valueOf(regDateStr).toLocalDateTime(); + + LocalDate lastMonth = regDate.toLocalDate().withDayOfMonth(1).minusMonths(1); + LocalDate startDate = lastMonth.withDayOfMonth(1); + LocalDate endDate = lastMonth.withDayOfMonth(lastMonth.lengthOfMonth()); + + result.setStartDate(startDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + result.setEndDate(endDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + } + return result; + } } diff --git a/src/main/java/itn/let/mjo/pay/web/MjonPayController.java b/src/main/java/itn/let/mjo/pay/web/MjonPayController.java index 08267bdb..e4a4e305 100644 --- a/src/main/java/itn/let/mjo/pay/web/MjonPayController.java +++ b/src/main/java/itn/let/mjo/pay/web/MjonPayController.java @@ -2603,15 +2603,16 @@ public class MjonPayController { * 2023.12.22 우영두 * @param mjonMsgVO * @param model - * @return "/web/member/pay/PayUserSWList.do" + * @return "/web/member/pay/payUserSWList.do" * @throws Exception */ - @RequestMapping(value= {"/web/member/pay/PayUserSWList.do"}) - public String PayUserSWList(@ModelAttribute("mjonMsgVO") MjonMsgVO mjonMsgVO, + @RequestMapping(value= {"/web/member/pay/payUserSWList.do"}) + public String payUserSWList(@ModelAttribute("mjonMsgVO") MjonMsgVO mjonMsgVO, MjonPayVO mjonPayVO, MberManageVO mberManageVO, RedirectAttributes redirectAttributes, HttpServletRequest request, ModelMap model) throws Exception{ + /*LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();*/ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; @@ -2621,117 +2622,26 @@ public class MjonPayController { return "redirect:/web/user/login/login.do"; } String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); - mjonMsgVO.setUserId(userId); - /* - { // 충전캐시 - String sumPayMoney = mjonPayService.selectAgentSumPayMoney(userId); - model.addAttribute("sumPayMoney", sumPayMoney); - } + mjonPayVO.setUserId(userId); - { // 충전포인트 - String sumPoint = mjonPayService.selectSumPoint(userId); - model.addAttribute("sumPoint", sumPoint); - } - */ - - { // 총 사용금액 - mjonPayVO.setUserId(userId); - List usedCashTotList = mjonPayService.selectUsedCashWithKakaoTotCnt(mjonPayVO); - model.addAttribute("usedCashTotList", usedCashTotList); - } - { // 사용가능한 금액 - // mberManageVO.prePaymentYn 선불 후불 회원 구분으로 인해 select함 - mberManageVO = mjonMsgDataService.selectMberManageInfo(userId); - model.addAttribute("mberManageVO", mberManageVO); - } - /* - { // 발송건수 - mjonMsgVO.setReserveYn("N"); - List sendTotList = mjonMsgService.selectWithKakaoSendTotCnt(mjonMsgVO); - model.addAttribute("sendTotList", sendTotList); - } - - { // 예약건수 - mjonMsgVO.setReserveYn("Y"); - List reservToList = mjonMsgService.selectWithKakaoSendTotCnt(mjonMsgVO); - model.addAttribute("reservToList", reservToList); - } - */ - {// 선거 후보자 정보 조회 - MjonCandidateVO mjonCandidateVO = new MjonCandidateVO(); - if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기 - mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId); - if(mjonCandidateVO != null) { - mjonCandidateVO.setRegidentNo1(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo1())); - mjonCandidateVO.setRegidentNo2(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo2())); - } - } - model.addAttribute("mjonCandidateVO", mjonCandidateVO); - } - - - { - /** - * 후불제 회원 관련 사용 요금 내역 정보 조회하기 - * 20231228 우영두 추가 - * 누적사용금액, 누적 납부금액, 당월 납부 예상금액 정보 조회 - * - * */ - - //누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-"로 사용된 금액만 합산) - String totSumCashAfterPay = mjonPayService.selectTotalSumCashForAfterPay(userId); - model.addAttribute("totSumCashAfterPay", totSumCashAfterPay); - - //누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용) - String totSumPointAfterPay = mjonPayService.selectTotalSumPointForAfterPay(userId); - model.addAttribute("totSumPointAfterPay", totSumPointAfterPay); - - //누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액) - String totSumPaymentAfterPay = mjonPayService.selectTotSumPaymentAfterPay(userId); - model.addAttribute("totSumPaymentAfterPay", totSumPaymentAfterPay); - - //누적 납부 포인트 조회 ( 누적 납부금액 합산에 대한 2% 포인트 정보 계산) - float p_i_re_point = 0; - JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo(); - if (sysJoinSetVO != null) { - p_i_re_point = sysJoinSetVO.getPointPer(); - } - int paymentPointAfterPay = Math.round((Float.parseFloat(totSumPaymentAfterPay) * p_i_re_point / 100)); - model.addAttribute("sumPaymentPointAfterPay", paymentPointAfterPay); - - //당월 납부 예상금액 (누적 사용금액 합산 - 누적 납부금액 합산 정보 계산) - - float unPaymentAfterPay = Float.parseFloat(totSumCashAfterPay) - Float.parseFloat(totSumPaymentAfterPay); - model.addAttribute("unPaymentAfterPay", unPaymentAfterPay); - - //당월 납부 예상 포인트 (당월 납부 예상 금액에 대한 2% 포인트 정보 계산) - int unPaymentPointAfterPay = Math.round((unPaymentAfterPay * p_i_re_point / 100)); - model.addAttribute("unPaymentPointAfterPay", unPaymentPointAfterPay); - - /* - * 2024.02.06 후불제 회원 중 협의단가를 사용하는 회원은 포인트 적립이 되지 않아야함. - * 후불제 협의 단가 여부 체크 - * 모든 협의 단가 금액을 합산하여 0보다 크면 협의단가 있음. - * */ - float shortPrice = mberManageVO.getShortPrice(); - float longPrice = mberManageVO.getLongPrice(); - float picturePrice = mberManageVO.getPicturePrice() + mberManageVO.getPicture2Price() + mberManageVO.getPicture3Price(); - float kakaoAtPrice = mberManageVO.getKakaoAtPrice(); - float kakaoFtPrice = mberManageVO.getKakaoFtPrice(); - float totPrice = shortPrice + longPrice + picturePrice + kakaoAtPrice + kakaoFtPrice; - String negoPriceYn = "N"; - if(totPrice > 0) { - negoPriceYn = "Y"; - } - model.addAttribute("negoPriceYn", negoPriceYn); - - } - { - // 초기 날짜 셋팅 - model.addAttribute("startDate", DateUtils.getDateMonthsAgo(12)); - model.addAttribute("endDate", DateUtils.getCurrentDate()); - } +// // 비즈니스 로직 부분 + Map resultMap = mjonPayService.payUserSWList(mjonPayVO); + + + model.addAttribute("usedCashTotList", resultMap.get("usedCashTotList")); + model.addAttribute("mjonCandidateVO", resultMap.get("mjonCandidateVO")); + model.addAttribute("mberManageVO", resultMap.get("mberManageVO")); + model.addAttribute("totSumCashAfterPay", resultMap.get("totSumCashAfterPay")); + model.addAttribute("totSumPointAfterPay", resultMap.get("totSumPointAfterPay")); + model.addAttribute("totSumPaymentAfterPay", resultMap.get("totSumPaymentAfterPay")); + model.addAttribute("sumPaymentPointAfterPay", resultMap.get("sumPaymentPointAfterPay")); + model.addAttribute("unPaymentAfterPay", resultMap.get("unPaymentAfterPay")); + model.addAttribute("unPaymentPointAfterPay", resultMap.get("unPaymentPointAfterPay")); + model.addAttribute("negoPriceYn", resultMap.get("negoPriceYn")); + model.addAttribute("startDate", resultMap.get("startDate")); + model.addAttribute("endDate", resultMap.get("endDate")); + return "/web/pay/PayUserSWList"; } @@ -2749,8 +2659,8 @@ public class MjonPayController { * @return "/web/member/pay/PayUserSWListAjax.do" * @throws Exception */ - @RequestMapping(value= {"/web/member/pay/PayUserSWListAjax.do"}) - public String PayUserSWListAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO, + @RequestMapping(value= {"/web/member/pay/payUserSWListAjax.do"}) + public String payUserSWListAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO, HttpServletRequest request, ModelMap model) throws Exception{ @@ -2774,29 +2684,12 @@ public class MjonPayController { mjonMsgVO.setLastIndex(paginationInfo.getLastRecordIndex()); mjonMsgVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - if("".equals(mjonMsgVO.getSearchSortCnd())){ //최초조회시 최신것 조회List - mjonMsgVO.setSearchSortCnd("regDate"); - mjonMsgVO.setSearchSortOrd("desc"); - } + Map resultMap = mjonPayService.payUserSWListAjax(mjonMsgVO); - // 검색 데이터가 없거나 - // 시작일자가 종료일자보다 이후이거나 - // 총 기간이 365일이 넘으면 현재일부터 365일 전 날짜를 넣어서 검색 - if(!DateUtils.dateChkAndValueChk(mjonMsgVO.getStartDate(),mjonMsgVO.getEndDate(), 12 )) { - - mjonMsgVO.setStartDate(DateUtils.getDateMonthsAgo(12)); - mjonMsgVO.setEndDate(DateUtils.getCurrentDate()); - - }; - - List payUserSWList = mjonMsgDataService.selectPayUserSWList(mjonMsgVO); - - paginationInfo.setTotalRecordCount(payUserSWList.size()> 0 ? payUserSWList.get(0).getTotCnt() : 0); + paginationInfo.setTotalRecordCount((int)resultMap.get("totCnt")); model.addAttribute("paginationInfo", paginationInfo); - model.addAttribute("payUserSWList", payUserSWList); - - model.addAttribute("totSuccSendPrice", payUserSWList.size() > 0 ? PayUtils.getTrimToFirstDecimal(payUserSWList.get(0).getTotSuccSendPrice()) : 0); - + model.addAttribute("payUserSWList", resultMap.get("payUserSWList")); + model.addAttribute("totSuccSendPrice", resultMap.get("totSuccSendPrice")); model.addAttribute("mjonMsgVO", mjonMsgVO); @@ -2878,7 +2771,7 @@ public class MjonPayController { font.setBoldweight(Font.BOLDWEIGHT_BOLD); //글씨 bold sheet.setColumnWidth(1, 5000); // 칼럼의 폭 조절 - sheet.setColumnWidth(4, 10000); // 칼럼의 폭 조절 + sheet.setColumnWidth(3, 10000); // 칼럼의 폭 조절 try{ @@ -2903,6 +2796,7 @@ public class MjonPayController { sheet.addMergedRegion(new CellRangeAddress(0,1,1,1)); //셀병합 sheet.addMergedRegion(new CellRangeAddress(0,1,2,2)); //셀병합 sheet.addMergedRegion(new CellRangeAddress(0,1,3,3)); //셀병합 + sheet.addMergedRegion(new CellRangeAddress(0,1,6,6)); //셀병합 cell = row.createCell(0); @@ -2910,46 +2804,29 @@ public class MjonPayController { cell.setCellStyle(style); cell = row.createCell(1); - cell.setCellValue("날짜"); + cell.setCellValue("발송일시"); cell.setCellStyle(style); cell = row.createCell(2); - cell.setCellValue("문자유형"); + cell.setCellValue("형태"); cell.setCellStyle(style); cell = row.createCell(3); - cell.setCellValue("발송건수"); - cell.setCellStyle(style); - - cell = row.createCell(4); cell.setCellValue("내용"); cell.setCellStyle(style); - /*cell = row.createCell(5); - cell.setCellValue("충전"); - sheet.addMergedRegion(new CellRangeAddress(0,0,5,6)); //셀병합 + cell = row.createCell(4); + cell.setCellValue("발송건수"); + sheet.addMergedRegion(new CellRangeAddress(0,0,4,5)); //셀병합 cell.setCellStyle(style); - - cell = row.createCell(6); - cell.setCellStyle(style);*/ - + cell = row.createCell(5); - cell.setCellValue("사용"); - sheet.addMergedRegion(new CellRangeAddress(0,0,5,6)); //셀병합 cell.setCellStyle(style); cell = row.createCell(6); + cell.setCellValue("금액(원)"); cell.setCellStyle(style); - - /*cell = row.createCell(9); - cell.setCellValue("잔액"); - sheet.addMergedRegion(new CellRangeAddress(0,0,9,10)); //셀병합 - cell.setCellStyle(style); - - cell = row.createCell(10); - cell.setCellStyle(style);*/ - row = sheet.createRow(1); cell = row.createCell(0); @@ -2965,32 +2842,16 @@ public class MjonPayController { cell.setCellStyle(style); cell = row.createCell(4); + cell.setCellValue("성공"); cell.setCellStyle(style); - /*cell = row.createCell(5); - cell.setCellValue("충전금"); - cell.setCellStyle(style); - - cell = row.createCell(6); - cell.setCellValue("포인트"); - cell.setCellStyle(style);*/ - cell = row.createCell(5); - cell.setCellValue("충전금"); + cell.setCellValue("실패"); cell.setCellStyle(style); cell = row.createCell(6); - cell.setCellValue("포인트"); cell.setCellStyle(style); - /*cell = row.createCell(9); - cell.setCellValue("충전금"); - cell.setCellStyle(style); - - cell = row.createCell(10); - cell.setCellValue("포인트"); - cell.setCellStyle(style);*/ - DecimalFormat formatter = new DecimalFormat("###,###.##"); String befCash = ""; String befPoint = ""; @@ -3033,15 +2894,11 @@ public class MjonPayController { if(j==0) cell.setCellValue(i+1); //번호 if(j==1) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getRegDate()); //결제일시 if(j==2) cell.setCellValue(msgType); //문자유형 - if(j==3) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendCnt()); //발송건수 - if(j==4) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSmsTxt()); //내용 - if(j==5) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendPrice()); //충전 - 충전금 - if(j==6) cell.setCellValue(0); //충전 - 포인트 - /*if(j==7) cell.setCellValue(totPrice); //사용 - 충전금 - if(j==8) cell.setCellValue(0); //사용 - 포인트 - if(j==9) cell.setCellValue(thisPoint); //잔액 - 충전금 - if(j==10) cell.setCellValue(befPoint); //잔액 - 포인트 -*/ } + if(j==3) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSmsTxt()); //내용 + if(j==4) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendCnt()); //성공건수 + if(j==5) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getFailSendCnt()); //실패건수 + if(j==6) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendPrice()); //금액 + } } } response.setHeader("Set-Cookie", "fileDownload=true; path=/"); @@ -5051,28 +4908,11 @@ public class MjonPayController { model.addAttribute("resultList", payUserSumList); // 수신자 정보 - String mberNm = ""; // 회사명 - String managerNm = ""; // 담당자명 - String moblphonNo = ""; // 연락처 - MberManageVO mberManageVO = new MberManageVO(); - mberManageVO = mjonMsgDataService.selectMberManageInfo(userId); - if (mberManageVO != null) { - // 회원종류 p-개인 c-기업 - if (mberManageVO.getDept().equals("c")) { - mberNm = mberManageVO.getMberNm(); - managerNm = mberManageVO.getManagerNm(); - moblphonNo = mberManageVO.getMoblphonNo(); - } - else { - mberNm = mberManageVO.getMberNm(); - managerNm = mberManageVO.getMberNm(); - moblphonNo = mberManageVO.getMoblphonNo(); - } - } - - model.addAttribute("mberNm", mberNm); - model.addAttribute("managerNm", managerNm); - model.addAttribute("moblphonNo", moblphonNo); + MJUtil mjUtil = new MJUtil(); + MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(userId); + mberManageVO.setMoblphonNo(mjUtil.addDash(mberManageVO.getMoblphonNo())); + mberManageVO.setBizNo(mjUtil.bizNoAddDash(mberManageVO.getBizNo())); + model.addAttribute("mberManageVO", mberManageVO); //부가세 포함 가격 정보 계산 double addTax = Math.round(totalSumPrice * 0.1); @@ -6190,7 +6030,42 @@ public class MjonPayController { return "/uss/ion/pay/cashPointSendList"; } - + + /** + * * 거래명세서 팝업 + * @param searchVO + * @param model + * @return "/web/member/pay/payInvoicePopupAjax.do" + * @throws Exception + */ + @RequestMapping(value= {"/web/member/pay/payInvoicePopupAjax.do"}) + public String printInvoiceAjax( + @ModelAttribute("searchVO") MjonPayVO mjonPayVO + , RedirectAttributes redirectAttributes + , ModelMap model) throws Exception { + + + + //로그인 권한정보 불러오기 + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); + + if(loginVO == null) { + //redirectAttributes.addFlashAttribute("message", "문자온 서비스는 로그인 후 이용 가능합니다."); + return "redirect:/web/user/login/login.do"; + } + + mjonPayVO.setUserId(userId); + + //결제 정보 불러오기 + MJUtil mjUtil = new MJUtil(); + MjonPayVO result = mjonPayService.selectPayDetail(mjonPayVO); + result.setMbtlNum(mjUtil.addDash(result.getMbtlNum())); + result.setBizNo(mjUtil.bizNoAddDash(result.getBizNo())); + model.addAttribute("result", result); + + return "web/pay/payInvoicePrintPopup"; + } /** * @param p_pattern * @param p_mjonPayVO diff --git a/src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java b/src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java index 7907a32d..7dfff842 100644 --- a/src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java +++ b/src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java @@ -278,6 +278,8 @@ public class MjonPayV2Controller { try { // 다음 결제시 결제수단 SELECT nextPayMethod = userManageService.selectNextPayMethod(userId); + // 실제 마지막 결제 방식 - + } catch(Exception e) { isSuccess = false; @@ -1640,6 +1642,45 @@ public class MjonPayV2Controller { return "web/cop/kgmV2/bankOkUrl"; } + /** + * 마지막 결제수단 SELECT + * @throws Exception + */ + @RequestMapping(value = "/web/member/pay/selectLastPayMethodAjax.do") + public ModelAndView selectLastPayMethodAjax(MjonPayVO mjonPayVO, + HttpServletRequest request ) throws Exception { + + ModelAndView modelAndView = new ModelAndView(); + modelAndView.setViewName("jsonView"); + + boolean isSuccess = true; + String msg = ""; + String nextPayMethod = ""; + + LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser(); + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); + + if(userId == null) { + isSuccess = false; + msg = "로그인이 필요합니다."; + } + + try { + // 다음 결제시 결제수단 SELECT + nextPayMethod = userManageService.selectLastPayMethod(userId); + } + catch(Exception e) { + isSuccess = false; + msg = e.getMessage(); + } + + modelAndView.addObject("isSuccess", isSuccess); + modelAndView.addObject("msg", msg); + modelAndView.addObject("nextPayMethod", nextPayMethod); + + return modelAndView; + } + // Get Server Path public static String getKgServerPath(HttpServletRequest request) { String kgmPath = request.getScheme() + "://" + request.getServerName() +":" + request.getServerPort(); diff --git a/src/main/java/itn/let/uat/uia/service/impl/EgovMberManageServiceImpl.java b/src/main/java/itn/let/uat/uia/service/impl/EgovMberManageServiceImpl.java index 52caee34..20f997f3 100644 --- a/src/main/java/itn/let/uat/uia/service/impl/EgovMberManageServiceImpl.java +++ b/src/main/java/itn/let/uat/uia/service/impl/EgovMberManageServiceImpl.java @@ -1,5 +1,10 @@ package itn.let.uat.uia.service.impl; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; import java.util.List; import javax.annotation.Resource; @@ -11,14 +16,16 @@ import org.springframework.web.context.request.ServletRequestAttributes; import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import itn.com.cmm.util.StringUtil; import itn.com.uss.olh.hpc.service.HackIpService; import itn.com.uss.olh.hpc.service.HackIpVO; import itn.com.utl.fcc.service.EgovStringUtil; -import itn.let.mjo.cert.service.CertVO; +import itn.let.mjo.msgdata.service.MjonMsgDataService; import itn.let.mjo.msgsent.service.MjonMsgSentVO; import itn.let.mjo.pay.service.KmcVO; import itn.let.sec.rgm.service.AuthorGroup; import itn.let.sec.rgm.service.EgovAuthorGroupService; +import itn.let.sym.site.service.JoinSettingVO; import itn.let.uat.uia.service.AuthCertVO; import itn.let.uss.umt.service.AdmProcHstryVO; import itn.let.uss.umt.service.EgovMberManageService; @@ -82,6 +89,10 @@ public class EgovMberManageServiceImpl extends EgovAbstractServiceImpl implement @Resource(name = "hackIpService") private HackIpService hackIpService; + /* MjonMsgDataService */ + @Resource(name = "MjonMsgDataService") + private MjonMsgDataService mjonMsgDataService; + @Override public int insertMber(MberManageVO mberManageVO) throws Exception { @@ -621,4 +632,71 @@ public class EgovMberManageServiceImpl extends EgovAbstractServiceImpl implement return mberManageDAO.findTopByregDateFromCertLog(authCertVO); } + public MberManageVO selectMberHeaderInfo(String mberId) throws Exception { + //회원 단가, 이벤트 단가, 이벤트 종료일 등 조회 + MberManageVO headerInfo = mberManageDAO.selectMberHeaderInfo(mberId); + //기본 단가 조회 + JoinSettingVO sysPrice = mjonMsgDataService.selectJoinSettingInfo(); + + //이벤트 종료까지 남은 일 수 계산 + long eventLeftDay = calculateEventLeftDay(headerInfo.getEventEndDate()); + headerInfo.setEventLeftDay(String.valueOf(eventLeftDay)); + + //이벤트 유무에 따라 이벤트 잔액 or 잔액 사용 + boolean isEventActive = eventLeftDay > 0; + double money = isEventActive ? headerInfo.getEventRemainCash() : headerInfo.getUserMoney(); + + //이벤트, 회원 단가가 0일 시 기본 단가 사용 + setPrices(headerInfo, sysPrice, isEventActive); + + //발송가능 건수 조회 + calculateAvailableCounts(headerInfo, money); + + return headerInfo; + } + + private long calculateEventLeftDay(String eventEndDateStr) { + if (StringUtil.isEmpty(eventEndDateStr)) return 0; + LocalDate today = LocalDate.now(); + LocalDate eventEndDate = LocalDate.parse(eventEndDateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd")); + return ChronoUnit.DAYS.between(today, eventEndDate); + } + + private void setPrices(MberManageVO headerInfo, JoinSettingVO sysPrice, boolean isEventActive) { + if (isEventActive) { + headerInfo.setHeaderShortPrice(priceChk(headerInfo.getEventShortPrice(), sysPrice.getShortPrice())); + headerInfo.setHeaderLongPrice(priceChk(headerInfo.getEventLongPrice(), sysPrice.getLongPrice())); + headerInfo.setHeaderPicturePrice(priceChk(headerInfo.getEventPicturePrice(), sysPrice.getPicturePrice())); + headerInfo.setHeaderPicture2Price(priceChk(headerInfo.getEventPicture2Price(), sysPrice.getPicture2Price())); + headerInfo.setHeaderPicture3Price(priceChk(headerInfo.getEventPicture3Price(), sysPrice.getPicture3Price())); + } else { + headerInfo.setHeaderShortPrice(priceChk(headerInfo.getShortPrice(), sysPrice.getShortPrice())); + headerInfo.setHeaderLongPrice(priceChk(headerInfo.getLongPrice(), sysPrice.getLongPrice())); + headerInfo.setHeaderPicturePrice(priceChk(headerInfo.getPicturePrice(), sysPrice.getPicturePrice())); + headerInfo.setHeaderPicture2Price(priceChk(headerInfo.getPicture2Price(), sysPrice.getPicture2Price())); + headerInfo.setHeaderPicture3Price(priceChk(headerInfo.getPicture3Price(), sysPrice.getPicture3Price())); + } + // 카카오, 팩스 단가는 기본 단가 고정 + headerInfo.setHeaderKakaoAtPrice(sysPrice.getKakaoAtPrice()); + headerInfo.setHeaderFaxPrice(sysPrice.getFaxPrice()); + } + + private float priceChk(float price, float sysPrice) { + return price > 0 ? price : sysPrice; + } + + private void calculateAvailableCounts(MberManageVO headerInfo, double money) { + headerInfo.setHeaderShortCnt(calcCount(money, headerInfo.getHeaderShortPrice())); + headerInfo.setHeaderLongCnt(calcCount(money, headerInfo.getHeaderLongPrice())); + headerInfo.setHeaderPictureCnt(calcCount(money, headerInfo.getHeaderPicturePrice())); + headerInfo.setHeaderPicture2Cnt(calcCount(money, headerInfo.getHeaderPicture2Price())); + headerInfo.setHeaderPicture3Cnt(calcCount(money, headerInfo.getHeaderPicture3Price())); + headerInfo.setHeaderKakaoAtCnt(calcCount(money, headerInfo.getHeaderKakaoAtPrice())); + headerInfo.setHeaderFaxCnt(calcCount(money, headerInfo.getHeaderFaxPrice())); + } + + private int calcCount(double money, double price) { + if (price <= 0) return 0; + return (int) Math.floor(money / price); + } } \ No newline at end of file diff --git a/src/main/java/itn/let/uat/uia/service/impl/MberManageDAO.java b/src/main/java/itn/let/uat/uia/service/impl/MberManageDAO.java index 2418dce9..54338300 100644 --- a/src/main/java/itn/let/uat/uia/service/impl/MberManageDAO.java +++ b/src/main/java/itn/let/uat/uia/service/impl/MberManageDAO.java @@ -345,5 +345,8 @@ public class MberManageDAO extends EgovComAbstractDAO{ public String findTopByregDateFromCertLog(AuthCertVO authCertVO) { return (String)select("mberManageDAO.findTopByregDateFromCertLog", authCertVO); } - + + public MberManageVO selectMberHeaderInfo(String mberId) { + return (MberManageVO) select("mberManageDAO.selectMberHeaderInfo", mberId); + } } \ No newline at end of file diff --git a/src/main/java/itn/let/uss/umt/service/EgovMberManageService.java b/src/main/java/itn/let/uss/umt/service/EgovMberManageService.java index 1bc0877c..a9c224b7 100644 --- a/src/main/java/itn/let/uss/umt/service/EgovMberManageService.java +++ b/src/main/java/itn/let/uss/umt/service/EgovMberManageService.java @@ -251,4 +251,6 @@ public interface EgovMberManageService { public String findTopByregDateFromCertLog(AuthCertVO authCertVO); + //사용자 헤더 정보(단가, 이벤트 활성화 기간) + public MberManageVO selectMberHeaderInfo(String mberId) throws Exception; } \ No newline at end of file diff --git a/src/main/java/itn/let/uss/umt/service/EgovUserManageService.java b/src/main/java/itn/let/uss/umt/service/EgovUserManageService.java index 8cf39d58..41888bb0 100644 --- a/src/main/java/itn/let/uss/umt/service/EgovUserManageService.java +++ b/src/main/java/itn/let/uss/umt/service/EgovUserManageService.java @@ -220,4 +220,6 @@ public interface EgovUserManageService { public Map selectFaxSendList(FaxGroupDataVO faxGroupDataVO); + // 마지막 결제수단 조회 + public String selectLastPayMethod(String mberId) throws Exception; } \ No newline at end of file diff --git a/src/main/java/itn/let/uss/umt/service/MberManageVO.java b/src/main/java/itn/let/uss/umt/service/MberManageVO.java index 42194719..955fa1c3 100644 --- a/src/main/java/itn/let/uss/umt/service/MberManageVO.java +++ b/src/main/java/itn/let/uss/umt/service/MberManageVO.java @@ -512,6 +512,39 @@ public class MberManageVO extends UserDefaultVO{ */ private String secuLoginFlag; + + /** + * 회원 이벤트 정보 + */ + private String eventEndDate; //회원 이벤트 종료일자 + private double eventRemainCash; //이벤트 차감 후 남은 Cash + private float eventShortPrice; //이벤트 단문 가격 + private float eventLongPrice; //이벤트 장문 가격 + private float eventPicturePrice; //이벤트 그림 1장 가격 + private float eventPicture2Price; //이벤트 그림 2장 가격 + private float eventPicture3Price; //이벤트 그림 3장 가격 + private String eventLeftDay; //이벤트 남은 기간 + + /** + * 헤더 영역 정보(단가, 발송가능 건수) + */ + private float headerShortPrice; + private float headerLongPrice; + private float headerPicturePrice; + private float headerPicture2Price; + private float headerPicture3Price; + private float headerKakaoAtPrice; + private float headerKakaoFtPrice; + private float headerFaxPrice; + private int headerShortCnt; + private int headerLongCnt; + private int headerPictureCnt; + private int headerPicture2Cnt; + private int headerPicture3Cnt; + private int headerKakaoAtCnt; + private int headerKakaoFtCnt; + private int headerFaxCnt; + public String getSmsCode() { return smsCode; } @@ -1804,6 +1837,150 @@ public class MberManageVO extends UserDefaultVO{ public void setSecuLoginFlag(String secuLoginFlag) { this.secuLoginFlag = secuLoginFlag; } + public String getEventEndDate() { + return eventEndDate; + } + public void setEventEndDate(String eventEndDate) { + this.eventEndDate = eventEndDate; + } + public double getEventRemainCash() { + return eventRemainCash; + } + public void setEventRemainCash(double eventRemainCash) { + this.eventRemainCash = eventRemainCash; + } + public float getEventShortPrice() { + return eventShortPrice; + } + public void setEventShortPrice(float eventShortPrice) { + this.eventShortPrice = eventShortPrice; + } + public float getEventLongPrice() { + return eventLongPrice; + } + public void setEventLongPrice(float eventLongPrice) { + this.eventLongPrice = eventLongPrice; + } + public float getEventPicturePrice() { + return eventPicturePrice; + } + public void setEventPicturePrice(float eventPicturePrice) { + this.eventPicturePrice = eventPicturePrice; + } + public float getEventPicture2Price() { + return eventPicture2Price; + } + public void setEventPicture2Price(float eventPicture2Price) { + this.eventPicture2Price = eventPicture2Price; + } + public float getEventPicture3Price() { + return eventPicture3Price; + } + public void setEventPicture3Price(float eventPicture3Price) { + this.eventPicture3Price = eventPicture3Price; + } + public String getEventLeftDay() { + return eventLeftDay; + } + public void setEventLeftDay(String eventLeftDay) { + this.eventLeftDay = eventLeftDay; + } + public float getHeaderShortPrice() { + return headerShortPrice; + } + public void setHeaderShortPrice(float headerShortPrice) { + this.headerShortPrice = headerShortPrice; + } + public float getHeaderLongPrice() { + return headerLongPrice; + } + public void setHeaderLongPrice(float headerLongPrice) { + this.headerLongPrice = headerLongPrice; + } + public float getHeaderPicturePrice() { + return headerPicturePrice; + } + public void setHeaderPicturePrice(float headerPicturePrice) { + this.headerPicturePrice = headerPicturePrice; + } + public float getHeaderPicture2Price() { + return headerPicture2Price; + } + public void setHeaderPicture2Price(float headerPicture2Price) { + this.headerPicture2Price = headerPicture2Price; + } + public float getHeaderPicture3Price() { + return headerPicture3Price; + } + public void setHeaderPicture3Price(float headerPicture3Price) { + this.headerPicture3Price = headerPicture3Price; + } + public int getHeaderShortCnt() { + return headerShortCnt; + } + public void setHeaderShortCnt(int headerShortCnt) { + this.headerShortCnt = headerShortCnt; + } + public int getHeaderLongCnt() { + return headerLongCnt; + } + public void setHeaderLongCnt(int headerLongCnt) { + this.headerLongCnt = headerLongCnt; + } + public int getHeaderPictureCnt() { + return headerPictureCnt; + } + public void setHeaderPictureCnt(int headerPictureCnt) { + this.headerPictureCnt = headerPictureCnt; + } + public int getHeaderPicture2Cnt() { + return headerPicture2Cnt; + } + public void setHeaderPicture2Cnt(int headerPicture2Cnt) { + this.headerPicture2Cnt = headerPicture2Cnt; + } + public int getHeaderPicture3Cnt() { + return headerPicture3Cnt; + } + public void setHeaderPicture3Cnt(int headerPicture3Cnt) { + this.headerPicture3Cnt = headerPicture3Cnt; + } + public float getHeaderKakaoAtPrice() { + return headerKakaoAtPrice; + } + public void setHeaderKakaoAtPrice(float headerKakaoAtPrice) { + this.headerKakaoAtPrice = headerKakaoAtPrice; + } + public float getHeaderKakaoFtPrice() { + return headerKakaoFtPrice; + } + public void setHeaderKakaoFtPrice(float headerKakaoFtPrice) { + this.headerKakaoFtPrice = headerKakaoFtPrice; + } + public float getHeaderFaxPrice() { + return headerFaxPrice; + } + public void setHeaderFaxPrice(float headerFaxPrice) { + this.headerFaxPrice = headerFaxPrice; + } + public int getHeaderKakaoAtCnt() { + return headerKakaoAtCnt; + } + public void setHeaderKakaoAtCnt(int headerKakaoAtCnt) { + this.headerKakaoAtCnt = headerKakaoAtCnt; + } + public int getHeaderKakaoFtCnt() { + return headerKakaoFtCnt; + } + public void setHeaderKakaoFtCnt(int headerKakaoFtCnt) { + this.headerKakaoFtCnt = headerKakaoFtCnt; + } + public int getHeaderFaxCnt() { + return headerFaxCnt; + } + public void setHeaderFaxCnt(int headerFaxCnt) { + this.headerFaxCnt = headerFaxCnt; + } } \ No newline at end of file diff --git a/src/main/java/itn/let/uss/umt/service/impl/EgovUserManageServiceImpl.java b/src/main/java/itn/let/uss/umt/service/impl/EgovUserManageServiceImpl.java index aa136dad..94786594 100644 --- a/src/main/java/itn/let/uss/umt/service/impl/EgovUserManageServiceImpl.java +++ b/src/main/java/itn/let/uss/umt/service/impl/EgovUserManageServiceImpl.java @@ -882,5 +882,11 @@ public class EgovUserManageServiceImpl extends EgovAbstractServiceImpl implement return resultMap; } + + // 마지막 결제수단 SELECT + @Override + public String selectLastPayMethod(String mberId) throws Exception { + return userManageDAO.selectLastPayMethod(mberId); + } } \ No newline at end of file diff --git a/src/main/java/itn/let/uss/umt/service/impl/UserManageDAO.java b/src/main/java/itn/let/uss/umt/service/impl/UserManageDAO.java index 8e5285f0..4b836fe3 100644 --- a/src/main/java/itn/let/uss/umt/service/impl/UserManageDAO.java +++ b/src/main/java/itn/let/uss/umt/service/impl/UserManageDAO.java @@ -320,5 +320,9 @@ public class UserManageDAO extends EgovAbstractDAO{ public int selectUserPrePaymentPGdataCount(String userId) throws Exception{ return (int) select("userManageDAO.selectUserPrePaymentPGdataCount", userId); } - + + // 마지막 결제수단 SELECT + public String selectLastPayMethod(String mberId) throws Exception{ + return (String) select("userManageDAO.selectLastPayMethod", mberId); + } } \ No newline at end of file diff --git a/src/main/java/itn/web/MainController.java b/src/main/java/itn/web/MainController.java index cfaf8028..359b8c28 100644 --- a/src/main/java/itn/web/MainController.java +++ b/src/main/java/itn/web/MainController.java @@ -12,6 +12,9 @@ import java.security.PrivateKey; import java.security.PublicKey; import java.security.spec.RSAPublicKeySpec; import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -106,6 +109,7 @@ import itn.let.lett.service.LetterVO; import itn.let.mjo.addr.service.AddrTransHistService; import itn.let.mjo.addr.service.AddrTransHistVO; import itn.let.mjo.event.service.MjonEventService; +import itn.let.mjo.event.service.MjonEventVO; import itn.let.mjo.kisa.service.KisaService; import itn.let.mjo.kisa.service.KisaVO; import itn.let.mjo.mjocommon.MjonForienIpChk; @@ -130,6 +134,7 @@ import itn.let.sym.mnu.mpm.service.MenuManageVO; import itn.let.sym.prm.service.EgovProgrmManageService; import itn.let.sym.prm.service.ProgrmManageVO; import itn.let.sym.site.service.EgovSiteManagerService; +import itn.let.sym.site.service.JoinSettingVO; import itn.let.sym.site.service.MetaTagVO; import itn.let.sym.site.service.SiteManagerVO; import itn.let.uss.umt.service.EgovMberManageService; @@ -1256,6 +1261,16 @@ public class MainController { model.addAttribute("mberManageVO", userManageService.selectUserInfo(mberManageVO)); } + /* + * 회원별 단가, 기본 단가, 이벤트 정보 조회 + * 2025.07.25 이지우 추가 + * */ + MberManageVO mberHeaderInfoVO = new MberManageVO(); + if(loginVO != null) { + mberHeaderInfoVO = mberManageService.selectMberHeaderInfo(loginVO.getId()); + } + model.addAttribute("mberHeaderInfoVO", mberHeaderInfoVO); + return "web/com/webCommonHeader"; } diff --git a/src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml index a20ea414..e2447cef 100644 --- a/src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/mjo/addr/Addr_SQL_Mysql.xml @@ -569,10 +569,8 @@ on A.ADDR_GRP_ID = mag.ADDR_GRP_ID WHERE A.MBER_ID = #mberId# - AND (A.RECV_STATUS = 'Y' - or A.RECV_STATUS = 'S' - or A.RECV_STATUS is null) - AND mag.DELETE_YN = 'N' + AND (A.RECV_STATUS IN ('Y', 'S') OR A.RECV_STATUS IS NULL) + AND (A.ADDR_GRP_ID IS NULL OR MAG.DELETE_YN = 'N') @@ -1354,34 +1352,32 @@ , BOOKMARK , RECV_STATUS ) - SELECT - ADDR_GRP_ID - , MBER_ID - , ADDR_NM - , ADDR_PHONE_NO - , ADDR_INFO1 - , ADDR_INFO2 - , ADDR_INFO3 - , ADDR_INFO4 - , ADDR_COMMENT - , FRST_REGIST_PNTTM - , FRST_REGISTER_ID - , LAST_UPDT_PNTTM - , LAST_UPDUSR_ID - , DELETE_YN - , BOOKMARK - , RECV_STATUS - FROM TEMP_MJ_ADDR - WHERE MBER_ID = #mberId# - AND ADDR_GRP_ID = #addrGrpId# - AND BOOKMARK = #bookmark# - AND ADDR_PHONE_NO NOT IN - ( - SELECT ADDR_PHONE_NO FROM MJ_ADDR - WHERE MBER_ID = #mberId# - AND ADDR_GRP_ID = #addrGrpId# - AND BOOKMARK = #bookmark# - ) + SELECT t.ADDR_GRP_ID, + t.MBER_ID, + t.ADDR_NM, + FN_GETHYPHEN(t.ADDR_PHONE_NO), + t.ADDR_INFO1, + t.ADDR_INFO2, + t.ADDR_INFO3, + t.ADDR_INFO4, + t.ADDR_COMMENT, + t.FRST_REGIST_PNTTM, + t.FRST_REGISTER_ID, + t.LAST_UPDT_PNTTM, + t.LAST_UPDUSR_ID, + t.DELETE_YN, + t.BOOKMARK, + t.RECV_STATUS + FROM TEMP_MJ_ADDR AS t + LEFT JOIN MJ_ADDR AS m + ON m.MBER_ID = t.MBER_ID + AND m.ADDR_GRP_ID = t.ADDR_GRP_ID + AND m.BOOKMARK = t.BOOKMARK + AND replace(m.ADDR_PHONE_NO, '-', '') = replace(t.ADDR_PHONE_NO, '-', '') + WHERE t.MBER_ID = #mberId# + AND t.ADDR_GRP_ID = #addrGrpId# + AND t.BOOKMARK = #bookmark# + AND m.MBER_ID IS NULL diff --git a/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml b/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml index d441861d..c5cef1da 100644 --- a/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml @@ -2184,6 +2184,8 @@ , BLINE_CODE AS blineCode , AT_SMISHING_YN AS atSmishingYn , PRE_PAYMENT_YN AS prePaymentYn + , BIZ_NO AS bizNo + , MBER_EMAIL_ADRES AS mberEmailAdres FROM LETTNGNRLMBER WHERE MBER_ID = #userId# @@ -3172,6 +3174,7 @@ WHERE 1 = 1 AND pf.SentEA > 0 AND mjf.USER_ID = #userId# + AND mjf.RESERVE_C_YN = 'N' ) AS pay WHERE 1=1 @@ -3281,7 +3284,7 @@ , M.fileName3 AS fileName3 , M.orderByCode AS orderByCode , M.msgId AS msgId - , M.reqDate AS reqDate + , DATE_FORMAT(M.reqDate, '%Y-%m-%d %H:%i') AS reqDate FROM (SELECT DATE_FORMAT(B.REGDATE, '%Y-%m-%d %H:%i' ) AS regDate @@ -3322,7 +3325,7 @@ /*and A.DEL_FLAG = 'N'*/ AND A.USER_ID = #userId# AND B.USER_ID = #userId# - /*AND B.RESERVE_C_YN = 'N'*/ + AND B.RESERVE_C_YN = 'N' ORDER BY 1=1 , msgGroupId DESC , sentDate DESC @@ -3370,6 +3373,7 @@ WHERE 1 = 1 AND pf.SentEA > 0 AND mjf.USER_ID = #userId# + AND mjf.RESERVE_C_YN = 'N' ) AS pay WHERE 1=1 @@ -3595,9 +3599,9 @@ , MIN(DATE_FORMAT(M.REQ_DATE, '%Y-%m-%d' )) AS minRegDate , M.msgTypeName , M.orderByCode - , SUM(IF(M.msgTypeName = '단문(SMS)', 1, 0)) AS shtSendCount - , SUM(IF(M.msgTypeName = '장문(LMS)', 1, 0)) AS longSendCount - , SUM(IF(M.msgTypeName = '그림(MMS)', 1, 0)) AS pictSendCount + , SUM(IF(M.msgTypeName = '단문', 1, 0)) AS shtSendCount + , SUM(IF(M.msgTypeName = '장문', 1, 0)) AS longSendCount + , SUM(IF(M.msgTypeName = '그림', 1, 0)) AS pictSendCount , SUM(IF(M.msgTypeName = '알림톡', 1, 0)) AS atSendCount , SUM(IF(M.msgTypeName = '친구톡', 1, 0)) AS ftSendCount @@ -3616,14 +3620,14 @@ , B.MSG_TYPE , CASE WHEN B.MSG_TYPE = '6' AND B.FILE_CNT > 0 - THEN '그림(MMS)' + THEN '그림' WHEN B.MSG_TYPE = '6' AND B.FILE_CNT = 0 - THEN '장문(LMS)' + THEN '장문' WHEN B.MSG_TYPE = '8' THEN '알림톡' WHEN B.MSG_TYPE = '9' THEN '친구톡' - ELSE '단문(SMS)' + ELSE '단문' END msgTypeName , CASE WHEN B.MSG_TYPE = '6' AND B.FILE_CNT > 0 diff --git a/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml b/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml index f22eb8fd..66b242c2 100644 --- a/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/pay/MjonPay_SQL_mysql.xml @@ -101,6 +101,7 @@ , D.CODE_NM AS rcptTypeTxt , E.CONFIRM_YN AS confirmYn , E.RCPT_TYPE AS rcptType + , E.CONFIRM_DATE AS confirmDate , IFNULL(MP.POINT, '0') AS point , EMI.EVENT_PG_MOID AS eventMoid , mber.SMISHING_YN AS smishingYn @@ -149,6 +150,7 @@ MOID , CONFIRM_YN , RCPT_TYPE + , CONFIRM_DATE FROM MJ_TAX WHERE 1=1 @@ -2373,4 +2375,27 @@ + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovMberManage_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovMberManage_SQL_Mysql.xml index aedf797a..11fd56b9 100644 --- a/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovMberManage_SQL_Mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovMberManage_SQL_Mysql.xml @@ -2142,4 +2142,38 @@ + diff --git a/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml index eb97a567..75e0c297 100644 --- a/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml @@ -1458,5 +1458,15 @@ AND MONTH(REG_DATE) = MONTH(CURRENT_DATE) - + + + + diff --git a/src/main/webapp/publish/kmc/kmcis_web_sample_step01.jsp b/src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step01.jsp similarity index 100% rename from src/main/webapp/publish/kmc/kmcis_web_sample_step01.jsp rename to src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step01.jsp diff --git a/src/main/webapp/publish/kmc/kmcis_web_sample_step02.jsp b/src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step02.jsp similarity index 100% rename from src/main/webapp/publish/kmc/kmcis_web_sample_step02.jsp rename to src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step02.jsp diff --git a/src/main/webapp/publish/kmc/kmcis_web_sample_step03.jsp b/src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step03.jsp similarity index 100% rename from src/main/webapp/publish/kmc/kmcis_web_sample_step03.jsp rename to src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step03.jsp diff --git a/src/main/webapp/publish/kmc/kmcis_web_sample_step04.jsp b/src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step04.jsp similarity index 100% rename from src/main/webapp/publish/kmc/kmcis_web_sample_step04.jsp rename to src/main/webapp/WEB-INF/jsp/sample/kmc/kmcis_web_sample_step04.jsp diff --git a/src/main/webapp/publish/nicepay/cancelRequest.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelRequest.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/cancelRequest.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelRequest.jsp diff --git a/src/main/webapp/publish/nicepay/cancelRequest_utf.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelRequest_utf.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/cancelRequest_utf.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelRequest_utf.jsp diff --git a/src/main/webapp/publish/nicepay/cancelResult.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelResult.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/cancelResult.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelResult.jsp diff --git a/src/main/webapp/publish/nicepay/cancelResult_utf.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelResult_utf.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/cancelResult_utf.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/cancelResult_utf.jsp diff --git a/src/main/webapp/publish/nicepay/payRequest.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/payRequest.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/payRequest.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/payRequest.jsp diff --git a/src/main/webapp/publish/nicepay/payRequest.jsp_back b/src/main/webapp/WEB-INF/jsp/sample/nicepay/payRequest.jsp_back similarity index 100% rename from src/main/webapp/publish/nicepay/payRequest.jsp_back rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/payRequest.jsp_back diff --git a/src/main/webapp/publish/nicepay/payRequest_utf.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/payRequest_utf.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/payRequest_utf.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/payRequest_utf.jsp diff --git a/src/main/webapp/publish/nicepay/payResult.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/payResult.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/payResult.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/payResult.jsp diff --git a/src/main/webapp/publish/nicepay/payResultAjax.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/payResultAjax.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/payResultAjax.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/payResultAjax.jsp diff --git a/src/main/webapp/publish/nicepay/payResult_utf.jsp b/src/main/webapp/WEB-INF/jsp/sample/nicepay/payResult_utf.jsp similarity index 100% rename from src/main/webapp/publish/nicepay/payResult_utf.jsp rename to src/main/webapp/WEB-INF/jsp/sample/nicepay/payResult_utf.jsp diff --git a/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp b/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp index a6d05299..47b8716c 100644 --- a/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp @@ -112,16 +112,17 @@ function insertAddrAjax() { // return; //} - if(!checkHpNum(form.addrPhoneNo.value)){//휴대폰 유효성 검사 - if(!checkNorPhoneNum(form.addrPhoneNo.value)){//일반전화 유효성 검사 - + if(!isValidPhoneNumber(form.addrPhoneNo.value)){//일반전화 유효성 검사 + const formattedNumber =formatPhoneNumber(form.addrPhoneNo.value); // 번호 표준화 + if(!isValidPhoneNumber(formattedNumber)){ alert("잘못된 휴대폰번호 또는 일반전화 번호 입니다."); return false; - } - } + //휴대폰번호 포맷 맞추기 + form.addrPhoneNo.value = formatPhoneNumber(form.addrPhoneNo.value); + var data = new FormData(form); $.ajax({ diff --git a/src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp b/src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp index 71ddc8e0..9cf41d7a 100644 --- a/src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp @@ -1398,14 +1398,14 @@ function actionLogin_end(){ @@ -1627,7 +1627,9 @@ function actionLogin_end(){
  • -
    마이페이지
    + <%-- 250724 마이페이지 대시보드 삭제 --%> + <%--
    마이페이지
    --%> +
    마이페이지
    @@ -1652,7 +1654,7 @@ function actionLogin_end(){
  • 요금안내/견적내기
  • 결제하기
  • 요금 결제내역
  • -
  • 요금 사용내역
  • +
  • 요금 사용내역
  • <%--
  • 계산서/현금영수증 발행 등록
  • --%>
  • 세금계산서 발행
  • @@ -1744,8 +1746,9 @@ function actionLogin_end(){
  • -
  • +
  • diff --git a/src/main/webapp/WEB-INF/jsp/web/pay/payInvoicePrintPopup.jsp b/src/main/webapp/WEB-INF/jsp/web/pay/payInvoicePrintPopup.jsp new file mode 100644 index 00000000..9e3d35c5 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/web/pay/payInvoicePrintPopup.jsp @@ -0,0 +1,384 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page import="itn.com.cmm.LoginVO" %> + + + + + + 거래명세서 + + + + + + + + + + +
    +
    +
    + 문자온 CI +
    +

    (12248) 경기도 남양주시 다산순환로 20, A동 735호(다산동, 현대프리미어캠퍼스)

    +

    TEL 1551-8011

    +
    +
    +
    +

    거래명세서(공급받는자 보관용)

    +
    +
    +

    공급받는 자

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    등록번호, 상호, 성명, 전화번호, 이메일 정보 제공
    등록번호 + + + + + + - + + + +
    상     호 + + + + + + - + + +
    성     명 + + + + + + + + +
    전화번호 + +
    이 메 일 + +
    +
    +
    +

    공급자

    + 도장 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    등록번호, 상호, 성명, 전화번호, 이메일 정보 제공
    등록번호653-87-00858
    상     호주식회사 아이티앤
    성     명유인식
    전화번호1551-8011
    이 메 일help@iten.co.kr
    +
    +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    작성일자, 공급가액, 세액, 비고 정보를 제공하는 표
    작성일자공급가액세액
    비고 + + + 사용기간(${result.startDate} ~ ${result.endDate}) + + + - + + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    월, 일, 품목, 규격, 수량, 단가, 공급가액, 세액, 비고 정보를 제공하는 표
    품목규격수량단가공급가액세액비고
    문자온 메시징 서비스 이용료-
    합계금액전잔액입금액현잔액 + + + + 이 금액을 [청 구]함 + + + 이 금액을 [영 수]함 + + +
    + + -- + +
    +
    +
    + + + +
    +
    + +
    +
    +
    + + + diff --git a/src/main/webapp/WEB-INF/jsp/web/user/mberCompanyInfoChange.jsp b/src/main/webapp/WEB-INF/jsp/web/user/mberCompanyInfoChange.jsp index bed33f22..87e70649 100644 --- a/src/main/webapp/WEB-INF/jsp/web/user/mberCompanyInfoChange.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/user/mberCompanyInfoChange.jsp @@ -242,25 +242,17 @@ function updateUserInfo(){ $("#receivemail").val("N"); } - if($("#emailId").val() == ""){ - alert("이메일을 입력해주세요."); + if($("#emailId").val().trim() == "" || $("#emailAdd").val().trim() == ""){ + alert("이메일은 필수 입력 항목입니다.") return false; - } - - if($("#emailId").val() != ""|| $("#emailAdd").val() != ""){ - if($("#emailAdd").val() != ""){ - var email = $("#emailId").val() + "@" + $("#emailAdd").val(); - var taxExptext = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i; - if(taxExptext.test(email)==false){ - alert("이메일주소 형식이 올바르지 않습니다."); - return false; - } - - $("#mberEmailAdres").val(email); - }else{ - alert("이메일 주소를 확인해 주세요"); + }else { + var email = $("#emailId").val() + "@" + $("#emailAdd").val(); + var taxExptext = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i; + if(taxExptext.test(email)==false){ + alert("이메일주소 형식이 올바르지 않습니다."); return false; } + $("#mberEmailAdres").val(email); } if("${cmpPhoneChangeManageVO.hstSttus}" == '03'){ @@ -678,7 +670,7 @@ function changeValueWork(obj){
    -
    *이메일
    +
    이메일