|
@@ -475,9 +475,9 @@ public class OrderBaseEsLogic {
|
|
|
|
|
|
// 次日需处理(18:00-次日7:59创建,appointment_time为空)
|
|
// 次日需处理(18:00-次日7:59创建,appointment_time为空)
|
|
NativeSearchQuery crxcSearchQuery = new NativeSearchQueryBuilder()
|
|
NativeSearchQuery crxcSearchQuery = new NativeSearchQueryBuilder()
|
|
- .withQuery(queryBuilder)
|
|
|
|
|
|
+ .withQuery(queryBuilder.must(buildCrxcQuery())) // 复用公共条件
|
|
.withPageable(PageRequest.of(1, 1))
|
|
.withPageable(PageRequest.of(1, 1))
|
|
- .addAggregation(this.getAggs(AggregationBuilders.filter("CRXC", buildCrxcQuery()))) // 修正聚合绑定
|
|
|
|
|
|
+ .addAggregation(this.getAggs(AggregationBuilders.filter("CRXC", QueryBuilders.matchAllQuery()))) // 因 query 已包含条件,filter 可简化
|
|
.build();
|
|
.build();
|
|
|
|
|
|
SearchHits crxcResponse = this.search(crxcSearchQuery, year);
|
|
SearchHits crxcResponse = this.search(crxcSearchQuery, year);
|
|
@@ -745,8 +745,8 @@ public class OrderBaseEsLogic {
|
|
.gte(prevDay18) // 修改点
|
|
.gte(prevDay18) // 修改点
|
|
.lte(today759)) // 修改点
|
|
.lte(today759)) // 修改点
|
|
// 条件 2:create_time >= 当日8:30:00(原次日调整为当日)
|
|
// 条件 2:create_time >= 当日8:30:00(原次日调整为当日)
|
|
- .must(QueryBuilders.rangeQuery("create_time")
|
|
|
|
- .lte(today830)) // 修改点
|
|
|
|
|
|
+// .must(QueryBuilders.rangeQuery("create_time")
|
|
|
|
+// .lte(today830)) // 修改点
|
|
// 条件 3:appointment_time为空(保持不变)
|
|
// 条件 3:appointment_time为空(保持不变)
|
|
.mustNot(QueryBuilders.existsQuery("appointment_time"))
|
|
.mustNot(QueryBuilders.existsQuery("appointment_time"))
|
|
// 条件 4:order_status排除(保持不变)
|
|
// 条件 4:order_status排除(保持不变)
|