"WeChat Enterprise number Attendance" using what method to judge the staff in the resident office sign-off

Source: Internet
Author: User
"Enterprise attendance" in what way to judge the staff in the resident office sign-off
A novice, here to ask you predecessors a question.
Recently in the enterprise number of attendance check-out function, now the server backstage has been able to receive the user sent over the geographical location (latitude and longitude), my demand is the user is only allowed in the Resident office area (assuming that the office is large, hundreds of square, in this area can sign-off, Not allowed outside the region) check-out.

get to the latitude and longitude returned by the user in what way to determine whether it is allowed to sign in and check back??

If the location information of the office location of the employee is stored in the database and then compared with the latitude and longitude returned, this is a large office location, how is location information stored? How can judgment be judged?
------to solve the idea----------------------
First of all! The current map positioning error is not too accurate, fortunately, in the company, whether it is WIFI,GPS positioning is accurate, the general error within 100 meters, the best to reach 50 meters.
1:
The database stores the company's personnel half-yearly office location in the center of latitude and longitude. And with pity Dorado as the center, the distance between the storage pity Dorado to the maximum allowable office distance is the radius. Each time the user check-in or sign-off, if a, b two points, a point of longitude, latitude respectively Λa and φa,b points longitude, latitude respectively λb and φb,d for distance.
Use the following methods:
D=111.12cos{1/[sinφasinφb 10 Cosφacosφbcos (λb-λa)]}
The distance between calculations is compared to the distance (radius) allowed by the corresponding user in the database. Sign-in check-out is allowed within the RADIUS range.

2: Same as 1. The problem is converted to a point coordinate known as the center of the point, the radius of R, and the coordinates of all points on the circle.
2.1:
Select the staff regular Office location center into the database, calculate the maximum allowable range of pity Dorado distance of all latitude and longitude, stored in the database (not recommended, also unscientific, the amount of data is too large. )。
2.2:
。 The four points that are rectangles are stored in a database. The user compares the values in the database when checking in.
I hope this article will help you get your http://digdeeply.org/archives/06152067.html.

Recommendation 2.2 method.

There must be some error.



Let's get some points.

------to solve the idea----------------------
The range is small to set a center point, judging Radius bai.
But sometimes it's not good to solve.

Want to ask is in addition to latitude and longitude can get network status?
Or at the time of submission of IP is the company extranet/intranet IP can check in and so on
------to solve the idea----------------------
Citation:
first! The current map positioning error is not too accurate, fortunately, in the company, whether it is WIFI,GPS positioning is accurate, the general error within 100 meters, the best to reach 50 meters.
1:
The database stores the company's personnel half-yearly office location in the center of latitude and longitude. And with pity Dorado as the center, the distance between the storage pity Dorado to the maximum allowable office distance is the radius. Each time the user check-in or sign-off, if a, b two points, a point of longitude, latitude respectively Λa and φa,b points longitude, latitude respectively λb and φb,d for distance.
Use the following methods:
D=111.12cos{1/[sinφasinφb 10 Cosφacosφbcos (λb-λa)]}
The distance between calculations is compared to the distance (radius) allowed by the corresponding user in the database. Sign-in check-out is allowed within the RADIUS range.

2: Same as 1. The problem is converted to a point coordinate known as the center of the point, the radius of R, and the coordinates of all points on the circle.
2.1:
Select the staff regular Office location center into the database, calculate the maximum allowable range of pity Dorado distance of all latitude and longitude, stored in the database (not recommended, also unscientific, the amount of data is too large. )。
2.2:
。 The four points that are rectangles are stored in a database. The user compares the values in the database when checking in.
I hope this article will help you get your http://digdeeply.org/archives/06152067.html.

Recommendation 2.2 method.

There must be some error.



Let's get some points.
  • 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.