<?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.jeeplus.human.practice.logwrite.mapper.RegistrationWorkLogDetailMapper">

    <sql id="Son_Column_List">
        b.year,
        b.month,
        b.day,
        b.week,
        b.audit_project_unit_name,
        b.audit_work_content,
        b.work_log_id,
        b.check_type
    </sql>
    <delete id="deleteDetailInfo">
        update human_resources_practice_registration_work_log_detail set del_flag = '1' where work_log_id = #{id}
    </delete>

    <select id="getChildList" resultType="com.jeeplus.human.practice.logwrite.domain.RegistrationWorkLogDetail">
        select
        <include refid="Son_Column_List"></include>,
        sa.id as locationId,
        sa.name as location
        from human_resources_practice_registration_work_log_detail b
        left join sys_area sa on b.location = sa.id
        where b.del_flag = '0' and b.work_log_id = #{id}
    </select>
</mapper>