| | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectCoalPayList" parameterType="CoalPay" resultMap="CoalPayResult"> |
| | | <include refid="selectCoalPayVo"/> |
| | | <select id="selectCoalPayList" resultType="com.gkhy.exam.pay.dto.rep.CoalPayRepDto"> |
| | | select id, |
| | | batch_name, |
| | | dept_id, |
| | | pay_type, |
| | | amount, |
| | | year, |
| | | quarter, |
| | | pay_person_type, pay_company_name, pay_company_card, update_by, update_time, create_by, create_time, del_flag , |
| | | ( SELECT COUNT(cps.id) FROM coal_pay_student cps WHERE cps.del_flag = 0 AND cps.coal_pay_id = coal_pay.id ) AS total_num, |
| | | ( SELECT COUNT(cps.id) FROM coal_pay_student cps WHERE cps.del_flag = 0 AND cps.coal_pay_id = coal_pay.id AND cps.pay_status = 1 ) AS have_pay_num |
| | | from coal_pay |
| | | <where> |
| | | <if test="deptId != null "> |
| | | and dept_id = #{deptId} |
| | |
| | | order by create_time desc |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <!-- <select id="selectCoalPayList" parameterType="CoalPay">--> |
| | | <!-- <include refid="selectCoalPayVo"/>--> |
| | | <!-- <where>--> |
| | | <!-- <if test="deptId != null ">--> |
| | | <!-- and dept_id = #{deptId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="minDate !=null">--> |
| | | <!-- and create_time >= #{minDate}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="maxDate != null">--> |
| | | <!-- and create_time <= #{maxDate}--> |
| | | <!-- </if>--> |
| | | <!-- and del_flag = 0--> |
| | | <!-- order by create_time desc--> |
| | | <!-- </where>--> |
| | | <!--<!– </select>–>--> |
| | | </mapper> |