春风项目四线(合箱线、总装线)
hdy
2024-01-18 2cc5a1afe8296d148f0a32989395d538e5323a8e
提交 | 用户 | 时间
fd2207 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.processes.mapper.BsProcessesInfoMapper">
6     
7     <resultMap type="BsProcessesInfo" id="BsProcessesInfoResult">
8         <result property="id"    column="id"    />
9         <result property="processesCode"    column="processes_code"    />
10         <result property="processesName"    column="processes_name"    />
11         <result property="processesType"    column="processes_type"    />
12         <result property="preparationTime"    column="preparation_time"    />
13         <result property="productiveTime"    column="productive_time"    />
14         <result property="status"    column="status"    />
15         <result property="spareField1"    column="spare_field_1"    />
16         <result property="spareField2"    column="spare_field_2"    />
17         <result property="spareField3"    column="spare_field_3"    />
18         <result property="spareField4"    column="spare_field_4"    />
19         <result property="createUser"    column="create_user"    />
20         <result property="createTime"    column="create_time"    />
21         <result property="updateUser"    column="update_user"    />
22         <result property="updateTime"    column="update_time"    />
23         <result property="remarks"    column="remarks"    />
24     </resultMap>
25
26     <sql id="selectBsProcessesInfoVo">
27         select id, processes_code, processes_name, processes_type, preparation_time, productive_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from bs_processes_info
28     </sql>
29
30     <select id="selectBsProcessesInfoList" parameterType="BsProcessesInfo" resultMap="BsProcessesInfoResult">
31         <include refid="selectBsProcessesInfoVo"/>
32         <where>
33             <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
34             <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
35             <if test="processesType != null  and processesType != ''"> and processes_type like concat('%', #{processesType}, '%')</if>
36             <if test="status != null  and status != ''"> and status = #{status}</if>
37         </where>
38     </select>
39     
40     <select id="selectBsProcessesInfoById" parameterType="Long" resultMap="BsProcessesInfoResult">
41         <include refid="selectBsProcessesInfoVo"/>
42         where id = #{id}
43     </select>
44         
45     <insert id="insertBsProcessesInfo" parameterType="BsProcessesInfo">
46         insert into bs_processes_info
47         <trim prefix="(" suffix=")" suffixOverrides=",">
48             <if test="id != null">id,</if>
49             <if test="processesCode != null and processesCode != ''">processes_code,</if>
50             <if test="processesName != null">processes_name,</if>
51             <if test="processesType != null and processesType != ''">processes_type,</if>
52             <if test="preparationTime != null">preparation_time,</if>
53             <if test="productiveTime != null">productive_time,</if>
54             <if test="status != null">status,</if>
55             <if test="spareField1 != null">spare_field_1,</if>
56             <if test="spareField2 != null">spare_field_2,</if>
57             <if test="spareField3 != null">spare_field_3,</if>
58             <if test="spareField4 != null">spare_field_4,</if>
59             <if test="createUser != null">create_user,</if>
60             <if test="createTime != null">create_time,</if>
61             <if test="updateUser != null">update_user,</if>
62             <if test="updateTime != null">update_time,</if>
63             <if test="remarks != null">remarks,</if>
64          </trim>
65         <trim prefix="values (" suffix=")" suffixOverrides=",">
66             <if test="id != null">#{id},</if>
67             <if test="processesCode != null and processesCode != ''">#{processesCode},</if>
68             <if test="processesName != null">#{processesName},</if>
69             <if test="processesType != null and processesType != ''">#{processesType},</if>
70             <if test="preparationTime != null">#{preparationTime},</if>
71             <if test="productiveTime != null">#{productiveTime},</if>
72             <if test="status != null">#{status},</if>
73             <if test="spareField1 != null">#{spareField1},</if>
74             <if test="spareField2 != null">#{spareField2},</if>
75             <if test="spareField3 != null">#{spareField3},</if>
76             <if test="spareField4 != null">#{spareField4},</if>
77             <if test="createUser != null">#{createUser},</if>
78             <if test="createTime != null">#{createTime},</if>
79             <if test="updateUser != null">#{updateUser},</if>
80             <if test="updateTime != null">#{updateTime},</if>
81             <if test="remarks != null">#{remarks},</if>
82          </trim>
83     </insert>
84
85     <update id="updateBsProcessesInfo" parameterType="BsProcessesInfo">
86         update bs_processes_info
87         <trim prefix="SET" suffixOverrides=",">
88             <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
89             <if test="processesName != null">processes_name = #{processesName},</if>
90             <if test="processesType != null and processesType != ''">processes_type = #{processesType},</if>
91             <if test="preparationTime != null">preparation_time = #{preparationTime},</if>
92             <if test="productiveTime != null">productive_time = #{productiveTime},</if>
93             <if test="status != null">status = #{status},</if>
94             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
95             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
96             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
97             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
98             <if test="createUser != null">create_user = #{createUser},</if>
99             <if test="createTime != null">create_time = #{createTime},</if>
100             <if test="updateUser != null">update_user = #{updateUser},</if>
101             <if test="updateTime != null">update_time = #{updateTime},</if>
102             <if test="remarks != null">remarks = #{remarks},</if>
103         </trim>
104         where id = #{id}
105     </update>
106
107     <delete id="deleteBsProcessesInfoById" parameterType="Long">
108         delete from bs_processes_info where id = #{id}
109     </delete>
110
111     <delete id="deleteBsProcessesInfoByIds" parameterType="String">
112         delete from bs_processes_info where id in 
113         <foreach item="id" collection="array" open="(" separator="," close=")">
114             #{id}
115         </foreach>
116     </delete>
117 </mapper>