/* ------check-In time----- */ Check_In_Time = attendance_log.get("Check_In_Time"); Check_In_temp_time = Check_In_Time.getSuffix("T"); Check_In_time_f = Check_In_temp_time.subString(0,8); Temp_Check_In_Time = Check_In_Time.toTime(); Check_In_date = Temp_Check_In_Time.getDay().toLong(); if(Check_In_date < 10) { Check_In_date = "0" + Check_In_date; } Check_In_month = Temp_Check_In_Time.getMonth().toLong(); if(Check_In_month < 10) { Check_In_month = "0" + Check_In_month; } Check_In_year = Temp_Check_In_Time.getYear(); Final_Check_In_Time = Check_In_date + "/" + Check_In_month + "/" + Check_In_year + " " + Check_In_time_f; /* ------check-out time----- */ Check_Out_Time = attendance_log.get("Check_Out_Time"); if(Check_Out_Time != null) { Check_Out_temp_time = Check_Out_Time.getSuffix("T"); Check_Out_time_f = Check_Out_temp_time.subString(0,8); Temp_Check_Out_Time = Check_Out_Time.toTime(); Check_Out_date = Temp_Check_Out_Time.getDay().toLong(); if(Check_Out_date < 10) { Check_Out_date = "0" + Check_Out_date; } Check_Out_month = Temp_Check_Out_Time.getMonth().toLong(); if(Check_Out_month < 10) { Check_Out_month = "0" + Check_Out_month; } Check_Out_year = Temp_Check_Out_Time.getYear(); Final_Check_Out_Time = Check_Out_date + "/" + Check_Out_month + "/" + Check_Out_year + " " + Check_Out_time_f; } /* ------Owner Email----- */ owner_map = attendance_log.get("Owner").toMap(); owner_email = owner_map.get("email"); /* ------People Check-In check-Out Code----- */ if(Check_Out_Time == null) { paramMap = Map(); paramMap.put("dateFormat","dd/MM/yyyy HH:mm:ss"); paramMap.put("checkIn",Final_Check_In_Time); paramMap.put("emailId",owner_email); response = invokeurl [ type :POST parameters:paramMap connection:"zohopeoplecon" ]; } else { paramMap = Map(); paramMap.put("dateFormat","dd/MM/yyyy HH:mm:ss"); paramMap.put("checkOut",Final_Check_Out_Time); paramMap.put("emailId",owner_email); response = invokeurl [ type :POST parameters:paramMap connection:"zohopeoplecon" ]; info "response: " + response; } |