step 1 : download api 10.9.9.2
This commit is contained in:
49
api/resultentry-v106/Re_normal.php
Normal file
49
api/resultentry-v106/Re_normal.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
class Re_normal extends MY_Controller
|
||||
{
|
||||
var $db_smartone;
|
||||
|
||||
public function index()
|
||||
{
|
||||
echo "RE Normal API";
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->db_smartone = $this->load->database("onedev", true);
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
$prm = $this->sys_input;
|
||||
$od_id = $prm["order_detail_id"];
|
||||
$sql = "call sp_re_update_normal(?)";
|
||||
$this->db_smartone->query($sql, array($od_id));
|
||||
$this->clean_mysqli_connection($this->db_smartone->conn_id);
|
||||
|
||||
$sql_norm = "select T_OrderDetailMinValue, T_OrderDetailMaxValue,
|
||||
T_OrderDetailMinValueInclusive, T_OrderDetailMaxValueInclusive,
|
||||
Nat_TestFlagLow, Nat_TestFlagHigh,
|
||||
T_OrderDetailNat_NormalValueID,
|
||||
T_OrderDetailNat_MethodeID, T_OrderDetailNormalValueNote,
|
||||
Nat_MethodeName
|
||||
from t_orderdetail
|
||||
join t_test on T_OrderDetailT_TestID = T_TestID
|
||||
join nat_methode on T_OrderDetailNat_MethodeID = Nat_MethodeID
|
||||
join nat_test on T_TestNat_TestID = Nat_TestID and T_TestIsActive = 'Y'
|
||||
where T_OrderDetailID = ? ";
|
||||
$qry = $this->db_smartone->query($sql_norm,array($od_id));
|
||||
if ( $qry) {
|
||||
$rows = $qry->result_array();
|
||||
if(count($rows) > 0 ) {
|
||||
$result = array("status"=>"OK","records" => $rows[0]);
|
||||
$this->sys_ok($result);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$this->sys_error_db("Change Methode", $this->db_smartone);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user