<?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.ruoyi.oa.mapper.OaProgressDetailMapper">

    <resultMap type="com.ruoyi.oa.domain.OaProgressDetail" id="OaProgressDetailResult">
        <result property="detailId" column="detail_id"/>
        <result property="progressId" column="progress_id"/>
        <result property="detailName" column="detail_name"/>
        <result property="planStartDate" column="plan_start_date"/>
        <result property="planEndDate" column="plan_end_date"/>
        <result property="actualStartDate" column="actual_start_date"/>
        <result property="actualEndDate" column="actual_end_date"/>
        <result property="completePercent" column="complete_percent"/>
        <result property="planPayDate" column="plan_pay_date"/>
        <result property="payAmount" column="pay_amount"/>
        <result property="paidAmount" column="paid_amount"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
        <result property="remark" column="remark"/>
        <result property="detailStatus" column="detail_status"/>
    </resultMap>

    <select id="selectVoPagePlus" resultType="com.ruoyi.oa.domain.vo.OaProgressDetailVo">
        select opd.detail_id,
               progress_id,
               detail_name,
               plan_start_date,
               plan_end_date,
               actual_start_date,
               actual_end_date,
               complete_percent,
               plan_pay_date,
               pay_amount,
               paid_amount,
               detail_status,
               create_by,
               create_time,
               update_by,
               update_time,
               del_flag,
               remark,
               department,
               TIMESTAMPDIFF(DAY, NOW(), plan_end_date) AS remainTime
        from oa_progress_detail opd
            ${ew.getCustomSqlSegment}
    </select>


</mapper>
