Пример #1
0
 public function wasteOut()
 {
     $postData = $_POST['txt_json'];
     echo urldecode(json_encode(wasteOut($postData)));
 }
Пример #2
0
                $error[$key]->des = urlencode('废物已经出库');
                $error[$key]->rfid = $rfid;
                $key++;
            } elseif ($stat == 0) {
                $error[$key]->code = 14;
                $error[$key]->des = urlencode('废物为空');
                $error[$key]->rfid = $rfid;
                $key++;
            } else {
                $time = date("Y-m-d H:i:s");
                $sql1 = "UPDATE rfid SET update_date_time = '{$time}',status = 1 WHERE rfid_id = '{$rfid}'";
                if (!mysql_query($sql1, $con)) {
                    $error[$key]->code = 3;
                    $error[$key]->des = urlencode('更新RFID数据库失败');
                    $error[$key]->rfid = $rfid;
                    $key++;
                }
            }
        }
    }
    mysql_close($con);
    if (isset($error)) {
        $newerror['error'] = $error;
        return $newerror;
    } else {
        $resultData->code = 200;
        return $resultData;
    }
}
echo urldecode(json_encode(wasteOut()));