zss
2023-09-05 b9e2c1619cf61bcd5f24b858fff738244d20566e
inspect-server/src/main/resources/mapper/FinishedInspectMapper.xml
@@ -43,4 +43,35 @@
            and finished_inspect.create_time <= #{end}
        </if>
    </select>
    <!--新增过程检验单-根据订单号选择产品信息-->
    <resultMap id="oneMap" type="map">
        <id property="name" column="material"/>
        <result property="code" column="code"/>
        <result property="specifications" column="specifications"/>
        <result property="unit" column="unit"/>
        <collection property="children" resultMap="twoMap" javaType="List"/>
    </resultMap>
    <resultMap id="twoMap" type="map">
        <result property="name" column="techfather"/>
        <collection property="children" resultMap="threeMap" javaType="List"/>
    </resultMap>
    <resultMap id="threeMap" type="map">
        <id property="id" column="technologyId"/>
        <result property="name" column="techname"/>
    </resultMap>
    <select id="chooseMater" resultMap="oneMap">
        select mo.name material,
               code,
               specifications,
               unit,
               technology_id   technologyId,
               techfather,
               techname
        from mom_ocean.manual_technology mt
                 left join mom_ocean.manufacture_order mo on mt.manufacture_order_id = mo.id
                 left join mom_ocean.material m on m.name = mo.name
        where mo.state = 1
          and type = 1
          and order_code = #{orderNumber}
    </select>
</mapper>