| | |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--获取物理卡开关阀记录数量,微信小程序使用--> |
| | | <select id="getCardOpenCloseCount" resultType="java.lang.Long"> |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 1 |
| | | </select> |
| | | |
| | | <!--获取物理卡开关阀记录,微信小程序使用--> |
| | | <select id="getCardOpenClose" resultType="com.dy.pipIrrGlobal.voRm.VoOpenClostWechat"> |
| | | SELECT |
| | | cl_this_money AS expense, |
| | | op_ic_card_no AS cardNum, |
| | | inta.name AS intakeNum, |
| | | open_dt AS openTime, |
| | | close_dt AS closeTime, |
| | | cl_this_time AS duration, |
| | | cl_this_amount AS amount, |
| | | '刷卡开阀' AS openType |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 1 |
| | | ORDER BY open_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--获取虚拟卡开关阀记录数量,微信小程序使用--> |
| | | <select id="getVcCardOpenCloseCount" resultType="java.lang.Long"> |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 8 |
| | | </select> |
| | | |
| | | <!--获取虚拟卡开关阀记录,微信小程序使用--> |
| | | <select id="getVcCardOpenClose" resultType="com.dy.pipIrrGlobal.voRm.VoOpenClostWechat"> |
| | | SELECT |
| | | cl_this_money AS expense, |
| | | op_ic_card_no AS cardNum, |
| | | inta.name AS intakeNum, |
| | | open_dt AS openTime, |
| | | close_dt AS closeTime, |
| | | cl_this_time AS duration, |
| | | cl_this_amount AS amount, |
| | | CASE |
| | | WHEN cl_type = 13 THEN '定时关阀式开阀' |
| | | WHEN cl_type = 14 THEN '定量关阀式开阀' |
| | | ELSE '远程开阀' |
| | | END AS openType |
| | | FROM rm_open_close_valve_history his |
| | | LEFT JOIN pr_intake inta ON inta.id = his.intake_id |
| | | WHERE op_type = 8 |
| | | ORDER BY open_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | </mapper> |