Prechádzať zdrojové kódy

App总览-营业数据-环比

wangbo 4 rokov pred
rodič
commit
945187921c

+ 6 - 2
sms_water/src/main/resources/mapper/RevenueMapper.xml

@@ -102,7 +102,9 @@
         select date_format(t1.collect_date, '%Y-%m' ) collect_date_string,
         sum(METER_READING_USAGE) meter_reading_usage,
         sum(RECEIVABLE_TOTAL_AMOUNT) receivable_total_amount,
-        sum(RECEIVED_TOTAL_AMOUNT) received_total_amount
+        sum(RECEIVED_TOTAL_AMOUNT) received_total_amount,
+        sum(GENERAL_USER_USAGE) general_user_usage,
+        sum(BIG_USER_USAGE) big_user_usage
         from sms_month_revenue t1
         where t1.collect_date>=date_sub(date_format(curdate(), '%y-%m-1' ), interval #{months}-1 month)
         <if test="tenantId != null and tenantId != ''">
@@ -128,7 +130,9 @@
         select date_format(t1.collect_date, '%Y-%m' ) collect_date_string,
         sum(METER_READING_USAGE) meter_reading_usage,
         sum(RECEIVABLE_TOTAL_AMOUNT) receivable_total_amount,
-        sum(RECEIVED_TOTAL_AMOUNT) received_total_amount
+        sum(RECEIVED_TOTAL_AMOUNT) received_total_amount,
+        sum(GENERAL_USER_USAGE) general_user_usage,
+        sum(BIG_USER_USAGE) big_user_usage,
         from sms_month_revenue t1
         where t1.collect_date>=date_format(#{startDate}, '%y-%m-1' ) and t1.collect_date &lt;= date_format(#{endDate}, '%y-%m-1')
         <if test="tenantId != null and tenantId != ''">