|
|
|
@ -6,11 +6,23 @@
|
|
|
|
|
select rq AS chargTime,sfxm,sfmc,je,sfmz
|
|
|
|
|
from udi_sbfybb
|
|
|
|
|
<where>
|
|
|
|
|
<if test="sfxm != null and sfxm != ''">
|
|
|
|
|
AND sfxm = #{sfxm}
|
|
|
|
|
<if test="deviceBusinessProject.sfxm != null and deviceBusinessProject.sfxm != ''">
|
|
|
|
|
AND sfxm = #{deviceBusinessProject.sfxm}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="chargTime != null">
|
|
|
|
|
AND CONVERT(DATE, rq) = CONVERT(DATE, #{chargTime}, 120)
|
|
|
|
|
<if test="deviceBusinessProject.chargTime != null">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
AND CONVERT(DATE, rq) = CONVERT(DATE, #{deviceBusinessProject.chargTime}, 120)
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceBusinessProject.startChargTime != null">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
AND CONVERT(DATE, rq) >= CONVERT(DATE, #{deviceBusinessProject.startChargTime}, 120)
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceBusinessProject.endChargTime != null">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
AND CONVERT(DATE, rq) <= CONVERT(DATE, #{deviceBusinessProject.endChargTime}, 120)
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by CONVERT(DATETIME, rq, 120) desc
|
|
|
|
|