kamshory / ZKLibrary

ZKLibrary is PHP library for reading and writing data to attendance device using UDP protocol. This library useful to comunicate between web server and attendance device directly without addition program. This library is implemented in the form of class. So that you can create an object and use it functions.
GNU General Public License v2.0
193 stars 176 forks source link

Doesn't get the Verification Type on getAttendance. #92

Open nik-endozo opened 4 years ago

nik-endozo commented 4 years ago

No check in and out, overtime in and out. What does the "state" for? It is always 1.

shanbwp commented 4 years ago

your are right am also have this same issue .how to get in & out ?

MrSupaBeast commented 3 years ago

I have a similar issue, but I think I know what's going on.

I think the issue here is that what's presented in the state column, is not the "check-in" or "check-out" status, but infact, the verification column (Pin/Fingerprint/RFID, in my case below)

My device is based on ZKteco hardware, but manufactured by someone else. And the attlog downloaded to USB from my device presents:

(ID) (Date/Time) (Unknown) (In/ut) (Verification) (Unknown) 1 2020-08-18 10:04:13 1 0 3 0 1 2020-08-18 10:04:36 1 1 3 0 1 2020-08-18 10:04:52 1 0 1 0 1 2020-08-18 10:08:51 1 1 1 0 1 2020-08-18 10:12:15 1 0 4 0 1 2020-08-18 10:12:41 1 1 4 0

When I call the function$zk->getAttendance(); the 2nd array value ($state), displays the results from the 5th column of the attendance log, instead of the 4th column, which is the in/out state.

So instead I'm presented with the following:

UID | ID | Time | State | 9 | 1 | 2020-08-18 10:04:13 | 3 |   10 | 1 | 2020-08-18 10:04:36 | 3 |   11 | 1 | 2020-08-18 10:04:52 | 1 |   12 | 1 | 2020-08-18 10:05:13 | 1 |   13 | 1 | 2020-08-18 10:08:51 | 1 |   14 | 1 | 2020-08-18 10:12:15 | 4 |   15 | 1 | 2020-08-18 10:12:41 | 4 |  

pervej-fac commented 3 years ago

How can I get In/Out data?