Merge branch 'hylee'

This commit is contained in:
hylee 2023-07-10 10:16:23 +09:00
commit 65dff45ef3
2 changed files with 46 additions and 32 deletions

View File

@ -1157,21 +1157,10 @@ public class TestController {
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
// api인지 확인
ApiKeyVO apiKeyVO = new ApiKeyVO();
apiKeyVO.setAccessKey(mjonMsgVO.getAccessKey());
List<ApiKeyVO> resultList = apiKeyMngService.selectCheckApiKeyDup(apiKeyVO);
if(resultList.size() >= 1) {
userId = resultList.get(0).getMberId();
}
// LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
// userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
userId = mjonMsgVO.getMberId();
if(userId.equals("")) {
modelAndView.addObject("message", "로그인 후 이용이 가능합니다.");
@ -1388,6 +1377,9 @@ public class TestController {
}
// 토탈금액 "," 리플레이스 처리
mjonMsgVO.setTotPrice(mjonMsgVO.getTotPrice().replaceAll(",", ""));
float tmpOrgEachPrice = Float.parseFloat(mjonMsgVO.getEachPrice());
float tmpOrgTotPrice = Float.parseFloat(mjonMsgVO.getTotPrice());
@ -1517,8 +1509,6 @@ public class TestController {
shortMsgVO = mjonMsgVO;
longMsgVO = mjonMsgVO;
imgMsgVO = mjonMsgVO;
System.out.println("shortMsgVO :: "+ shortMsgVO.getsPrice());
System.out.println("mjonMsgVO :: "+ mjonMsgVO.getsPrice());
int shortMsgCnt = Integer.parseInt(mjonMsgVO.getShortMsgCnt());
int longMsgCnt = Integer.parseInt(mjonMsgVO.getLongMsgCnt());
@ -1768,7 +1758,14 @@ public class TestController {
imgMsgVO.setRep4List(imgRep4);
//개별단가 계산하기
String eachPrice = shortMsgVO.getsPrice();
String eachPrice = imgMsgVO.getpPrice();
//api 서버에서 pPrice 값이 없는 경우가 있어서 오류 방지를위해서 추가
if(eachPrice == null) {
eachPrice = imgMsgVO.getEachPrice();
}
/**
* 그림문자에 치환 내용이 포함되어 있는 경우 단가 계산하기.
@ -1813,9 +1810,12 @@ public class TestController {
//개별단가 계산하기
String eachPrice = shortMsgVO.getsPrice();
if(StringUtils.isEmpty(eachPrice))
{
//api 서버에서 sPrice 값이 없는 경우가 있어서 오류 방지를위해서 추가
if(eachPrice == null) {
eachPrice = shortMsgVO.getEachPrice();
}
/**
@ -1845,7 +1845,6 @@ public class TestController {
shortMsgVO.setMsgType("4");
}
System.out.println("shortMsgVO.getEachPrice() :: "+ shortMsgVO.getEachPrice());
//총금액 계산하기
Float sTotPrice = Float.parseFloat(shortMsgVO.getEachPrice()) * shortCnt;
shortMsgVO.setTotPrice(sTotPrice.toString());
@ -1871,6 +1870,13 @@ public class TestController {
String eachPrice = longMsgVO.getmPrice();
//api 서버에서 mPrice 값이 없는 경우가 있어서 오류 방지를위해서 추가
if(eachPrice == null) {
eachPrice = longMsgVO.getEachPrice();
}
if(fileCount > 2) {//그림 이미지가 3개
eachPrice = mjonMsgVO.getP3Price();
@ -2001,9 +2007,7 @@ public class TestController {
}else {
//문자발송 함수 호출 - 일괄변환이 없거나, 그림문자 일괄변환의 경우 한번에 전송 처리
System.out.println("???????");
modelAndView = fncSendMsg(mjonMsgVO);
System.out.println("!!!!!!!!!!!!");
}
@ -2060,16 +2064,13 @@ public class TestController {
// 법인폰 알람여부 체크
JoinSettingVO joinSettingVO = new JoinSettingVO();
joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
// SMS 체크
if (joinSettingVO != null && joinSettingVO.getSmsNoti().equals("Y")) {
// getAdminPhoneSendMsgData(mjonMsgVO);
}
// SLACK 체크
if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
//Slack으로 메세지 전송 처리
MjonCommon comm = new MjonCommon();
comm.getAdminSandSlack(mjonMsgVO);
System.out.println("slack noti");
// comm.getAdminSandSlack(mjonMsgVO);
}
}
@ -2079,11 +2080,6 @@ public class TestController {
}
return modelAndView;
}
/**
* 문자발송시 치환문자가 있거나 단문, 장문 일경우 타는 로직

View File

@ -51,6 +51,11 @@
return false;
}
if(!moneyChk()){
return false;
}
if(!valueChk()){
return false;
}
@ -152,6 +157,19 @@
}
function moneyChk(){
//회원 보유 잔액 비교
var totPriceOnly = stringReplaceAll($('#totalPriceTxt').text() , ",", "");
var userMoneyOnly = stringReplaceAll($('#hdUserMoney').text(), ",", "");
if(parseFloat(userMoneyOnly) < parseFloat(totPriceOnly)){
alert("팩스 발송에 필요한 회원님의 보유 잔액이 부족 합니다.");
return false;
}
}
function valueChk(){
if($('#title').val() == ''){
alert('제목을 입력해 주세요.');