Subversion Repositories SmartDukaan

Rev

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

Rev 27421 Rev 27422
Line 91... Line 91...
91
		if (hyperTrackKey == null) {
91
		if (hyperTrackKey == null) {
92
			hyperTrackKey = new HypertrackKey();
92
			hyperTrackKey = new HypertrackKey();
93
			hyperTrackKey.setHypertrackKeyId(hyperTrackKeyModel.getHyperTrackId());
93
			hyperTrackKey.setHypertrackKeyId(hyperTrackKeyModel.getHyperTrackId());
94
			hyperTrackKey.setDeviceId(hyperTrackKeyModel.getDeviceId());
94
			hyperTrackKey.setDeviceId(hyperTrackKeyModel.getDeviceId());
95
		}
95
		}
96
	
96
 
97
		hyperTrackKey.setUserId(hyperTrackKeyModel.getUserId());
97
		hyperTrackKey.setUserId(hyperTrackKeyModel.getUserId());
98
		hyperTrackKey.setCreatedTimestamp(LocalDateTime.now());
98
		hyperTrackKey.setCreatedTimestamp(LocalDateTime.now());
99
		hyperTrackKey.setUpdatedTimestamp(LocalDateTime.now());
99
		hyperTrackKey.setUpdatedTimestamp(LocalDateTime.now());
100
		hypertrackKeyRepository.persist(hyperTrackKey);
100
		hypertrackKeyRepository.persist(hyperTrackKey);
101
		return responseSender.ok(true);
101
		return responseSender.ok(true);
Line 130... Line 130...
130
		double lat2 = coords.getDouble(1);
130
		double lat2 = coords.getDouble(1);
131
		double lng2 = coords.getDouble(0);
131
		double lng2 = coords.getDouble(0);
132
		double dist = distance(lat1, lng1, lat2, lng2, "m");
132
		double dist = distance(lat1, lng1, lat2, lng2, "m");
133
		EmployeeAttendanceModel em = new EmployeeAttendanceModel();
133
		EmployeeAttendanceModel em = new EmployeeAttendanceModel();
134
		em.setDistance(dist);
134
		em.setDistance(dist);
135
 
-
 
-
 
135
		em.setLatitude(lat2);
-
 
136
		em.setLongitude(lng2);
136
		if (!employeeAttendance.isEmpty()) {
137
		if (!employeeAttendance.isEmpty()) {
137
			if (employeeAttendance.get(0).getPunch().equals("punchIn")) {
138
			if (employeeAttendance.get(0).getPunch().equals("punchIn")) {
138
				em.setPunchIn(true);
139
				em.setPunchIn(true);
139
			} else {
140
			} else {
140
				em.setPunchIn(false);
141
				em.setPunchIn(false);