Subversion Repositories SmartDukaan

Rev

Rev 28116 | Rev 28123 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28116 Rev 28122
Line 150... Line 150...
150
			double lat2 = coords.getDouble(1);
150
			double lat2 = coords.getDouble(1);
151
			double lng2 = coords.getDouble(0);
151
			double lng2 = coords.getDouble(0);
152
			double dist = distance(lat1, lng1, lat2, lng2, "m");
152
			double dist = distance(lat1, lng1, lat2, lng2, "m");
153
			LOGGER.info("jsonObj" + jsonObj);
153
			LOGGER.info("jsonObj" + jsonObj);
154
			JSONObject deviceData = deviceStatus.getJSONObject("data");
154
			JSONObject deviceData = deviceStatus.getJSONObject("data");
-
 
155
			LOGGER.info("status1" + status);
155
 
156
 
156
			em = new EmployeeAttendanceModel();
157
			em = new EmployeeAttendanceModel();
157
			em.setDistance(dist);
158
			em.setDistance(dist);
158
			em.setLatitude(lat2);
159
			em.setLatitude(lat2);
159
			em.setLongitude(lng2);
160
			em.setLongitude(lng2);
Line 195... Line 196...
195
				}
196
				}
196
 
197
 
197
			} else {
198
			} else {
198
				em.setPunchIn(false);
199
				em.setPunchIn(false);
199
			}
200
			}
-
 
201
		} else {
-
 
202
 
-
 
203
			LOGGER.info("status3" + status);
-
 
204
 
-
 
205
			em.setPunchIn(false);
200
		}
206
		}
201
		return responseSender.ok(em);
207
		return responseSender.ok(em);
202
	}
208
	}
203
 
209
 
204
	private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {
210
	private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {