| | |
| | | sp.id spid, #五级型号id |
| | | sp.name spname #五级型号名 |
| | | from (select type, id, name,father from mom_ocean.material where state = 1) m |
| | | left join (select id, name, material_id from mom_ocean.standard where state = 1) s on m.id = s.material_id |
| | | left join (select id, name, material_id from mom_ocean.standard where state = 1) s |
| | | on m.id = s.material_id |
| | | left join (select id, name, standard_id from mom_ocean.specifications where state = 1) sp |
| | | on sp.standard_id = s.id |
| | | </select> |
| | |
| | | and m.name = #{name} |
| | | and code = #{code} |
| | | </select> |
| | | |
| | | <!--根据标准id查询物料--> |
| | | <select id="selFath" resultType="com.yuanchu.mom.pojo.Material"> |
| | | select * |
| | | from mom_ocean.material |
| | | where state = 1 |
| | | and id = (select material_id |
| | | from mom_ocean.standard |
| | | where standard.state = 1 |
| | | and standard.id = #{id}) |
| | | </select> |
| | | </mapper> |