<?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.qy.worksheetsystem.model.mapper.PersonWorkMapper">
    <select id="selectKey" resultType="String">
        select dbo.newbosid('CF9DCEB1') as id
    </select>
    <select id="getAvailableDateInfo" resultType="java.util.Map">
        SELECT
        item.fid as "id",
        CONVERT(varchar(10) , item.FDate, 120 ) as "date",
        CAST (item.FDayType as varchar) as "dateType",
        item.FWEEK "week",hre.CFEmployeeID employeeID,hre.workHours
        FROM
        T_HR_ATS_WorkCalendarItem item
        left join T_HR_ATS_WorkCalendar w on w.fid=item.FCALENDARGROUPID
        left join (
        select whre.CFEmployeeID,whre.CFdata,sum(whre.CFWorkingHours) workHours
        from
        CT_PRO_WorkHoursReportEntry whre
        where whre.CFEmployeeID=#{employeeID}
        group by whre.CFData,whre.CFEmployeeID) hre on hre.CFdata=item.FDate
        WHERE
        item.FDate BETWEEN #{startDate}
        AND #{endDate}
        AND w.FISDEFAULT=1
        order by item.FDate
    </select>
    <!--22DCD041-->


</mapper>