수정건 수정

This commit is contained in:
USER
2022-08-05 14:05:35 +09:00
parent 8971945e93
commit e67838c044
13 changed files with 101 additions and 32 deletions

View File

@@ -179,7 +179,7 @@ export default {
return false;
}
const hp = this.blckSndrno;
if (!this.isNull(hp) && !this.isMobile(hp)) {
if (!this.isNull(hp) && !this.isSendnum(hp)) {
this.row.title = '발신번호 차단';
this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
this.$parent.alertInsert(this.row)

View File

@@ -129,6 +129,18 @@ const utils_mixin = {
}
},
/** 발신번호 차단 */
isSendnum(phoneNum){
var regExp = /^(01[016789])([0-9]{3,4})([0-9]{4})|((080-[0-9]{3,4}|15(44|66|77|88))[0-9]{4})|(0(2|3[1-3]|4[1-4]|5[1-5]|6[1-4]))(\d{3,4})(\d{4})$/;
var myArray;
if(regExp.test(phoneNum)){
myArray = regExp.exec(phoneNum);
return true;
}else{
return false;
}
},
isNull(obj) {
if (lodash.isNil(obj) || lodash.trim(obj) == '') {
return true;

View File

@@ -65,7 +65,7 @@
<tr>
<th>제출서류</th>
<td class="sender">
<p v-for="(item, idx) in docList" v-if="item.docTpCd !== '06'">{{ item.docTitle }}</p>
<a v-for="(item, idx) in docList" v-if="item.docTpCd !== '06'">{{ item.docTitle }}</a>
</td>
</tr>
<tr>

View File

@@ -471,15 +471,19 @@ export default {
sendNm: this.sendNm,
sendNum: this.sendNum
})
// 등록할 발신 번호
if (this.numberInputs.length > 0) {
this.numberInputs.forEach(element =>
for(var i=0; i<this.numberInputs.length; i++){
if(this.numberInputs[i].sendNm !== '' && this.numberInputs[i].sendNum !== ''){
this.saveSendNums.push({
sendNm: element.sendNm,
sendNum: element.sendNum
sendNm: this.numberInputs[i].sendNm,
sendNum: this.numberInputs[i].sendNum
})
)
}
}
}
if (this.doValidate()) {
if (this.bizrAuthYn !== 'Y') {
if (this.nmineeDivCd === '01') {

View File

@@ -71,10 +71,12 @@ const router = new Router({
router.beforeEach((to, from, next) => {
const isPublic = to.matched.some(record => record.meta.public);
const loggedIn = !!tokenSvc.getToken();
if (!isPublic && !loggedIn) {
return next('/login');
}else{
var nextUrl = to.fullPath;
var fromUrl = from.fullPath;
if(nextUrl == '/'){
console.log(store.getters);
const rootUrl = store.getters['login/getRootUrl'];
@@ -82,7 +84,12 @@ router.beforeEach((to, from, next) => {
return next('/login');
}
return next(rootUrl);
}
}else if(nextUrl == '/view/login/auth'){
if(fromUrl != '/login'){
return next('/login');
}
}
}
to.matched.some(record => {

View File

@@ -21,6 +21,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
@@ -192,10 +193,17 @@ public class SendNumMgtService {
String regReqNo = sendNumMgtMapper.selectRegReqNo();
String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId);
try {
Date now = new Date();
String nowDate = DateUtils.dateToStr(now, "yyyyMMddHHmmss");
insertNumberReqDto.setUserSeq(userSeq);
insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size());
insertNumberReqDto.setRegId(regId);
insertNumberReqDto.setRegReqNo(regReqNo);
insertNumberReqDto.setApvCnt(insertNumberReqDto.getList().size()); // 승인 건수
insertNumberReqDto.setRejtCnt(0); // 반려 건수
insertNumberReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_COMPLETED); // 요청 상태 코드(01:승인대기, 02:처리완료)
insertNumberReqDto.setCmpltDt(nowDate); // 완료일시
// 2. 발신번호등록 테이블 저장. (EZ_SNDRNO_REG)
sendNumMgtMapper.insertNumber(insertNumberReqDto);
@@ -458,8 +466,10 @@ public class SendNumMgtService {
for(UpdateApprSendNumber updateApprSendNumber: updateApprReqDto.getList()){
if(StringUtils.equals(Const.SNDRNO_STTUS_CD_COMPLETED, updateApprSendNumber.getSttusCd())){
apvCnt++;
updateApprSendNumber.setUseYn(Const.COMM_YES); // 사용여부 : 승인완료 시 자동으로 Y 값으로 되며 승인대기, 반려, 관리자 변경 값은 N으로 표기
}else if(StringUtils.equals(Const.SNDRNO_STTUS_CD_REJECT, updateApprSendNumber.getSttusCd())){
rejtCnt++;
updateApprSendNumber.setUseYn(Const.COMM_NO); // 사용여부 : 승인완료 시 자동으로 Y 값으로 되며 승인대기, 반려, 관리자 변경 값은 N으로 표기
}
updateApprSendNumber.setAdminId(regId);
sendNumMgtMapper.updateSndrno(updateApprSendNumber);
@@ -468,11 +478,28 @@ public class SendNumMgtService {
updateApprReqDto.setApvCnt(apvCnt);
updateApprReqDto.setRejtCnt(rejtCnt);
if(totalCnt == apvCnt){
updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_COMPLETED);
updateApprReqDto.setCmpltYn(Const.COMM_YES);
}else{
updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_WAITING);
// 발신 번호 등록 정보 가져오기
SendNumberApprDetailReqDto sendNumberApprDetailReqDto = new SendNumberApprDetailReqDto();
sendNumberApprDetailReqDto.setRegReqNo(updateApprReqDto.getRegReqNo()); // 발신 번호 세팅
SendNumberApprDetailRes sendNumberApprDetailRes = sendNumMgtMapper.selectSvcSndrnoReqDetail(sendNumberApprDetailReqDto);
if(sendNumberApprDetailRes != null) {
String cmpltDt = sendNumberApprDetailRes.getCmpltDt();
// if(cmpltDt == null) { // 완료 일시가 없으면
// if(totalCnt == (apvCnt + rejtCnt)){ // (승인 | 반려) 처리가 다 되었는지 확인
// updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_COMPLETED);
// updateApprReqDto.setCmpltYn(Const.COMM_YES);
// }else {
// // 처리가 다 안되어서 승인 대기 상태
// updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_WAITING);
// }
// }
if(cmpltDt == null) { // 완료 일시가 없으면
if((apvCnt + rejtCnt) > 0) {
updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_COMPLETED);
updateApprReqDto.setCmpltYn(Const.COMM_YES);
}
}
}
int result = sendNumMgtMapper.upddateSndrnoReg(updateApprReqDto);

View File

@@ -75,5 +75,21 @@ public class InsertNumberReqDto implements Serializable{
@ApiModelProperty(example = "", name = "", dataType = "String", hidden=true)
private String regReqNo;
/** 승인_건수*/
@ApiModelProperty(hidden=true)
private int apvCnt;
/** 반려_건수*/
@ApiModelProperty(hidden=true)
private int rejtCnt;
/** 완료_일시*/
@ApiModelProperty(hidden=true)
private String cmpltDt;
/** 요청_상태_코드*/
@ApiModelProperty(hidden=true)
private String reqSttusCd;
}

View File

@@ -21,17 +21,17 @@ public class UpdateApprReqDto implements Serializable{
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
private String adminId;
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "int")
@ApiModelProperty(example = "승인 건수", name = "승인 건수", dataType = "int")
private int apvCnt;
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "int")
@ApiModelProperty(example = "반려 건수", name = "반려 건수", dataType = "int")
private int rejtCnt;
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "요청 상태", name = "요청 상태", dataType = "String")
private String reqSttusCd;
@ApiModelProperty(example = "처리완료여부", name = "처리완료여부", dataType = "String")
private String cmpltYn;
}

View File

@@ -20,5 +20,8 @@ public class UpdateApprSendNumber implements Serializable{
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
private String adminId;
/** 사용여부 : 승인완료 시 자동으로 Y 값으로 되며 승인대기, 반려, 관리자 변경 값은 N으로 표기*/
@ApiModelProperty(hidden = true)
private String useYn;
}

View File

@@ -1,7 +1,7 @@
spring:
datasource-db1:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -15,8 +15,7 @@ spring:
max-lifetime: 1800000
datasource-db2:
driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-ro-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://dev-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:

View File

@@ -1,7 +1,7 @@
spring:
datasource-db1:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -15,8 +15,7 @@ spring:
max-lifetime: 1800000
datasource-db2:
driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-ro-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://prd-msghubez-db.cluster-clgtyr2wjyos.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:

View File

@@ -1,7 +1,7 @@
spring:
datasource-db1:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:
@@ -15,8 +15,7 @@ spring:
max-lifetime: 1800000
datasource-db2:
driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-ro-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnect=true
jdbc-url: jdbc:mysql://stg-msghubez-db.cluster-chhh2ppdeksu.ap-northeast-2.rds.amazonaws.com:3306?serverTimezone=UTC&characterEncoding=UTF-8
username: hubez_admin
password: ENC(KujgLXvYG1ZD0bT9ec6I3Ld/xV25JmyX)
hikari:

View File

@@ -268,14 +268,15 @@
,CHG_ID
,CHG_DT
,RQTR_ID
,RQTR_NM
,RQTR_NM
,CMPLT_DT
)
VALUES(
#{regReqNo}
,'01'
,#{reqSttusCd}
,#{reqCnt}
,0
,0
,#{apvCnt}
,#{rejtCnt}
,NOW()
,#{userSeq}
,#{regId}
@@ -283,7 +284,8 @@
,#{regId}
,NOW()
,#{regId}
,(select OPRTR_NM from hubez_admin.EZ_ADM_USER eau where OPRTR_ID = #{regId})
,(select OPRTR_NM from hubez_admin.EZ_ADM_USER eau where OPRTR_ID = #{regId})
,#{cmpltDt}
)
</insert>
@@ -605,7 +607,8 @@
SET
CHG_ID = #{adminId}
, CHG_DT = NOW()
, STTUS_CD = #{sttusCd}
, STTUS_CD = #{sttusCd}
, USE_YN = #{useYn}
WHERE SEQ_NO = #{seqNo}
AND SNDRNO = #{sndrno}
</update>