<?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.shkj.wms.mapper.BusinDataTaskGoodsMapper">

    <select id="selectBusinTaskGoodsByTaskCode" resultType="com.shkj.wms.vo.BusinDataTaskGoodsVo" parameterType="Long">
        select goods.id as goodsId,task_code,goods.goods_no,goods.qr_code,vehiche_model, color, location, barcodes.is_split,
         goods.is_punching, repair_time, barcodes.is_repair, in_Status, location_code, punching_result,  orientation,goods.traverse_date
        from busin_data_task_goods  goods
        inner join base_barcodes_in barcodes on goods.qr_code=barcodes.qr_code
        <where>
            <if test="taskId !=null ">
                task_code =#{taskId}
            </if>
        </where>
    </select>

    <select id="getTaskGoodsByTaskCodeForOut" resultType="com.shkj.wms.vo.BusinDataTaskGoodsVo" parameterType="Long">
        SELECT
        goodsdata.id AS goodsId,
        task_code,
        goodsdata.goods_no,
        vehiche_model,
        color,
        location,
        goodsdata.is_split,
        goodsdata.is_punching,
        location_code,
        orientation
        FROM
        busin_data_task_goods taskgoods
        INNER JOIN base_goods_data goodsdata ON taskgoods.goods_no = goodsdata.goods_no
        <where>
            <if test="taskId !=null ">
                task_code =#{taskId}
            </if>
        </where>
    </select>



</mapper>
