<?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.maintain.business.mapper.ErpMaterialReturnsInfoMapper">
    <resultMap type="com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo" id="ErpMaterialReturnsInfoResult">
        <result property="id" column="id"/>
        <result property="returnsId" column="returns_id"/>
        <result property="returnsCode" column="returns_code"/>
        <result property="putawayNumber" column="putaway_code"/>
        <result property="vendorId" column="vendor_id"/>
        <result property="vendorName" column="vendor_name"/>
        <result property="materialId" column="material_id"/>
        <result property="materialCode" column="material_code"/>
        <result property="materialName" column="material_name"/>
        <result property="materialSpecifications" column="material_specifications"/>
        <result property="materialUnit" column="material_unit"/>
        <result property="materialWarrantyPeriod" column="material_warranty_period"/>
        <result property="referencePrice" column="reference_price"/>
        <result property="sellingPrice" column="selling_price"/>
        <result property="returnsNumber" column="returns_number"/>
        <result property="returnsPrice" column="returns_price"/>
        <result property="returnsMoney" column="returns_money"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
    </resultMap>
    <sql id="info">
        SELECT
            emri.id,
            emri.returns_id,
            emri.putaway_info_id,
            emri.vendor_id,
            emri.vendor_name,
            emri.material_id,
            emri.material_code,
            emri.material_name,
            emri.material_specifications,
            emri.material_unit,
            emri.material_warranty_period,
            emri.reference_price,
            emri.selling_price,
            emri.returns_number,
            emri.returns_price, emri.returns_money, emri.create_by, emri.create_time,emr.returns_code,emr.putaway_id,emr.putaway_code
            FROM erp_material_returns_info emri
            LEFT JOIN erp_material_returns emr ON emri.returns_id = emr.id
    </sql>
    <select id="customQueryPageList" resultType="com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo">
        <include refid="info" />
        ${ew.getCustomSqlSegment}
    </select>

    <select id="customQueryList" resultType="com.maintain.business.domain.vo.ErpMaterialReturnsInfoVo">
        <include refid="info" />
        ${ew.getCustomSqlSegment}
    </select>


</mapper>
