mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:16:34 +09:00
TC 수정 반영
This commit is contained in:
@@ -106,6 +106,11 @@ public class RiskMgtService {
|
||||
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
|
||||
|
||||
SendNumIntrcpDetail sendNumIntrcpDetail = riskMgtMapper.selectSndrnoBlckDetail(insertIntrcpReqDto.getBlckSndrno());
|
||||
if(sendNumIntrcpDetail != null){
|
||||
return new SendNumInsertIntrcpResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
||||
}
|
||||
|
||||
try {
|
||||
insertIntrcpReqDto.setBlckYn(Const.COMM_YES);
|
||||
// regId 들고오기
|
||||
|
||||
@@ -12,13 +12,17 @@ import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class SendNumMgtService {
|
||||
@@ -46,28 +50,30 @@ public class SendNumMgtService {
|
||||
int totalCnt = sendNumMgtMapper.selectProfileTotalCnt(profileListReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
ProfileListRes profileListRes = new ProfileListRes();
|
||||
profileListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
ProfileListRes profileListRes = new ProfileListRes();
|
||||
profileListRes.setList(new ArrayList<>());
|
||||
profileListRes.setPaging(paging);
|
||||
|
||||
return new ProfileListResDto(ApiResponseCode.CM_NOT_FOUND, profileListRes);
|
||||
}
|
||||
|
||||
int page = profileListReqDto.getPage();
|
||||
int pagePerRows = profileListReqDto.getPage();
|
||||
int pagePerRows = profileListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
profileListReqDto.setPage(page);
|
||||
|
||||
List<ProfileInfo> profileInfos = sendNumMgtMapper.selectProfileList(profileListReqDto);
|
||||
|
||||
ProfileListRes profileListRes = new ProfileListRes();
|
||||
profileListRes.setList(profileInfos);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
ProfileListRes profileListRes = new ProfileListRes();
|
||||
profileListRes.setList(profileInfos);
|
||||
profileListRes.setPaging(paging);
|
||||
|
||||
return new ProfileListResDto(ApiResponseCode.SUCCESS, profileListRes);
|
||||
@@ -88,28 +94,30 @@ public class SendNumMgtService {
|
||||
int totalCnt = sendNumMgtMapper.selectSendNumberTotalCnt(sendNumberListReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
|
||||
SendNumberListRes sendNumberListRes = new SendNumberListRes();
|
||||
sendNumberListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
SendNumberListRes sendNumberListRes = new SendNumberListRes();
|
||||
sendNumberListRes.setList(new ArrayList<>());
|
||||
sendNumberListRes.setPaging(paging);
|
||||
return new SendNumberListResDto(ApiResponseCode.CM_NOT_FOUND, sendNumberListRes);
|
||||
}
|
||||
|
||||
int page = sendNumberListReqDto.getPage();
|
||||
int pagePerRows = sendNumberListReqDto.getPage();
|
||||
int pagePerRows = sendNumberListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
sendNumberListReqDto.setPage(page);
|
||||
|
||||
List<SendNumberInfo> sendNumberInfos = sendNumMgtMapper.selectSendNumberList(sendNumberListReqDto);
|
||||
|
||||
SendNumberListRes sendNumberListRes = new SendNumberListRes();
|
||||
sendNumberListRes.setList(sendNumberInfos);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
SendNumberListRes sendNumberListRes = new SendNumberListRes();
|
||||
sendNumberListRes.setList(sendNumberInfos);
|
||||
sendNumberListRes.setPaging(paging);
|
||||
|
||||
return new SendNumberListResDto(ApiResponseCode.SUCCESS, sendNumberListRes);
|
||||
@@ -142,32 +150,36 @@ public class SendNumMgtService {
|
||||
* @param insertNumberReqDto
|
||||
* @return
|
||||
*/
|
||||
@Transactional(value="db1TransactionManager")
|
||||
public InsertNumberResDto insertNumber(InsertNumberReqDto insertNumberReqDto, MultipartHttpServletRequest multipartRequest) {
|
||||
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
String adminId = insertNumberReqDto.getAdminId();
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
// 2. 중복 발신번호 체크를 위한 조회.
|
||||
List<InsertNumber> sendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
|
||||
List<InsertNumber> resSendNumbers = new ArrayList<>();
|
||||
List<InsertNumber> dbSendNumbers = insertNumberReqDto.getList();
|
||||
|
||||
List<InsertNumber> allSendNumbers = insertNumberReqDto.getList();
|
||||
|
||||
if(insertNumberReqDto.getList().size() == sendNumbers.size()){
|
||||
// 중복건... 오류
|
||||
}
|
||||
// 실패 항목 응답.
|
||||
if(sendNumbers.size() > 0){
|
||||
// 중복건의 대한 오류 응답.
|
||||
resSendNumbers.addAll(sendNumbers);
|
||||
allSendNumbers.addAll(sendNumbers);
|
||||
}
|
||||
|
||||
dbSendNumbers = allSendNumbers.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
// 1. 발신번호 SEQ 채번
|
||||
String regReqNo = sendNumMgtMapper.selectRegReqNo();
|
||||
String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId);
|
||||
try {
|
||||
insertNumberReqDto.setUserSeq(userSeq);
|
||||
insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size());
|
||||
insertNumberReqDto.setRegId(adminId);
|
||||
insertNumberReqDto.setRegId(regId);
|
||||
insertNumberReqDto.setRegReqNo(regReqNo);
|
||||
|
||||
// 2. 발신번호등록 테이블 저장. (EZ_SNDRNO_REG)
|
||||
@@ -181,18 +193,7 @@ public class SendNumMgtService {
|
||||
dir.mkdirs();
|
||||
}
|
||||
|
||||
// 3. 발신번호 테이블 저장. (EZ_SVC_SNDRNO)
|
||||
List<InsertNumber> reqSendNumbers = insertNumberReqDto.getList();
|
||||
List<InsertNumber> dbSendNumbers = new ArrayList<>();
|
||||
for(InsertNumber insertNumber: reqSendNumbers){
|
||||
for(InsertNumber insertNumber1: resSendNumbers){
|
||||
if(StringUtils.equals(insertNumber.getSendNum(), insertNumber1.getSendNum())){
|
||||
reqSendNumbers.remove(insertNumber1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (InsertNumber dbInsertNumber : reqSendNumbers){
|
||||
for (InsertNumber dbInsertNumber : dbSendNumbers){
|
||||
dbInsertNumber.setCustSeq(insertNumberReqDto.getCustSeq());
|
||||
dbInsertNumber.setRegReqNo(regReqNo);
|
||||
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
|
||||
@@ -202,7 +203,7 @@ public class SendNumMgtService {
|
||||
}else{
|
||||
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
|
||||
}
|
||||
dbInsertNumber.setRegId(adminId);
|
||||
dbInsertNumber.setRegId(regId);
|
||||
sendNumMgtMapper.insertNumberList(dbInsertNumber);
|
||||
}
|
||||
|
||||
@@ -211,7 +212,6 @@ public class SendNumMgtService {
|
||||
|
||||
// 4. 발신번호 등록 서류 테이블 저장. (EZ_SNDRNO_DOC)
|
||||
// DOC_NO 채번.
|
||||
String regId = insertNumberReqDto.getRegId();
|
||||
|
||||
List<MultipartFile> multipartFiles = new ArrayList<>();
|
||||
List<String> docTpCd = new ArrayList<>();
|
||||
@@ -225,12 +225,13 @@ public class SendNumMgtService {
|
||||
MultipartFile tenureFile = multipartRequest.getFile("tenureFile");
|
||||
multipartFiles.add(tenureFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_02);
|
||||
|
||||
// 사업자등록증 '06'
|
||||
MultipartFile businessFile = multipartRequest.getFile("businessFile");
|
||||
multipartFiles.add(businessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_06);
|
||||
|
||||
if(StringUtils.equals("02", insertNumberReqDto.getNmineeDivCd())){
|
||||
if(StringUtils.equals(Const.SNDRNO_TP_CD_OTHER, insertNumberReqDto.getNmineeDivCd())){
|
||||
// 위임-수임관계 확인 서류 '03'
|
||||
MultipartFile trustFile = multipartRequest.getFile("trustFile");
|
||||
multipartFiles.add(trustFile);
|
||||
@@ -257,6 +258,8 @@ public class SendNumMgtService {
|
||||
String fileNm = regReqNo + "_" + docTpCd.get(j).substring(1,2) + "_" + 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).
|
||||
@@ -277,9 +280,9 @@ public class SendNumMgtService {
|
||||
}
|
||||
|
||||
InsertNumberRes insertNumberRes = new InsertNumberRes();
|
||||
if(resSendNumbers.size() > 0){
|
||||
if(sendNumbers.size() > 0){
|
||||
// 발신번호 중복건 응답 처리.
|
||||
insertNumberRes.setList(resSendNumbers);
|
||||
insertNumberRes.setList(sendNumbers);
|
||||
}
|
||||
|
||||
return new InsertNumberResDto(ApiResponseCode.SUCCESS, insertNumberRes);
|
||||
@@ -354,28 +357,30 @@ public class SendNumMgtService {
|
||||
int totalCnt = sendNumMgtMapper.selectSvcSndrnoListTotalCnt(sendNumberApprListReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
|
||||
sendNumberApprListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
|
||||
sendNumberApprListRes.setList(new ArrayList<>());
|
||||
sendNumberApprListRes.setPaging(paging);
|
||||
|
||||
return new SendNumberApprListResDto(ApiResponseCode.CM_NOT_FOUND, sendNumberApprListRes);
|
||||
}
|
||||
|
||||
int page = sendNumberApprListReqDto.getPage();
|
||||
int pagePerRows = sendNumberApprListReqDto.getPage();
|
||||
int pagePerRows = sendNumberApprListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
sendNumberApprListReqDto.setPage(page);
|
||||
|
||||
List<SendNumberApprInfo> sendNumberApprInfos = sendNumMgtMapper.selectSvcSndrnoList(sendNumberApprListReqDto);
|
||||
|
||||
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
|
||||
sendNumberApprListRes.setList(sendNumberApprInfos);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
|
||||
sendNumberApprListRes.setList(sendNumberApprInfos);
|
||||
sendNumberApprListRes.setPaging(paging);
|
||||
|
||||
return new SendNumberApprListResDto(ApiResponseCode.SUCCESS, sendNumberApprListRes);
|
||||
|
||||
@@ -1,27 +1,11 @@
|
||||
package kr.co.uplus.ez.api.sysMgt;
|
||||
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AdminDetail;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AdminDetailReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AdminInfo;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AdminListReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AuthDetail;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AuthDetailReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AuthInfo;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AuthMenu;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.DeleteAdmin;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.DeleteAuthReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.InsertAdminReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.InsertAuthReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.SearchMadangId;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.SearchMadangIdReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.UpdateAdminReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.UpdateAuthReqDto;
|
||||
|
||||
@Mapper
|
||||
public interface SysMgtMapper {
|
||||
|
||||
@@ -58,4 +42,6 @@ public interface SysMgtMapper {
|
||||
int deleteAuth(Map<String, Object> paramMap); // 권한 삭제
|
||||
|
||||
int deleteAuthMenu(Map<String, Object> paramMap); // 권한메뉴 삭제
|
||||
|
||||
int checkAdmin(Map<String, Object> paramMap);
|
||||
}
|
||||
@@ -108,6 +108,15 @@ public class SysMgtService {
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionMaster.getMapper(SysMgtMapper.class);
|
||||
|
||||
// 관리자 ID 중복체크.
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("searchType", "01");
|
||||
paramMap.put("adminId", insertAdminReqDto.getMadangId());
|
||||
int checkId = sysMgtMapper.checkAdmin(paramMap);
|
||||
if(checkId > 0){
|
||||
return new InsertAdminResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
||||
}
|
||||
|
||||
String encPw = EncryptionUtil.getCustomSHA512(insertAdminReqDto.getMadangId(), insertAdminReqDto.getAdminPw());
|
||||
insertAdminReqDto.setAdminPw(encPw);
|
||||
|
||||
@@ -232,9 +241,14 @@ public class SysMgtService {
|
||||
public DeleteAuthResDto deleteAuth(DeleteAuthReqDto deleteAuthReqDto) {
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionMaster.getMapper(SysMgtMapper.class);
|
||||
Map<String, Object> authParamMap = new HashMap<String, Object>();
|
||||
|
||||
Map<String, Object> authParamMap = new HashMap<String, Object>();
|
||||
authParamMap.put("searchType", "02");
|
||||
authParamMap.put("authCd", deleteAuthReqDto.getAuthCd());
|
||||
int checkAdmin = sysMgtMapper.checkAdmin(authParamMap);
|
||||
if(checkAdmin > 0){
|
||||
return new DeleteAuthResDto(ApiResponseCode.CE_SYSMGT_AUTHCODE_EXISTS_USER);
|
||||
}
|
||||
|
||||
try {
|
||||
// 1.권한메뉴 삭제
|
||||
|
||||
@@ -57,7 +57,8 @@ public enum ApiResponseCode {
|
||||
,CE_DUPLICATE_ID("4018", "이미 사용중인 아이디 입니다.")
|
||||
/** 발송한도금액이 정액한도금액보다 작습니다. */
|
||||
,CE_SENDINGLIMT_ERROR("4019", "발송한도금액이 정액한도금액보다 작습니다.")
|
||||
|
||||
/** 해당 권한코드에 해당하는 어드민 사용자가 존재함. */
|
||||
,CE_SYSMGT_AUTHCODE_EXISTS_USER("4020", "해당 권한코드에 해당하는 어드민 사용자가 존재함.")
|
||||
// 시스템
|
||||
/** 알 수 없는 에러. */
|
||||
,SE_UNKNOWN("9999", "알 수 없는 에러");
|
||||
|
||||
@@ -95,6 +95,9 @@ public class Const {
|
||||
public static final String SNDRNO_DOC_TP_CD_06 = "06";
|
||||
public static final String SNDRNO_DOC_TP_CD_07 = "07";
|
||||
|
||||
public static final String SNDRNO_TP_CD_SELF = "01";
|
||||
public static final String SNDRNO_TP_CD_OTHER = "02";
|
||||
|
||||
public static final String INCH_DIV_CD_HOME = "01";
|
||||
public static final String INCH_DIV_CD_ADM = "02";
|
||||
|
||||
|
||||
@@ -4,177 +4,139 @@
|
||||
<mapper namespace="kr.co.uplus.ez.api.calculate.CalculateMapper">
|
||||
|
||||
<select id="selectCalculateListTotalCnt" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="int">
|
||||
SELECT COUNT(*) AS TOTALCNT
|
||||
FROM
|
||||
(SELECT
|
||||
eci.CUST_NM
|
||||
,eci.BIZRNO
|
||||
,esi.SUBS_ID
|
||||
FROM hubez_common.EZ_SUBS_INFO esi
|
||||
JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON esi.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
) A
|
||||
JOIN
|
||||
(SELECT MAX(COLEC_TMS) AS COLEC_TMS
|
||||
,eud.USE_YM AS USE_YM
|
||||
,eud.SUBS_ID AS SUBS_ID
|
||||
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
WHERE 1=1
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
GROUP BY eud.USE_YM, eud.SUBS_ID) B
|
||||
ON A.SUBS_ID = B.SUBS_ID
|
||||
/* calculate-mapper.xml(selectCalculateListTotalCnt) */
|
||||
SELECT count(*) AS TOTALCNT
|
||||
FROM (
|
||||
SELECT RAT_YM
|
||||
, RAT_TMS
|
||||
, USE_YM
|
||||
, COLEC_TMS
|
||||
from hubez_admin.EZ_RAT_TXN
|
||||
where LAST_YN = 'Y'
|
||||
<![CDATA[
|
||||
and RAT_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND RAT_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
) tms
|
||||
inner join hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
on eud.USE_YM = tms.USE_YM
|
||||
and tms.COLEC_TMS = eud.COLEC_TMS
|
||||
where 1 =1
|
||||
<![CDATA[
|
||||
and eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
and eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eud.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eud.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY eud.USE_YM DESC, eud.CUST_NM DESC
|
||||
</select>
|
||||
|
||||
<select id="selectCalculateList" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="kr.co.uplus.ez.api.calculate.dto.CalcList">
|
||||
SELECT
|
||||
A.CUST_NM
|
||||
,A.BIZRNO
|
||||
,B.USE_YM
|
||||
,B.PROD_NM
|
||||
,B.PROD_AMT
|
||||
,B.START_AMT
|
||||
,B.USE_AMT
|
||||
,B.CFWD_AMT
|
||||
,B.MRT_USE_AMT
|
||||
,B.EXTNC_AMT
|
||||
,B.BILLING_AMT
|
||||
,B.TOTAL_SND_CNT
|
||||
,B.SMS_SND_CNT
|
||||
,B.LMS_SND_CNT
|
||||
,B.MMS_SND_CNT
|
||||
,B.ATLK_SND_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
eci.CUST_NM
|
||||
,eci.BIZRNO
|
||||
,esi.SUBS_ID
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON esi.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
) A
|
||||
JOIN
|
||||
(SELECT MAX(COLEC_TMS) AS COLEC_TMS
|
||||
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS USE_YM
|
||||
,eud.SUBS_ID AS SUBS_ID
|
||||
,eud.PROD_NM AS PROD_NM
|
||||
,ROUND(IFNULL(eud.PROD_AMT,0)) AS PROD_AMT
|
||||
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMT -- 시작금액 : 정액한도금액+이월금액
|
||||
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMT -- 사용금액 : 정액사용금액 + 이월사용금액 + 종량사용금액
|
||||
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS CFWD_AMT -- 이월금액
|
||||
,ROUND(IFNULL(eud.MRT_USE_AMT,0)) AS MRT_USE_AMT -- 종량금액
|
||||
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTNC_AMT -- 소멸금액 : 소멸처리금액
|
||||
,ROUND(IFNULL((SELECT IFNULL(t2.RAT_AMT,0)
|
||||
FROM hubez_admin.EZ_RAT_TXN t1
|
||||
JOIN hubez_admin.EZ_RATTXN_DTL t2
|
||||
ON t1.RAT_YM = t2.RAT_YM
|
||||
AND t1.RAT_TMS = t2.RAT_TMS
|
||||
WHERE t1.USE_YM = eud.USE_YM
|
||||
AND t1.COLEC_TMS = eud.COLEC_TMS
|
||||
AND t2.SUBS_ID = eud.SUBS_ID ),0)) AS BILLING_AMT -- 청구금액 : 과금금액
|
||||
,SUM(IFNULL(eud.SMS_USE_CNT,0) + IFNULL(eud.LMS_USE_CNT,0) + IFNULL(eud.MMS_USE_CNT,0) + IFNULL(eud.ATLK_USE_CNT,0)) AS TOTAL_SND_CNT
|
||||
,IFNULL(eud.SMS_USE_CNT,0) AS SMS_SND_CNT
|
||||
,IFNULL(eud.LMS_USE_CNT,0) AS LMS_SND_CNT
|
||||
,IFNULL(eud.MMS_USE_CNT,0) AS MMS_SND_CNT
|
||||
,IFNULL(eud.ATLK_USE_CNT,0) AS ATLK_SND_CNT
|
||||
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
WHERE 1=1
|
||||
/* calculate-mapper.xml(selectCalculateList) */
|
||||
SELECT eud.CUST_NM
|
||||
, eud.BIZRNO
|
||||
, DATE_FORMAT(eud.USE_YM, '%Y-%m') AS USE_YM
|
||||
, eud.PROD_NM
|
||||
, ROUND(IFNULL(eud.PROD_AMT,0), 1) AS PROD_AMT
|
||||
, ROUND(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0), 1) AS START_AMT -- 시작금액 : 정액한도금액+이월금액
|
||||
, ROUND(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0), 1) AS USE_AMT -- 사용금액 : 정액사용금액 + 이월사용금액 + 종량사용금액
|
||||
, ROUND(IFNULL(eud.CFWD_AMT,0), 1) AS CFWD_AMT -- 이월금액
|
||||
, ROUND(IFNULL(eud.MRT_USE_AMT,0), 1) AS MRT_USE_AMT -- 종량금액
|
||||
, ROUND(IFNULL(eud.EXTNC_AMT,0), 1) AS EXTNC_AMT -- 소멸금액 : 소멸처리금액
|
||||
, ifnull((
|
||||
select RAT_AMT
|
||||
from hubez_admin.EZ_RATTXN_DTL
|
||||
where RAT_YM = tms.RAT_YM and RAT_TMS = tms. RAT_TMS and SUBS_ID = eud.SUBS_ID
|
||||
) , 0) as BILLING_AMT
|
||||
, (IFNULL(eud.SMS_USE_CNT,0) + IFNULL(eud.LMS_USE_CNT,0) + IFNULL(eud.MMS_USE_CNT,0) + IFNULL(eud.ATLK_USE_CNT,0)) AS TOTAL_SND_CNT
|
||||
, IFNULL(eud.SMS_USE_CNT,0) AS SMS_SND_CNT
|
||||
, IFNULL(eud.LMS_USE_CNT,0) AS LMS_SND_CNT
|
||||
, IFNULL(eud.MMS_USE_CNT,0) AS MMS_SND_CNT
|
||||
, IFNULL(eud.ATLK_USE_CNT,0) AS ATLK_SND_CNT
|
||||
FROM (
|
||||
SELECT RAT_YM
|
||||
, RAT_TMS
|
||||
, USE_YM
|
||||
, COLEC_TMS
|
||||
from hubez_admin.EZ_RAT_TXN
|
||||
where LAST_YN = 'Y'
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
and RAT_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND RAT_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
GROUP BY eud.USE_YM, eud.SUBS_ID) B
|
||||
ON A.SUBS_ID = B.SUBS_ID
|
||||
ORDER BY B.USE_YM DESC, B.SUBS_ID DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
) tms
|
||||
inner join hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
on eud.USE_YM = tms.USE_YM
|
||||
and tms.COLEC_TMS = eud.COLEC_TMS
|
||||
where 1 =1
|
||||
<![CDATA[
|
||||
and eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
and eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eud.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eud.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY eud.USE_YM DESC, eud.CUST_NM DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCalculateExcelList" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="kr.co.uplus.ez.api.calculate.dto.CalcList">
|
||||
SELECT
|
||||
A.CUST_NM
|
||||
,A.BIZRNO
|
||||
,B.USE_YM
|
||||
,B.PROD_NM
|
||||
,B.PROD_AMT
|
||||
,B.START_AMT
|
||||
,B.USE_AMT
|
||||
,B.CFWD_AMT
|
||||
,B.MRT_USE_AMT
|
||||
,B.EXTNC_AMT
|
||||
,B.BILLING_AMT
|
||||
,B.TOTAL_SND_CNT
|
||||
,B.SMS_SND_CNT
|
||||
,B.LMS_SND_CNT
|
||||
,B.MMS_SND_CNT
|
||||
,B.ATLK_SND_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
eci.CUST_NM
|
||||
,eci.BIZRNO
|
||||
,esi.SUBS_ID
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON esi.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
) A
|
||||
JOIN
|
||||
(SELECT MAX(COLEC_TMS) AS COLEC_TMS
|
||||
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS USE_YM
|
||||
,eud.SUBS_ID AS SUBS_ID
|
||||
,eud.PROD_NM AS PROD_NM
|
||||
,ROUND(IFNULL(eud.PROD_AMT,0)) AS PROD_AMT
|
||||
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMT -- 시작금액 : 정액한도금액+이월금액
|
||||
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMT -- 사용금액 : 정액사용금액 + 이월사용금액 + 종량사용금액
|
||||
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS CFWD_AMT -- 이월금액
|
||||
,ROUND(IFNULL(eud.MRT_USE_AMT,0)) AS MRT_USE_AMT -- 종량금액
|
||||
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTNC_AMT -- 소멸금액 : 소멸처리금액
|
||||
,ROUND(IFNULL((SELECT IFNULL(t2.RAT_AMT,0)
|
||||
FROM hubez_admin.EZ_RAT_TXN t1
|
||||
JOIN hubez_admin.EZ_RATTXN_DTL t2
|
||||
ON t1.RAT_YM = t2.RAT_YM
|
||||
AND t1.RAT_TMS = t2.RAT_TMS
|
||||
WHERE t1.USE_YM = eud.USE_YM
|
||||
AND t1.COLEC_TMS = eud.COLEC_TMS
|
||||
AND t2.SUBS_ID = eud.SUBS_ID ),0)) AS BILLING_AMT -- 청구금액 : 과금금액
|
||||
,SUM(IFNULL(eud.SMS_USE_CNT,0) + IFNULL(eud.LMS_USE_CNT,0) + IFNULL(eud.MMS_USE_CNT,0) + IFNULL(eud.ATLK_USE_CNT,0)) AS TOTAL_SND_CNT
|
||||
,IFNULL(eud.SMS_USE_CNT,0) AS SMS_SND_CNT
|
||||
,IFNULL(eud.LMS_USE_CNT,0) AS LMS_SND_CNT
|
||||
,IFNULL(eud.MMS_USE_CNT,0) AS MMS_SND_CNT
|
||||
,IFNULL(eud.ATLK_USE_CNT,0) AS ATLK_SND_CNT
|
||||
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
WHERE 1=1
|
||||
/* calculate-mapper.xml(selectCalculateExcelList) */
|
||||
SELECT eud.CUST_NM
|
||||
, eud.BIZRNO
|
||||
, DATE_FORMAT(eud.USE_YM, '%Y-%m') AS USE_YM
|
||||
, eud.PROD_NM
|
||||
, ROUND(IFNULL(eud.PROD_AMT,0), 1) AS PROD_AMT
|
||||
, ROUND(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0), 1) AS START_AMT -- 시작금액 : 정액한도금액+이월금액
|
||||
, ROUND(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0), 1) AS USE_AMT -- 사용금액 : 정액사용금액 + 이월사용금액 + 종량사용금액
|
||||
, ROUND(IFNULL(eud.CFWD_AMT,0), 1) AS CFWD_AMT -- 이월금액
|
||||
, ROUND(IFNULL(eud.MRT_USE_AMT,0), 1) AS MRT_USE_AMT -- 종량금액
|
||||
, ROUND(IFNULL(eud.EXTNC_AMT,0), 1) AS EXTNC_AMT -- 소멸금액 : 소멸처리금액
|
||||
, ifnull((
|
||||
select RAT_AMT
|
||||
from hubez_admin.EZ_RATTXN_DTL
|
||||
where RAT_YM = tms.RAT_YM and RAT_TMS = tms. RAT_TMS and SUBS_ID = eud.SUBS_ID
|
||||
) , 0) as BILLING_AMT
|
||||
, (IFNULL(eud.SMS_USE_CNT,0) + IFNULL(eud.LMS_USE_CNT,0) + IFNULL(eud.MMS_USE_CNT,0) + IFNULL(eud.ATLK_USE_CNT,0)) AS TOTAL_SND_CNT
|
||||
, IFNULL(eud.SMS_USE_CNT,0) AS SMS_SND_CNT
|
||||
, IFNULL(eud.LMS_USE_CNT,0) AS LMS_SND_CNT
|
||||
, IFNULL(eud.MMS_USE_CNT,0) AS MMS_SND_CNT
|
||||
, IFNULL(eud.ATLK_USE_CNT,0) AS ATLK_SND_CNT
|
||||
FROM (
|
||||
SELECT RAT_YM
|
||||
, RAT_TMS
|
||||
, USE_YM
|
||||
, COLEC_TMS
|
||||
from hubez_admin.EZ_RAT_TXN
|
||||
where LAST_YN = 'Y'
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
and RAT_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND RAT_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
GROUP BY eud.USE_YM, eud.SUBS_ID) B
|
||||
ON A.SUBS_ID = B.SUBS_ID
|
||||
ORDER BY B.USE_YM DESC, B.SUBS_ID DESC
|
||||
) tms
|
||||
inner join hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
on eud.USE_YM = tms.USE_YM
|
||||
and tms.COLEC_TMS = eud.COLEC_TMS
|
||||
where 1 =1
|
||||
<![CDATA[
|
||||
and eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
and eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eud.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eud.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY eud.USE_YM DESC, eud.CUST_NM DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -330,7 +330,7 @@
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" index="i"
|
||||
separator=",">
|
||||
(#{item.seqNo},#{item.seqNm}, #{item.word}, #{item.regId}, NOW() )
|
||||
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() )
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -7,15 +7,12 @@
|
||||
parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.ProfileListReqDto"
|
||||
resultType="int">
|
||||
/* sysMgt-mapper.xml(selectAdmUserTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_common.EZ_KKO_CHNL ekc
|
||||
ON esu.USER_SEQ = ekc.USER_SEQ
|
||||
AND ekc.MSGHB_STTUS_CD IN ('A','D')
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE esu.USER_TP_CD ='01'
|
||||
select count(*)
|
||||
from hubez_common.EZ_KKO_CHNL ekc
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = ekc.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
<include refid="profileListCondition"></include>
|
||||
</select>
|
||||
|
||||
@@ -24,32 +21,38 @@
|
||||
resultType="kr.co.uplus.ez.api.sendNumMgt.dto.ProfileInfo">
|
||||
/* sysMgt-mapper.xml(selectProfileList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.custNm
|
||||
, bRegNo
|
||||
, sendProfile
|
||||
, sendProfileKey
|
||||
, DORM_YN
|
||||
, case when A.MSGHB_STTUS_CD = 'D' then '삭제'
|
||||
when A.DORM_YN = 'Y' then '휴면'
|
||||
when A.BLCK_YN = 'Y' then '미사용'
|
||||
when A.MSGHB_STTUS_CD = 'A' then '사용'
|
||||
else '미사용'
|
||||
end as stat
|
||||
, DATE_FORMAT(A.REG_DT, '%Y-%m-%d') AS regDt
|
||||
FROM
|
||||
(
|
||||
select eci.CUST_NM as custNm
|
||||
, eci.BIZRNO as bRegNo
|
||||
, ekc.CHNL_ID as sendProfile
|
||||
, ekc.SNDRPROF_KEY as sendProfileKey
|
||||
, ekc.DORM_YN
|
||||
, case when ekc.DORM_YN = 'Y' then '휴면'
|
||||
when ekc.MSGHB_STTUS_CD = 'A' then '사용'
|
||||
when ekc.MSGHB_STTUS_CD = 'D' then '삭제'
|
||||
else '미사용'
|
||||
end as stat
|
||||
, DATE_FORMAT(ekc.REG_DT, '%Y-%m-%d') AS regDt
|
||||
from hubez_common.EZ_SVC_USER esu
|
||||
inner join hubez_common.EZ_KKO_CHNL ekc
|
||||
on esu.USER_SEQ = ekc.USER_SEQ
|
||||
and ekc.MSGHB_STTUS_CD in ('A','D')
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
where esu.USER_TP_CD ='01'
|
||||
<include refid="profileListCondition"></include>
|
||||
ORDER BY ekc.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
select eci.CUST_NM as custNm
|
||||
, eci.BIZRNO as bRegNo
|
||||
, ekc.CHNL_ID as sendProfile
|
||||
, ekc.SNDRPROF_KEY as sendProfileKey
|
||||
, ekc.DORM_YN
|
||||
, ekc.MSGHB_STTUS_CD
|
||||
, ekc.BLCK_YN
|
||||
, ekc.REG_DT
|
||||
from hubez_common.EZ_KKO_CHNL ekc
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = ekc.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
<include refid="profileListCondition"></include>
|
||||
ORDER BY ekc.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="profileListCondition">
|
||||
@@ -57,19 +60,21 @@
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
<choose>
|
||||
<when test='searchType1 == "A"'> <!-- 상태 사용-->
|
||||
AND MSGHB_STTUS_CD = 'A'
|
||||
AND BLCK_YN = 'N'
|
||||
AND DORM_YN = 'N'
|
||||
AND ekc.MSGHB_STTUS_CD = 'A'
|
||||
AND ekc.BLCK_YN = 'N'
|
||||
AND ekc.DORM_YN = 'N'
|
||||
</when>
|
||||
<when test='searchType1 == "N"'> <!-- 상태 미사용-->
|
||||
AND MSGHB_STTUS_CD = 'A'
|
||||
AND (BLCK_YN = 'Y' OR DORM_YN = 'Y')
|
||||
AND ekc.BLCK_YN = 'Y'
|
||||
AND MSGHB_STTUS_CD != 'D'
|
||||
AND ekc.DORM_YN != 'Y'
|
||||
</when>
|
||||
<when test='searchType1 == "D"'> <!-- 상태 삭제-->
|
||||
AND MSGHB_STTUS_CD = 'D'
|
||||
</when>
|
||||
<when test='searchType1 == "H"'> <!-- 상태 휴면-->
|
||||
AND DORM_YN = 'Y'
|
||||
AND MSGHB_STTUS_CD != 'D'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
@@ -77,13 +82,13 @@
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
<choose>
|
||||
<when test='searchType2 == "custNm"'><!-- 검색조건 - 고객사명 -->
|
||||
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}), '%')
|
||||
and eci.CUST_NM LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
</when>
|
||||
<when test='searchType2 == "bregNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
and eci.BIZRNO = #{searchText1}
|
||||
and eci.BIZRNO like CONCAT('%', #{searchText1}, '%')
|
||||
</when>
|
||||
<when test='searchType2 == "sendProfile"'><!-- 검색조건 - 발신프로필 -->
|
||||
and ekc.CHNL_ID = #{searchText1}
|
||||
and ekc.CHNL_ID like CONCAT('%', #{searchText1}, '%')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
@@ -91,76 +96,58 @@
|
||||
</sql>
|
||||
<select id="selectSendNumberTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="int">
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
hubez_common.EZ_CUST_INFO eci
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON
|
||||
esr.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
esr.REG_REQ_NO = ess.REG_REQ_NO
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
SELECT count(*)
|
||||
from hubez_common.EZ_SVC_SNDRNO ess
|
||||
inner join hubez_common.EZ_SNDRNO_REG esr
|
||||
on esr.REG_REQ_NO = ess.REG_REQ_NO
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = esr.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectSendNumberList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberInfo">
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.CUST_NM
|
||||
, REG_REQ_NO
|
||||
, A.USER_ID as ADMIN_ID
|
||||
, A.RQTR_ID AS register
|
||||
, A.BIZRNO AS bRegNo
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'NMINEE_DIV_CD' AND DTL_CD = A.NMINEE_DIV_CD) AS NMINEE_DIV_CD
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'INCH_DIV_CD' AND DTL_CD = A.INCH_DIV_CD) AS INCH_DIV_CD
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SNDRNO_STTUS_CD' AND DTL_CD = A.STTUS_CD) AS sttusCd
|
||||
, A.SNDRNO AS SNDRNO
|
||||
, A.SEQ_NO
|
||||
, DATE_FORMAT(A.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
eci.CUST_NM ,
|
||||
esr.REG_REQ_NO,
|
||||
(SELECT esu2.USER_ID FROM hubez_common.EZ_SVC_USER esu2 WHERE esu2.USER_SEQ = esu.PRNTS_USER_SEQ)AS ADMIN_ID,
|
||||
esr.REG_ID AS register,
|
||||
eci.BIZRNO AS bRegNo,
|
||||
(SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'NMINEE_DIV_CD'
|
||||
AND ecd.DTL_CD = ess.NMINEE_DIV_CD) AS NMINEE_DIV_CD,
|
||||
(SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'INCH_DIV_CD'
|
||||
AND ecd.DTL_CD = ess.INCH_DIV_CD) AS INCH_DIV_CD,
|
||||
(SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'SNDRNO_STTUS_CD'
|
||||
AND ecd.DTL_CD = ess.STTUS_CD) AS sttusCd,
|
||||
ess.SNDRNO AS SNDRNO,
|
||||
ess.SEQ_NO,
|
||||
DATE_FORMAT(esr.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_INFO eci
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON
|
||||
esr.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
esr.REG_REQ_NO = ess.REG_REQ_NO
|
||||
eci.CUST_NM
|
||||
, esr.REG_REQ_NO
|
||||
, esu.USER_ID
|
||||
, esr.RQTR_ID
|
||||
, eci.BIZRNO
|
||||
, ess.NMINEE_DIV_CD
|
||||
, ess.INCH_DIV_CD
|
||||
, ess.STTUS_CD
|
||||
, ess.SNDRNO
|
||||
, ess.SEQ_NO
|
||||
, esr.REG_DT
|
||||
from hubez_common.EZ_SVC_SNDRNO ess
|
||||
inner join hubez_common.EZ_SNDRNO_REG esr
|
||||
on esr.REG_REQ_NO = ess.REG_REQ_NO
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = esr.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
ORDER BY eci.BIZRNO
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
ORDER BY ess.REG_DT , ess.REG_REQ_NO DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="numberListCondition">
|
||||
@@ -180,13 +167,13 @@
|
||||
<if test='searchType4 != null and searchType4 != ""'>
|
||||
<choose>
|
||||
<when test='searchType4 == "bregNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
AND eci.BIZRNO = #{searchText1}
|
||||
AND eci.BIZRNO like CONCAT('%', #{searchText1}, '%')
|
||||
</when>
|
||||
<when test='searchType4 == "regNo"'><!-- 검색조건 - 발신번호 -->
|
||||
AND ess.SNDRNO = #{searchText1}
|
||||
AND ess.SNDRNO like CONCAT('%', #{searchText1}, '%')
|
||||
</when>
|
||||
<when test='searchType4 == "custNm"'><!-- 검색조건 - 고객사명 -->
|
||||
AND UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}), '%')
|
||||
AND eci.CUST_NM LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
@@ -201,7 +188,8 @@
|
||||
hubez_common.EZ_SVC_USER esu, hubez_common.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
AND esu.USER_TP_CD IN ('01', '03')
|
||||
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
</select>
|
||||
|
||||
<select id="selectAdminList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminInfo">
|
||||
@@ -216,7 +204,8 @@
|
||||
hubez_common.EZ_SVC_USER esu, hubez_common.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
AND esu.USER_TP_CD IN ('01', '03')
|
||||
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
</select>
|
||||
|
||||
<select id="selectUserSeqByAdminId" parameterType="String" resultType="String">
|
||||
|
||||
@@ -68,10 +68,10 @@ SELECT
|
||||
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
and eci.BIZRNO = #{searchText1}
|
||||
AND eci.BIZRNO like CONCAT('%', #{searchText1}, '%')
|
||||
</when>
|
||||
<when test='searchType2 == "authCd"'><!-- 검색조건 - 인증코드 -->
|
||||
and esu.AUTHCD_080 = #{searchText1}
|
||||
AND esu.AUTHCD_080 like CONCAT('%', #{searchText1}, '%')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -323,6 +323,7 @@
|
||||
<select id="selectAuthDetail"
|
||||
parameterType="kr.co.uplus.ez.api.sysMgt.dto.AuthDetailReqDto"
|
||||
resultType="kr.co.uplus.ez.api.sysMgt.dto.AuthDetail">
|
||||
/* sysMgt-mapper.xml(selectAuthDetail) */
|
||||
SELECT
|
||||
AUT_CD AS authCd
|
||||
,AUT_NM AS authNm
|
||||
@@ -338,6 +339,7 @@
|
||||
<select id="selectAuthMemuList"
|
||||
parameterType="kr.co.uplus.ez.api.sysMgt.dto.AuthDetailReqDto"
|
||||
resultType="kr.co.uplus.ez.api.sysMgt.dto.AuthMenu">
|
||||
/* sysMgt-mapper.xml(selectAuthMemuList) */
|
||||
SELECT
|
||||
T2.MENU_NO AS menuNo
|
||||
,T3.PRNTS_MENU_NO AS upperMenuNo
|
||||
@@ -352,6 +354,23 @@
|
||||
WHERE T2.AUT_CD = #{authCd}
|
||||
</select>
|
||||
|
||||
<select id="checkAdmin" parameterType="hashMap" resultType="int">
|
||||
/* sysMgt-mapper.xml(checkAdminId) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
hubez_admin.EZ_ADM_USER eau
|
||||
WHERE 1=1
|
||||
<if test="searchType != null and searchType != ''">
|
||||
<if test="searchType == '01' ">
|
||||
AND OPRTR_ID = #{adminId}
|
||||
</if>
|
||||
<if test="searchType == '02' ">
|
||||
AND AUT_CD = #{authCd}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user