Esempio n. 1
0
 private static void determineAchievoIds() {
   for (DayAtWork day : days) {
     for (WorkActivity activity : day.getActivities()) {
       if (!activity.isBookingRequired()) continue;
       if (activity.getAchievoId() != null) continue;
       String hiszillaId = activity.getHiszillaId();
       if (hiszillaId != null) {
         activity.setAchievoId(determineAchievoIdByHiszillaId(hiszillaId, activity.getText()));
       } else {
         activity.setAchievoId(determineAchievoIdByText(activity.getText()));
       }
     }
   }
 }
Esempio n. 2
0
 private static void writeCsv(File file) throws IOException {
   FileWriter out = new FileWriter(file);
   CsvWriter csv = new CsvWriter(out);
   int currentMonth = 0;
   for (DayAtWork day : days) {
     if (currentMonth != day.getDate().getMonth()) {
       currentMonth = day.getDate().getMonth();
       csv.closeRecord();
       csv.closeRecord();
     }
     for (WorkActivity activity : day.getActivities()) {
       if (!activity.isBookingRequired()) continue;
       activity.appendTo(csv);
     }
   }
   out.close();
 }