update tính năng thống kê chấm công và xuất dữ liệu chấm công

This commit is contained in:
2020-10-16 17:48:38 +07:00
parent 4ba094ab24
commit 0314fa4158
12 changed files with 425 additions and 5 deletions

View File

@@ -14,13 +14,14 @@ class LogsSearch extends Logs {
public $staff_name;
public $staff_department;
public $staff_code;
/**
* {@inheritdoc}
*/
public function rules() {
return [
[['id', 'staff_id', 'device_id', 'in_out_state', 'event_type', 'card_number', 'staff_department'], 'integer'],
[['id', 'staff_id', 'device_id', 'in_out_state', 'event_type', 'card_number', 'staff_department', 'staff_code'], 'integer'],
[['staff_name'], 'safe'],
];
}
@@ -62,6 +63,8 @@ class LogsSearch extends Logs {
$query->andFilterWhere(['LIKE', 'name', $this->staff_name]);
if ($this->staff_department)
$query->andFilterWhere(['department_id' => $this->staff_department]);
if ($this->staff_code)
$query->andFilterWhere(['code' => $this->staff_code]);
// grid filtering conditions
$query->andFilterWhere([