Time Clock Design scheme

Source: Internet
Author: User

SELECT * from T_kq_wastebook where date_format (kaoqin_time, '%y-%m-%d ') = ' 2016-07-05 '

-How many cards does this unit play? Typically two or four times, no other shifts are supported

--One round shift

06:00:00 to 09:00:00 morning shift between 08:00:00 for normal to post, 08:00:01 to 09:00:00, for late

17:00:00 to 21:00:00 pm departures from 17:00:00 to 17:30:00 and between 17:30:01 and 21:00:00 for normal work



--Two round shifts

06:00:00 to 09:00:00 morning shift between 08:00:00 for normal to post, 08:00:01 to 09:00:00, for late

11:00:00 to 12:00:00 morning shift between 11:00:00 to 11:30:00 for early departure, 11:30:01 to 12:00:00 between, for normal work


12:30:00 to 13:30:00 afternoon shift 13:00:00 before normal to post, 13:00:01 to 13:30:00, for late

17:00:00 to 21:00:00 pm departures from 17:00:00 to 17:30:00 and between 17:30:01 and 21:00:00 for normal work


Other time is invalid clock-in record

--a unit to support the default shift, but also support the special population of the designated shift, frequency is described a few times, support two times and four times, others do not support.
--four fields with four punch-in required maintenance, two clock-out only for the first two fields

 create TABLE ' t_kq_statistic ' (' id '  int  (11  ) not NULL auto_increment, ' person_id '   =innodb default Charset=utf8; 
CREATE TABLE ' T_kq_wastebook ' (  int(one) not NULL auto_increment,  int (one) default null,  ' kaoqin_time ' datetime DEFAULT null,  PRIMARY KEY (' id ')) ENGINE= InnoDB auto_increment=5 DEFAULT Charset=utf8;

Time Clock Design scheme

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.