'ID', 'staff_id' => 'Staff ID', 'card_number' => 'card_number', 'device_id' => 'Device ID', 'door_id' => 'Door ID', 'in_out_state' => 'In Out State', 'time' => 'Time', 'event_type' => 'Event Type', ]; } public function multiCreate($datas) { $field = ['staff_id', 'card_number', 'device_id', 'door_id', 'in_out_state', 'time', 'event_type']; static::getDb()->createCommand()->batchInsert($this->tableName(), $field, $datas)->execute(); return true; } public static function parseTime($time) { $temp = intval($time); $second = $temp % 60; $temp = $temp / 60; $minute = $temp % 60; $temp = $temp / 60; $hour = $temp % 24; $temp = $temp / 24; $day = $temp % 31 + 1; $temp = $temp / 31; $month = $temp % 12 + 1; $temp = $temp / 12; $year = $temp + 2000; $timeFull = sprintf("%02d", $hour) . ":" . sprintf("%02d", $minute) . ":" . sprintf("%02d", $second) . " " . sprintf("%02d", $day) . "/" . sprintf("%02d", $month) . "/" . intval($year); return date_format(date_create_from_format('H:i:s d/m/Y', $timeFull), 'U'); } }