<?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="net.lab1024.sa.admin.module.business.task.dao.TaskDao">

    <!-- 查询结果列 -->
    <sql id="base_columns">
        t_task.task_id,
        t_task.bill_code,
        t_task.status,
        t_task.task_type,
        t_task.plan_qty,
        t_task.move_qty,
        t_task.item_key_id,
        t_task.asn_detail_id,
        t_task.pick_detail_id,
        t_task.src_stock_id,
        t_task.src_stock_code,
        t_task.dst_stock_id,
        t_task.src_location_id,
        t_task.dst_location_id,
        t_task.dst_location_code,
        t_task.src_location_code,
        t_task.dst_stock_code,
        t_task.inventory_id,
        t_task.agv_task_id,
        t_task.be_skip,
        t_task.create_time,
        t_task.end_time,
        t_task.create_user_id,
        t_task.create_user_name,
        t_task.update_time
    </sql>

    <!-- 分页查询 -->
    <select id="queryPage" resultType="net.lab1024.sa.admin.module.business.task.domain.vo.TaskVO">
        SELECT
        <include refid="base_columns"/>
        FROM t_task
        <where>
            <!--入库单-->
            <if test="queryForm.asnId != null ">
                AND t_task.asn_detail_id=#{queryForm.asnId}
            </if>
        </where>
    </select>


</mapper>
