懒羊羊
2023-12-14 28c5e2202c11af63c6cf138ff319ec8813e1bd64
提交 | 用户 | 时间
83806e 1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.jcdm.main.bs.mapper.BsTechnologyRouteChildInfoMapper">
6     
7     <resultMap type="BsTechnologyRouteChildInfo" id="BsTechnologyRouteChildInfoResult">
8         <result property="id"    column="id"    />
9         <result property="processesCode"    column="processes_code"    />
10         <result property="processesName"    column="processes_name"    />
11         <result property="stepNo"    column="step_no"    />
12         <result property="nextProcess"    column="next_process"    />
13         <result property="nextProcessBond"    column="next_process_bond"    />
14         <result property="keyProcessesFlag"    column="key_processes_flag"    />
15         <result property="preparationTime"    column="preparation_time"    />
16         <result property="waitTime"    column="wait_time"    />
17         <result property="createUser"    column="create_user"    />
18         <result property="createTime"    column="create_time"    />
19         <result property="updateUser"    column="update_user"    />
20         <result property="updateTime"    column="update_time"    />
21         <result property="remark"    column="remark"    />
22         <result property="routeCode"    column="route_code"    />
23         <result property="spareField1"    column="spare_field_1"    />
24         <result property="spareField2"    column="spare_field_2"    />
25         <result property="spareField3"    column="spare_field_3"    />
26         <result property="spareField4"    column="spare_field_4"    />
03bb7a 27         <result property="routeId"    column="route_id"    />
28
83806e 29     </resultMap>
30
31     <sql id="selectBsTechnologyRouteChildInfoVo">
03bb7a 32         select route_id, id, processes_code, processes_name, step_no, next_process, next_process_bond, key_processes_flag, preparation_time, wait_time, create_user, create_time, update_user, update_time, remark, route_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_technology_route_child_info
83806e 33     </sql>
34
35     <select id="selectBsTechnologyRouteChildInfoList" parameterType="BsTechnologyRouteChildInfo" resultMap="BsTechnologyRouteChildInfoResult">
36         <include refid="selectBsTechnologyRouteChildInfoVo"/>
37         <where>  
38             <if test="processesCode != null  and processesCode != ''"> and processes_code like concat('%', #{processesCode}, '%')</if>
39             <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
40             <if test="keyProcessesFlag != null  and keyProcessesFlag != ''"> and key_processes_flag = #{keyProcessesFlag}</if>
41             <if test="routeCode != null  and routeCode != ''"> and route_code = #{routeCode}</if>
28c5e2 42             <if test="routeId != null  and routeId != ''"> and route_Id = #{routeId}</if>
83806e 43
44         </where>
45     </select>
46     
47     <select id="selectBsTechnologyRouteChildInfoById" parameterType="Long" resultMap="BsTechnologyRouteChildInfoResult">
48         <include refid="selectBsTechnologyRouteChildInfoVo"/>
49         where id = #{id}
50     </select>
51         
52     <insert id="insertBsTechnologyRouteChildInfo" parameterType="BsTechnologyRouteChildInfo">
53         insert into bs_technology_route_child_info
54         <trim prefix="(" suffix=")" suffixOverrides=",">
55             <if test="id != null">id,</if>
56             <if test="processesCode != null and processesCode != ''">processes_code,</if>
57             <if test="processesName != null">processes_name,</if>
58             <if test="stepNo != null">step_no,</if>
59             <if test="nextProcess != null">next_process,</if>
60             <if test="nextProcessBond != null">next_process_bond,</if>
61             <if test="keyProcessesFlag != null">key_processes_flag,</if>
62             <if test="preparationTime != null">preparation_time,</if>
63             <if test="waitTime != null">wait_time,</if>
64             <if test="createUser != null">create_user,</if>
65             <if test="createTime != null">create_time,</if>
66             <if test="updateUser != null">update_user,</if>
67             <if test="updateTime != null">update_time,</if>
68             <if test="remark != null">remark,</if>
69             <if test="routeCode != null">route_code,</if>
70             <if test="spareField1 != null">spare_field_1,</if>
71             <if test="spareField2 != null">spare_field_2,</if>
72             <if test="spareField3 != null">spare_field_3,</if>
73             <if test="spareField4 != null">spare_field_4,</if>
03bb7a 74             <if test="routeId != null">route_id,</if>
75         </trim>
83806e 76         <trim prefix="values (" suffix=")" suffixOverrides=",">
77             <if test="id != null">#{id},</if>
78             <if test="processesCode != null and processesCode != ''">#{processesCode},</if>
79             <if test="processesName != null">#{processesName},</if>
80             <if test="stepNo != null">#{stepNo},</if>
81             <if test="nextProcess != null">#{nextProcess},</if>
82             <if test="nextProcessBond != null">#{nextProcessBond},</if>
83             <if test="keyProcessesFlag != null">#{keyProcessesFlag},</if>
84             <if test="preparationTime != null">#{preparationTime},</if>
85             <if test="waitTime != null">#{waitTime},</if>
86             <if test="createUser != null">#{createUser},</if>
87             <if test="createTime != null">#{createTime},</if>
88             <if test="updateUser != null">#{updateUser},</if>
89             <if test="updateTime != null">#{updateTime},</if>
90             <if test="remark != null">#{remark},</if>
91             <if test="routeCode != null">#{routeCode},</if>
92             <if test="spareField1 != null">#{spareField1},</if>
93             <if test="spareField2 != null">#{spareField2},</if>
94             <if test="spareField3 != null">#{spareField3},</if>
95             <if test="spareField4 != null">#{spareField4},</if>
03bb7a 96             <if test="routeId != null">#{routeId},</if>
97         </trim>
83806e 98     </insert>
99
100     <update id="updateBsTechnologyRouteChildInfo" parameterType="BsTechnologyRouteChildInfo">
101         update bs_technology_route_child_info
102         <trim prefix="SET" suffixOverrides=",">
103             <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
104             <if test="processesName != null">processes_name = #{processesName},</if>
105             <if test="stepNo != null">step_no = #{stepNo},</if>
106             <if test="nextProcess != null">next_process = #{nextProcess},</if>
107             <if test="nextProcessBond != null">next_process_bond = #{nextProcessBond},</if>
108             <if test="keyProcessesFlag != null">key_processes_flag = #{keyProcessesFlag},</if>
109             <if test="preparationTime != null">preparation_time = #{preparationTime},</if>
110             <if test="waitTime != null">wait_time = #{waitTime},</if>
111             <if test="createUser != null">create_user = #{createUser},</if>
112             <if test="createTime != null">create_time = #{createTime},</if>
113             <if test="updateUser != null">update_user = #{updateUser},</if>
114             <if test="updateTime != null">update_time = #{updateTime},</if>
115             <if test="remark != null">remark = #{remark},</if>
116             <if test="routeCode != null">route_code = #{routeCode},</if>
117             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
118             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
119             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
120             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
03bb7a 121             <if test="routeId != null">route_id = #{routeId},</if>
122
83806e 123         </trim>
124         where id = #{id}
125     </update>
126
03bb7a 127     <update id="updateBsTechnologyRouteChildByCodeInfo" parameterType="BsTechnologyRouteChildInfo">
128         update bs_technology_route_child_info
129         <trim prefix="SET" suffixOverrides=",">
130             <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
131             <if test="processesName != null">processes_name = #{processesName},</if>
132             <if test="stepNo != null">step_no = #{stepNo},</if>
133             <if test="nextProcess != null">next_process = #{nextProcess},</if>
134             <if test="nextProcessBond != null">next_process_bond = #{nextProcessBond},</if>
135             <if test="keyProcessesFlag != null">key_processes_flag = #{keyProcessesFlag},</if>
136             <if test="preparationTime != null">preparation_time = #{preparationTime},</if>
137             <if test="waitTime != null">wait_time = #{waitTime},</if>
138             <if test="createUser != null">create_user = #{createUser},</if>
139             <if test="createTime != null">create_time = #{createTime},</if>
140             <if test="updateUser != null">update_user = #{updateUser},</if>
141             <if test="updateTime != null">update_time = #{updateTime},</if>
142             <if test="remark != null">remark = #{remark},</if>
143             <if test="routeCode != null">route_code = #{routeCode},</if>
144             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
145             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
146             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
147             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
148             <if test="routeId != null">route_id = #{routeId},</if>
149
150         </trim>
28c5e2 151         where route_id = #{routeId}
03bb7a 152     </update>
153
83806e 154     <delete id="deleteBsTechnologyRouteChildInfoById" parameterType="Long">
155         delete from bs_technology_route_child_info where id = #{id}
156     </delete>
157
158     <delete id="deleteBsTechnologyRouteChildInfoByIds" parameterType="String">
159         delete from bs_technology_route_child_info where id in 
160         <foreach item="id" collection="array" open="(" separator="," close=")">
161             #{id}
162         </foreach>
163     </delete>
164 </mapper>