-
admin
2024-04-28 3581b1687306f77b7463c4c0a23d30ddfb6e9bb7
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?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.collectionParamConf.mapper.DaCollectionParamConfMapper">
    
    <resultMap type="DaCollectionParamConf" id="DaCollectionParamConfResult">
        <result property="id"    column="id"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="parameterSetCode"    column="parameter_set_code"    />
        <result property="parameterSetName"    column="parameter_set_name"    />
        <result property="collectParameterId"    column="collect_parameter_id"    />
        <result property="collectParameterName"    column="collect_parameter_name"    />
        <result property="contrastParameterFlag"    column="contrast_parameter_flag"    />
        <result property="collectParameterType"    column="collect_parameter_type"    />
        <result property="collectParameterUnit"    column="collect_parameter_unit"    />
        <result property="Descriptives"    column="Descriptives"    />
        <result property="paramUpper"    column="param_upper"    />
        <result property="paramLower"    column="param_lower"    />
        <result property="paramCentral"    column="param_Central"    />
        <result property="productCode"    column="product_code"    />
        <result property="gatherAddress"    column="gather_address"    />
        <result property="gatherSequence"    column="gather_sequence"    />
        <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"    />
        <result property="processesName"    column="processes_name"    />
        <result property="device"    column="device"    />
        <result property="project"    column="project"    />
        <result property="accuracy"    column="accuracy"    />
        <result property="arrayLength"    column="array_length"    />
        <result property="acquisitionFrequency"    column="acquisition_frequency"    />
        <result property="demandDepartment"    column="demand_department"    />
        <result property="whetherToCollect"    column="whether_to_collect"    />
        <result property="defaultValue"    column="default_value"    />
        <result property="productModel"    column="product_model"    />
 
    </resultMap>
 
    <sql id="selectDaCollectionParamConfVo">
        select id, processes_code, product_model, parameter_set_code, parameter_set_name, collect_parameter_id, collect_parameter_name, contrast_parameter_flag, collect_parameter_type, collect_parameter_unit, Descriptives, param_upper, param_lower, param_Central, product_code, gather_address, gather_sequence, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, processes_name, device, project, accuracy, array_length, acquisition_frequency, demand_department, whether_to_collect, default_value from da_collection_param_conf
    </sql>
 
    <select id="selectDaCollectionParamConfList" parameterType="DaCollectionParamConf" resultMap="DaCollectionParamConfResult">
        <include refid="selectDaCollectionParamConfVo"/>
        <where>  
            <if test="processesCode != null  and processesCode != ''"> and processes_code like concat('%', #{processesCode}, '%')</if>
            <if test="parameterSetCode != null  and parameterSetCode != ''"> and parameter_set_code like concat('%', #{parameterSetCode}, '%')</if>
            <if test="parameterSetName != null  and parameterSetName != ''"> and parameter_set_name like concat('%', #{parameterSetName}, '%')</if>
            <if test="collectParameterId != null  and collectParameterId != ''"> and collect_parameter_id like concat('%', #{collectParameterId}, '%')</if>
            <if test="collectParameterName != null  and collectParameterName != ''"> and collect_parameter_name like concat('%', #{collectParameterName}, '%')</if>
            <if test="contrastParameterFlag != null  and contrastParameterFlag != ''"> and contrast_parameter_flag like concat('%', #{contrastParameterFlag}, '%')</if>
            <if test="collectParameterType != null  and collectParameterType != ''"> and collect_parameter_type like concat('%', #{collectParameterType}, '%')</if>
            <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
            <if test="gatherAddress != null  and gatherAddress != ''"> and gather_address like concat('%', #{gatherAddress}, '%')</if>
 
        </where>
    </select>
    
    <select id="selectDaCollectionParamConfById" parameterType="Long" resultMap="DaCollectionParamConfResult">
        <include refid="selectDaCollectionParamConfVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertDaCollectionParamConf" parameterType="DaCollectionParamConf">
        insert into da_collection_param_conf
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="processesCode != null">processes_code,</if>
            <if test="parameterSetCode != null">parameter_set_code,</if>
            <if test="parameterSetName != null">parameter_set_name,</if>
            <if test="collectParameterId != null">collect_parameter_id,</if>
            <if test="collectParameterName != null">collect_parameter_name,</if>
            <if test="contrastParameterFlag != null">contrast_parameter_flag,</if>
            <if test="collectParameterType != null">collect_parameter_type,</if>
            <if test="collectParameterUnit != null">collect_parameter_unit,</if>
            <if test="Descriptives != null">Descriptives,</if>
            <if test="paramUpper != null">param_upper,</if>
            <if test="paramLower != null">param_lower,</if>
            <if test="paramCentral != null">param_Central,</if>
            <if test="productCode != null">product_code,</if>
            <if test="gatherAddress != null">gather_address,</if>
            <if test="gatherSequence != null">gather_sequence,</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>
            <if test="processesName != null">processes_name,</if>
            <if test="device != null">device,</if>
            <if test="project != null">project,</if>
            <if test="accuracy != null">accuracy,</if>
            <if test="arrayLength != null">array_length,</if>
            <if test="acquisitionFrequency != null">acquisition_frequency,</if>
            <if test="demandDepartment != null">demand_department,</if>
            <if test="whetherToCollect != null">whether_to_collect,</if>
            <if test="defaultValue != null">default_value,</if>
            <if test="productModel != null">product_model,</if>
 
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="processesCode != null">#{processesCode},</if>
            <if test="parameterSetCode != null">#{parameterSetCode},</if>
            <if test="parameterSetName != null">#{parameterSetName},</if>
            <if test="collectParameterId != null">#{collectParameterId},</if>
            <if test="collectParameterName != null">#{collectParameterName},</if>
            <if test="contrastParameterFlag != null">#{contrastParameterFlag},</if>
            <if test="collectParameterType != null">#{collectParameterType},</if>
            <if test="collectParameterUnit != null">#{collectParameterUnit},</if>
            <if test="Descriptives != null">#{Descriptives},</if>
            <if test="paramUpper != null">#{paramUpper},</if>
            <if test="paramLower != null">#{paramLower},</if>
            <if test="paramCentral != null">#{paramCentral},</if>
            <if test="productCode != null">#{productCode},</if>
            <if test="gatherAddress != null">#{gatherAddress},</if>
            <if test="gatherSequence != null">#{gatherSequence},</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>
            <if test="processesName != null">#{processesName},</if>
            <if test="device != null">#{device},</if>
            <if test="project != null">#{project},</if>
            <if test="accuracy != null">#{accuracy},</if>
            <if test="arrayLength != null">#{arrayLength},</if>
            <if test="acquisitionFrequency != null">#{acquisitionFrequency},</if>
            <if test="demandDepartment != null">#{demandDepartment},</if>
            <if test="whetherToCollect != null">#{whetherToCollect},</if>
            <if test="defaultValue != null">#{defaultValue},</if>
            <if test="productModel != null">#{productModel},</if>
 
        </trim>
    </insert>
 
    <update id="updateDaCollectionParamConf" parameterType="DaCollectionParamConf">
        update da_collection_param_conf
        <trim prefix="SET" suffixOverrides=",">
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="parameterSetCode != null">parameter_set_code = #{parameterSetCode},</if>
            <if test="parameterSetName != null">parameter_set_name = #{parameterSetName},</if>
            <if test="collectParameterId != null">collect_parameter_id = #{collectParameterId},</if>
            <if test="collectParameterName != null">collect_parameter_name = #{collectParameterName},</if>
            <if test="contrastParameterFlag != null">contrast_parameter_flag = #{contrastParameterFlag},</if>
            <if test="collectParameterType != null">collect_parameter_type = #{collectParameterType},</if>
            <if test="collectParameterUnit != null">collect_parameter_unit = #{collectParameterUnit},</if>
            <if test="Descriptives != null">Descriptives = #{Descriptives},</if>
            <if test="paramUpper != null">param_upper = #{paramUpper},</if>
            <if test="paramLower != null">param_lower = #{paramLower},</if>
            <if test="paramCentral != null">param_Central = #{paramCentral},</if>
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="gatherAddress != null">gather_address = #{gatherAddress},</if>
            <if test="gatherSequence != null">gather_sequence = #{gatherSequence},</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>
            <if test="processesName != null">processes_name = #{processesName},</if>
            <if test="device != null">device = #{device},</if>
            <if test="project != null">project = #{project},</if>
            <if test="accuracy != null">accuracy = #{accuracy},</if>
            <if test="arrayLength != null">array_length = #{arrayLength},</if>
            <if test="acquisitionFrequency != null">acquisition_frequency = #{acquisitionFrequency},</if>
            <if test="demandDepartment != null">demand_department = #{demandDepartment},</if>
            <if test="whetherToCollect != null">whether_to_collect = #{whetherToCollect},</if>
            <if test="defaultValue != null">default_value = #{defaultValue},</if>
            <if test="productModel != null">product_model = #{productModel},</if>
 
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteDaCollectionParamConfById" parameterType="Long">
        delete from da_collection_param_conf where id = #{id}
    </delete>
 
    <delete id="deleteDaCollectionParamConfByIds" parameterType="String">
        delete from da_collection_param_conf where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>