mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 15:58:20 +09:00
발신번호 등록
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<th>사업자번호</th>
|
||||
<td><input type="text" disabled v-model="bRegNo" /></td>
|
||||
</tr>
|
||||
<tr v-show="bizrAuthYn !== 'Y'">
|
||||
<tr>
|
||||
<th>명의자 구분</th>
|
||||
<td>
|
||||
<input
|
||||
@@ -151,7 +151,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="bizrAuthYn !== 'Y' && fileType === 2">
|
||||
<tr v-show="fileType === 2">
|
||||
<th>타사업자 명의 제출서류</th>
|
||||
<td>
|
||||
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p>
|
||||
@@ -1065,109 +1065,15 @@ export default {
|
||||
}
|
||||
|
||||
if (this.doValidate()) {
|
||||
if (this.bizrAuthYn !== 'Y') {
|
||||
if (this.nmineeDivCd === '01') {
|
||||
// 사업자 필수 서류 : 사업자 등록증, 통신서비스 이용증명원
|
||||
const response = await sendNumMgtApi.insertNumber1(
|
||||
this.communicationFile, //통신서비스 이용 증명원
|
||||
// this.tenureFile, //재직증명서 2023.04.25 삭제
|
||||
this.businessFile, //사업자 등록증
|
||||
// this.identificationCardFile, //신분증 2023.04.25 삭제
|
||||
this.identificationEvidenceFile, //재직증명서 (임직원 신청시)
|
||||
this.adminId,
|
||||
this.custNm,
|
||||
this.bRegNo,
|
||||
this.nmineeDivCd,
|
||||
this.saveSendNums,
|
||||
this.bizrAuthYn,
|
||||
this.custSeq,
|
||||
this.bRegNo
|
||||
);
|
||||
const result = response.data;
|
||||
// if(this.communicationFile.size >= 1024){
|
||||
// alert('파일용량test')
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (result != null && result.retCode == '0000') {
|
||||
if (result.data.list != null && result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
this.toComplete();
|
||||
} else if (result != null && result.retCode == '4021') {
|
||||
if (result.data.list != null && result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else if (this.nmineeDivCd === '02') {
|
||||
// 타사업자 필수 서류 : 사업자 등록증, 통신서비스 이용증명원, 위임장, 위임-수입업체 관계 확인 문서, 위임업체 사업자등록증
|
||||
const response = await sendNumMgtApi.insertNumber2(
|
||||
this.businessFile, //사업자 등록증
|
||||
/*this.otherBusinessFile, 2023.04.25 공통으로 처리*/
|
||||
this.communicationFile, //통신서비스 이용 증명원
|
||||
this.identificationEvidenceFile, //재직증명서(임직원 신청시)
|
||||
this.attorneyFile, //위임장
|
||||
this.delegationFile, //위임-수입업체 관계 확인 문서
|
||||
this.delegatedBusinessFile, //위임업체 사업자 등록중
|
||||
/*this.authorizedBusinessFile, 2023.04.25 수임업체 사업자 등록증 삭제*/
|
||||
this.delegatedIdentificationFile, //위임업체 대리인 신분증 사본
|
||||
this.commDeputyIdFile, //수임업체 대리인 신분증 사본
|
||||
this.delegateCertificateFile, //위임업체 대리인 재직증명서
|
||||
this.commDeputyCertificateFile, //수임업체 대리인 재직증명서
|
||||
/*this.identificationCardFile, 2023.04.25 신분증 삭제*/
|
||||
/* this.corporateCertificateFile, */
|
||||
this.adminId,
|
||||
this.custNm,
|
||||
this.bRegNo,
|
||||
this.nmineeDivCd,
|
||||
this.saveSendNums,
|
||||
this.bizrAuthYn,
|
||||
this.custSeq,
|
||||
this.bRegNo
|
||||
);
|
||||
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == '0000') {
|
||||
if (result.data.list != null && result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
this.toComplete();
|
||||
} else if (result != null && result.retCode == '4021') {
|
||||
if (result.data.list != null) {
|
||||
if (result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const response = await sendNumMgtApi.insertNumber(
|
||||
if (this.nmineeDivCd === '01') {
|
||||
console.log("사업자")
|
||||
// 사업자 필수 서류 : 사업자 등록증, 통신서비스 이용증명원
|
||||
const response = await sendNumMgtApi.insertNumber1(
|
||||
this.communicationFile, //통신서비스 이용 증명원
|
||||
// this.tenureFile, //재직증명서 2023.04.25 삭제
|
||||
this.businessFile, //사업자 등록증
|
||||
// this.identificationCardFile, //신분증 2023.04.25 삭제
|
||||
this.identificationEvidenceFile, //재직증명서 (임직원 신청시)
|
||||
this.adminId,
|
||||
this.custNm,
|
||||
this.bRegNo,
|
||||
@@ -1177,6 +1083,67 @@ export default {
|
||||
this.custSeq,
|
||||
this.bRegNo
|
||||
);
|
||||
console.log("response.data",response.data)
|
||||
const result = response.data;
|
||||
// if(this.communicationFile.size >= 1024){
|
||||
// alert('파일용량test')
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (result != null && result.retCode == '0000') {
|
||||
if (result.data.list != null && result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
this.toComplete();
|
||||
} else if (result != null && result.retCode == '4021') {
|
||||
if (result.data.list != null && result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else if (this.nmineeDivCd === '02') {
|
||||
console.log("안녕 타사업자")
|
||||
// 타사업자 필수 서류 : 사업자 등록증, 통신서비스 이용증명원, 위임장, 위임-수입업체 관계 확인 문서, 위임업체 사업자등록증
|
||||
console.log("businessFile",this.businessFile);
|
||||
console.log("attorneyFile",this.attorneyFile);
|
||||
console.log("delegationFile",this.delegationFile);
|
||||
const response = await sendNumMgtApi.insertNumber2(
|
||||
this.businessFile, //사업자 등록증
|
||||
/*this.otherBusinessFile, 2023.04.25 공통으로 처리*/
|
||||
this.communicationFile, //통신서비스 이용 증명원
|
||||
this.identificationEvidenceFile, //재직증명서(임직원 신청시)
|
||||
this.attorneyFile, //위임장
|
||||
this.delegationFile, //위임-수입업체 관계 확인 문서
|
||||
this.delegatedBusinessFile, //위임업체 사업자 등록중
|
||||
/*this.authorizedBusinessFile, 2023.04.25 수임업체 사업자 등록증 삭제*/
|
||||
this.delegatedIdentificationFile, //위임업체 대리인 신분증 사본
|
||||
this.commDeputyIdFile, //수임업체 대리인 신분증 사본
|
||||
this.delegateCertificateFile, //위임업체 대리인 재직증명서
|
||||
this.commDeputyCertificateFile, //수임업체 대리인 재직증명서
|
||||
/*this.identificationCardFile, 2023.04.25 신분증 삭제*/
|
||||
/* this.corporateCertificateFile, */
|
||||
this.adminId,
|
||||
this.custNm,
|
||||
this.bRegNo,
|
||||
this.nmineeDivCd,
|
||||
this.saveSendNums,
|
||||
this.bizrAuthYn,
|
||||
this.custSeq,
|
||||
this.bRegNo
|
||||
);
|
||||
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == '0000') {
|
||||
if (result.data.list != null && result.data.list.length > 0) {
|
||||
@@ -1190,15 +1157,53 @@ export default {
|
||||
}
|
||||
this.toComplete();
|
||||
} else if (result != null && result.retCode == '4021') {
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
if (result.data.list != null) {
|
||||
if (result.data.list.length > 0) {
|
||||
this.row.title = '발신번호 등록';
|
||||
var failMsg = '';
|
||||
for (var i = 0; i < result.data.list.length; i++) {
|
||||
failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
}
|
||||
}
|
||||
this.row.failMsg = failMsg;
|
||||
this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// } else {
|
||||
// const response = await sendNumMgtApi.insertNumber(
|
||||
// this.adminId,
|
||||
// this.custNm,
|
||||
// this.bRegNo,
|
||||
// this.nmineeDivCd,
|
||||
// this.saveSendNums,
|
||||
// this.bizrAuthYn,
|
||||
// this.custSeq,
|
||||
// this.bRegNo
|
||||
// );
|
||||
// const result = response.data;
|
||||
// if (result != null && result.retCode == '0000') {
|
||||
// if (result.data.list != null && result.data.list.length > 0) {
|
||||
// this.row.title = '발신번호 등록';
|
||||
// var failMsg = '';
|
||||
// for (var i = 0; i < result.data.list.length; i++) {
|
||||
// failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
// }
|
||||
// this.row.failMsg = failMsg;
|
||||
// this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
// }
|
||||
// this.toComplete();
|
||||
// } else if (result != null && result.retCode == '4021') {
|
||||
// var failMsg = '';
|
||||
// for (var i = 0; i < result.data.list.length; i++) {
|
||||
// failMsg += '[' + (i + 1) + '] ' + result.data.list[i].sendNum + '<br>';
|
||||
// }
|
||||
// this.row.failMsg = failMsg;
|
||||
// this.$parent.$refs.commmonModal.sendNumFailMsgOpen(this.row);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
},
|
||||
doValidate() {
|
||||
|
||||
@@ -48,9 +48,9 @@ const insertNumber = (adminId, custNm, bRegNo, nmineeDivCd, numberInputs, bizrAu
|
||||
// 사업자가 등록 요청.
|
||||
const insertNumber1 = (
|
||||
communicationFile,
|
||||
tenureFile,
|
||||
// tenureFile,
|
||||
businessFile,
|
||||
identificationCardFile,
|
||||
// identificationCardFile,
|
||||
identificationEvidenceFile,
|
||||
adminId,
|
||||
custNm,
|
||||
@@ -62,9 +62,9 @@ const insertNumber1 = (
|
||||
) => {
|
||||
let formData = new FormData();
|
||||
formData.append('communicationFile', communicationFile);
|
||||
formData.append('tenureFile', tenureFile);
|
||||
// formData.append('tenureFile', tenureFile);
|
||||
formData.append('businessFile', businessFile);
|
||||
formData.append('identificationCardFile', identificationCardFile);
|
||||
// formData.append('identificationCardFile', identificationCardFile);
|
||||
formData.append('identificationEvidenceFile', identificationEvidenceFile);
|
||||
|
||||
const row = {};
|
||||
@@ -89,19 +89,20 @@ const insertNumber1 = (
|
||||
|
||||
// 타사업자가 등록 요청.
|
||||
const insertNumber2 = (
|
||||
businessFile,
|
||||
communicationFile,
|
||||
delegationFile,
|
||||
attorneyFile,
|
||||
otherBusinessFile,
|
||||
delegatedIdentificationFile,
|
||||
delegateCertificateFile,
|
||||
delegatedBusinessFile,
|
||||
authorizedBusinessFile,
|
||||
//corporateCertificateFile,
|
||||
identificationCardFile,
|
||||
identificationEvidenceFile,
|
||||
commDeputyCertificateFile,
|
||||
attorneyFile,
|
||||
delegationFile,
|
||||
delegatedBusinessFile,
|
||||
delegatedIdentificationFile,
|
||||
commDeputyIdFile,
|
||||
delegateCertificateFile,
|
||||
commDeputyCertificateFile,
|
||||
// otherBusinessFile,
|
||||
// authorizedBusinessFile,
|
||||
//corporateCertificateFile,
|
||||
// identificationCardFile,
|
||||
adminId,
|
||||
custNm,
|
||||
bRegNo,
|
||||
@@ -114,13 +115,14 @@ const insertNumber2 = (
|
||||
formData.append('communicationFile', communicationFile);
|
||||
formData.append('delegationFile', delegationFile);
|
||||
formData.append('attorneyFile', attorneyFile);
|
||||
formData.append('otherBusinessFile', otherBusinessFile);
|
||||
// formData.append('otherBusinessFile', otherBusinessFile);
|
||||
formData.append('businessFile', businessFile);
|
||||
formData.append('delegatedIdentificationFile', delegatedIdentificationFile);
|
||||
formData.append('delegateCertificateFile', delegateCertificateFile);
|
||||
formData.append('delegatedBusinessFile', delegatedBusinessFile);
|
||||
formData.append('authorizedBusinessFile', authorizedBusinessFile);
|
||||
// formData.append('authorizedBusinessFile', authorizedBusinessFile);
|
||||
//formData.append('corporateCertificateFile', corporateCertificateFile);
|
||||
formData.append('identificationCardFile', identificationCardFile);
|
||||
// formData.append('identificationCardFile', identificationCardFile);
|
||||
formData.append('identificationEvidenceFile', identificationEvidenceFile);
|
||||
formData.append('commDeputyCertificateFile', commDeputyCertificateFile);
|
||||
formData.append('commDeputyIdFile', commDeputyIdFile);
|
||||
|
||||
@@ -231,6 +231,14 @@ public class SendNumMgtService {
|
||||
@Transactional(value="db1TransactionManager")
|
||||
public InsertNumberResDto insertNumber(InsertNumberReqDto insertNumberReqDto, MultipartHttpServletRequest multipartRequest) {
|
||||
|
||||
|
||||
|
||||
Iterator fileNameIter = multipartRequest.getFileNames();
|
||||
while (fileNameIter.hasNext()) {
|
||||
String key = (String)fileNameIter.next();
|
||||
logger.debug("key={}",key);
|
||||
}
|
||||
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
String adminId = insertNumberReqDto.getAdminId();
|
||||
@@ -297,6 +305,7 @@ public class SendNumMgtService {
|
||||
|
||||
// 2. 발신번호등록 테이블 저장. (EZ_SNDRNO_REG)
|
||||
sendNumMgtMapper.insertNumber(insertNumberReqDto);
|
||||
logger.debug("발신번호 저장 성공");
|
||||
|
||||
String yyyyMMdd = DateUtils.date2strYMD();
|
||||
// Path : efs/admin/sendNumDoc/yyyy/mm/
|
||||
@@ -330,153 +339,178 @@ public class SendNumMgtService {
|
||||
}
|
||||
|
||||
// 사업자 인증이 안된 경우 파일업로드...
|
||||
if(!StringUtils.equals(Const.COMM_YES, insertNumberReqDto.getBizrAuthYn())){
|
||||
|
||||
// 4. 발신번호 등록 서류 테이블 저장. (EZ_SNDRNO_DOC)
|
||||
// DOC_NO 채번.
|
||||
// 4. 발신번호 등록 서류 테이블 저장. (EZ_SNDRNO_DOC)
|
||||
// DOC_NO 채번.
|
||||
|
||||
List<MultipartFile> multipartFiles = new ArrayList<>();
|
||||
List<String> docTpCd = new ArrayList<>();
|
||||
if(StringUtils.equals(Const.SNDRNO_TP_CD_SELF, insertNumberReqDto.getNmineeDivCd())) {
|
||||
// 통신서비스이용 증명원 '01'
|
||||
MultipartFile communicationFile = multipartRequest.getFile("communicationFile");
|
||||
multipartFiles.add(communicationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_01);
|
||||
|
||||
// 재직증명서 '02'
|
||||
if(multipartRequest.getFile("tenureFile") != null) {
|
||||
MultipartFile tenureFile = multipartRequest.getFile("tenureFile");
|
||||
multipartFiles.add(tenureFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_02);
|
||||
}
|
||||
|
||||
// 사업자등록증 '06'
|
||||
List<MultipartFile> multipartFiles = new ArrayList<>();
|
||||
List<String> docTpCd = new ArrayList<>();
|
||||
if(StringUtils.equals(Const.SNDRNO_TP_CD_SELF, insertNumberReqDto.getNmineeDivCd())) {
|
||||
// 사업자등록증 '06'
|
||||
if(multipartRequest.getFile("businessFile") != null) {
|
||||
MultipartFile businessFile = multipartRequest.getFile("businessFile");
|
||||
multipartFiles.add(businessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_06);
|
||||
|
||||
// 신분증(본인확인) '13'
|
||||
if(multipartRequest.getFile("identificationCardFile") != null) {
|
||||
MultipartFile identificationCardFile = multipartRequest.getFile("identificationCardFile");
|
||||
multipartFiles.add(identificationCardFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_13);
|
||||
}
|
||||
|
||||
// 재직증명서(본인확인) '14'
|
||||
if(multipartRequest.getFile("identificationEvidenceFile") != null) {
|
||||
MultipartFile identificationEvidenceFile = multipartRequest.getFile("identificationEvidenceFile");
|
||||
multipartFiles.add(identificationEvidenceFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_14);
|
||||
}
|
||||
|
||||
} else if(StringUtils.equals(Const.SNDRNO_TP_CD_OTHER, insertNumberReqDto.getNmineeDivCd())){
|
||||
// 위임-수임사간 관계 확인 문서 '03'
|
||||
MultipartFile delegationFile = multipartRequest.getFile("delegationFile");
|
||||
multipartFiles.add(delegationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_03);
|
||||
}
|
||||
|
||||
// 통신서비스이용 증명원 '01'
|
||||
MultipartFile communicationFile = multipartRequest.getFile("communicationFile");
|
||||
multipartFiles.add(communicationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_01);
|
||||
|
||||
// // 재직증명서 '02'
|
||||
// if(multipartRequest.getFile("tenureFile") != null) {
|
||||
// MultipartFile tenureFile = multipartRequest.getFile("tenureFile");
|
||||
// multipartFiles.add(tenureFile);
|
||||
// docTpCd.add(Const.SNDRNO_DOC_TP_CD_02);
|
||||
// }
|
||||
|
||||
|
||||
// // 신분증(본인확인) '13'
|
||||
// if(multipartRequest.getFile("identificationCardFile") != null) {
|
||||
// MultipartFile identificationCardFile = multipartRequest.getFile("identificationCardFile");
|
||||
// multipartFiles.add(identificationCardFile);
|
||||
// docTpCd.add(Const.SNDRNO_DOC_TP_CD_13);
|
||||
// }
|
||||
|
||||
// 재직증명서(본인확인) '14'
|
||||
if(multipartRequest.getFile("identificationEvidenceFile") != null) {
|
||||
MultipartFile identificationEvidenceFile = multipartRequest.getFile("identificationEvidenceFile");
|
||||
multipartFiles.add(identificationEvidenceFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_14);
|
||||
}
|
||||
|
||||
} else if(StringUtils.equals(Const.SNDRNO_TP_CD_OTHER, insertNumberReqDto.getNmineeDivCd())){
|
||||
logger.debug("타사업자로 온거 맞아?");
|
||||
// 사업자등록증 '06'
|
||||
if(multipartRequest.getFile("businessFile") != null) {
|
||||
MultipartFile businessFile = multipartRequest.getFile("businessFile");
|
||||
logger.debug("businessFile={}",businessFile.getName());
|
||||
multipartFiles.add(businessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_06);
|
||||
}
|
||||
|
||||
// 통신서비스이용 증명원 '01'
|
||||
MultipartFile communicationFile = multipartRequest.getFile("communicationFile");
|
||||
logger.debug("communicationFile={}",communicationFile.getName());
|
||||
multipartFiles.add(communicationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_01);
|
||||
|
||||
// 재직증명서(본인확인) '14'
|
||||
if(multipartRequest.getFile("identificationEvidenceFile") != null) {
|
||||
logger.debug("재직증명서");
|
||||
MultipartFile identificationEvidenceFile = multipartRequest.getFile("identificationEvidenceFile");
|
||||
multipartFiles.add(identificationEvidenceFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_14);
|
||||
}
|
||||
|
||||
// 위임장 '04'
|
||||
MultipartFile attorneyFile = multipartRequest.getFile("attorneyFile");
|
||||
logger.debug("attorneyFile={}",multipartRequest.getFile("attorneyFile"));
|
||||
multipartFiles.add(attorneyFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_04);
|
||||
|
||||
// 위임-수임업체 관계 확인 문서 '03'
|
||||
MultipartFile delegationFile = multipartRequest.getFile("delegationFile");
|
||||
logger.debug("delegationFile={}",delegationFile.getName());
|
||||
multipartFiles.add(delegationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_03);
|
||||
|
||||
// 위임장 '04'
|
||||
MultipartFile attorneyFile = multipartRequest.getFile("attorneyFile");
|
||||
multipartFiles.add(attorneyFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_04);
|
||||
// 위임업체 사업자등록증 '10'
|
||||
MultipartFile delegatedBusinessFile = multipartRequest.getFile("delegatedBusinessFile");
|
||||
logger.debug("delegatedBusinessFile={}",delegatedBusinessFile.getName());
|
||||
multipartFiles.add(delegatedBusinessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_10);
|
||||
|
||||
// 법인인감증명서 '12'
|
||||
|
||||
// 위임사 신분증(임직원 신청시) '08'
|
||||
if(multipartRequest.getFile("delegatedIdentificationFile") != null) {
|
||||
logger.debug("위임사 신분증(임직원 신청시)");
|
||||
MultipartFile delegatedIdentificationFile = multipartRequest.getFile("delegatedIdentificationFile");
|
||||
multipartFiles.add(delegatedIdentificationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_08);
|
||||
}
|
||||
|
||||
// 수임사 대리인 재직증명서(임직원 신청시) '15'
|
||||
if(multipartRequest.getFile("commDeputyCertificateFile") != null) {
|
||||
logger.debug("수임사 대리인 재직증명서(임직원 신청시)");
|
||||
MultipartFile commDeputyCertificateFile = multipartRequest.getFile("commDeputyCertificateFile");
|
||||
multipartFiles.add(commDeputyCertificateFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_15);
|
||||
}
|
||||
|
||||
// 위임사 재직증명서(임직원 신청시) '09'
|
||||
if(multipartRequest.getFile("delegateCertificateFile") != null) {
|
||||
logger.debug("위임사 재직증명서(임직원 신청시)");
|
||||
MultipartFile delegateCertificateFile = multipartRequest.getFile("delegateCertificateFile");
|
||||
multipartFiles.add(delegateCertificateFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_09);
|
||||
}
|
||||
|
||||
// 수임사 대리인 신분증(임직원 신청시) '16'
|
||||
if(multipartRequest.getFile("commDeputyIdFile") != null) {
|
||||
logger.debug("수임사 대리인 신분증(임직원 신청시)");
|
||||
MultipartFile commDeputyIdFile = multipartRequest.getFile("commDeputyIdFile");
|
||||
multipartFiles.add(commDeputyIdFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_16);
|
||||
}
|
||||
|
||||
// 사업자등록증(타사) '07'
|
||||
// MultipartFile otherBusinessFile = multipartRequest.getFile("otherBusinessFile");
|
||||
// multipartFiles.add(otherBusinessFile);
|
||||
// docTpCd.add(Const.SNDRNO_DOC_TP_CD_07);
|
||||
|
||||
// 신분증(본인확인) '13'
|
||||
// if(multipartRequest.getFile("identificationCardFile") != null) {
|
||||
// MultipartFile identificationCardFile = multipartRequest.getFile("identificationCardFile");
|
||||
// multipartFiles.add(identificationCardFile);
|
||||
// docTpCd.add(Const.SNDRNO_DOC_TP_CD_13);
|
||||
// }
|
||||
// 법인인감증명서 '12'
|
||||
// MultipartFile corporateCertificateFile = multipartRequest.getFile("corporateCertificateFile");
|
||||
// multipartFiles.add(corporateCertificateFile);
|
||||
// docTpCd.add(Const.SNDRNO_DOC_TP_CD_12);
|
||||
|
||||
// 위임사 사업자등록증 '10'
|
||||
MultipartFile delegatedBusinessFile = multipartRequest.getFile("delegatedBusinessFile");
|
||||
multipartFiles.add(delegatedBusinessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_10);
|
||||
|
||||
// 수임사 사업자등록증 '11'
|
||||
MultipartFile authorizedBusinessFile = multipartRequest.getFile("authorizedBusinessFile");
|
||||
multipartFiles.add(authorizedBusinessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_11);
|
||||
|
||||
// 통신서비스이용 증명원 '01'
|
||||
if(multipartRequest.getFile("communicationFile") != null) {
|
||||
MultipartFile communicationFile = multipartRequest.getFile("communicationFile");
|
||||
multipartFiles.add(communicationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_01);
|
||||
}
|
||||
|
||||
// 위임사 재직증명서(임직원 신청시) '09'
|
||||
if(multipartRequest.getFile("delegateCertificateFile") != null) {
|
||||
MultipartFile delegateCertificateFile = multipartRequest.getFile("delegateCertificateFile");
|
||||
multipartFiles.add(delegateCertificateFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_09);
|
||||
}
|
||||
|
||||
// 위임사 신분증(임직원 신청시) '08'
|
||||
if(multipartRequest.getFile("delegatedIdentificationFile") != null) {
|
||||
MultipartFile delegatedIdentificationFile = multipartRequest.getFile("delegatedIdentificationFile");
|
||||
multipartFiles.add(delegatedIdentificationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_08);
|
||||
}
|
||||
|
||||
// 사업자등록증(타사) '07'
|
||||
MultipartFile otherBusinessFile = multipartRequest.getFile("otherBusinessFile");
|
||||
multipartFiles.add(otherBusinessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_07);
|
||||
|
||||
// 신분증(본인확인) '13'
|
||||
if(multipartRequest.getFile("identificationCardFile") != null) {
|
||||
MultipartFile identificationCardFile = multipartRequest.getFile("identificationCardFile");
|
||||
multipartFiles.add(identificationCardFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_13);
|
||||
}
|
||||
|
||||
// 재직증명서(본인확인) '14'
|
||||
if(multipartRequest.getFile("identificationEvidenceFile") != null) {
|
||||
MultipartFile identificationEvidenceFile = multipartRequest.getFile("identificationEvidenceFile");
|
||||
multipartFiles.add(identificationEvidenceFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_14);
|
||||
}
|
||||
|
||||
// 수임사 대리인 재직증명서(임직원 신청시) '15'
|
||||
if(multipartRequest.getFile("commDeputyCertificateFile") != null) {
|
||||
MultipartFile commDeputyCertificateFile = multipartRequest.getFile("commDeputyCertificateFile");
|
||||
multipartFiles.add(commDeputyCertificateFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_15);
|
||||
}
|
||||
|
||||
// 수임사 대리인 신분증(임직원 신청시) '16'
|
||||
if(multipartRequest.getFile("commDeputyIdFile") != null) {
|
||||
MultipartFile commDeputyIdFile = multipartRequest.getFile("commDeputyIdFile");
|
||||
multipartFiles.add(commDeputyIdFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_16);
|
||||
}
|
||||
}
|
||||
|
||||
// 파일 업로드 및 테이블 저장 (등록 서류 관련).
|
||||
for(int j=0; j<multipartFiles.size(); j++){
|
||||
// DOC FILE UPLOAD.
|
||||
String ext = FileIoUtils.getExtension(multipartFiles.get(j).getOriginalFilename());
|
||||
// File Nm : [reg_req_no]_[doc_no]_[doc_tp_cd].확장자
|
||||
String fileNm = regReqNo + "_" + ("" + Integer.parseInt(docTpCd.get(j))) + "_" + docTpCd.get(j) + "." + ext;
|
||||
String titleNm = multipartFiles.get(j).getOriginalFilename();
|
||||
long fileSize = multipartFiles.get(j).getSize();
|
||||
|
||||
|
||||
// File Upload.
|
||||
FileUtil.upload(multipartFiles.get(j), fileNm, path);
|
||||
|
||||
// 발신번호 등록 서류 테이블 저장 (EZ_SNDRNO_DOC).
|
||||
InsertNumberFile insertFile = new InsertNumberFile();
|
||||
insertFile.setRegReqNo(regReqNo);
|
||||
insertFile.setDocNo("" + Integer.parseInt(docTpCd.get(j)));
|
||||
//insertFile.setDocNo(docTpCd.get(j).substring(1,2));
|
||||
insertFile.setDocTpCd(docTpCd.get(j));
|
||||
insertFile.setDocTitle(titleNm);
|
||||
insertFile.setFileNm(fileNm);
|
||||
insertFile.setFilePath(path);
|
||||
insertFile.setFileSize(fileSize);
|
||||
insertFile.setRegId(regId);
|
||||
sendNumMgtMapper.insertNumberDoc(insertFile);
|
||||
}
|
||||
|
||||
|
||||
// // 수임사 사업자등록증 '11'
|
||||
// MultipartFile authorizedBusinessFile = multipartRequest.getFile("authorizedBusinessFile");
|
||||
// multipartFiles.add(authorizedBusinessFile);
|
||||
// docTpCd.add(Const.SNDRNO_DOC_TP_CD_11);
|
||||
}
|
||||
|
||||
|
||||
// 파일 업로드 및 테이블 저장 (등록 서류 관련).
|
||||
for(int j=0; j<multipartFiles.size(); j++) {
|
||||
logger.debug("********들어왔나 내용확인만 하자.몇번째={},내용={}",j,multipartFiles.get(j).getOriginalFilename());
|
||||
}
|
||||
|
||||
for(int j=0; j<multipartFiles.size(); j++){
|
||||
logger.debug("왜 for문 안돌아?몇번째={},내용={}",j,multipartFiles.get(j).getOriginalFilename());
|
||||
// DOC FILE UPLOAD.
|
||||
String ext = FileIoUtils.getExtension(multipartFiles.get(j).getOriginalFilename());
|
||||
// File Nm : [reg_req_no]_[doc_no]_[doc_tp_cd].확장자
|
||||
String fileNm = regReqNo + "_" + ("" + Integer.parseInt(docTpCd.get(j))) + "_" + docTpCd.get(j) + "." + ext;
|
||||
String titleNm = multipartFiles.get(j).getOriginalFilename();
|
||||
long fileSize = multipartFiles.get(j).getSize();
|
||||
|
||||
|
||||
// File Upload.
|
||||
FileUtil.upload(multipartFiles.get(j), fileNm, path);
|
||||
|
||||
// 발신번호 등록 서류 테이블 저장 (EZ_SNDRNO_DOC).
|
||||
InsertNumberFile insertFile = new InsertNumberFile();
|
||||
insertFile.setRegReqNo(regReqNo);
|
||||
insertFile.setDocNo("" + Integer.parseInt(docTpCd.get(j)));
|
||||
//insertFile.setDocNo(docTpCd.get(j).substring(1,2));
|
||||
insertFile.setDocTpCd(docTpCd.get(j));
|
||||
insertFile.setDocTitle(titleNm);
|
||||
insertFile.setFileNm(fileNm);
|
||||
insertFile.setFilePath(path);
|
||||
insertFile.setFileSize(fileSize);
|
||||
insertFile.setRegId(regId);
|
||||
sendNumMgtMapper.insertNumberDoc(insertFile);
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user