261028_01_ENH: 새로운 KART 연동

This commit is contained in:
2026-10-28 08:54:54 +09:00
parent cadf55e7ee
commit 998d04d39c
3 changed files with 68 additions and 85 deletions

View File

@@ -101,9 +101,7 @@ kon.survey = (function () {
var apiWaits = [];
if (nextinput.val() === "END") {
var isKiwi = 1;
var kartRequestUrl = "https://rapi.kric.com/api/v1/project/derived/"+isKiwi+"/"+kon.survey.PKEY+"/"+kon.survey.IDKEY;
apiWaits.push(callLoggedApi(kartRequestUrl, "DERIVED", kon.survey.IDKEY, "", ""));
apiWaits.push(callKartDerived(kon.survey.PKEY, kon.survey.IDKEY));
}
if (surveyType === "LIST") {
@@ -193,6 +191,41 @@ kon.survey = (function () {
});
}
function callKartDerived(pkey, idkey) {
var url = KART_BASE_URL
+ "/project/" + KART_PROJECT_TYPE
+ "/" + encodeURIComponent(pkey)
+ "/derived/respondent/" + encodeURIComponent(idkey)
+ "/recalculate";
logExternalApi("DERIVED", idkey, "", "REQUEST", "");
return $.ajax({
url: url,
type: "POST",
headers: {
"X-API-Key": KON_KIWI_API_KEY
},
dataType: "json",
cache: false,
timeout: 60000,
success: function (data, status, xhr) {
logExternalApi(
"DERIVED", idkey, "", "SUCCESS",
"HTTP " + xhr.status
);
},
error: function (xhr, status) {
logExternalApi(
"DERIVED", idkey, "", "FAIL",
"HTTP " + xhr.status + " / " + status
);
}
});
}
function callContactStatusApi(contactMappingList, idkey, statuses) {
var allRequestsDone = $.Deferred();
var mappingsLeft = contactMappingList.length;