Commit 1287623a8d28880c1ed78db275754267e5498db7
1 parent
d1b12530
method exchanged in drools and fixed errors
Showing
1 changed file
with
3 additions
and
4 deletions
services/MainBot/src/main/resources/de/bht/beuthbot/drools/Canteen.drl
... | ... | @@ -32,16 +32,15 @@ import de.bht.beuthbot.drools.model.DroolsMessage; |
32 | 32 | |
33 | 33 | import de.bht.beuthbot.scheduler.SchedulerBean |
34 | 34 | import de.bht.beuthbot.jms.TaskMessage |
35 | -import de.bht.beuthbot.scheduler.model.ReminderCycle | |
36 | 35 | import java.util.Date |
37 | 36 | import java.text.SimpleDateFormat |
38 | 37 | import java.text.ParseException |
39 | 38 | import de.bht.beuthbot.model.Messenger |
40 | -import de.bht.beuthbot.scheduler.model.Reminder; | |
41 | 39 | |
42 | 40 | import java.time.DayOfWeek; |
43 | 41 | import java.time.LocalDate |
44 | -import de.bht.beuthbot.utils.DateStringExtractor; | |
42 | +import de.bht.beuthbot.utils.DateStringExtractor | |
43 | +import de.bht.beuthbot.model.entities.Reminder; | |
45 | 44 | |
46 | 45 | global de.bht.beuthbot.canteen.model.CanteenData canteenData; |
47 | 46 | global de.bht.beuthbot.model.entities.AppUser user; |
... | ... | @@ -139,7 +138,7 @@ rule "Create reminder" |
139 | 138 | Reminder reminder = s.createReminder(message, user); |
140 | 139 | String messageText = ""; |
141 | 140 | if(reminder.getIntent() == Intent.SHOW_FOOD.getText()) { |
142 | - messageText = "Ich werde dir " + DateStringExtractor.getGermanWeekDayFromLocalDate(reminder.getCycleDate(), true) + " um " + new SimpleDateFormat("KK:mm").format(reminder.getCycleTime()) + " Uhr den Mensaplan mitteilen!"; | |
141 | + messageText = "Ich werde dir " + DateStringExtractor.getGermanWeekDayFromLocalDate(reminder.getCycleTime(), true) + " um " + new SimpleDateFormat("KK:mm").format(reminder.getCycleTime()) + " Uhr den Mensaplan mitteilen!"; | |
143 | 142 | } else { |
144 | 143 | messageText = "Es war mir leider nicht möglich eine Erinnerung für dich anzulegen. Versuche es bitte noch einmal."; |
145 | 144 | } //TODO: Add other intents | ... | ... |