<?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.yeejoin.equipmanage.mapper.DutyDetailsMapper">

    <select id='selectDutyPersonList' resultType="java.util.Map">
        SELECT
        c.biz_org_name,
        IFNULL(c.personImg,'') personImg,
        IFNULL(c.job_title,'') job_title,
        IFNULL(c.telephone,'') telephone,
        d.duty_date
        FROM
        cb_org_usr c
        RIGHT JOIN d_duty_details d ON c.amos_org_id = d.user_id
        WHERE
        d.duty_date like concat('%',#{dutyDate},'%')
        <if test="bizOrgCode != null and  bizOrgCode!='' ">
            and c.biz_org_code like concat(#{bizOrgCode},'%')
        </if>
        ORDER BY
        d.duty_date DESC
    </select>
</mapper>
