sinake
2026-09-15 afe21cabc75e56e44aafbd461ebdade8b77aefff
ruoyi-project/src/main/resources/mapper/project/ServiceTotalsMapper.xml
@@ -6,14 +6,14 @@
    <select id="caseTrend" parameterType="com.ruoyi.project.domain.ServiceTotals"
            resultType="ServiceTotals">
        SELECT DATE_FORMAT(a.ReportTime, '%Y-%m') donateTime, residencecountyname area,  COUNT(*) potentialCount,COUNT(IF(complete_state=3, true, null)) completeCount  FROM service_donatebaseinfo_report a
        SELECT DATE_FORMAT(a.ReportTime, '%Y-%m') donateTime, register_county_name area,  COUNT(*) potentialCount,COUNT(IF(complete_state=3, true, null)) completeCount  FROM service_donatebaseinfo_report a
        LEFT JOIN  service_donatecompletioninfo  b ON b.InfoID=a.id and a.del_flag=0 and b.del_flag=0
        <where>
            <if test="area != null  and area != ''">and residencecountyname>=#{area}</if>
            <if test="area != null  and area != ''">and register_county_name>=#{area}</if>
            <if test="startTime != null  and startTime != ''">and a.ReportTime>=#{startTime}</if>
            <if test="endTime != null  and endTime != ''">and a.ReportTime &lt;= #{endTime}</if>
        </where>
        GROUP BY residencecountyname, DATE_FORMAT(a.ReportTime, '%Y-%m')
        GROUP BY register_county_name, DATE_FORMAT(a.ReportTime, '%Y-%m')
    </select>
    <select id="caseTrendMoon" parameterType="com.ruoyi.project.domain.ServiceTotals"
@@ -21,7 +21,7 @@
        SELECT DATE_FORMAT(a.ReportTime, '%Y-%m') donateTime, COUNT(*) potentialCount,COUNT(IF(complete_state=3, true, null)) completeCount  FROM service_donatebaseinfo a
        LEFT JOIN  service_donatecompletioninfo  b ON b.InfoID=a.id and a.del_flag=0 and b.del_flag=0
        <where>
            <if test="area != null  and area != ''">and residencecountyname>=#{area}</if>
            <if test="area != null  and area != ''">and register_county_name>=#{area}</if>
            <if test="startTime != null  and startTime != ''">and a.ReportTime>=#{startTime}</if>
            <if test="endTime != null  and endTime != ''">and a.ReportTime &lt;= #{endTime}</if>
        </where>
@@ -30,14 +30,14 @@
    <select id="caseTrendArea" parameterType="com.ruoyi.project.domain.ServiceTotals"
            resultType="ServiceTotals">
        SELECT residencecountyname area, COUNT(*) potentialCount,COUNT(IF(complete_state=3, true, null)) completeCount  FROM service_donatebaseinfo a
        SELECT register_county_name area, COUNT(*) potentialCount,COUNT(IF(complete_state=3, true, null)) completeCount  FROM service_donatebaseinfo a
        LEFT JOIN  service_donatecompletioninfo  b ON b.InfoID=a.id and a.del_flag=0 and b.del_flag=0
        <where>
            <if test="area != null  and area != ''">and residencecountyname>=#{area}</if>
            <if test="area != null  and area != ''">and register_county_name>=#{area}</if>
            <if test="startTime != null  and startTime != ''">and a.ReportTime>=#{startTime}</if>
            <if test="endTime != null  and endTime != ''">and a.ReportTime &lt;= #{endTime}</if>
        </where>
        GROUP BY residencecountyname
        GROUP BY register_county_name
    </select>
    <select id="organ" parameterType="com.ruoyi.project.domain.ServiceTotals"