đồng bộ dữ liệu giữa các thiết bị
This commit is contained in:
@@ -71,7 +71,7 @@ class ApiController extends Controller {
|
||||
"Staff" => $post["id"],
|
||||
"Time" => $time,
|
||||
"Image" => $fileName,
|
||||
"Confidence" => strval($post["confidence"])
|
||||
"Confidence" => strval($post["confidence"])
|
||||
]);
|
||||
Yii::$app->response->format = "json";
|
||||
return ["status" => "success"];
|
||||
@@ -100,14 +100,14 @@ class ApiController extends Controller {
|
||||
public function actionData() {
|
||||
if (Yii::$app->request->post()) {
|
||||
Yii::$app->response->format = "json";
|
||||
return ListManagement::find()->andWhere(["NOT IN", "name", Yii::$app->request->post()])->orderBy(['id' => SORT_DESC])->all();
|
||||
return ListManagement::find()->orderBy(['id' => SORT_DESC])->all();
|
||||
}
|
||||
}
|
||||
|
||||
public function actionFullData() {
|
||||
if (Yii::$app->request->post()) {
|
||||
Yii::$app->response->format = "json";
|
||||
$lists = ListManagement::find()->andWhere(["IN", "id", Yii::$app->request->post()])->orderBy(['id' => SORT_DESC])->all();
|
||||
$lists = ListManagement::find()->andWhere(["IN", "code", Yii::$app->request->post()])->orderBy(['id' => SORT_DESC])->all();
|
||||
$res = [];
|
||||
foreach ($lists as $key => $value) {
|
||||
$f = [];
|
||||
@@ -117,6 +117,7 @@ class ApiController extends Controller {
|
||||
}
|
||||
$res[] = [
|
||||
"id" => $value->id,
|
||||
"code" => $value->code,
|
||||
"type" => $value->type,
|
||||
"name" => $value->name,
|
||||
"gender" => $value->gender,
|
||||
|
||||
Reference in New Issue
Block a user