add doc api wynacom

This commit is contained in:
Hanan Askarim
2026-06-18 14:50:57 +07:00
parent 9ff322a6a1
commit 8df5ffb743
4 changed files with 1038 additions and 81 deletions

View File

@@ -16,9 +16,6 @@ class Wynacom extends MY_Controller
"message" => "Wynacom tools API",
"endpoints" => array(
"POST /tools/wynacom/sampling_timestamp",
"POST /tools/wynacom/nonlab",
"POST /tools/wynacom/lab",
"POST /tools/wynacom/sampling",
"POST /tools/wynacom/generate_token",
"POST /tools/wynacom/check_token",
"POST /tools/wynacom/token_setting",
@@ -28,61 +25,6 @@ class Wynacom extends MY_Controller
exit;
}
public function sampling()
{
try {
$order = $this->require_order_header();
$lab_number = $order["T_OrderHeaderLabNumber"];
$this->sys_ok(array(
"T_OrderHeaderID" => $order["T_OrderHeaderID"],
"T_OrderHeaderLabNumber" => $lab_number,
"nonlab" => $this->get_nonlab_timestamp($lab_number),
"lab" => $this->get_lab_timestamp($lab_number)
));
exit;
} catch (Exception $exc) {
$this->sys_error($exc->getMessage());
exit;
}
}
public function nonlab()
{
try {
$order = $this->require_order_header();
$lab_number = $order["T_OrderHeaderLabNumber"];
$this->sys_ok(array(
"T_OrderHeaderID" => $order["T_OrderHeaderID"],
"T_OrderHeaderLabNumber" => $lab_number,
"records" => $this->get_nonlab_timestamp($lab_number)
));
exit;
} catch (Exception $exc) {
$this->sys_error($exc->getMessage());
exit;
}
}
public function lab()
{
try {
$order = $this->require_order_header();
$lab_number = $order["T_OrderHeaderLabNumber"];
$this->sys_ok(array(
"T_OrderHeaderID" => $order["T_OrderHeaderID"],
"T_OrderHeaderLabNumber" => $lab_number,
"records" => $this->get_lab_timestamp($lab_number)
));
exit;
} catch (Exception $exc) {
$this->sys_error($exc->getMessage());
exit;
}
}
public function generate_token()
{
try {