mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-17 05:39:50 +08:00
update 首页数据看板
This commit is contained in:
@@ -3680,4 +3680,27 @@
|
||||
<select id="countTotalOrders" resultType="java.lang.Long">
|
||||
select count(*) from order_basic_info where del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="getTimeDistribution" resultType="com.jsowell.pile.vo.web.TimeDistributionVO">
|
||||
SELECT
|
||||
HOUR(t1.create_time) AS hour,
|
||||
COUNT(*) AS orderCount
|
||||
FROM order_basic_info t1
|
||||
WHERE t1.del_flag = '0'
|
||||
AND t1.order_status = '6'
|
||||
<if test="dto.startTime != null and dto.startTime != ''">
|
||||
AND t1.create_time >= #{dto.startTime}
|
||||
</if>
|
||||
<if test="dto.endTime != null and dto.endTime != ''">
|
||||
AND t1.create_time <= #{dto.endTime}
|
||||
</if>
|
||||
<if test="dto.stationIdList != null and dto.stationIdList.size() > 0">
|
||||
AND t1.station_id IN
|
||||
<foreach item="sid" collection="dto.stationIdList" open="(" separator="," close=")">
|
||||
#{sid}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY HOUR(t1.create_time)
|
||||
ORDER BY hour ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -770,4 +770,20 @@
|
||||
and station_lng != ''
|
||||
and station_lat != ''
|
||||
</select>
|
||||
|
||||
<select id="getCityDeviceCount" resultType="com.jsowell.pile.vo.web.CityDeviceCountVO">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN address LIKE '%省%' AND address LIKE '%市%' THEN
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(address, '省', -1), '市', 1), '市')
|
||||
WHEN address LIKE '%市%' THEN
|
||||
LEFT(SUBSTRING_INDEX(address, '市', 1), 3)
|
||||
ELSE '其他'
|
||||
END AS cityName,
|
||||
COUNT(*) AS deviceCount
|
||||
FROM pile_station_info
|
||||
WHERE del_flag = '0' AND address IS NOT NULL AND address != ''
|
||||
GROUP BY cityName
|
||||
ORDER BY deviceCount DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user