From f9cb0f3f384279b2cbe87c35dde3ba573a0197f3 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期四, 24 四月 2025 16:17:25 +0800
Subject: [PATCH] 煤矿缴费修改

---
 exam-system/src/main/resources/mapper/pay/CoalPayMapper.xml |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/exam-system/src/main/resources/mapper/pay/CoalPayMapper.xml b/exam-system/src/main/resources/mapper/pay/CoalPayMapper.xml
index bf3fbd5..547e83a 100644
--- a/exam-system/src/main/resources/mapper/pay/CoalPayMapper.xml
+++ b/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>
\ No newline at end of file

--
Gitblit v1.9.2