This commit is contained in:
YAS\29473
2025-10-16 16:26:14 +08:00
parent 8bb175c056
commit 4bb4665460
8 changed files with 254 additions and 6 deletions

View File

@@ -3421,4 +3421,34 @@
AND #{dto.endTime,jdbcType=VARCHAR}
AND t1.`settle_amount` > 0;
</select>
<select id="getOrderDetailByStationIdsForMonth" resultType="com.jsowell.pile.vo.uniapp.business.BusinessOrderDetailInfoVO">
SELECT
DATE_FORMAT(t1.create_time, '%Y-%m-%d') AS tradeDate,
t1.pile_connector_code AS pileConnectorCode,
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
WHERE t1.del_flag = '0'
AND 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 DESC
</select>
</mapper>