hapus yang tidak perlu
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
import axios from "axios";
|
||||
import config from "./config/config";
|
||||
import logging from "./config/logging";
|
||||
import { NAME_SPACE } from "./server";
|
||||
|
||||
export const getOrder = async () => {
|
||||
const url = config.base_url + "tools/member/cashbackpoint/list/";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const updateCashback = async (id: string) => {
|
||||
const url = config.base_url + "tools/member/cashbackpoint/getcashback/" + id;
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const uploadCashback = async () => {
|
||||
const url = config.base_url + "tools/member/uploadpoint/upload/";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,168 +0,0 @@
|
||||
import axios from "axios";
|
||||
import config from "./config/config";
|
||||
import logging from "./config/logging";
|
||||
import { NAME_SPACE } from "./server";
|
||||
|
||||
export const getMember = async () => {
|
||||
const url = config.base_url + "tools/member/Membergateway/getmemberv2";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const uploadV2 = async (prm: any) => {
|
||||
const url = config.base_url + "tools/member/Membergateway/uploadV2";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
// logging.info(NAME_SPACE, "PRM : ", prm);
|
||||
try {
|
||||
const resp = await axios.post(
|
||||
url,
|
||||
{
|
||||
debug: "N",
|
||||
data: prm,
|
||||
},
|
||||
{
|
||||
headers: { "Content-Type": "application/json; charset=UTF-8" },
|
||||
responseType: "arraybuffer",
|
||||
}
|
||||
);
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const upload = async () => {
|
||||
const url = config.base_url + "tools/member/Membergateway/upload";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const download = async () => {
|
||||
const url = config.base_url + "tools/member/Membergateway/download";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const downloadV2 = async () => {
|
||||
const url = config.base_url + "tools/member/Membergateway/downloadV2";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const generate = async (prm: any) => {
|
||||
const url = config.base_url + "tools/member/Membergateway/generateV2";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.post(
|
||||
url,
|
||||
{
|
||||
data: prm,
|
||||
},
|
||||
{
|
||||
headers: { "Content-Type": "application/json; charset=UTF-8" },
|
||||
responseType: "arraybuffer",
|
||||
}
|
||||
);
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const getDataNatInfo = async () => {
|
||||
const url = config.base_url + "tools/member/downloadinfo/downloadInfo";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const insertNatInfo = async (
|
||||
nik: string,
|
||||
visit: string,
|
||||
point: string
|
||||
) => {
|
||||
const url =
|
||||
config.base_url +
|
||||
"tools/member/downloadinfo/insertInfo/" +
|
||||
nik +
|
||||
"/" +
|
||||
visit +
|
||||
"/" +
|
||||
point;
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
import axios from "axios";
|
||||
import config from "./config/config";
|
||||
import logging from "./config/logging";
|
||||
import { NAME_SPACE } from "./server";
|
||||
|
||||
export const get_order = async (row_per_batch: number) => {
|
||||
const url_patient =
|
||||
config.base_url + "/etl/getorder/getdata?limit=" + row_per_batch;
|
||||
logging.info(NAME_SPACE, "Info : " + url_patient);
|
||||
try {
|
||||
const resp = await axios.get(url_patient, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
import axios from "axios";
|
||||
import config from "./config/config";
|
||||
import logging from "./config/logging";
|
||||
import { NAME_SPACE } from "./server";
|
||||
|
||||
export const uploadPayment = async () => {
|
||||
const url = config.base_url + "tools/member/uploadpaymentpoint/upload";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,39 +0,0 @@
|
||||
import axios from "axios";
|
||||
import config from "./config/config";
|
||||
import logging from "./config/logging";
|
||||
import { NAME_SPACE } from "./server";
|
||||
|
||||
// export const retur = async () => {
|
||||
// const url = config.base_url + "tools/member/uploadretur/upload/";
|
||||
// logging.info(NAME_SPACE, "INFO : " + url);
|
||||
// try {
|
||||
// const resp = await axios.get(url, {
|
||||
// responseType: "arraybuffer",
|
||||
// });
|
||||
// const jresp = JSON.parse(resp.data.toString());
|
||||
// return jresp;
|
||||
// } catch (e) {
|
||||
// if (axios.isAxiosError(e)) {
|
||||
// logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
// } else if (e instanceof Error) {
|
||||
// logging.error(NAME_SPACE, e.message);
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
export const retur = async () => {
|
||||
const url = config.base_url + "tools/member/uploadretur/upload/";
|
||||
logging.info(NAME_SPACE, "\t INFO : " + url);
|
||||
try {
|
||||
const resp = await axios.get(url, {
|
||||
responseType: "arraybuffer",
|
||||
});
|
||||
const jresp = JSON.parse(resp.data.toString());
|
||||
return jresp;
|
||||
} catch (e) {
|
||||
if (axios.isAxiosError(e)) {
|
||||
logging.error(NAME_SPACE, e.response?.data.toString());
|
||||
} else if (e instanceof Error) {
|
||||
logging.error(NAME_SPACE, e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -31,7 +31,8 @@ async function jurnalTxJob() {
|
||||
logging.info(NAME_SPACE, "Starting Job Jurbal TX" + VERSION);
|
||||
// UPLOAD
|
||||
logging.info(NAME_SPACE, "Start Get Jurnal Tx");
|
||||
var respJurnal = await getJurnal("2024-09-18");
|
||||
// 2024 - 09 - 17;
|
||||
var respJurnal = await getJurnal("");
|
||||
if (respJurnal["status"] != "OK") {
|
||||
logging.error(NAME_SPACE, "\t Error", respJurnal);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user