|
|
|
@@ -169,9 +169,17 @@ public class MeetingOrderTemplate implements BaseTemplate { |
|
|
|
|
|
|
|
try { |
|
|
|
//遍历roomListR.getData(),判断content中是否包含item.getName(),如果包含,则将item.getId()赋值给locationId |
|
|
|
List<DmMeetingRoomsDto> aaa = roomListR.getData().stream().sorted((x,y)->y.getName().length() - x.getName().length()).collect(Collectors.toList()); |
|
|
|
for (DmMeetingRoomsDto roomsDto : aaa) { |
|
|
|
if (content.contains(roomsDto.getName())) { |
|
|
|
List<DmMeetingRoomsDto> roomsDtoList = roomListR.getData().stream().sorted((x,y)->y.getName().length() - x.getName().length()).collect(Collectors.toList()); |
|
|
|
String[] chinesenumber = {"一","二","三","四","五","六","七","八","九","十"}; |
|
|
|
String[] number = {"1","2","3","4","5","6","7","8","9","10"}; |
|
|
|
for (DmMeetingRoomsDto roomsDto : roomsDtoList) { |
|
|
|
String roomName = roomsDto.getName(); |
|
|
|
for(int i = 0;i<10;i++){ |
|
|
|
if(roomName.contains(chinesenumber[i])){ |
|
|
|
roomName = roomName.replace(chinesenumber[i], number[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
if (content.contains(roomName)) { |
|
|
|
// 更新session中的locationId与location |
|
|
|
session.getFormat().put("location",roomsDto.getName()); |
|
|
|
session.getFormat().put("locationId",roomsDto.getId()); |
|
|
|
@@ -238,10 +246,12 @@ public class MeetingOrderTemplate implements BaseTemplate { |
|
|
|
|
|
|
|
//判断是否为确认或取消指令 |
|
|
|
checkObject = session.getFormat(); |
|
|
|
if(checkObject.containsKey("date") && checkObject.containsKey("start_time") && checkObject.containsKey("location") && checkObject.containsKey("duration") && content.contains("确认")){ |
|
|
|
if(checkObject.containsKey("conflict")){ |
|
|
|
if(checkObject.getInteger("conflict") == 0){ |
|
|
|
session.getFormat().put("confirm", 1); |
|
|
|
if(checkObject.containsKey("date") && checkObject.containsKey("start_time") && checkObject.containsKey("location") && checkObject.containsKey("duration")){ |
|
|
|
if(content.contains("确定") || content.contains("确认")){ |
|
|
|
if(checkObject.containsKey("conflict")){ |
|
|
|
if(checkObject.getInteger("conflict") == 0){ |
|
|
|
session.getFormat().put("confirm", 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|