|
|
@ -9,9 +9,12 @@ import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendRequest;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendRequest;
|
|
|
|
|
|
|
|
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltReqData;
|
|
|
|
|
|
|
|
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
|
|
|
|
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
|
|
|
|
import kr.xit.biz.kt.mapper.IBizKtMmsMapper;
|
|
|
|
import kr.xit.biz.kt.mapper.IBizKtMmsMapper;
|
|
|
|
import kr.xit.core.exception.BizRuntimeException;
|
|
|
|
import kr.xit.core.exception.BizRuntimeException;
|
|
|
|
|
|
|
|
import kr.xit.core.support.utils.DateUtils;
|
|
|
|
import kr.xit.ens.kt.service.IKtMmsService;
|
|
|
|
import kr.xit.ens.kt.service.IKtMmsService;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import org.apache.commons.collections4.ListUtils;
|
|
|
|
import org.apache.commons.collections4.ListUtils;
|
|
|
@ -105,30 +108,65 @@ public class BizKtMmsService extends EgovAbstractServiceImpl implements IBizKtMm
|
|
|
|
KtCommonResponse ktTokenResponse = null;
|
|
|
|
KtCommonResponse ktTokenResponse = null;
|
|
|
|
|
|
|
|
|
|
|
|
for(List<KtMainSendReqData> reqs : parts) {
|
|
|
|
for(List<KtMainSendReqData> reqs : parts) {
|
|
|
|
KtMainSendRequest ktReqDTO = KtMainSendRequest.builder()
|
|
|
|
ktTokenResponse = ktMmsService.mainSend(
|
|
|
|
.signguCode(reqDTO.getSignguCode())
|
|
|
|
KtMainSendRequest.builder()
|
|
|
|
.ffnlgCode(reqDTO.getFfnlgCode())
|
|
|
|
.signguCode(reqDTO.getSignguCode())
|
|
|
|
.profile(profile)
|
|
|
|
.ffnlgCode(reqDTO.getFfnlgCode())
|
|
|
|
//.serviceCd("cache")
|
|
|
|
.profile(profile)
|
|
|
|
//.serviceKey("cache")
|
|
|
|
//.serviceCd("cache")
|
|
|
|
.msgCd("db")
|
|
|
|
//.serviceKey("cache")
|
|
|
|
//.msgType("2")
|
|
|
|
.msgCd("db")
|
|
|
|
.makeDt("123456789012db")
|
|
|
|
//.msgType("2")
|
|
|
|
.sndnExTime("123456789012db")
|
|
|
|
.makeDt("123456789012db")
|
|
|
|
.exTime("123456789012db")
|
|
|
|
.sndnExTime("123456789012db")
|
|
|
|
//.mType("4")
|
|
|
|
.exTime("123456789012db")
|
|
|
|
.sndnTotCnt(reqs.size()) //-> 요청건수 count
|
|
|
|
//.mType("4")
|
|
|
|
.mmsBinary("db")
|
|
|
|
.sndnTotCnt(reqs.size()) //-> 요청건수 count
|
|
|
|
.fileFmat("db")
|
|
|
|
.mmsBinary("db")
|
|
|
|
.testSndnYn("N")
|
|
|
|
.fileFmat("db")
|
|
|
|
.reqs(reqs)
|
|
|
|
.testSndnYn("N")
|
|
|
|
.build();
|
|
|
|
.reqs(reqs)
|
|
|
|
|
|
|
|
.build()
|
|
|
|
ktTokenResponse = ktMmsService.mainSend(ktReqDTO);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ktTokenResponse;
|
|
|
|
return ktTokenResponse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public KtCommonResponse messageResult(final KtMnsRequest reqDTO) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<KtMsgRsltReqData> rsltReqs = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KtMsgRsltReqData reqData = KtMsgRsltReqData.builder()
|
|
|
|
|
|
|
|
.srcKey("db")
|
|
|
|
|
|
|
|
.mmsSndgRsltSqno(1) // ++
|
|
|
|
|
|
|
|
.prcsDt("YYYYMMDD")
|
|
|
|
|
|
|
|
.mmsBsnsDvcd("12345")
|
|
|
|
|
|
|
|
//.mblBzowrDvcd("01")
|
|
|
|
|
|
|
|
.mmsSndgRsltDvcd("40")
|
|
|
|
|
|
|
|
.mmsRdgTmst(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss"))
|
|
|
|
|
|
|
|
//.msgType("2")
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
rsltReqs.add(reqData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<List<KtMsgRsltReqData>> parts = ListUtils.partition(rsltReqs, MAX_KT_SEND_CNT);
|
|
|
|
|
|
|
|
KtCommonResponse ktTokenResponse = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(List<KtMsgRsltReqData> reqs : parts) {
|
|
|
|
|
|
|
|
ktTokenResponse = ktMmsService.messageResult(
|
|
|
|
|
|
|
|
KtMsgRsltRequest.builder()
|
|
|
|
|
|
|
|
.signguCode(reqDTO.getSignguCode())
|
|
|
|
|
|
|
|
.ffnlgCode(reqDTO.getFfnlgCode())
|
|
|
|
|
|
|
|
.profile(profile)
|
|
|
|
|
|
|
|
.reqs(reqs)
|
|
|
|
|
|
|
|
.build()
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ktTokenResponse;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
// /**
|
|
|
|
// * 사전 문자 수신 등록 요청(BC-AG-SN-001)
|
|
|
|
// * 사전 문자 수신 등록 요청(BC-AG-SN-001)
|
|
|
|