This commit is contained in:
2023-07-20 16:12:46 +08:00
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>

View File

@@ -273,10 +273,12 @@
LEFT JOIN pile_station_info t2 ON t2.merchant_id = t1.id and t2.del_flag = '0'
WHERE
t1.del_flag = '0'
<if test="merchantDeptIds != null and merchantDeptIds.size() != 0">
AND t1.dept_id IN
<foreach collection="merchantDeptIds" item="item" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
</select>
<select id="queryInfoByDeptId" resultMap="PileMerchantInfoResult">