| | |
| | | oh.op_ic_card_no AS openIcNum, |
| | | oh.op_ic_card_addr AS openIcAddr, |
| | | oh.open_dt AS openTime, |
| | | oh.op_type AS openType_, |
| | | oh.op_type AS opType, |
| | | oh.op_order_no AS openOrderNo, |
| | | oh.op_total_amount AS openTotalAmount, |
| | | oh.op_remain_money AS openRemainMoney, |
| | |
| | | oh.cl_ic_card_no AS closeIcNum, |
| | | oh.cl_ic_card_addr AS closeIcAddr, |
| | | oh.close_dt AS closeTime, |
| | | oh.cl_type AS closeType_, |
| | | oh.cl_type AS clType, |
| | | oh.cl_this_amount AS closeThisAmount, |
| | | oh.cl_this_time AS thisTime, |
| | | oh.cl_price AS closePrice, |
| | |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <!-- /////////////////////////////////// --> |
| | | <!-- 统计相关 --> |
| | | <!-- /////////////////////////////////// --> |
| | | <select id="statisticsByIc" resultType="com.dy.pipIrrGlobal.voSt.VoIcConsumeStatistics"> |
| | | select ocvh.client_id as clientId, |
| | | cc.id as cardId, |
| | | sum(ocvh.cl_this_amount) as water, |
| | | sum(ocvh.cl_this_money) as amount, |
| | | sum(ocvh.cl_this_time) as duration, |
| | | 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} |
| | | group by ocvh.client_id, cc.id |
| | | </select> |
| | | <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientConsumeStatistics"> |
| | | select client_id as clientId, |
| | | sum(cl_this_amount) as water, |
| | | sum(cl_this_money) as amount, |
| | | 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} |
| | | group by client_id |
| | | </select> |
| | | </mapper> |