From b5c5eb130ca0848124f9d136af4be142ad5aac07 Mon Sep 17 00:00:00 2001 From: binxie <137736985@qq.com> Date: 星期一, 26 六月 2023 14:42:02 +0800 Subject: [PATCH] backup0626 --- force-app/main/default/classes/LexConsumableAccountSOQL.cls | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/force-app/main/default/classes/LexConsumableAccountSOQL.cls b/force-app/main/default/classes/LexConsumableAccountSOQL.cls index 6620269..eef1437 100644 --- a/force-app/main/default/classes/LexConsumableAccountSOQL.cls +++ b/force-app/main/default/classes/LexConsumableAccountSOQL.cls @@ -1,19 +1,20 @@ public with sharing class LexConsumableAccountSOQL { - public static AggregateResult[] getAccountBySales(Datetime thisDatetime, Datetime nextDatetime) { - AggregateResult[] arList = new List<AggregateResult>( - [ - SELECT count(id), Consumable_order__r.Order_ForHospital__r.name hospitalName, sum(Sale_amount__c) thisAmount - FROM Consumable_Orderdetails__c - WHERE CreatedDate >= :thisDatetime AND CreatedDate < :nextDatetime AND Consumable_order__r.Order_ForHospital__r.name != '' - GROUP BY Consumable_order__r.Order_ForHospital__r.Name - ORDER BY sum(Sale_amount__c) DESC - LIMIT 10 - ] - ); + public static AggregateResult[] getAccountBySales(Datetime thisDatetime ,Datetime nextDatetime){ + AggregateResult[] arList = new List<AggregateResult>([ + SELECT count(id), Consumable_order__r.Order_ForHospital__r.name hospitalName, sum(Sale_amount__c) thisAmount + FROM Consumable_Orderdetails__c + WHERE + CreatedDate >= :thisDatetime + AND CreatedDate < :nextDatetime + AND Consumable_order__r.Order_ForHospital__r.name != '' + GROUP BY Consumable_order__r.Order_ForHospital__r.Name + ORDER BY sum(Sale_amount__c) DESC + LIMIT 10 + ]); return arList; } - public static AggregateResult[] getAccountTotalSales(Datetime thisDatetime, Datetime nextDatetime) { + public static AggregateResult[] getAccountTotalSales(Datetime thisDatetime ,Datetime nextDatetime){ AggregateResult[] saleAmountList = [ SELECT sum(Sale_amount__c) saleAmount FROM Consumable_Orderdetails__c @@ -21,4 +22,6 @@ ]; return saleAmountList; } + + } \ No newline at end of file -- Gitblit v1.9.1