春风项目四线(合箱线、总装线)
wujian
2024-09-04 e4a393c219c3c48cbf0e4af615b316facb82eb62
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?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.jcdm.main.da.tileMatchMiddleware.mapper.DaTileMatchMiddlewareMapper">
    <resultMap type="DaTileMatchMiddleware" id="DaTileMatchMiddlewareResult">
        <result property="id"    column="id"    />
        <result property="sfcCode"    column="sfc_code"    />
        <result property="palletNo"    column="Pallet_no"    />
        <result property="crankshaftNo"    column="crankshaft_no"    />
        <result property="state"    column="state"    />
        <result property="remarks"    column="remarks"    />
        <result property="connectingrodNo"    column="connectingRod_no"    />
        <result property="cylinder"    column="cylinder"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
 
    <sql id="selectDaTileMatchMiddlewareVo">
        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
    </sql>
 
    <select id="selectDaTileMatchMiddlewareList" parameterType="DaTileMatchMiddleware" resultMap="DaTileMatchMiddlewareResult">
        <include refid="selectDaTileMatchMiddlewareVo"/>
        <where>  
            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
            <if test="palletNo != null  and palletNo != ''"> and Pallet_no = #{palletNo}</if>
            <if test="crankshaftNo != null  and crankshaftNo != ''"> and crankshaft_no = #{crankshaftNo}</if>
            <if test="state != null "> and state = #{state}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="connectingrodNo != null  and connectingrodNo != ''"> and connectingRod_no = #{connectingrodNo}</if>
            <if test="cylinder != null "> and cylinder = #{cylinder}</if>
        </where>
    </select>
    
    <select id="selectDaTileMatchMiddlewareById" parameterType="Long" resultMap="DaTileMatchMiddlewareResult">
        <include refid="selectDaTileMatchMiddlewareVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware">
        insert into da_tile_match_middleware
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="sfcCode != null">sfc_code,</if>
            <if test="palletNo != null">Pallet_no,</if>
            <if test="crankshaftNo != null">crankshaft_no,</if>
            <if test="state != null">state,</if>
            <if test="remarks != null">remarks,</if>
            <if test="connectingrodNo != null">connectingRod_no,</if>
            <if test="cylinder != null">cylinder,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="sfcCode != null">#{sfcCode},</if>
            <if test="palletNo != null">#{palletNo},</if>
            <if test="crankshaftNo != null">#{crankshaftNo},</if>
            <if test="state != null">#{state},</if>
            <if test="remarks != null">#{remarks},</if>
            <if test="connectingrodNo != null">#{connectingrodNo},</if>
            <if test="cylinder != null">#{cylinder},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
         </trim>
    </insert>
 
    <update id="updateDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware">
        update da_tile_match_middleware
        <trim prefix="SET" suffixOverrides=",">
            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
            <if test="palletNo != null">Pallet_no = #{palletNo},</if>
            <if test="crankshaftNo != null">crankshaft_no = #{crankshaftNo},</if>
            <if test="state != null">state = #{state},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="connectingrodNo != null">connectingRod_no = #{connectingrodNo},</if>
            <if test="cylinder != null">cylinder = #{cylinder},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteDaTileMatchMiddlewareById" parameterType="Long">
        delete from da_tile_match_middleware where id = #{id}
    </delete>
 
    <delete id="deleteDaTileMatchMiddlewareByIds" parameterType="String">
        delete from da_tile_match_middleware where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>