| New file | 
 |  |  | 
 |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
 |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
 |  |  | <mapper namespace="com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper"> | 
 |  |  |  | 
 |  |  |     <select id="openCloseRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeOpenCloseValve"> | 
 |  |  |         select | 
 |  |  |         tb.intake_id as intakeId, | 
 |  |  |         sec.id as clientId, | 
 |  |  |         sec.name as clientName, | 
 |  |  |         sec.address as clientAddr, | 
 |  |  |         tb.op_dt as openTime, | 
 |  |  |         tb.op_type as opType, | 
 |  |  |         tb.op_ic_card_no as openIcNum, | 
 |  |  |         tb.op_remain_money as openRemainMoney, | 
 |  |  |         tb.cl_dt as closeTime, | 
 |  |  |         tb.cl_type as clType, | 
 |  |  |         tb.cl_ic_card_no as closeIcNum, | 
 |  |  |         tb.cl_remain_money as closeRemainMoney, | 
 |  |  |         tb.cl_this_time as thisTime, | 
 |  |  |         tb.cl_this_amount as thisAmount, | 
 |  |  |         tb.cl_this_money as thisMoney | 
 |  |  |         from rm_open_close_valve_history tb | 
 |  |  |         left join se_client sec on tb.client_id = sec.id | 
 |  |  |         where tb.intake_id = #{intakeId, jdbcType=BIGINT} | 
 |  |  |         ORDER BY tb.id 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="lossDayRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeLossDay"> | 
 |  |  |         select | 
 |  |  |         tb.intake_id as intakeId, | 
 |  |  |         tb.dt AS dt, | 
 |  |  |         tb.loss_amount AS loss | 
 |  |  |         from rm_loss_day tb | 
 |  |  |         where intake_id = #{intakeId, jdbcType=BIGINT} | 
 |  |  |         ORDER BY tb.id 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="lossMonthRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeLossMonth"> | 
 |  |  |         select | 
 |  |  |         tb.intake_id as intakeId, | 
 |  |  |         CONCAT(tb.year, '-', tb.month) AS dt, | 
 |  |  |         tb.amount AS loss | 
 |  |  |         from st_loss_month tb | 
 |  |  |         where intake_id = #{intakeId, jdbcType=BIGINT} | 
 |  |  |         ORDER BY tb.id 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="amountDayRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeAmountDay"> | 
 |  |  |         select | 
 |  |  |         tb.intake_id as intakeId, | 
 |  |  |         tb.dt AS dt, | 
 |  |  |         tb.amount AS amount, | 
 |  |  |         tb.money AS money, | 
 |  |  |         tb.times AS times | 
 |  |  |         from rm_intake_amount_day tb | 
 |  |  |         where intake_id = #{intakeId, jdbcType=BIGINT} | 
 |  |  |         ORDER BY tb.id 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="amountMonthRecords" resultType="com.dy.pipIrrGlobal.voAllRound.VoArIntakeAmountMonth"> | 
 |  |  |         select | 
 |  |  |         tb.intake_id as intakeId, | 
 |  |  |         CONCAT(tb.year, '-', tb.month) AS dt, | 
 |  |  |         tb.amount AS amount | 
 |  |  |         from st_intake_amount_month tb | 
 |  |  |         where intake_id = #{intakeId, jdbcType=BIGINT} | 
 |  |  |         ORDER BY tb.id 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> |