Multi-user's staff attendance method based on offline client correction computer timeTechnical field
The present invention relates to the human resource management field, be specifically related to a kind of multi-user's staff attendance method based on offline client correction computer time.
Background technology
In order to realize effective management of human resources, adopting attendance management is common and effective way at present.In order to realize effective attendance management, the way of prior art comprises paper slip punched-card machine, fingerprint attendance machine.Though the paper slip punched-card machine is simple, can't realize the active data exchange, can't carry out data and gather, can't realize attendance management efficiently.Though fingerprint attendance machine can be realized exchanges data, generally all need connect through serial port data line, have the problem of using trouble, and the fingerprint attendance machine price general charged is high.Meanwhile, for a lot of enterprises, computing machine is very universal, can reach staff basically more than one, and prior art does not have effectively to utilize the computer resource of enterprises through the independent Time Attendance Device of buying, has the problem of the wasting of resources.
Summary of the invention
The purpose of this invention is to provide and a kind ofly can make full use of computer resource, multi-user's staff attendance method of revising computer time based on offline client with low cost, easy to use.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of multi-user's staff attendance method based on offline client correction computer time, and implementation step is following:
1) definition employee user and password database and on time constant;
2) read the system login daily record of current computer client;
3) obtain the on time the earliest of operating system every day and unused time the latest, the on time deducts the on time constant and replaces the former on time the earliest the earliest;
4), generate the work attendance combined data according to the work attendance register information of storage with the login employee and the on time the earliest of every day of current computer client, unused time, date store as one day work attendance register information the latest.
Further improvement as technique scheme:
The said on time the earliest of obtaining operating system every day specifically comprises: list all start records on the same day, all shutdown records are carried out series arrangement according to the time, read article one start recorded logs time then as on time the earliest.
The said unused time the latest of obtaining operating system every day specifically comprises: list all shutdown records on the same day, all shutdown records are carried out inverted order according to the time arrange, read article one shutdown recorded logs time then as unused time the latest.
When the work attendance register information is stored in the said step 4); Also comprise according to the employee, the earliest the on time, unused time, date generate a checking cryptographic hash through non-reversible algorithm the latest, then with said checking cryptographic hash with the employee, the earliest the on time, unused time, date are stored in the database the latest.
The present invention has following advantage: in the technical scheme of the present invention; Obtain the on time the earliest of operating system every day and unused time the latest; On time deducts the on time constant former on time the earliest of replacement the earliest; With the login employee and the on time the earliest of every day of current computer client, unused time, date store as one day work attendance register information the latest; Work attendance register information according to storage generates the work attendance combined data, can make full use of the staff attendance that computer resource is realized enterprise, has advantage with low cost, easy to use.
Description of drawings
Fig. 1 is the schematic flow sheet of the embodiment of the invention.
Embodiment
As shown in Figure 1, the embodiment of the invention is following based on the implementation step of multi-user's staff attendance method of offline client correction computer time:
1) definition employee user and password database and on time constant;
2) read the system login daily record of current computer client;
3) obtain the on time the earliest of operating system every day and unused time the latest, the on time deducts the on time constant and replaces the former on time the earliest the earliest;
4), generate the work attendance combined data according to the work attendance register information of storage with the login employee and the on time the earliest of every day of current computer client, unused time, date store as one day work attendance register information the latest.
In the present embodiment; The on time the earliest of obtaining operating system every day specifically comprises: all start records of listing the same day; All shutdown records are carried out series arrangement according to the time, read article one start recorded logs time then as on time the earliest.
In the present embodiment; The unused time the latest of obtaining operating system every day specifically comprises: all shutdown records of listing the same day; All shutdown records are carried out inverted order according to the time arrange, read article one shutdown recorded logs time then as unused time the latest.
In the present embodiment; When the work attendance register information is stored in the step 4); Also comprise according to the employee, the earliest the on time, unused time, date generate a checking cryptographic hash through non-reversible algorithm the latest, will verify then cryptographic hash with the employee, the earliest the on time, unused time, date are stored in the database the latest.
The above is merely preferred implementation of the present invention, and protection scope of the present invention is not limited in above-mentioned embodiment, and every technical scheme that belongs to the principle of the invention all belongs to protection scope of the present invention.For a person skilled in the art, some improvement and the retouching under the prerequisite that does not break away from principle of the present invention, carried out, these improvement and retouching also should be regarded as protection scope of the present invention.