| | |
| | | <result property="internal" column="internal"/> |
| | | </resultMap> |
| | | <select id="selectAllPro" resultMap="oneMap"> |
| | | select p.id pid, |
| | | p.name pname, |
| | | p.father pfather, |
| | | unit, |
| | | required, |
| | | internal, |
| | | t.father tfather, |
| | | t.name tname |
| | | select p.id pid, |
| | | p.name pname, |
| | | p.father pfather, |
| | | unit, |
| | | required, |
| | | internal, |
| | | t.father tfather, |
| | | t.name tname |
| | | from mom_ocean.product p |
| | | left join mom_ocean.technology t on p.technology_id = t.id |
| | | left join mom_ocean.technology t on p.technology_id = t.id |
| | | where p.state = 1 |
| | | and p.version = #{version} |
| | | and specifications_id = #{specificationsId} |
| | | and p.version = #{version} |
| | | and specifications_id = #{specificationsId} |
| | | <if test="message!=null and message!=''"> |
| | | and p.name like concat('%',#{message},'%') |
| | | and p.father like concat('%',#{message},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <!--右上角新增-技术指标-选择项目父类--> |
| | | <select id="chooseFather" resultType="java.util.Map"> |
| | | select distinct father |
| | | from mom_ocean.product |
| | | where state = 1 |
| | | and technology_id = #{technologyId} |
| | | </select> |
| | | |
| | | <!--根据型号id查询该型号下的所有工艺的技术指标--> |
| | | <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Product"> |
| | | select * |
| | | from mom_ocean.product |
| | | where state = 1 |
| | | and version = #{version} |
| | | and technology_id in (select id |
| | | from mom_ocean.technology |
| | | where technology.state = 1 |
| | | and specifications_id = #{specificationsId}) |
| | | </select> |
| | | <!--查询标准BOM技术指标中该型号工艺下最新版本的检验项目--> |
| | | <select id="selProByVerSpe" resultType="com.yuanchu.mom.pojo.Product"> |
| | | select * |
| | | from mom_ocean.product |
| | | where state = 1 |
| | | and technology_id = #{technologyId} |
| | | </select> |
| | | |
| | | <!--根据工艺路线id删除--> |
| | | <update id="delProByTecId"> |
| | | update mom_ocean.product |
| | | set state=0 |
| | | where technology_id = #{id} |
| | | </update> |
| | | |
| | | <!--根据工艺路线id批量删除--> |
| | | <update id="delAllByTechId"> |
| | | update mom_ocean.product |
| | | set state=0 |
| | | where technology_id in (${ids}) |
| | | </update> |
| | | |
| | | <!--根据技术指标id批量删除--> |
| | | <update id="delAllPro"> |
| | | update mom_ocean.product |
| | | set state=0 |
| | | where id in (${ids}) |
| | | </update> |
| | | </mapper> |