ZQN
2024-06-19 d21773b0d86197d133ef4b16fe366232c345c665
project-enforce/src/main/resources/mapper/enforce/EnforceOrderMapper.xml
@@ -60,7 +60,9 @@
        from sys_job_log
    </sql>
    <select id="selectCheckList" parameterType="EnforceOrderQueryBo" resultMap="EnforceOrderResult">
    <select id="selectCheckList"
            parameterType="EnforceOrderQueryBo"
            resultMap="EnforceOrderResult">
        <include refid="selectEnforceOrderVo"/>
        <where>
            <if test="orderNo != null and orderNo != ''">
@@ -88,10 +90,35 @@
                    #{applyDeptId}
                </foreach>
            </if>
        </where>
    </select>
    <select id="getMonthCount"
            parameterType="Long"
            resultType="com.project.common.vo.KeyVal">
        select
            MONTH(apply_time) AS k,
            IFNULL(count(order_id),0) as v
        from enforce_order
        where 1=1
        <if test="deptId != null ">
            AND apply_dept_id = #{deptId}
        </if>
        GROUP BY k
    </select>
    <select id="getDeptCount"
            parameterType="String"
            resultType="com.project.common.vo.KeyVal">
        select
        MONTH(check_dept_id) AS k,
        IFNULL(count(order_id),0) as v
        from enforce_order
        where 1=1
        <if test="yearMonth!=null and yearMonth!=''">
            AND apply_time like concat('%', #{yearMonth}, '%')
        </if>
        GROUP BY k
    </select>
</mapper>