OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-02-18 612b5a21417f3c8dcaed84c1c0691dc883088f61
src/main/resources/mybatis/query-template/department-template.xml
@@ -12,10 +12,10 @@
        FROM
        department d
        WHERE 1=1
        <if test="departmentName != '' and departmentName != null">
        <if test="departmentName != null and departmentName != ''">
            AND d.department_name like CONCAT('%',#{departmentName},'%')
        </if>
        <if test="id != '' and id != null">
        <if test="id != null and id != ''">
            AND d.id like CONCAT('%',#{id},'%')
        </if>
        <choose>
@@ -33,7 +33,7 @@
    <select id="count" resultType="java.lang.Long" parameterType="kr.wisestone.owl.web.condition.DepartmentCondition">
        SELECT
        count(d.id)
        count(DISTINCT d.id)
        FROM
        department d
        WHERE 1=1
@@ -76,5 +76,29 @@
        where p.id = #{projectId};
    </select>
    <select id="findByIssueStatusId" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.DepartmentCondition">
        SELECT
        d.id as id,
        d.department_name as departmentName
        FROM
        department d
        INNER JOIN workflow_department wd ON wd.department_id = d.id
        WHERE 1=1
        <if test="issueStatusId != null and issueStatusId != ''">
            AND wd.issue_status_id = #{issueStatusId}
        </if>
        <if test="workflowId != null and workflowId != ''">
            AND wd.workflow_Id = #{workflowId}
        </if>
        <choose>
            <when test="excludeIds != null and excludeIds.size != 0">
                AND d.id NOT IN
                <foreach collection="excludeIds" item="item" index="index" separator="," open="(" close=")">
                    #{item}
                </foreach>
            </when>
        </choose>
    </select>
</mapper>