From 4f03433bb2b196bbc306cca4dca173da9a370ff0 Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Tue, 21 Feb 2023 19:17:07 +0700 Subject: [PATCH] update --- .../modules/loadbalance/loadbalance.model.js | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/application/modules/loadbalance/loadbalance.model.js b/application/modules/loadbalance/loadbalance.model.js index f413976..f58d3ac 100644 --- a/application/modules/loadbalance/loadbalance.model.js +++ b/application/modules/loadbalance/loadbalance.model.js @@ -288,10 +288,6 @@ const insertLoadingBalance = async ( .insert(data) .returning('i_load_balance') .then((resp) => { - winston.logger.warn( - `${uniqueCode} inserting loading balance 1 ${JSON.stringify(resp)}` - ); - let id = resp[0]; let loadDetail = []; detail.forEach((element) => { @@ -317,8 +313,6 @@ const insertLoadingBalance = async ( .insert(loadDetail); }) .then(() => { - winston.logger.warn(`${uniqueCode} inserting loading balance 2...}`); - // insert load balance history return knex('trx.t_d_load_balance_history') .transacting(trx) @@ -326,12 +320,6 @@ const insertLoadingBalance = async ( .insert(data); }) .then((history) => { - winston.logger.warn( - `${uniqueCode} inserting loading balance 3 ${JSON.stringify( - history - )}` - ); - let id = history[0]; let loadDetail = []; detail.forEach((element) => { @@ -357,8 +345,6 @@ const insertLoadingBalance = async ( .insert(loadDetail); }) .then(() => { - winston.logger.warn(`${uniqueCode} inserting loading balance 4...}`); - // update reservation return knex('trx.t_d_reservation_balance') .transacting(trx) @@ -377,8 +363,6 @@ const insertLoadingBalance = async ( .whereIn('c_reservation_no', reservationNumber); }) .then(() => { - winston.logger.warn(`${uniqueCode} inserting loading balance 5...}`); - // delete flag counting return knex('trx.t_d_flag_counting') .transacting(trx) @@ -387,8 +371,6 @@ const insertLoadingBalance = async ( .del(); }) .then(() => { - winston.logger.warn(`${uniqueCode} inserting loading balance 6...}`); - // insert flag counting return knex('trx.t_d_flag_counting').transacting(trx).insert({ d_request: now, @@ -399,34 +381,18 @@ const insertLoadingBalance = async ( }); }) .then(() => { - winston.logger.warn( - `${uniqueCode} inserting loading balance 7 COMMIT... }` - ); - trx.commit; }) .catch((err) => { - winston.logger.warn( - `${uniqueCode} ERRORRRRRRR ROLLBACK ${JSON.stringify(err.message)}` - ); trx.rollback; }); }) .then((result) => { - winston.logger.warn( - `${uniqueCode} inserting loading balance 8 ${JSON.stringify(result)}` - ); - // console.log(result); return result; }) .catch((error) => { console.log(error.message); - winston.logger.warn( - `${uniqueCode} inserting loadbalance 9 ERRORRRRRRR CATCH ${JSON.stringify( - err.message - )}` - ); return error.message; }); };