admin
2024-07-04 d8e6a522964374f72fab85a3f53fc7a8ffa56e04
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
<?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.testDeviceInterfaceTemp.mapper.DaTestDeviceInterfaceTempMapper">
    
    <resultMap type="DaTestDeviceInterfaceTemp" id="DaTestDeviceInterfaceTempResult">
        <result property="id"    column="id"    />
        <result property="recordId"    column="record_id"    />
        <result property="stationCode"    column="station_code"    />
        <result property="productNum"    column="product_num"    />
        <result property="totalResult"    column="total_result"    />
        <result property="workOrderNo"    column="work_order_no"    />
        <result property="supplierType"    column="supplier_type"    />
        <result property="checkList"    column="check_list"    />
        <result property="resultCode"    column="result_code"    />
        <result property="resultMessage"    column="result_message"    />
        <result property="resultData"    column="result_data"    />
        <result property="remarks"    column="remarks"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="spareField1"    column="spare_field1"    />
        <result property="spareField2"    column="spare_field2"    />
        <result property="spareField3"    column="spare_field3"    />
        <result property="spareField4"    column="spare_field4"    />
    </resultMap>
 
    <sql id="selectDaTestDeviceInterfaceTempVo">
        select id, record_id, station_code, product_num, total_result, work_order_no, supplier_type, check_list, result_code, result_message, result_data, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4 from da_test_device_interface_temp
    </sql>
 
    <select id="selectDaTestDeviceInterfaceTempList" parameterType="DaTestDeviceInterfaceTemp" resultMap="DaTestDeviceInterfaceTempResult">
        <include refid="selectDaTestDeviceInterfaceTempVo"/>
        <where>  
            <if test="recordId != null  and recordId != ''"> and record_id = #{recordId}</if>
            <if test="stationCode != null  and stationCode != ''"> and station_code = #{stationCode}</if>
            <if test="productNum != null  and productNum != ''"> and product_num = #{productNum}</if>
            <if test="totalResult != null  and totalResult != ''"> and total_result = #{totalResult}</if>
            <if test="workOrderNo != null  and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
            <if test="supplierType != null  and supplierType != ''"> and supplier_type = #{supplierType}</if>
            <if test="checkList != null  and checkList != ''"> and check_list = #{checkList}</if>
            <if test="resultCode != null  and resultCode != ''"> and result_code = #{resultCode}</if>
            <if test="resultMessage != null  and resultMessage != ''"> and result_message = #{resultMessage}</if>
            <if test="resultData != null  and resultData != ''"> and result_data = #{resultData}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and spare_field1 = #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and spare_field2 = #{spareField2}</if>
            <if test="spareField3 != null  and spareField3 != ''"> and spare_field3 = #{spareField3}</if>
            <if test="spareField4 != null  and spareField4 != ''"> and spare_field4 = #{spareField4}</if>
        </where>
    </select>
    
    <select id="selectDaTestDeviceInterfaceTempById" parameterType="Long" resultMap="DaTestDeviceInterfaceTempResult">
        <include refid="selectDaTestDeviceInterfaceTempVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertDaTestDeviceInterfaceTemp" parameterType="DaTestDeviceInterfaceTemp" useGeneratedKeys="true" keyProperty="id">
        insert into da_test_device_interface_temp
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="recordId != null">record_id,</if>
            <if test="stationCode != null">station_code,</if>
            <if test="productNum != null">product_num,</if>
            <if test="totalResult != null">total_result,</if>
            <if test="workOrderNo != null">work_order_no,</if>
            <if test="supplierType != null">supplier_type,</if>
            <if test="checkList != null">check_list,</if>
            <if test="resultCode != null">result_code,</if>
            <if test="resultMessage != null">result_message,</if>
            <if test="resultData != null">result_data,</if>
            <if test="remarks != null">remarks,</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>
            <if test="spareField1 != null">spare_field1,</if>
            <if test="spareField2 != null">spare_field2,</if>
            <if test="spareField3 != null">spare_field3,</if>
            <if test="spareField4 != null">spare_field4,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="recordId != null">#{recordId},</if>
            <if test="stationCode != null">#{stationCode},</if>
            <if test="productNum != null">#{productNum},</if>
            <if test="totalResult != null">#{totalResult},</if>
            <if test="workOrderNo != null">#{workOrderNo},</if>
            <if test="supplierType != null">#{supplierType},</if>
            <if test="checkList != null">#{checkList},</if>
            <if test="resultCode != null">#{resultCode},</if>
            <if test="resultMessage != null">#{resultMessage},</if>
            <if test="resultData != null">#{resultData},</if>
            <if test="remarks != null">#{remarks},</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>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
         </trim>
    </insert>
 
    <update id="updateDaTestDeviceInterfaceTemp" parameterType="DaTestDeviceInterfaceTemp">
        update da_test_device_interface_temp
        <trim prefix="SET" suffixOverrides=",">
            <if test="recordId != null">record_id = #{recordId},</if>
            <if test="stationCode != null">station_code = #{stationCode},</if>
            <if test="productNum != null">product_num = #{productNum},</if>
            <if test="totalResult != null">total_result = #{totalResult},</if>
            <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
            <if test="supplierType != null">supplier_type = #{supplierType},</if>
            <if test="checkList != null">check_list = #{checkList},</if>
            <if test="resultCode != null">result_code = #{resultCode},</if>
            <if test="resultMessage != null">result_message = #{resultMessage},</if>
            <if test="resultData != null">result_data = #{resultData},</if>
            <if test="remarks != null">remarks = #{remarks},</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>
            <if test="spareField1 != null">spare_field1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field2 = #{spareField2},</if>
            <if test="spareField3 != null">spare_field3 = #{spareField3},</if>
            <if test="spareField4 != null">spare_field4 = #{spareField4},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteDaTestDeviceInterfaceTempById" parameterType="Long">
        delete from da_test_device_interface_temp where id = #{id}
    </delete>
 
    <delete id="deleteDaTestDeviceInterfaceTempByIds" parameterType="String">
        delete from da_test_device_interface_temp where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
    <delete id="deleteDaTestDeviceInterfaceTempByProductNum" parameterType="String">
        DELETE
        FROM
            da_test_device_interface_temp
        WHERE
            product_num = #{cellCode}
    </delete>
</mapper>