|
@@ -734,19 +734,19 @@ public class OrderBaseEsLogic {
|
|
|
private BoolQueryBuilder buildDrxcQuery() {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
LocalDate today = now.toLocalDate();
|
|
|
- String today8 = DateUtil.format(today.atTime(8, 0, 0), "yyyy-MM-dd HH:mm:ss");
|
|
|
- String today1759 = DateUtil.format(today.atTime(17, 59, 59), "yyyy-MM-dd HH:mm:ss");
|
|
|
- String nowMinus30 = DateUtil.format(now.minusMinutes(30), "yyyy-MM-dd HH:mm:ss");
|
|
|
+ String today8 = DateUtil.format(today.atTime(8, 0, 0), "yyyy-MM-dd HH:mm:ss"); // 当日8:00:00
|
|
|
+ String today1759 = DateUtil.format(today.atTime(17, 59, 59), "yyyy-MM-dd HH:mm:ss"); // 当日17:59:59
|
|
|
+ String nowMinus30 = DateUtil.format(now.minusMinutes(30), "yyyy-MM-dd HH:mm:ss"); // 当前时间-30分钟(超半小时的时间阈值)
|
|
|
|
|
|
return QueryBuilders.boolQuery()
|
|
|
- .must(QueryBuilders.rangeQuery("create_time")
|
|
|
+ .must(QueryBuilders.rangeQuery("create_time") // create_time在当日8:00-17:59之间
|
|
|
.gte(today8)
|
|
|
.lte(today1759))
|
|
|
- .must(QueryBuilders.rangeQuery("create_time")
|
|
|
- .gte(nowMinus30))
|
|
|
- .mustNot(QueryBuilders.existsQuery("appointment_time"))
|
|
|
+ .must(QueryBuilders.rangeQuery("create_time") // create_time <= 当前时间-30分钟(超半小时未处理)
|
|
|
+ .lte(nowMinus30)) // 关键修改:将 gte 改为 lte
|
|
|
+ .mustNot(QueryBuilders.existsQuery("appointment_time")) // appointment_time为空
|
|
|
.mustNot(QueryBuilders.termsQuery("order_status", "YWG", "GCSZX", "WDWG", "YWGO", "YQX", "FWZT", "YCGB","YZP",
|
|
|
- "FWQX", "FL", "YJS", "LRCD", "DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP"));
|
|
|
+ "FWQX", "FL", "YJS", "LRCD", "DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP")); // 相同order_status排除条件
|
|
|
}
|
|
|
|
|
|
|