zss
2023-09-11 19b596d3c05b1ca7ff80d8b802e7f6e03ad77dad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?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.RecordModelMapper">
    <!--查询记录内容维护列表 右边展示该工艺下的所有记录内容-->
    <select id="selectAllRecord" resultType="java.util.Map">
        select id,
               name,
               unit,
               note
        from mom_ocean.record_model
        where state = 1
          and tech_tem_id = #{id}
    </select>
 
    <!--根据记录内容id查看详情-->
    <select id="selecRecordById" resultType="java.util.Map">
        select type,
               father  techFather,
               tt.name techName,
               tt.id,
               rm.name,
               unit,
               note
        from mom_ocean.record_model rm,
             mom_ocean.technology_template tt
        where rm.state = 1
          and tech_tem_id = tt.id
          and rm.id = #{id}
    </select>
 
    <!--根据记录内容id批量删除-->
    <update id="delAllRecord">
        update mom_ocean.record_model
        set state=0
        where id in (${ids})
    </update>
 
    <!--根据工艺路线id删除-->
    <update id="delRecordByTechId">
        update mom_ocean.record_model
        set state=0
        where tech_tem_id = #{id}
    </update>
 
    <!--根据工艺路线id批量删除-->
    <update id="delAllByTechId">
        update mom_ocean.record_model
        set state=0
        where tech_tem_id in (${ids})
    </update>
</mapper>