Subversion Repositories SmartDukaan

Rev

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

Rev 28122 Rev 28123
Line 140... Line 140...
140
 
140
 
141
			Response resp = client.newCall(request2).execute();
141
			Response resp = client.newCall(request2).execute();
142
			LOGGER.info("resp" + resp);
142
			LOGGER.info("resp" + resp);
143
			em = new EmployeeAttendanceModel();
143
			em = new EmployeeAttendanceModel();
144
			em.setPunchIn(false);
144
			em.setPunchIn(false);
-
 
145
			em.setDeviceStatus(status);
145
		} else if (status.equals("active")) {
146
		} else if (status.equals("active")) {
146
			JSONObject c = jsonObj.getJSONObject("location");
147
			JSONObject c = jsonObj.getJSONObject("location");
147
			JSONObject d = c.getJSONObject("geometry");
148
			JSONObject d = c.getJSONObject("geometry");
148
			JSONArray coords = d.getJSONArray("coordinates");
149
			JSONArray coords = d.getJSONArray("coordinates");
149
 
150
 
Line 195... Line 196...
195
					em.setPunchSeconds(seconds);
196
					em.setPunchSeconds(seconds);
196
				}
197
				}
197
 
198
 
198
			} else {
199
			} else {
199
				em.setPunchIn(false);
200
				em.setPunchIn(false);
-
 
201
				em.setDeviceStatus(status);
200
			}
202
			}
201
		} else {
203
		} else {
202
 
204
 
203
			LOGGER.info("status3" + status);
205
			LOGGER.info("status3" + status);
204
 
206
 
205
			em.setPunchIn(false);
207
			em.setPunchIn(false);
-
 
208
			em.setDeviceStatus(status);
206
		}
209
		}
207
		return responseSender.ok(em);
210
		return responseSender.ok(em);
208
	}
211
	}
209
 
212
 
210
	private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {
213
	private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {