教育训练处考试制证系统后端
“djh”
2025-04-24 f9cb0f3f384279b2cbe87c35dde3ba573a0197f3
exam-system/src/main/resources/mapper/pay/CoalPayMapper.xml
@@ -105,10 +105,18 @@
        </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}
@@ -123,4 +131,22 @@
            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 &gt;= #{minDate}-->
<!--            </if>-->
<!--            <if test="maxDate != null">-->
<!--                and create_time &lt;= #{maxDate}-->
<!--            </if>-->
<!--            and del_flag = 0-->
<!--            order by create_time desc-->
<!--        </where>-->
<!--&lt;!&ndash;    </select>&ndash;&gt;-->
</mapper>