‘linchangsheng’ 1 month ago
parent
commit
b42b7fc4d7

+ 4 - 4
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseCountLogic.java

@@ -248,7 +248,7 @@ public class OrderBaseCountLogic {
         NativeSearchQuery searchQueryWGD = new NativeSearchQueryBuilder()
                 .withQuery(QueryBuilders.boolQuery()
                                 .must(QueryBuilders.termsQuery("order_status",orderStatus))
-                        .must(  QueryBuilders.rangeQuery("create_time")
+                        .must(  QueryBuilders.rangeQuery("over_time")
                                 .gte(DateUtil.format(DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), (-6))),"yyyy-MM-dd HH:mm:ss"))
                                 .lte(DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")))
                 .must( QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("create_websit_id", adminUser.getAdminWebsitIds()))
@@ -335,7 +335,7 @@ public class OrderBaseCountLogic {
                         .lte(DateUtil.format(DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), (6))),"yyyy-MM-dd HH:mm:ss"))))
                 .withPageable(PageRequest.of(1, 1))
                 .addAggregation(AggregationBuilders.dateHistogram("QTDSM")
-                        .field("create_time")
+                        .field("appointment_time")
                         .calendarInterval(DateHistogramInterval.DAY)
                         .format("yyyy-MM-dd"))
                 .build();
@@ -372,7 +372,7 @@ public class OrderBaseCountLogic {
                                 .should(QueryBuilders.termsQuery("websit_id", adminUser.getAdminWebsitIds())))
                         .must(QueryBuilders.boolQuery()
                                 .must(QueryBuilders.termsQuery("order_type_text",OrderTypeEnum.INSTALL.getRemark()))
-                                .must(QueryBuilders.rangeQuery("create_time")
+                                .must(QueryBuilders.rangeQuery("over_time")
                                         .gte(DateUtil.format(DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), (-29))),"yyyy-MM-dd HH:mm:ss"))
                                         .lte(DateUtil.format(DateUtil.endOfDay(new Date()),"yyyy-MM-dd HH:mm:ss")))))
                 .withPageable(PageRequest.of(1, 1))
@@ -406,7 +406,7 @@ public class OrderBaseCountLogic {
                                 .should(QueryBuilders.termsQuery("websit_id", adminUser.getAdminWebsitIds())))
                         .must(QueryBuilders.boolQuery()
                                 .must(QueryBuilders.termsQuery("order_type_text",OrderTypeEnum.REPAIR.getRemark()))
-                                .must(QueryBuilders.rangeQuery("create_time")
+                                .must(QueryBuilders.rangeQuery("over_time")
                                         .gte(DateUtil.format(DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), (-29))),"yyyy-MM-dd HH:mm:ss"))
                                         .lte(DateUtil.format(DateUtil.endOfDay(new Date()),"yyyy-MM-dd HH:mm:ss")))))
                 .withPageable(PageRequest.of(1, 1))