新增 南瑞相关接口

This commit is contained in:
Lemon
2023-10-10 16:20:45 +08:00
parent 4babf55fec
commit ff9a10c992
8 changed files with 181 additions and 15 deletions

View File

@@ -1165,4 +1165,33 @@
where
station_id = #{stationId,jdbcType=BIGINT}
</update>
<select id="getNROrderInfoByOrderCode" resultType="com.jsowell.pile.domain.nanrui.NROrderInfo">
SELECT
t1.merchant_id,
t3.organization_code AS operatorId,
t1.pile_connector_code AS connectorId,
t1.order_code AS startChargeSeq,
t2.total_used_electricity AS elect,
t2.sharp_used_electricity AS cuspElect,
t2.peak_used_electricity AS peakElect,
t2.flat_used_electricity AS flatElect,
t2.valley_used_electricity AS valleyElect,
t1.charge_start_time AS startTime,
t1.charge_end_time AS endTime
FROM
order_basic_info t1
JOIN order_detail t2 ON t1.order_code = t2.order_code
AND t1.del_flag = '0'
JOIN pile_merchant_info t3 ON t1.merchant_id = t3.id
AND t3.del_flag = '0'
<where>
<if test="dto.orderCode != null and dto.orderCode != ''">
and t1.order_code = #{dto.orderCode,jdbcType=VARCHAR}
</if>
<if test="dto.queryStartTime != null and dto.queryStartTime != '' and dto.queryEndTime != null and dto.queryEndTime != ''">
and t1.charge_end_time between #{dto.queryStartTime,jdbcType=VARCHAR} and #{dto.queryEndTime,jdbcType=VARCHAR}
</if>
</where>
</select>
</mapper>