|
|
|
@@ -381,7 +381,7 @@ public class DmMeetingInnerApiController extends BaseApiController { |
|
|
|
@InnerAuth |
|
|
|
@GetMapping("/recent/{deptId}/{dateStr}") |
|
|
|
@ResponseBody |
|
|
|
public List<JSONObject> recent(@PathVariable(value = "deptId") Long deptId,@PathVariable(value = "dateStr") String dateStr,@RequestParam(value = "roomId", required = false) Long roomId, HttpServletRequest request) { |
|
|
|
public List<JSONObject> recent(@PathVariable(value = "deptId") Long deptId,@PathVariable(value = "dateStr") String dateStr,@RequestParam(value = "roomId", required = false) Long roomId,@RequestParam(value = "startTime", required = false) String startTime, HttpServletRequest request) { |
|
|
|
|
|
|
|
List<DmMeetingOrdersPo> list = new ArrayList<>(); |
|
|
|
List<Long> ids = new ArrayList<>(); |
|
|
|
@@ -404,14 +404,13 @@ public class DmMeetingInnerApiController extends BaseApiController { |
|
|
|
//过滤掉今天的已经过去的预约记录,并按开始时间进行排序 |
|
|
|
list = list.stream().filter(t->DateUtils.formatDate(t.getOrderDate(), "yyyy-MM-dd").compareTo(DateUtils.formatDate(new Date(), "yyyy-MM-dd"))>0 || (DateUtils.formatDate(t.getOrderDate(), "yyyy-MM-dd").compareTo(DateUtils.formatDate(new Date(), "yyyy-MM-dd"))==0 && DateUtils.formatDate(t.getStartTime(), "HH:mm").compareTo(DateUtils.formatDate(new Date(), "HH:mm"))>0)).sorted(Comparator.comparing(po -> DateUtils.formatDate(po.getStartTime(), "HH:mm"))).collect(Collectors.toList()); |
|
|
|
|
|
|
|
/*List<String> times = new ArrayList<>(); |
|
|
|
for (int i = 0 ;i<list.size();i++){ |
|
|
|
times.add(DateUtils.formatDate(list.get(i).getStartTime(),"HH:mm")); |
|
|
|
times.add(DateUtils.formatDate(list.get(i).getEndTime(),"HH:mm")); |
|
|
|
}*/ |
|
|
|
|
|
|
|
//获得当前时间开始最近的整点,或者半点 |
|
|
|
String currentStr = "08:00"; |
|
|
|
if (StringUtils.isNotEmpty(startTime)) { |
|
|
|
currentStr = startTime; |
|
|
|
} |
|
|
|
|
|
|
|
if (dateStr.compareTo(DateUtils.formatDate(new Date(), "yyyy-MM-dd")) == 0) { |
|
|
|
LocalTime currentTime = LocalTime.now(); |
|
|
|
if (currentTime.getMinute() >= 30) { |
|
|
|
|