新增 运营端小程序 站点经营分析统计图相关接口

This commit is contained in:
Lemon
2024-07-30 14:19:15 +08:00
parent 719fb39ffb
commit 01fb1e7b2a
11 changed files with 484 additions and 17 deletions

View File

@@ -2953,4 +2953,36 @@
and `t1`.`create_time` <![CDATA[ >= ]]> #{endTime,jdbcType=VARCHAR}
and `t1`.`update_time` <![CDATA[ <= ]]> #{startTime,jdbcType=VARCHAR}
</select>
<select id="getOrderDetailByStationIds" resultType="com.jsowell.pile.vo.BusinessOrderDetailInfoVO">
SELECT
DATE_FORMAT( t1.create_time, '%Y-%m-%d' ) AS tradeDate,
<!-- t1.order_code AS orderCode,-->
t1.station_id AS stationId,
t2.sharp_used_electricity AS sharpUsedElectricity,
t2.sharp_amount AS sharpAmount,
t2.sharp_electricity_price AS sharpElectricityPrice,
t2.peak_used_electricity AS peakUsedElectricity,
t2.peak_amount AS peakAmount,
t2.peak_electricity_price AS peakElectricityPrice,
t2.flat_used_electricity AS flatUsedElectricity,
t2.flat_amount AS flatAmount,
t2.flat_electricity_price AS flatElectricityPrice,
t2.valley_used_electricity AS valleyUsedElectricity,
t2.valley_amount AS valleyAmount,
t2.valley_electricity_price AS valleyElectricityPrice,
t2.total_service_amount AS totalServiceAmount,
t1.settle_amount AS settleAmount
FROM
order_basic_info t1
JOIN order_detail t2 ON t1.order_code = t2.order_code
AND t1.del_flag = '0'
WHERE
t1.station_id IN
<foreach collection="stationIds" item="stationId" open="(" separator="," close=")">
#{stationId,jdbcType=VARCHAR}
</foreach>
AND t1.create_time BETWEEN #{startTime,jdbcType=VARCHAR} AND DATE_ADD(#{endTime,jdbcType=VARCHAR}, INTERVAL 1 DAY)
order by t1.create_time
</select>
</mapper>