| | |
| | | rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <!--根据指定条件获取记录总数--> |
| | | <select id="getRecordCount" resultType="java.lang.Long"> |
| | | select count(*) |
| | | from rm_intake_amount_day_last riadl |
| | | Left join pr_intake pint on pint.id = riadl.intake_id |
| | | <where> |
| | | <if test="intakeId != null and intakeId != '' "> |
| | | and rash.intake_id = #{intakeId} |
| | | </if> |
| | | <if test="intakeName != null and intakeName != '' "> |
| | | and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%') |
| | | </if> |
| | | <if test="startDt != null"> |
| | | and riadl.dt >= #{startDt,jdbcType=DATE} |
| | | </if> |
| | | <if test="endDt != null"> |
| | | and riadl.dt <= #{endDt,jdbcType=DATE} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <!--根据指定条件获取记录--> |
| | | <select id="getIntakeAmountDayLast" resultType="com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay"> |
| | | select |
| | | CAST(riadl.intake_id AS char)AS intakeId, |
| | | pint.name as intakeName, |
| | | riadl.dt as dt, |
| | | riadl.amount as amount, |
| | | riadl.dt_last as dtLast, |
| | | riadl.rtu_addr_last as rtuAddrLast, |
| | | CAST(riadl.controller_id_last AS char)AS controllerIdLast, |
| | | riadl.total_amount_last as totalAmountLast, |
| | | riadl.rtu_dt_last as rtuDtLast |
| | | from rm_intake_amount_day_last riadl |
| | | Left join pr_intake pint on pint.id = riadl.intake_id |
| | | <where> |
| | | <if test="intakeId != null and intakeId != '' "> |
| | | and rash.intake_id = #{intakeId} |
| | | </if> |
| | | <if test="intakeName != null and intakeName != '' "> |
| | | and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%') |
| | | </if> |
| | | <if test="startDt != null"> |
| | | and riadl.dt >= #{startDt,jdbcType=DATE} |
| | | </if> |
| | | <if test="endDt != null"> |
| | | and riadl.dt <= #{endDt,jdbcType=DATE} |
| | | </if> |
| | | </where> |
| | | ORDER BY riadl.id DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${(pageCurr-1)*pageSize}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | </mapper> |