Subversion Repositories SmartDukaan

Rev

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

Rev 27428 Rev 27432
Line 106... Line 106...
106
		// EmployeeAttendance employeeAttendance =
106
		// EmployeeAttendance employeeAttendance =
107
		// employeeAttendanceRepository.selectLatestPunchTimeStamp();
107
		// employeeAttendanceRepository.selectLatestPunchTimeStamp();
108
 
108
 
109
		List<EmployeeAttendance> employeeAttendances = employeeAttendanceRepository.selectByUserIdKey(userId, deviceId,
109
		List<EmployeeAttendance> employeeAttendances = employeeAttendanceRepository.selectByUserIdKey(userId, deviceId,
110
				LocalDate.now());
110
				LocalDate.now());
-
 
111
 
-
 
112
		LOGGER.info("hyperTrackKey" + hyperTrackKey);
-
 
113
		LOGGER.info("employeeAttendance" + employeeAttendances);
111
		OkHttpClient client = new OkHttpClient();
114
		OkHttpClient client = new OkHttpClient();
112
 
115
 
113
		String authString = "Basic "
116
		String authString = "Basic "
114
				+ Base64.getEncoder().encodeToString(String.format("%s:%s", ACCOUNT_ID, SECRET_KEY).getBytes());
117
				+ Base64.getEncoder().encodeToString(String.format("%s:%s", ACCOUNT_ID, SECRET_KEY).getBytes());
115
 
118
 
Line 127... Line 130...
127
		double dist = distance(lat1, lng1, lat2, lng2, "m");
130
		double dist = distance(lat1, lng1, lat2, lng2, "m");
128
		EmployeeAttendanceModel em = new EmployeeAttendanceModel();
131
		EmployeeAttendanceModel em = new EmployeeAttendanceModel();
129
		em.setDistance(dist);
132
		em.setDistance(dist);
130
		em.setLatitude(lat2);
133
		em.setLatitude(lat2);
131
		em.setLongitude(lng2);
134
		em.setLongitude(lng2);
132
		LOGGER.info("hyperTrackKey" + hyperTrackKey);
-
 
133
		LOGGER.info("employeeAttendance" + employeeAttendances);
-
 
-
 
135
 
134
		if (!employeeAttendances.isEmpty()) {
136
		if (!employeeAttendances.isEmpty()) {
135
			if (employeeAttendances.get(0).getCreateTimestamp().toLocalDate().equals(LocalDate.now())) {
137
			if (employeeAttendances.get(0).getCreateTimestamp().toLocalDate().equals(LocalDate.now())) {
136
				if (employeeAttendances.get(0).getPunch().equals("punchIn")) {
138
				if (employeeAttendances.get(0).getPunch().equals("punchIn")) {
137
					em.setPunchIn(true);
139
					em.setPunchIn(true);
138
				} else {
140
				} else {