|
|
|
|
@ -15,10 +15,10 @@ from dotenv import load_dotenv
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import os
|
|
|
|
|
from equipment.formula import rc_labor_cost, rc_lost_cost, rc_total_cost
|
|
|
|
|
|
|
|
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
|
|
|
from config import get_connection
|
|
|
|
|
from modules.equipment.formula import rc_labor_cost, rc_lost_cost, rc_total_cost
|
|
|
|
|
import json
|
|
|
|
|
|
|
|
|
|
load_dotenv()
|
|
|
|
|
@ -359,8 +359,7 @@ class Prediksi:
|
|
|
|
|
asset_crit_efdh_equivalent_force_derated_hours,
|
|
|
|
|
asset_crit_foh_force_outage_hours,
|
|
|
|
|
asset_crit_extra_fuel_cost
|
|
|
|
|
FROM lcc_ms_equipment_data
|
|
|
|
|
WHERE assetnum = %s
|
|
|
|
|
FROM lcc_ms_year_data
|
|
|
|
|
) t
|
|
|
|
|
"""
|
|
|
|
|
cursor.execute(query, (equipment_id,))
|
|
|
|
|
@ -431,7 +430,7 @@ class Prediksi:
|
|
|
|
|
raw_oh_interval, raw_oh_material_cost, raw_oh_labor_time, raw_oh_labor_human,
|
|
|
|
|
raw_predictive_interval, raw_predictive_material_cost, raw_predictive_labor_time, raw_predictive_labor_human,
|
|
|
|
|
"raw_loss_output_MW" as raw_loss_output_mw, raw_loss_output_price,
|
|
|
|
|
raw_operational_cost, raw_maintenance_cost, rc_material_cost
|
|
|
|
|
raw_operational_cost, raw_maintenance_cost
|
|
|
|
|
FROM lcc_equipment_tr_data
|
|
|
|
|
WHERE assetnum = %s;
|
|
|
|
|
'''
|
|
|
|
|
@ -655,7 +654,7 @@ class Prediksi:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Authentication: sign-in and refresh helpers
|
|
|
|
|
async def sign_in(self, username: str = "user14", password: str = "password") -> dict:
|
|
|
|
|
async def sign_in(self, username: str = "Admin", password: str = "password") -> dict:
|
|
|
|
|
"""Sign in to AUTH_APP_URL/sign-in using provided username/password.
|
|
|
|
|
|
|
|
|
|
Stores access_token and refresh_token on the instance when successful and returns the parsed response dict.
|
|
|
|
|
|