| | |
| | | count(ocvh.id) as times |
| | | from rm_open_close_valve_history ocvh |
| | | inner join se_client_card cc on CAST(cc.cardNum AS CHAR) = ocvh.cl_ic_card_no |
| | | where ocvh.cl_dt <![CDATA[>=]]> #{startDt, jdbcType=BIGINT} |
| | | and ocvh.cl_dt <![CDATA[<=]]> #{endDt, jdbcType=BIGINT} |
| | | where ocvh.cl_dt <![CDATA[>=]]> #{startDt, jdbcType=TIMESTAMP } |
| | | and ocvh.cl_dt <![CDATA[<=]]> #{endDt, jdbcType=TIMESTAMP} |
| | | group by ocvh.client_id, cc.id |
| | | </select> |
| | | <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientConsumeStatistics"> |
| | |
| | | sum(cl_this_time) as duration, |
| | | count(id) as times |
| | | from rm_open_close_valve_history |
| | | where cl_dt <![CDATA[>=]]> #{startDt, jdbcType=BIGINT} |
| | | and cl_dt <![CDATA[<=]]> #{endDt, jdbcType=BIGINT} |
| | | where cl_dt <![CDATA[>=]]> #{startDt, jdbcType=TIMESTAMP} |
| | | and cl_dt <![CDATA[<=]]> #{endDt, jdbcType=TIMESTAMP} |
| | | group by client_id |
| | | </select> |
| | | </mapper> |