수정건 수정

This commit is contained in:
USER
2022-09-01 16:54:21 +09:00
parent 648a16ad4f
commit 8dcd9365b6
15 changed files with 216 additions and 33 deletions

View File

@@ -176,7 +176,8 @@ export default {
{
name: 'prodNm', header: '요금제', align: 'center', width: '160px'
, formatter: props => {
let result = "<p>" + props.prodNm + "</p>\n<p>(" + props.prodAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + ")</p>";
//let result = "<p>" + props.prodNm + "</p>\n<p>(" + props.prodAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + ")</p>";
let result = "<p>" + props.prodNm + "</p>";
return result;
}
},

View File

@@ -3,7 +3,7 @@
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">알림톡 템플릿 목록 조회</h3>
<h3 class="title">알림톡 템플릿 관리</h3>
<p class="breadcrumb">채널관리 &gt; 알림톡 템플릿 관리</p>
</div>
<div class="search_wrap">

View File

@@ -178,8 +178,11 @@ export default {
if(fileExpend != "xlsx"){
//alert("파일은 (xlsx) 형식만 등록 가능합니다.");
this.row.title = '파일 업로드';
this.row.msg1 = '샘플과 동일한 확장자가 아닙니다.';
this.row.msg1 = '다시 업로드 해주세요.';
this.row.msg1 = '업로드 할 수 없는 파일 형식입니다.';
this.row.msg2 = '샘플 파일을 내려 받아 사용해주세요.';
// this.row.msg1 = '샘플과 동일한 확장자가 아닙니다.';
// this.row.msg1 = '다시 업로드 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -205,26 +208,60 @@ export default {
this.row.msg1 = '파일을 읽는 동안 에러가 발생 했습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
};
reader.onloadend = (e) => {
};
// reader.onloadend = (e) => {
// };
reader.onload = (e) => {
let data = reader.result;
let workbook = XLSX.read(data, {type: 'binary'});
/** header 규격 비교 start */
var readHeader = vm.get_header_row(workbook.Sheets["Sheet1"]);
var headersArr = [];
var excelHeaders = this.excelHeader[0];
for(var i=0; i < excelHeaders.length; i++){
var headerCol = excelHeaders[i];
headersArr.push(headerCol.name);
}
if(readHeader.length == headersArr.length){
for(var i=0; i<readHeader.length; i++){
if(readHeader[i] != headersArr[i]){
this.$refs.file.value = null;
let element = document.getElementById('uploadFile');
while (element.firstChild) {
element.removeChild(element.firstChild);
}
this.row.title = '청약고객관리';
this.row.msg1 = '규격이 다른 파일 입니다.';
this.row.msg1 = '샘플파일을 다운로드 받아 업로드 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}
}else{
this.row.title = '청약고객관리';
this.row.msg1 = '규격이 다른 파일 입니다.';
this.row.msg1 = '샘플파일을 다운로드 받아 업로드 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
/** header 규격 비교 end */
workbook.SheetNames.forEach((sheetName) => {
const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], {raw: true});
tmpResult = rowObj;
tmpResult = rowObj;
const limitCnt = 100;
this.totalCnt = Number(this.totalItems) + rowObj.length;
this.insertRowCnt = rowObj.length;
this.insertRowCnt = rowObj.length;
if (this.totalCnt > limitCnt) {
this.row.title = '청약고객관리';
this.row.msg1 = '100건이상은 등록되지 않습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
for (const [idx, r] of rowObj.entries()) {
if (idx > limitCnt - 1) {
break;
@@ -235,7 +272,7 @@ export default {
휴대폰번호 = '' + (vm.isNull(휴대폰번호) ? '' : 휴대폰번호);
이메일 = '' + (vm.isNull(이메일) ? '' : 이메일);
ID잠금 = '' + (vm.isNull(ID잠금) ? '' : ID잠금);
// 휴대폰번호=''+휴대폰번호;
if (!vm.isMobile(휴대폰번호)) {
if (vm.isMobile2(휴대폰번호)) {
@@ -243,7 +280,7 @@ export default {
}
}
let {retVal, msg} = vm.validXlxs({ID, 이름, 휴대폰번호, 이메일, ID잠금});
let {retVal, msg} = vm.validXlxs({ID, 이름, 휴대폰번호, 이메일, ID잠금});
if (retVal) {
const pVal = [
{name: '이름', val: 이름, len: 20},
@@ -265,6 +302,23 @@ export default {
};
reader.readAsBinaryString(file);
},
// sheet에서 header만 읽어 오기
get_header_row(sheet) {
var headers = [];
var range = XLSX.utils.decode_range(sheet['!ref']);
var C, R = range.s.r; /* start in the first row */
/* walk every column in the range */
for(C = range.s.c; C <= range.e.c; ++C) {
var cell = sheet[XLSX.utils.encode_cell({c:C, r:R})] /* find the cell in the first row */
var hdr = "UNKNOWN " + C; // <-- replace with your desired default
if(cell && cell.t) hdr = XLSX.utils.format_cell(cell);
headers.push(hdr);
}
return headers;
},
validXlxs({이름, 휴대폰번호, 이메일}) {
if (this.isNull(이름)) {
return {retVal: false, msg: '이름 누락'};
@@ -311,6 +365,16 @@ export default {
this.row.adminId = this.adminId;
this.row.list = this.nData;
// 대량 ID 등록시 파일 여부 체크
let element = document.getElementById('uploadFile');
if(element.firstChild == null){
this.row.title = '청약고객 관리';
this.row.msg1 = '업로드 파일이 없습니다.';
this.row.msg2 = '파일을 업로드 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
try {
const response = await custMgtApi.insertMassUser(this.row);
const result = response.data;

View File

@@ -106,10 +106,32 @@ export default {
}
},
//사용자ID 생성 Confirm
memberInsertConfirm() {
async memberInsertConfirm() {
// confirm 팝업 노출
if (this.doValidate()) {
this.$refs.validationConfirmModalPop.confirmInsertOpen()
// ID 중복체크
try{
this.row.adminId = this.adminId;
this.row.userId = this.userId;
this.row.userNm = this.userNm;
this.row.userEmail = this.email;
this.row.mdn = this.mdn;
this.row.userStat = this.stat;
const response = await custMgtApi.duplicateCheckUserId(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.$refs.validationConfirmModalPop.confirmInsertOpen();
} else if (result != null && result.retCode == "4018") {
// 이미 사용중인 ID
this.row.title = '청약고객관리';
this.row.msg1 = '중복된 아이디가 있습니다.';
this.row.msg2 = '아이디를 다시 확인하여 등록 부탁드립니다.';
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
}
}catch(err){
}
}
},
//사용자ID 수정 처리

View File

@@ -48,6 +48,11 @@ const insertUser = (params) => {
return httpClient.post('/api/v1/bo/custMgt/insertUser', params);
}
// 사용자 ID 중복 체크
const duplicateCheckUserId = (params) => {
return httpClient.post('/api/v1/bo/custMgt/duplicateCheckUserId', params);
}
// 사용자 ID 수정
const updateUser = (params) => {
return httpClient.post('/api/v1/bo/custMgt/updateUser', params);
@@ -117,4 +122,5 @@ export default {
updateAdminInfoTotal,
deleteMemo,
insertTestId,
duplicateCheckUserId,
}

View File

@@ -130,6 +130,7 @@ export default {
blckRsnCd: '',
blckYn: '',
sndblckTpCd: '',
isFirst:true,
options: [
{text: '20', value: 20},
{text: '50', value: 50},
@@ -137,7 +138,7 @@ export default {
],
grid: {
url: '/api/v1/bo/riskMgt/sendNum/intrcpList',
pagePerRows: 50,
pagePerRows: 20,
//perPage: 50,
pagination: true,
isCheckbox: false,
@@ -177,7 +178,9 @@ export default {
blckYn: '',
sndblckTpCd: '',
sndblckTpNm: '',
blckSndrno: ''
blckSndrno: '',
pagePerRows: '',
page: ''
},
excelHeader: []
}
@@ -217,8 +220,13 @@ export default {
this.grid.params.blckYn = this.blckYn
this.grid.params.sndblckTpCd = this.sndblckTpCd
if(this.isFirst){
this.grid.pagePerRows = 50
}
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
this.isFirst=false;
},
changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
@@ -232,7 +240,6 @@ export default {
params: this.grid.params
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
},
setCodeData() {
// 상태 옵션 셋팅.

View File

@@ -51,6 +51,7 @@
<input type="text" placeholder="발신번호명" v-model="numberInput.sendNm" maxlength="20">
<input type="text" placeholder="발신번호(숫자만입력)" v-model="numberInput.sendNum" @keypress="onlyNum"
@input="onlyNum" maxlength="11">
<button class="button white" @click="delNumberInput">삭제</button>
</div>
</div>
</td>
@@ -272,11 +273,15 @@ export default {
this.custSeq = data.custSeq
},
addNumberInput() {
if(this.numberInputs.length == 9){
return false;
}
this.numberInputs.push({
sendNm: '',
sendNum: ''
})
},
delNumberInput(index) {
this.numberInputs.splice(index, 1)
},
@@ -742,6 +747,8 @@ export default {
}
this.otherBusinessFile = null;
},
/** 저장 */
async saveSendNum() {
this.saveSendNums = []
this.saveSendNums.push({
@@ -797,6 +804,7 @@ export default {
}
} else if (this.nmineeDivCd === '02') {
// 타사업자
const response = await sendNumMgtApi.insertNumber2(this.communicationFile, this.delegationFile, this.attorneyFile, this.otherBusinessFile ,this.delegatedIdentificationFile, this.delegateCertificateFile, this.delegatedBusinessFile, this.authorizedBusinessFile, this.corporateCertificateFile, this.identificationCardFile, this.identificationEvidenceFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq, this.bRegNo)
const result = response.data;

View File

@@ -3,8 +3,8 @@
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">문자 발신 번호 목록 조회</h3>
<p class="breadcrumb">발신번호관리 &gt; 문자 발신 번호 목록 조회</p>
<h3 class="title">문자 발신 번호 관리</h3>
<p class="breadcrumb">발신번호관리 &gt; 문자 발신 번호 관리</p>
</div>
<div class="search_wrap">
<div class="group">

View File

@@ -27,12 +27,12 @@
<div class="input_box id">
<label for="id1" class="label">ID</label>
<input type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
@keyup.enter="search"/>
@keyup.enter="search" :readonly="!isFocused" @focus="isFocused = true" @blur="isFocused = false"/>
</div>
<div class="input_box">
<label for="name" class="label">이름(대리점명)</label>
<input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.searchText2"
@keyup.enter="search"/>
@keyup.enter="search" :readonly="!isFocused" @focus="isFocused = true" @blur="isFocused = false"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
@@ -101,6 +101,7 @@ export default {
name: 'adminList',
data() {
return {
isFocused: false,
row: {},
authType: [],
statType: [],
@@ -172,6 +173,7 @@ export default {
isKeep = true;
}
this.search(isKeep);
},
methods: {
search: function (isKeep) {
@@ -224,18 +226,20 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
},
async setCodeData() {
// 상태 옵션 셋팅.
api.commCode({'grpCd': 'ADM_STTUS_CD'}).then(response => {
this.statType = response.data.dat.a.list;
});
// api.commAuth().then(response => {
// this.authType = response.data.data.list;
// });
// 상태
try {
const res = await api.commCode({'grpCd': 'ADM_STTUS_CD'});
if(res.data.retCode == '0000'){
this.statType = res.data.data.list;
}
}catch(err){
}
// 권한
try {
const response = await api.commAuth();
if(response.data.retCode == '0000'){
this.authType = response.data.datalist;
this.authType = response.data.data.list;
}
}catch(err){

View File

@@ -458,5 +458,23 @@ public class CustMgtController {
}
return custService.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
}
/**
* date : 2022. 8. 31.
* auth : ckr
* desc : 사용자 ID 중복 체크
* @param paramMap
* @return
* @
*/
@RequestMapping(value = "/duplicateCheckUserId" , method = {RequestMethod.POST})
@ResponseBody
public InsertUserResDto duplicateCheckUserId(@RequestBody @Valid InsertUserReqDto insertUserReqDto, BindingResult bindingResult) {
if(validComponents.validParameter(bindingResult)) {
return new InsertUserResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return custService.duplicateCheckUserId(insertUserReqDto);
}
}

View File

@@ -959,5 +959,27 @@ public class CustMgtService {
return new UpdateAdminInfoTotalResDto(ApiResponseCode.SUCCESS);
}
/**
* date : 2022. 8. 31.
* auth : ckr
* desc : 사용자 ID 중복체크
*
* @param insertUserReqDto
* @return
*/
public InsertUserResDto duplicateCheckUserId(InsertUserReqDto insertUserReqDto) {
CustMgtMapper custMgtMapper = sqlSessionSlave.getMapper(CustMgtMapper.class);
String userId = insertUserReqDto.getUserId();
int userCnt = 0;
userCnt = custMgtMapper.getUserIdCount(userId);
if (userCnt > 0) {
logger.debug("사용자 ID 중복 : {}",userId);
return new InsertUserResDto(ApiResponseCode.CE_DUPLICATE_ID);
}
return new InsertUserResDto(ApiResponseCode.SUCCESS);
}
}

View File

@@ -4,6 +4,8 @@ import kr.co.uplus.ez.api.riskMgt.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.Const;
import kr.co.uplus.ez.common.data.Paging;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -17,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@Service
public class RiskMgtService {
@@ -60,7 +63,7 @@ public class RiskMgtService {
int page = sendNumIntrcpListReqDto.getPage();
int pagePerRows = sendNumIntrcpListReqDto.getPagePerRows();
page = (page - 1) * pagePerRows;
page = (page - 1) * pagePerRows;
sendNumIntrcpListReqDto.setPage(page);
List<SendNumIntrcpList> sendNumIntrcpListList = riskMgtMapper.selectSndrnoBlckList(sendNumIntrcpListReqDto);

View File

@@ -58,4 +58,6 @@ interface SendNumMgtMapper {
int updateSvcUser(UpdateApprReqDto updateApprReqDto);
InsertNumberFile selectDownload(InsertNumberFile insertNumberFile);
List<InsertNumber> selectSndrnoListAll(InsertNumberReqDto insertNumberReqDto);
}

View File

@@ -206,11 +206,24 @@ public class SendNumMgtService {
String regId = userDetails.getUsername();
// 2. 중복 발신번호 체크를 위한 조회.
List<InsertNumber> dbSendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
List<InsertNumber> dbSendNumbers = null;
List<InsertNumber> sendNumbers = insertNumberReqDto.getList();
List<InsertNumber> allSendNumbers = insertNumberReqDto.getList();
List<InsertNumber> duplicateSendNumList = new ArrayList<>();
String nmineeDivCd = insertNumberReqDto.getNmineeDivCd();
if(StringUtils.equals(nmineeDivCd, "01")) {
// 사업자 - 발신 번호 전체 중복 체크
dbSendNumbers = sendNumMgtMapper.selectSndrnoListAll(insertNumberReqDto);
}else {
// 타사업자 - 해당 사업자 발신 번호 한해서만 중복 체크
dbSendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
}
// List<InsertNumber> dbSendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
// List<InsertNumber> sendNumbers = insertNumberReqDto.getList();
// List<InsertNumber> allSendNumbers = insertNumberReqDto.getList();
// List<InsertNumber> duplicateSendNumList = new ArrayList<>();
for (int i=0; i<dbSendNumbers.size(); i++){
for (int j=0; j<sendNumbers.size(); j++){
String dbSendNum = dbSendNumbers.get(i).getSendNum();

View File

@@ -248,6 +248,19 @@
</foreach>
</select>
<select id="selectSndrnoListAll" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumber">
/* sendNumMgt-mapper.xml(selectSndrnoListAll) */
SELECT
SNDRNO AS sendNum
FROM
hubez_common.EZ_SVC_SNDRNO
WHERE 1=1
AND SNDRNO IN
<foreach collection="list" item="item" index="i" open="(" separator="," close=")">
#{item.sendNum}
</foreach>
</select>
<select id="selectRegReqNo" resultType="String">
SELECT CONCAT(DATE_FORMAT(NOW(), '%Y%m'), LPAD(hubez_common.FUN_NEXT_SEQ('SNDRNO_REG_SEQ'), 7, '0')) AS REG_REQ_NO
</select>