diff --git a/controllers/DeviceController.php b/controllers/DeviceController.php index 25c10262..fe5742a7 100644 --- a/controllers/DeviceController.php +++ b/controllers/DeviceController.php @@ -427,6 +427,19 @@ class DeviceController extends Controller { "TimeZoneInfos" => $TimeZoneInfos ]), true); if ($res["ErrorCode"] !== "-1") { + common::requestToCardService("/DeleteDeviceData/User", [ + "DeviceIP" => $deviceInfo->ip_address, + "UserAuthorizeInfos" => [ + [ + "CardNo" => "", + "Pin" => "", + "Password" => "", + "Group" => "", + "StartTime" => "", + "EndTime" => "" + ] + ] + ]); common::requestToCardService("/DeleteDeviceData/UserAuthorize", [ "DeviceIP" => $deviceInfo->ip_address, "UserAuthorizeInfos" => [ diff --git a/models/LogsSearch.php b/models/LogsSearch.php index 317f5334..93c3774e 100644 --- a/models/LogsSearch.php +++ b/models/LogsSearch.php @@ -65,6 +65,8 @@ class LogsSearch extends Logs { $query->andFilterWhere(['department_id' => $this->staff_department]); if ($this->staff_code) $query->andFilterWhere(['code' => $this->staff_code]); + if ($this->card_number) + $query->andFilterWhere(['logs.card_number' => $this->card_number]); // grid filtering conditions $query->andFilterWhere([