春风项目四线(合箱线、总装线)
wujian
2024-09-04 e4a393c219c3c48cbf0e4af615b316facb82eb62
提交 | 用户 | 时间
5030f3 1 <?xml version="1.0" encoding="UTF-8" ?>
Y 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.da.tileMatchMiddleware.mapper.DaTileMatchMiddlewareMapper">
6     <resultMap type="DaTileMatchMiddleware" id="DaTileMatchMiddlewareResult">
7         <result property="id"    column="id"    />
8         <result property="sfcCode"    column="sfc_code"    />
9         <result property="palletNo"    column="Pallet_no"    />
10         <result property="crankshaftNo"    column="crankshaft_no"    />
11         <result property="state"    column="state"    />
12         <result property="remarks"    column="remarks"    />
13         <result property="connectingrodNo"    column="connectingRod_no"    />
14         <result property="cylinder"    column="cylinder"    />
e4a393 15         <result property="createUser"    column="create_user"    />
W 16         <result property="createTime"    column="create_time"    />
17         <result property="updateUser"    column="update_user"    />
18         <result property="updateTime"    column="update_time"    />
5030f3 19     </resultMap>
Y 20
21     <sql id="selectDaTileMatchMiddlewareVo">
e4a393 22         select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder, create_user, create_time, update_user, update_time from da_tile_match_middleware
5030f3 23     </sql>
Y 24
25     <select id="selectDaTileMatchMiddlewareList" parameterType="DaTileMatchMiddleware" resultMap="DaTileMatchMiddlewareResult">
26         <include refid="selectDaTileMatchMiddlewareVo"/>
27         <where>  
28             <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
29             <if test="palletNo != null  and palletNo != ''"> and Pallet_no = #{palletNo}</if>
30             <if test="crankshaftNo != null  and crankshaftNo != ''"> and crankshaft_no = #{crankshaftNo}</if>
31             <if test="state != null "> and state = #{state}</if>
32             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
33             <if test="connectingrodNo != null  and connectingrodNo != ''"> and connectingRod_no = #{connectingrodNo}</if>
34             <if test="cylinder != null "> and cylinder = #{cylinder}</if>
35         </where>
36     </select>
37     
38     <select id="selectDaTileMatchMiddlewareById" parameterType="Long" resultMap="DaTileMatchMiddlewareResult">
39         <include refid="selectDaTileMatchMiddlewareVo"/>
40         where id = #{id}
41     </select>
42         
43     <insert id="insertDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware">
44         insert into da_tile_match_middleware
45         <trim prefix="(" suffix=")" suffixOverrides=",">
46             <if test="id != null">id,</if>
47             <if test="sfcCode != null">sfc_code,</if>
48             <if test="palletNo != null">Pallet_no,</if>
49             <if test="crankshaftNo != null">crankshaft_no,</if>
50             <if test="state != null">state,</if>
51             <if test="remarks != null">remarks,</if>
52             <if test="connectingrodNo != null">connectingRod_no,</if>
53             <if test="cylinder != null">cylinder,</if>
e4a393 54             <if test="createUser != null">create_user,</if>
W 55             <if test="createTime != null">create_time,</if>
56             <if test="updateUser != null">update_user,</if>
57             <if test="updateTime != null">update_time,</if>
5030f3 58          </trim>
Y 59         <trim prefix="values (" suffix=")" suffixOverrides=",">
60             <if test="id != null">#{id},</if>
61             <if test="sfcCode != null">#{sfcCode},</if>
62             <if test="palletNo != null">#{palletNo},</if>
63             <if test="crankshaftNo != null">#{crankshaftNo},</if>
64             <if test="state != null">#{state},</if>
65             <if test="remarks != null">#{remarks},</if>
66             <if test="connectingrodNo != null">#{connectingrodNo},</if>
67             <if test="cylinder != null">#{cylinder},</if>
e4a393 68             <if test="createUser != null">#{createUser},</if>
W 69             <if test="createTime != null">#{createTime},</if>
70             <if test="updateUser != null">#{updateUser},</if>
71             <if test="updateTime != null">#{updateTime},</if>
5030f3 72          </trim>
Y 73     </insert>
74
75     <update id="updateDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware">
76         update da_tile_match_middleware
77         <trim prefix="SET" suffixOverrides=",">
78             <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
79             <if test="palletNo != null">Pallet_no = #{palletNo},</if>
80             <if test="crankshaftNo != null">crankshaft_no = #{crankshaftNo},</if>
81             <if test="state != null">state = #{state},</if>
82             <if test="remarks != null">remarks = #{remarks},</if>
83             <if test="connectingrodNo != null">connectingRod_no = #{connectingrodNo},</if>
84             <if test="cylinder != null">cylinder = #{cylinder},</if>
e4a393 85             <if test="createUser != null">create_user = #{createUser},</if>
W 86             <if test="createTime != null">create_time = #{createTime},</if>
87             <if test="updateUser != null">update_user = #{updateUser},</if>
88             <if test="updateTime != null">update_time = #{updateTime},</if>
5030f3 89         </trim>
Y 90         where id = #{id}
91     </update>
92
93     <delete id="deleteDaTileMatchMiddlewareById" parameterType="Long">
94         delete from da_tile_match_middleware where id = #{id}
95     </delete>
96
97     <delete id="deleteDaTileMatchMiddlewareByIds" parameterType="String">
98         delete from da_tile_match_middleware where id in 
99         <foreach item="id" collection="array" open="(" separator="," close=")">
100             #{id}
101         </foreach>
102     </delete>
103 </mapper>