Sync mcu project from mgm mcu

This commit is contained in:
sas.fajri
2026-05-05 14:43:57 +07:00
parent fa4c559f27
commit d03dec2dda
3 changed files with 89 additions and 0 deletions

View File

@@ -591,6 +591,25 @@ class Preregisterv3 extends MY_Controller
}
}
$qry_sync_project = $this->db->query(
"CALL cpone.sp_upsert_mcu_project_by_mgm_mcuid(?)",
array(intval($prm['xid']))
);
if (!$qry_sync_project) {
$last_qry = $this->db->last_query();
$this->db->trans_rollback();
$this->sys_error("call sp_upsert_mcu_project_by_mgm_mcuid : " . $last_qry);
exit;
}
if (isset($this->db->conn_id) && $this->db->conn_id instanceof mysqli) {
while ($this->db->conn_id->more_results() && $this->db->conn_id->next_result()) {
$dummyResult = $this->db->conn_id->store_result();
if ($dummyResult instanceof mysqli_result) {
$dummyResult->free();
}
}
}
if ($this->db->trans_status() === FALSE) {
$this->db->trans_rollback();
$this->sys_error("Transaction Failed");