| | |
| | | <?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.yuanchu.mom.mapper.TechniqueMapper"> |
| | | <!--根据技术指标id删除--> |
| | | <update id="delByProId"> |
| | | update mom_ocean.technique |
| | | set state=0 |
| | | where technology_id = (select technology_id from mom_ocean.product where product.id = #{id}) |
| | | and product_father = (select father from mom_ocean.product where product.id = #{id}) |
| | | and product = (select name from mom_ocean.product where product.id = #{id}) |
| | | </update> |
| | | <!--根据技术指标id批量删除--> |
| | | <update id="delAll"> |
| | | update mom_ocean.technique |
| | | set state=0 |
| | | where technology_id in (select technology_id from mom_ocean.product where product.id in (${ids})) |
| | | and product_father in (select father from mom_ocean.product where product.id in (${ids})) |
| | | and product in (select name from mom_ocean.product where product.id in (${ids})) |
| | | </update> |
| | | <!--根据型号id查询所有版本--> |
| | | <select id="selectVerByTeq" resultType="java.lang.Integer"> |
| | | select distinct version |
| | |
| | | <collection property="children" resultMap="threeMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="threeMap" type="map"> |
| | | <id property="tqid" column="tqid"/> |
| | | <result property="device" column="device"/> |
| | | <collection property="children" resultMap="fourMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="fourMap" type="map"> |
| | | <result property="productFather" column="product_father"/> |
| | | <collection property="children" resultMap="fiveMap" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="fiveMap" type="map"> |
| | | <id property="tqid" column="tqid"/> |
| | | <result property="product" column="product"/> |
| | | <result property="unit" column="unit"/> |
| | | </resultMap> |
| | |
| | | and specifications_id = #{specificationsId} |
| | | and tq.version = #{version} |
| | | <if test="message!=null and message!=''"> |
| | | and device like concat('%',#{message},'%') |
| | | and name like concat('%',#{message},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | and specifications_id = #{specificationsId}) |
| | | </select> |
| | | <!--根据工艺路线id查询所有版本--> |
| | | <select id="selectVerByTeId" resultType="java.lang.Integer"> |
| | | <!-- <select id="selectVerByTeId" resultType="java.lang.Integer"> |
| | | select distinct version |
| | | from mom_ocean.technique |
| | | where state = 1 |
| | | and technology_id = #{technologyId} |
| | | </select> |
| | | </select>--> |
| | | |
| | | <!--查询该工艺下最新版本在一个检验项目下可以使用哪些设备--> |
| | | <select id="selDevByVerTecIdFaNam" resultType="java.util.Map"> |
| | | <!--<select id="selDevByVerTecIdFaNam" resultType="java.util.Map"> |
| | | select device.id, device |
| | | from mom_ocean.technique |
| | | left join mom_ocean.device on name = device |
| | | where technique.state = 1 |
| | | and device.state = 1 |
| | | and technology_id = #{technologyId} |
| | | and product_father = #{father} |
| | | and product = #{name} |
| | | and version = #{ver} |
| | | </select> |
| | | </select>--> |
| | | |
| | | <!--根据id查看详情--> |
| | | <select id="selTeqById" resultType="java.util.Map"> |