You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
436 lines
20 KiB
436 lines
20 KiB
<?php
|
|
|
|
/**
|
|
* by單台計算MI
|
|
* @url /wms/mkt/pricereview_mi-api.php
|
|
* @method POST
|
|
* @return JSON
|
|
*
|
|
* request
|
|
* {
|
|
* "pa"
|
|
* }
|
|
* pa : 價審單序號,是否汰改
|
|
* respons json
|
|
* {
|
|
* "st" : "ok",
|
|
* "err" : ""
|
|
* }
|
|
**/
|
|
ob_start();
|
|
include "../header.php";
|
|
ob_end_clean();
|
|
$rarr = array('st' => 'ok', 'err' => '');
|
|
|
|
try {
|
|
|
|
if (empty($_POST) || empty($_POST["pa"])) throw new \Exception("parameter empty");
|
|
$user_id = empty($_POST['user_id']) ? '' : $_POST['user_id'];
|
|
foreach ($_POST as $k => $v) {
|
|
$$k = htmlspecialchars(stripslashes(trim($v)));
|
|
}
|
|
|
|
if (empty($pa)) throw new \Exception("parameter empty[2]");
|
|
$opt = "";
|
|
if (strpos($pa, ",")) list($id, $opt) = explode(",", $pa);
|
|
else $id = $pa;
|
|
|
|
$person2weight_arr = [
|
|
"6" => "450",
|
|
"8" => "550",
|
|
"9" => "600",
|
|
"10" => "700",
|
|
"11" => "750",
|
|
"12" => "800",
|
|
"13" => "900",
|
|
"15" => "1000",
|
|
"17" => "1150",
|
|
"20" => "1350",
|
|
"24" => "1600"
|
|
];
|
|
|
|
$elev_arr = $elev_opt_arr = $pv_arr = $opt_elev_arr = $mi_arr = [];
|
|
$i = $weight = $elev_qty_all = 0;
|
|
|
|
// 電梯項目
|
|
$sql = "select note, item_qty, item_weight, item_op, item_spec, item_no from pricereview_item where mid = '$id' and item_group = 'A' order by item_no";
|
|
$res = mysqli_query($link, $sql);
|
|
while ($row = mysqli_fetch_row($res)) {
|
|
if (!empty($row[0])) list($etype, $persons, $floors, $speed) = explode(",", $row[0]);
|
|
else $etype = $persons = $floors = $speed = '';
|
|
/*
|
|
$item_qty = $row[1]; // 數量
|
|
$item_weight = $row[2]; // 載重
|
|
$item_op = $row[3]; // 開門方式
|
|
$item_spec = $row[4]; // 電梯規格
|
|
$item_no = $row[5];
|
|
*/
|
|
$elev_arr[$row[5]]["item_qty"] = $row[1];
|
|
$elev_arr[$row[5]]["item_weight"] = $row[2];
|
|
$elev_arr[$row[5]]["item_op"] = $row[3];
|
|
$elev_arr[$row[5]]["item_qty"] = $row[1];
|
|
$elev_arr[$row[5]]["item_spec"] = $row[4];
|
|
$elev_arr[$row[5]]["etype"] = $etype;
|
|
$elev_arr[$row[5]]["persons"] = $persons;
|
|
$elev_arr[$row[5]]["floors"] = $floors;
|
|
$elev_arr[$row[5]]["speed"] = $speed;
|
|
$elev_arr[$row[5]]["option"] = [];
|
|
$elev_arr[$row[5]]["mn"] = [];
|
|
$elev_qty_all += $row[1];
|
|
}
|
|
mysqli_free_result($res);
|
|
|
|
// 特殊費用平均分到每台電梯
|
|
$specarr = [];
|
|
$sql = "select special_fee from pricereview_main where id = '$id'";
|
|
$res = mysqli_query($link, $sql);
|
|
$row = mysqli_fetch_row($res);
|
|
$special_fee = $row[0];
|
|
mysqli_free_result($res);
|
|
$specarr[0] = "服務費";
|
|
if($elev_qty_all == 0 ){
|
|
$specarr[1] = 0;
|
|
$specarr[1] = round($special_fee / 1, 0);
|
|
|
|
}else{
|
|
$specarr[1] = round($special_fee / $elev_qty_all, 0);
|
|
}
|
|
|
|
// 電梯所屬OPTION
|
|
$opt_sel_id_arr = [];
|
|
$sql = "select id, price_id, item_spec, item_qty, option_relate_spec from pricereview_item where mid = '$id' and item_group = 'B'";
|
|
$res = mysqli_query($link, $sql);
|
|
while ($row = mysqli_fetch_row($res)) {
|
|
$opt_elev_arr[$row[0]]["price_id"] = $row[1];
|
|
$opt_elev_arr[$row[0]]["item_spec"] = $row[2];
|
|
$opt_elev_arr[$row[0]]["item_qty"] = $row[3];
|
|
$tmp_arr = explode(",", $row[4]);
|
|
$opt_elev_arr[$row[0]]["elev_no"] = $tmp_arr;
|
|
if (!empty($opt_elev_arr[$row[0]]["elev_no"][0])) {
|
|
foreach ($tmp_arr as $v) {
|
|
$elev_arr[$v]["option"][] = $row[0];
|
|
$opt_sel_id_arr[] = $row[0];
|
|
}
|
|
}
|
|
|
|
/*
|
|
$pv_arr["price_id"] = $row[1];
|
|
$pv_arr["item_spec"] = $row[2];
|
|
$pv_arr["item_qty"] = $row[3];
|
|
$pv_arr["elev_item_no"] = explode(",", $row[4]);
|
|
|
|
$tmp_arr = explode(",", $row[4]);
|
|
foreach ($tmp_arr as $v) {
|
|
$elev_opt_arr[$v][] = $pv_arr;
|
|
}
|
|
*/
|
|
}
|
|
mysqli_free_result($res);
|
|
$opt_nosel_id_arr = array_diff(array_keys($opt_elev_arr), $opt_sel_id_arr);
|
|
|
|
// 電梯所屬保固延長
|
|
$mn_elev_arr = $mn_sel_id_arr = [];
|
|
$sql = "select id, item_spec, item_price_bp, option_relate_spec, item_qty from pricereview_item where mid = '$id' and item_group = 'D'";
|
|
$res = mysqli_query($link, $sql);
|
|
while ($row = mysqli_fetch_row($res)) {
|
|
if($row[4] == 0){
|
|
continue;
|
|
}
|
|
$mn_elev_arr[$row[0]]["item_spec"] = $row[1];
|
|
$mn_elev_arr[$row[0]]["item_price_bp"] = $row[2];
|
|
$tmp_arr = explode(",", $row[3]);
|
|
$mn_elev_arr[$row[0]]["elev_no"] = $tmp_arr;
|
|
foreach ($tmp_arr as $v) {
|
|
$elev_arr[$v]["mn"][] = $row[0];
|
|
$mn_sel_id_arr[] = $row[0];
|
|
}
|
|
}
|
|
mysqli_free_result($res);
|
|
$mn_nosel_id_arr = array_diff(array_keys($mn_elev_arr), $mn_sel_id_arr);
|
|
|
|
// 除外項目平均分到每台電梯
|
|
$exarr = [];
|
|
$ex_fee = $j = 0;
|
|
$sql = "select id, item_spec, item_price_bp, item_qty from pricereview_item where mid = '$id' and item_group = 'E'";
|
|
$res = mysqli_query($link, $sql);
|
|
while ($row = mysqli_fetch_row($res)) {
|
|
if($row[3] == 0){
|
|
continue;
|
|
}
|
|
$exarr[$j][0] = $row[1];
|
|
if($elev_qty_all == 0 || false){
|
|
$exarr[$j][1] = 0;
|
|
$specarr[1] = round($special_fee / 1, 0);
|
|
}else{
|
|
$exarr[$j][1] = round($row[2] / $elev_qty_all, 0);
|
|
}
|
|
$ex_fee += $exarr[$j][1];
|
|
$j++;
|
|
}
|
|
mysqli_free_result($res);
|
|
|
|
// 拆梯&美容平均分到每台電梯
|
|
$dismantle_fee = $dismantle_amt = $polishing_fee = $polishing_amt = 0;
|
|
if ($opt == "R") {
|
|
$sql3 = "select item_spec, item_qty, note from pricereview_item where mid = '$id' and item_group = 'C'";
|
|
$res_i = mysqli_query($link, $sql3);
|
|
while ($row_i = mysqli_fetch_assoc($res_i)) {
|
|
if($row_i[1] == 0){
|
|
continue;
|
|
}
|
|
$sql4 = "select min_floors, price, price_plus from dismantle_mi_option where spec = '" . $row_i["item_spec"] . "' ";
|
|
$sql4 .= "and version_date = '2023-09-04'";
|
|
$sql4 .= "and ($row_i[note] between min_floors and max_floors) ";
|
|
$res_d = mysqli_query($link, $sql4);
|
|
if ($row_d = mysqli_fetch_assoc($res_d)) {
|
|
$dismantle_amt += ($row_d["price"] + $row_d["price_plus"] * ($row_i["note"] - $row_d["min_floors"])) * $row_i["item_qty"];
|
|
$polishing_amt += 3000 * $row_i["note"];
|
|
}
|
|
mysqli_free_result($res_d);
|
|
}
|
|
mysqli_free_result($res_i);
|
|
}
|
|
if($elev_qty_all == 0 || false){
|
|
$dismantle_fee = round($dismantle_amt / 1, 0);
|
|
$polishing_fee = round($polishing_amt / 1, 0);
|
|
}else{
|
|
$dismantle_fee = round($dismantle_amt / $elev_qty_all, 0);
|
|
$polishing_fee = round($polishing_amt / $elev_qty_all, 0);
|
|
}
|
|
|
|
|
|
//print_r($elev_arr);
|
|
//print_r($opt_elev_arr);
|
|
//print_r($opt_nosel_id_arr);
|
|
//print_r($mn_elev_arr);
|
|
//print_r($ex_arr);exit;
|
|
// echo json_encode($elev_arr);
|
|
require_once("./conn.php");
|
|
// echo json_encode($elev_arr);
|
|
foreach ((Array)$elev_arr as $item_no => $v) {
|
|
if($item_no == ""){
|
|
echo "null!!!!!";
|
|
continue;
|
|
}
|
|
// 電梯MI
|
|
$elevator_type = $v['etype'];
|
|
$floor = $v['floors'];
|
|
$speed = $v['speed'];
|
|
$min_weight = $v['item_weight'];
|
|
$sql_str = "SELECT elevator_mi_option.*,elevator_quotation_rule.* FROM elevator_mi_option
|
|
JOIN elevator_quotation_rule ON elevator_mi_option.quotation_no = elevator_quotation_rule.quotation_no
|
|
WHERE elevator_mi_option.elevator_type = :elevator_type AND
|
|
elevator_mi_option.min_weight = :min_weight AND elevator_mi_option.min_speed = :speed ";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':elevator_type', $elevator_type);
|
|
$stmt->bindParam(':speed', $speed);
|
|
$stmt->bindParam(':min_weight', $min_weight);
|
|
$stmt->execute();
|
|
$row_e = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
// $sql2 = "select o.*, r.* from elevator_mi_option o, elevator_quotation_rule r ";
|
|
// $sql2 .= "where o.quotation_no = r.quotation_no and o.elevator_type = '" . $v['etype'] . "' ";
|
|
// $sql2 .= "and ($v[item_weight] between o.min_weight and o.max_weight) ";
|
|
// $sql2 .= "and ($v[floors] between o.min_floors and o.max_floors) ";
|
|
// $sql2 .= "and ($v[speed] between o.min_speed and o.max_speed) ";
|
|
// if ($v["etype"] == "MAQ100" || $v["etype"] == "MAP100") {
|
|
// $sql2 .= "and (o.model_no = '" . $v["persons"] . "') ";
|
|
// }
|
|
// // echo $sql2;
|
|
// $res_e = mysqli_query($link, $sql2);
|
|
//$row_e = mysqli_fetch_assoc($res_e)
|
|
if ($row_e || true) {
|
|
// 加價:先不納入
|
|
$row_e["option_price"] = 0;
|
|
// 基准采购成本+±1停材料费+设计费+出口费用
|
|
$part1 = $row_e["purchase_cost"] + ($v["floors"] - $row_e["base_floor"]) * $row_e["material_plus"] + $row_e["design"] * $row_e["design_hour"] + $row_e["export_fee"];
|
|
// 利潤
|
|
$profit = 0;
|
|
// $profit = round($part1 * $row_e["profit"] + $row_e["equip_profit"], 0);
|
|
// 設備
|
|
$equipment_ntd = round(($part1 + $profit) * $row_e["equipment"], 0);
|
|
// 報關+運輸
|
|
$customs = round($equipment_ntd * $row_e["shipping"], 0) + $row_e["customs_shipping"];
|
|
// 安裝基價
|
|
$install_base = $row_e["install_price"] + $row_e["trial_price"] + $row_e["install_coef"] * $row_e["install_plus"] + $row_e["trial_coef"] * $row_e["trial_plus"];
|
|
// 安裝成本
|
|
$install_price = round($install_base + ($row_e["install_plus"] + $row_e["trial_plus"]) * ($v["floors"] - $row_e["base_floor"]), 0);
|
|
// 起吊+木箱+耗材
|
|
$woods = $row_e["crane"] + $row_e["wooden_box"] + $row_e["consume"] + $row_e["consumables"];
|
|
// MI
|
|
$mi = $equipment_ntd + $customs + $row_e["unloading"] + $row_e["transport_site"] + $install_price + $row_e["free1y"] + $woods + $row_e["option_price"];
|
|
|
|
/*
|
|
$install_price = $row_e["install_price"] + $row_e["install_plus"]*($floors - $row_e["min_floors"]); // 安裝
|
|
$trial_price = $row_e["trial_price"] + $row_e["trial_plus"]*($floors - $row_e["min_floors"]); // 試車
|
|
$extra_fee = round($row_e["install_price"]*$row_e["extra_rate"], 0); // 預抓配合工程
|
|
// 安裝成本
|
|
$install_cost_total = $install_price + $trial_price + $extra_fee + $row_e["crane"] + $row_e["wooden_box"] + $row_e["consume"] + $row_e["consumables"];
|
|
// 設計費
|
|
$design_fee = $row_e["design"]*$row_e["design_hour"];
|
|
// 利潤
|
|
if (strpos($row_e["profit"], ".") !== false) {
|
|
$profit_amt = round(($row_e["purchase_cost"] + ($floors - $row_e["base_floor"])*$row_e["material_plus"] + $design_fee + $row_e["export_fee"])*$row_e["profit"], 0);
|
|
} else $profit_amt = $row_e["profit"];
|
|
// 報價
|
|
$quotation = $row_e["purchase_cost"] + ($floors - $row_e["base_floor"])*$row_e["material_plus"] + $design_fee + $row_e["export_fee"] + $profit_amt;
|
|
// 設備折合台幣
|
|
$equipment_ntd = round($quotation*$row_e["equipment"], 0);
|
|
// 報關+運輸費
|
|
if (strpos($row_e["shipping"], ".") !== false) {
|
|
$shipping_fee = round($equipment_ntd*$row_e["shipping"], 0);
|
|
} else $shipping_fee = $row_e["shipping"];
|
|
// MI
|
|
$mi = $equipment_ntd + $shipping_fee + $row_e["unloading"] + $row_e["transport_site"] + $install_cost_total + $row_e["free1y"] + $row_e["option_price"] + $row_e["weight_price"];
|
|
*/
|
|
// 拆梯價格
|
|
/*
|
|
$dismantle_fee = $polishing_fee = 0;
|
|
if ($opt == "R") {
|
|
$sql3 = "select item_spec, item_qty, note from pricereview_item where mid = '$id' and item_group = 'C'";
|
|
$res_i = mysqli_query($link, $sql3);
|
|
while ($row_i = mysqli_fetch_assoc($res_i)) {
|
|
$sql4 = "select min_floors, price, price_plus from dismantle_mi_option where spec = '".$row_i["item_spec"]."' ";
|
|
$sql4 .= "and ($floors between min_floors and max_floors) ";
|
|
$sql4 .= "and version_date = '2023-09-04'";
|
|
$res_d = mysqli_query($link, $sql4);
|
|
if ($row_d = mysqli_fetch_assoc($res_d)) {
|
|
$dismantle_fee += ($row_d["price"] + $row_d["price_plus"]*($floors - $row_d["min_floors"]))*$row_i["item_qty"];
|
|
$polishing_fee += 3000*$row_i["note"];
|
|
}
|
|
mysqli_free_result($res_d);
|
|
}
|
|
mysqli_free_result($res_i);
|
|
}
|
|
*/
|
|
|
|
// Option價格
|
|
$oparr = [];
|
|
$option_fee = $j = 0;
|
|
$todo_opt_arr = $v["option"];
|
|
if (empty($todo_opt_arr)) $todo_opt_arr = $opt_nosel_id_arr;
|
|
if (!empty($todo_opt_arr)) {
|
|
foreach ($todo_opt_arr as $val) {
|
|
$sql4 = "select o.base_floor, o.base_floor_plus, o.price, r.equipment, p.price 'OP' ";
|
|
$sql4 .= "from option_mi o, elevator_quotation_rule r, option_price p ";
|
|
$sql4 .= "where o.quotation_no = r.quotation_no and o.option_price_id = p.id ";
|
|
$sql4 .= "and o.option_price_id = " . $opt_elev_arr[$val]["price_id"] . " ";
|
|
$sql4 .= "and ($v[item_weight] between o.min_weight and o.max_weight) and o.open_kind = '" . $v["item_op"] . "'";
|
|
|
|
$res_om = mysqli_query($link, $sql4);
|
|
if ($row_om = mysqli_fetch_assoc($res_om)) {
|
|
$row_om['price'] = (int)ceil($row_om['price']);
|
|
$plus = ($v["floors"] > $row_om["base_floor"]) ? ($v["floors"] - $row_om["base_floor"]) * $row_om["base_floor_plus"] : 0;
|
|
// 特例
|
|
if ($opt_elev_arr[$val]["price_id"] == "256" && ($v["floors"] < $row_om["base_floor"])) $row_om["price"] = 9815;
|
|
if ($opt_elev_arr[$val]["price_id"] == "266" && $v["floors"] >= 20) $plus += 44.8; // 15层,14.6元/层(19层内,跳20层再追加44.8元)
|
|
if ($row_om["price"] == 0) $row_om["price"] = $row_om["OP"] * 0.6; // 實體且沒成本的:抓牌價6成
|
|
// 含此option的電梯總台數
|
|
$myelev_qty = 0;
|
|
foreach ($opt_elev_arr[$val]["elev_no"] as $pval) {
|
|
$myelev_qty += $elev_arr[$pval]["item_qty"];
|
|
}
|
|
// 分配:OPTION數量除以電梯總台數
|
|
$option_amt = round(0 + ($row_om["price"] + $plus) * ($opt_elev_arr[$val]["item_qty"] / $myelev_qty) * $row_om["equipment"], 0);
|
|
$option_fee += $option_amt; // option總金額
|
|
|
|
$oparr[$j][1] = $option_amt;
|
|
} else {
|
|
$oparr[$j][1] = 0;
|
|
}
|
|
$oparr[$j][0] = $opt_elev_arr[$val]["item_spec"];
|
|
$j++;
|
|
}
|
|
}
|
|
// 保固延長
|
|
$mnarr = [];
|
|
$mn_fee = $j = 0;
|
|
$todo_mn_arr = $v["mn"];
|
|
if (!empty($todo_mn_arr[0])) {
|
|
foreach ($todo_mn_arr as $val) {
|
|
$mn_amt = 0;
|
|
// 含此保延的電梯總台數
|
|
$myelev_qty = 0;
|
|
foreach ($mn_elev_arr[$val]["elev_no"] as $pval) {
|
|
$myelev_qty += $elev_arr[$pval]["item_qty"];
|
|
}
|
|
// 分配:延保總價除以電梯總台數
|
|
$mn_amt += round(0 + ($mn_elev_arr[$val]["item_price_bp"] / $myelev_qty), 0);
|
|
$mnarr[$j][0] = $mn_elev_arr[$val]["item_spec"] . "保養費";
|
|
$mnarr[$j][1] = $mn_amt;
|
|
$mn_fee += $mn_amt;
|
|
$j++;
|
|
}
|
|
}
|
|
|
|
/*
|
|
|
|
$sql3 = "select id, price_id, item_spec, item_qty from pricereview_item ";
|
|
$sql3 .= "where mid = '$id' and item_group = 'B' and option_relate_spec like '".$item_no.",%' order by item_no";
|
|
//echo $sql3;exit;
|
|
$res_b = mysqli_query($link, $sql3);
|
|
while ($row_b = mysqli_fetch_assoc($res_b)) {
|
|
$sql4 = "select o.base_floor, o.base_floor_plus, o.price, r.equipment from option_mi o, elevator_quotation_rule r ";
|
|
$sql4 .= "where o.quotation_no = r.quotation_no and o.option_price_id = ".$row_b["price_id"]." ";
|
|
$sql4 .= "and ($item_weight between o.min_weight and o.max_weight) and o.open_kind = '$item_op'";
|
|
$res_om = mysqli_query($link, $sql4);
|
|
$row_om = mysqli_fetch_assoc($res_om);
|
|
$plus = ($floors > $row_om["base_floor"]) ? ($floors - $row_om["base_floor"])*$row_om["base_floor_plus"] : 0;
|
|
|
|
// 特例
|
|
if ($row_b["price_id"] == "256" && ($floors < $row_om["base_floor"])) $row_om["price"] = 9815;
|
|
if ($row_b["price_id"] == "266" && $floors >= 20) $plus += 44.8; // 15层,14.6元/层(19层内,跳20层再追加44.8元)
|
|
|
|
$option_amt = round(0+($row_om["price"]+$plus)*$row_b["item_qty"]*$row_om["equipment"], 0);
|
|
$option_fee += $option_amt; // option總金額
|
|
$oparr[$j][0] = $row_b["item_spec"];
|
|
$oparr[$j][1] = $option_amt;
|
|
$j++;
|
|
mysqli_free_result($res_om);
|
|
}
|
|
mysqli_free_result($res_b);
|
|
*/
|
|
|
|
// 拆台數
|
|
for ($n = 0; $n < $v["item_qty"]; $n++) {
|
|
$mi_arr[$i][0] = $mi + $dismantle_fee + $polishing_fee + $option_fee + $ex_fee + $mn_fee;
|
|
/*
|
|
$mi_arr[$i][1] = $row_e["purchase_cost"];
|
|
$mi_arr[$i][2] = $row_e["material_plus"];
|
|
$mi_arr[$i][3] = $design_fee;
|
|
$mi_arr[$i][4] = $row_e["export_fee"];
|
|
$mi_arr[$i][5] = $profit_amt;
|
|
$mi_arr[$i][6] = $quotation;
|
|
*/
|
|
$mi_arr[$i][1] = 0 + $equipment_ntd;
|
|
$mi_arr[$i][2] = 0 + $customs;
|
|
$mi_arr[$i][3] = 0 + $row_e["unloading"];
|
|
$mi_arr[$i][4] = 0 + $row_e["transport_site"];
|
|
$mi_arr[$i][5] = 0 + $install_price;
|
|
$mi_arr[$i][6] = 0 + $row_e["free1y"];
|
|
$mi_arr[$i][7] = 0 + $woods;
|
|
$mi_arr[$i][8] = $row_e["equipment"];
|
|
$mi_arr[$i][9] = 0 + $row_e["option_price"];
|
|
$mi_arr[$i][10] = 0 + $dismantle_fee;
|
|
$mi_arr[$i][11] = 0 + $polishing_fee;
|
|
$mi_arr[$i][12] = $mi_arr[$i][1] + $mi_arr[$i][2] + $mi_arr[$i][3] + $mi_arr[$i][4] + $mi_arr[$i][5] + $mi_arr[$i][6] + $mi_arr[$i][7] + $mi_arr[$i][9] + $mi_arr[$i][10] + $mi_arr[$i][11];
|
|
$mi_arr[$i][13] = $option_fee + $ex_fee + $mn_fee + $special_fee;
|
|
$mi_arr[$i][14] = $oparr;
|
|
$mi_arr[$i][15] = 0 + $ex_fee;
|
|
$mi_arr[$i][16] = $exarr;
|
|
$mi_arr[$i][17] = 0 + $mn_fee;
|
|
$mi_arr[$i][18] = $mnarr;
|
|
$mi_arr[$i][19] = $specarr;
|
|
$i++;
|
|
}
|
|
}
|
|
// mysqli_free_result($res_e);
|
|
}
|
|
|
|
$rarr["content"] = $mi_arr;
|
|
} catch (\Exception $e) {
|
|
$rarr['st'] = 'err';
|
|
$rarr['err'] = $e->getMessage();
|
|
}
|
|
|
|
echo json_encode($rarr, JSON_UNESCAPED_UNICODE);
|
|
exit;
|
|
|