新增后管数据看板

This commit is contained in:
Lemon
2026-05-08 11:42:11 +08:00
parent 478c70a352
commit b563659f84
14 changed files with 217 additions and 4 deletions

View File

@@ -330,4 +330,8 @@
t2.vin_code = #{vinCode,jdbcType=VARCHAR} or t2.vin_code = reverse(#{vinCode,jdbcType=VARCHAR})
)
</select>
<select id="countTotalMembers" resultType="java.lang.Long">
select count(*) from member_basic_info where del_flag = '0'
</select>
</mapper>

View File

@@ -3656,4 +3656,28 @@
#{orderCode}
</foreach>
</update>
<select id="getUsageTrendData" resultType="com.jsowell.pile.vo.web.UsageTrendVO">
select
DATE_FORMAT(t1.create_time, '%Y-%m-%d') as date,
count(*) as orderCount,
ifnull(sum(t2.total_used_electricity), 0) as electricity,
ifnull(sum(t2.total_order_amount), 0) as orderAmount
from order_basic_info t1
left join order_detail t2 on t1.order_code = t2.order_code
where t1.del_flag = '0'
and t1.order_status = '6'
<if test="dto.startTime != null and dto.startTime != ''">
and t1.create_time &gt;= #{dto.startTime}
</if>
<if test="dto.endTime != null and dto.endTime != ''">
and t1.create_time &lt;= #{dto.endTime}
</if>
group by DATE_FORMAT(t1.create_time, '%Y-%m-%d')
order by date asc
</select>
<select id="countTotalOrders" resultType="java.lang.Long">
select count(*) from order_basic_info where del_flag = '0'
</select>
</mapper>

View File

@@ -754,4 +754,20 @@
#{merchantId,jdbcType=VARCHAR}
</foreach>
</select>
<select id="countTotalStations" resultType="java.lang.Long">
select count(*) from pile_station_info where del_flag = '0'
</select>
<select id="getStationMapData" resultType="com.jsowell.pile.vo.web.StationMapVO">
select station_name as stationName,
station_lng as stationLng,
station_lat as stationLat
from pile_station_info
where del_flag = '0'
and station_lng is not null
and station_lat is not null
and station_lng != ''
and station_lat != ''
</select>
</mapper>