<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yida.data.attendance.mapper.AttendanceRuleObjMapper">

  <select id="findList" resultType="com.yida.data.common.core.entity.attendance.attendance.AttendanceRuleObj">
    select * from attendance_rule_obj where 1=1
    <if test="ruleId!=null">
      and rule_id = #{ruleId}
    </if>
    <if test="deptId!=null">
      and (parent_dept_id like concat('%',#{deptId},',%') or parent_dept_id like concat('%,',#{deptId},'%') or dept_id =
      #{deptId})
    </if>

  </select>
</mapper>
