<?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.water.WaterBatchMapper">

    <select id="getMaterialInfo" resultType="java.util.Map">
        select cd.quantity,
               m.name materialName,
               m.code materialCode,
               m.spec materialSpec,
               cd.price
        from contract_details cd
                 left join material m on cd.material_id = m.id
        where cd.contract_id = #{contractId}
    </select>

</mapper>
