<?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.fjhx.mapper.v3.V3PlanMapper">


    <select id="issue" resultType="com.fjhx.params.v3.MaterialMath">
        select wd.quantity,
               wd.create_time,
               wd.oper_user_id userId,
               m.Name          materialName,
               m.price,
               m.width
        from water_detail wd
                 left join material m on wd.material_id = m.id
            ${ew.customSqlSegment}
    </select>

    <select id="back" resultType="com.fjhx.params.v3.MaterialMath">
        select wbd.quantity,
               wbd.create_time,
               wbd.create_user userId,
               m.Name          materialName,
               m.price,
               m.width
        from water_back_details wbd
                 left join material m on wbd.material_id = m.id
            ${ew.customSqlSegment}
    </select>

    <select id="in" resultType="com.fjhx.params.v3.MaterialMath">
        select wtd.quantity,
               wtd.create_time,
               wtd.receive_id userId,
               m.Name         materialName,
               m.price,
               m.width
        from water_transfer_details wtd
                 left join material m on wtd.material_id = m.id
            ${ew.customSqlSegment}
    </select>

    <select id="out" resultType="com.fjhx.params.v3.MaterialMath">
        select wtd.quantity,
               wtd.create_time,
               wtd.create_user userId,
               m.Name          materialName,
               m.price,
               m.width
        from water_transfer_details wtd
                 left join material m on wtd.material_id = m.id
            ${ew.customSqlSegment}
    </select>


</mapper>
