刘小明
2024-06-19 d05dd9bd1e32e95108b0a299ccf71459c685c222
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?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.dy.pmsGlobal.daoSta.StaDeviceProductionLogMapper">
 
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/>
            <result property="planId" column="plan_id" jdbcType="VARCHAR"/>
            <result property="stationId" column="station_id" jdbcType="VARCHAR"/>
            <result property="currNode" column="curr_node" jdbcType="VARCHAR"/>
            <result property="nextNode" column="next_node" jdbcType="VARCHAR"/>
            <result property="inLineTime" column="in_line_time" jdbcType="TIMESTAMP"/>
            <result property="status" column="status" jdbcType="TINYINT"/>
            <result property="result" column="result" jdbcType="TINYINT"/>
            <result property="errorCode" column="error_code" jdbcType="VARCHAR"/>
            <result property="memo" column="memo" jdbcType="VARCHAR"/>
            <result property="assistants" column="assistants" jdbcType="VARCHAR"/>
            <result property="updatedDate" column="updated_date" jdbcType="TIMESTAMP"/>
            <result property="updatedBy" column="updated_by" jdbcType="VARCHAR"/>
            <result property="claimId" column="claim_id" jdbcType="BIGINT"/>
            <result property="repairId" column="repair_id" jdbcType="BIGINT"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        id,equip_no,plan_id,
        station_id,curr_node,next_node,
        in_line_time,status,result,
        error_code,memo,assistants,
        updated_date,updated_by,claim_id,
        repair_id
    </sql>
 
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from sta_device_production_log
        where  id = #{id,jdbcType=BIGINT} 
    </select>
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from sta_device_production_log
        where  id = #{id,jdbcType=BIGINT} 
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog" useGeneratedKeys="true">
        insert into sta_device_production_log
        ( id,equip_no,plan_id
        ,station_id,curr_node,next_node
        ,in_line_time,status,result
        ,error_code,memo,assistants
        ,updated_date,updated_by,claim_id
        ,repair_id)
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{planId,jdbcType=VARCHAR}
        ,#{stationId,jdbcType=VARCHAR},#{currNode,jdbcType=VARCHAR},#{nextNode,jdbcType=VARCHAR}
        ,#{inLineTime,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT}
        ,#{errorCode,jdbcType=VARCHAR},#{memo,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR}
        ,#{updatedDate,jdbcType=TIMESTAMP},#{updatedBy,jdbcType=VARCHAR},#{claimId,jdbcType=BIGINT}
        ,#{repairId,jdbcType=BIGINT})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog" useGeneratedKeys="true">
        insert into sta_device_production_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="equipNo != null">equip_no,</if>
                <if test="planId != null">plan_id,</if>
                <if test="stationId != null">station_id,</if>
                <if test="currNode != null">curr_node,</if>
                <if test="nextNode != null">next_node,</if>
                <if test="inLineTime != null">in_line_time,</if>
                <if test="status != null">status,</if>
                <if test="result != null">result,</if>
                <if test="errorCode != null">error_code,</if>
                <if test="memo != null">memo,</if>
                <if test="assistants != null">assistants,</if>
                <if test="updatedDate != null">updated_date,</if>
                <if test="updatedBy != null">updated_by,</if>
                <if test="claimId != null">claim_id,</if>
                <if test="repairId != null">repair_id,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="equipNo != null">#{equipNo,jdbcType=VARCHAR},</if>
                <if test="planId != null">#{planId,jdbcType=VARCHAR},</if>
                <if test="stationId != null">#{stationId,jdbcType=VARCHAR},</if>
                <if test="currNode != null">#{currNode,jdbcType=VARCHAR},</if>
                <if test="nextNode != null">#{nextNode,jdbcType=VARCHAR},</if>
                <if test="inLineTime != null">#{inLineTime,jdbcType=TIMESTAMP},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="result != null">#{result,jdbcType=TINYINT},</if>
                <if test="errorCode != null">#{errorCode,jdbcType=VARCHAR},</if>
                <if test="memo != null">#{memo,jdbcType=VARCHAR},</if>
                <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
                <if test="updatedDate != null">#{updatedDate,jdbcType=TIMESTAMP},</if>
                <if test="updatedBy != null">#{updatedBy,jdbcType=VARCHAR},</if>
                <if test="claimId != null">#{claimId,jdbcType=BIGINT},</if>
                <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog">
        update sta_device_production_log
        <set>
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=VARCHAR},
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=VARCHAR},
                </if>
                <if test="stationId != null">
                    station_id = #{stationId,jdbcType=VARCHAR},
                </if>
                <if test="currNode != null">
                    curr_node = #{currNode,jdbcType=VARCHAR},
                </if>
                <if test="nextNode != null">
                    next_node = #{nextNode,jdbcType=VARCHAR},
                </if>
                <if test="inLineTime != null">
                    in_line_time = #{inLineTime,jdbcType=TIMESTAMP},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
                <if test="result != null">
                    result = #{result,jdbcType=TINYINT},
                </if>
                <if test="errorCode != null">
                    error_code = #{errorCode,jdbcType=VARCHAR},
                </if>
                <if test="memo != null">
                    memo = #{memo,jdbcType=VARCHAR},
                </if>
                <if test="assistants != null">
                    assistants = #{assistants,jdbcType=VARCHAR},
                </if>
                <if test="updatedDate != null">
                    updated_date = #{updatedDate,jdbcType=TIMESTAMP},
                </if>
                <if test="updatedBy != null">
                    updated_by = #{updatedBy,jdbcType=VARCHAR},
                </if>
                <if test="claimId != null">
                    claim_id = #{claimId,jdbcType=BIGINT},
                </if>
                <if test="repairId != null">
                    repair_id = #{repairId,jdbcType=BIGINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT} 
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog">
        update sta_device_production_log
        set 
            equip_no =  #{equipNo,jdbcType=VARCHAR},
            plan_id =  #{planId,jdbcType=VARCHAR},
            station_id =  #{stationId,jdbcType=VARCHAR},
            curr_node =  #{currNode,jdbcType=VARCHAR},
            next_node =  #{nextNode,jdbcType=VARCHAR},
            in_line_time =  #{inLineTime,jdbcType=TIMESTAMP},
            status =  #{status,jdbcType=TINYINT},
            result =  #{result,jdbcType=TINYINT},
            error_code =  #{errorCode,jdbcType=VARCHAR},
            memo =  #{memo,jdbcType=VARCHAR},
            assistants =  #{assistants,jdbcType=VARCHAR},
            updated_date =  #{updatedDate,jdbcType=TIMESTAMP},
            updated_by =  #{updatedBy,jdbcType=VARCHAR},
            claim_id =  #{claimId,jdbcType=BIGINT},
            repair_id =  #{repairId,jdbcType=BIGINT}
        where   id = #{id,jdbcType=BIGINT} 
    </update>
</mapper>