update 首页汇总数据更换查询表

This commit is contained in:
Lemon
2023-07-20 16:03:55 +08:00
parent a3aaef384e
commit d99faaad46
6 changed files with 70 additions and 21 deletions

View File

@@ -408,4 +408,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item,jdbcType=BIGINT}
</foreach>
</update>
<select id="getGeneralSituationInfo" resultType="com.jsowell.pile.vo.web.IndexGeneralSituationVO">
select
sum(t1.total_amount) as totalChargingAmount,
sum(t1.use_electricity) as totalChargingDegree,
sum(t1.charge_num) as totalChargingQuantity
from
settle_order_report t1
where
t1.del_flag = '0'
<if test="IndexQueryDTO.stationId != null and IndexQueryDTO.stationId != ''">
and t1.station_id = #{IndexQueryDTO.stationId,jdbcType=VARCHAR}
</if>
<!-- 数据范围过滤 -->
<if test="IndexQueryDTO.stationIdList != null and IndexQueryDTO.stationIdList.size() != 0">
and t1.station_id in
<foreach collection="IndexQueryDTO.stationIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>