zss
2023-09-15 cd5b5908546c3d6c98e7aec607af8db1f8565495
base-server/src/main/resources/mapper/TechniqueModelMapper.xml
@@ -3,15 +3,27 @@
<mapper namespace="com.yuanchu.mom.mapper.TechniqueModelMapper">
    <!--查询生产工艺维护列表 右边展示该工艺下能使用的设备所能做的项目-->
    <resultMap id="selectAllTequeMap" type="map">
        <id property="name" column="dname"/>
        <id property="dname" column="dname"/>
        <collection property="children" resultMap="selectAllTequeMaps" javaType="List"/>
    </resultMap>
    <resultMap id="selectAllTequeMaps" type="map">
        <id property="id" column="id"/>
        <result property="name" column="father"/>
        <result property="name" column="unit"/>
        <result property="father" column="father"/>
        <result property="unit" column="unit"/>
        <result property="name" column="name"/>
    </resultMap>
    <!--根据技术指标id批量删除-->
    <update id="delTechById">
        update mom_ocean.technique_model
        set state=0
        where technical_model_id = #{id}
    </update>
    <!--根据技术指标id批量删除-->
    <update id="delAllTech">
        update mom_ocean.technique_model
        set state=0
        where technical_model_id in (${id})
    </update>
    <select id="selectAllTeque" resultMap="selectAllTequeMap">
        select d.name dname,
               qm.id,
@@ -23,6 +35,7 @@
             mom_ocean.device d,
             mom_ocean.technology_template tt
        where qm.state = 1
          and d.state = 1
          and d.id = qm.device_id
          and cm.id = qm.technical_model_id
          and tt.id = qm.tech_tem_id
@@ -37,7 +50,7 @@
    <resultMap id="chooseProMaps" type="map">
        <id property="id" column="technicalModelId"/>
        <result property="name" column="name"/>
        <result property="name" column="unit"/>
        <result property="unit" column="unit"/>
    </resultMap>
    <select id="choosePro" resultMap="chooseProMap">
        select father,
@@ -67,6 +80,8 @@
        select tt.type,
               tt.father techFather,
               tt.name   techName,
               tt.id     tid,
               d.id      did,
               d.name    dname,
               cm.father,
               cm.name,