ZQN
2024-06-27 55fefdfac9a281cc57a1b3bad1fd061eec4b066d
project-report/src/main/resources/mapper/report/ReportMapper.xml
@@ -13,8 +13,9 @@
            IFNULL(count(order_id),0) as v
        from enforce_order
        where 1=1
        and check_status>=2
        <if test="deptId != null ">
            AND apply_dept_id = #{deptId}
            AND check_dept_id = #{deptId}
        </if>
        <if test="beginTime!=null and beginTime!=''">
            AND apply_time &gt;= #{beginTime}
@@ -34,6 +35,7 @@
        IFNULL(count(order_id),0) as v
        from enforce_order
        where 1=1
        and check_status>=2
        <if test="beginTime!=null and beginTime!=''">
            AND apply_time &gt;= #{beginTime}
        </if>
@@ -54,7 +56,9 @@
        from sys_company sc
        left join enforce_order eo on sc.company_id=eo.company_id
        where 1=1
        and sc.company_status=0
        and sc.check_status=2
        and eo.check_status>=2
        <if test="beginTime!=null and beginTime!=''">
            AND eo.apply_time &gt;= #{beginTime}
        </if>
@@ -73,6 +77,7 @@
        IFNULL(count(order_id),0) as v
        from enforce_order
        where 1=1
          and check_status>=2
        <if test="beginTime!=null and beginTime!=''">
            AND apply_time &gt;= #{beginTime}
        </if>
@@ -92,15 +97,15 @@
        from enforce_complaint_log
        where 1=1
        <if test="beginTime!=null and beginTime!=''">
            AND apply_time &gt;= #{beginTime}
            AND complaint_time &gt;= #{beginTime}
        </if>
        <if test="endTime!=null and endTime!=''">
            AND apply_time &lt;= #{endTime}
            AND complaint_time &lt;= #{endTime}
        </if>
        GROUP BY k
    </select>
    <!--    执法类型分布-->
    <!--    投诉类型分布-->
    <select id="getComplaintTypeCount"
            parameterType="com.project.report.domain.bo.query.ReportQueryBo"
            resultType="com.project.common.vo.KeyVal">
@@ -110,12 +115,12 @@
        from enforce_complaint_log
        where 1=1
        <if test="beginTime!=null and beginTime!=''">
            AND apply_time &gt;= #{beginTime}
            AND complaint_time &gt;= #{beginTime}
        </if>
        <if test="endTime!=null and endTime!=''">
            AND apply_time &lt;= #{endTime}
            AND complaint_time &lt;= #{endTime}
        </if>
        <if test="doComplaint!=null ">
        <if test="doComplaint != null ">
            <if test="doComplaint == 0 ">
                AND complaint_status = 0
            </if>