|
@@ -312,13 +312,13 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="selectList" resultMap="revenueDtoMap">
|
|
|
- select t1.id,date_format(t1.collect_date,'%Y年%m月') as collect_date_string,meter_reading_usage*10000 as meter_reading_usage
|
|
|
+ select t1.id,date_format(t1.collect_date,'%Y-%m') as collect_date_string,meter_reading_usage*10000 as meter_reading_usage
|
|
|
,receivable_total_amount*10000 as receivable_total_amount,received_total_amount*10000 as received_total_amount,big_user_usage*10000 as big_user_usage
|
|
|
,general_user_usage*10000 as general_user_usage,t2.id as property_id,t3.id as sell_id,t3.water_usage*10000 as water_usage
|
|
|
,general_user_usage_received*10000 as general_user_usage_received,big_user_usage_received*10000 as big_user_usage_received
|
|
|
from sms_month_revenue t1
|
|
|
left join sms_water_property t2 on t1.company_org_id=t2.company_org_id and t1.tenant_id=t2.tenant_id and t2.status=1
|
|
|
- left join sms_month_sellwater t3 on t2.id=t3.property_id and date_format(t1.collect_date,'%Y-%m-%d')= date_format(t3.collect_date,'%Y-%m-%d')
|
|
|
+ left join sms_month_sellwater t3 on t2.id=t3.property_id and date_format(t1.collect_date,'%Y-%m')= date_format(t3.collect_date,'%Y-%m')
|
|
|
where t1.company_org_id = #{companyOrgId} and t1.collect_date >= concat(#{startDate}, '-1')
|
|
|
and t1.collect_date < concat(#{endDate}, '-1') + interval 1 month
|
|
|
order by t1.collect_date
|