admin
2024-07-26 5f75515d78809c336cb1a004a8cacf53c982344b
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
<?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.bs.formulaChildInfoTemp.mapper.BsFormulaChildInfoTempMapper">
    
    <resultMap type="BsFormulaChildInfoTemp" id="BsFormulaChildInfoTempResult">
        <result property="id"    column="id"    />
        <result property="sfcCode"    column="sfc_code"    />
        <result property="lineCode"    column="line_code"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="productCode"    column="product_code"    />
        <result property="operationSteps"    column="operation_steps"    />
        <result property="techRequirement"    column="tech_requirement"    />
        <result property="operationType"    column="operation_type"    />
        <result property="stepSort"    column="step_sort"    />
        <result property="paramCode"    column="param_code"    />
        <result property="materialCode"    column="material_code"    />
        <result property="formulaCode"    column="formula_code"    />
        <result property="picture"    column="picture"    />
        <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="collectData"    column="collect_data"    />
        <result property="results"    column="results"    />
        <result property="ngTimes"    column="ng_times"    />
        <result property="ngCollectData"    column="ng_collect_data"    />
        <result property="ngResults"    column="ng_results"    />
        <result property="childId"    column="child_id"    />
 
    </resultMap>
 
    <sql id="selectBsFormulaChildInfoTempVo">
        select id, sfc_code, child_id,line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results, ng_times, ng_collect_data, ng_results from bs_formula_child_info_temp
    </sql>
 
    <select id="selectBsFormulaChildInfoTempList" parameterType="BsFormulaChildInfoTemp" resultMap="BsFormulaChildInfoTempResult">
        <include refid="selectBsFormulaChildInfoTempVo"/>
        <where>  
            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
            <if test="lineCode != null  and lineCode != ''"> and line_code = #{lineCode}</if>
            <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
            <if test="operationSteps != null  and operationSteps != ''"> and operation_steps = #{operationSteps}</if>
            <if test="techRequirement != null  and techRequirement != ''"> and tech_requirement = #{techRequirement}</if>
            <if test="operationType != null  and operationType != ''"> and operation_type = #{operationType}</if>
            <if test="stepSort != null  and stepSort != ''"> and step_sort = #{stepSort}</if>
            <if test="paramCode != null  and paramCode != ''"> and param_code = #{paramCode}</if>
            <if test="materialCode != null  and materialCode != ''"> and material_code = #{materialCode}</if>
            <if test="formulaCode != null  and formulaCode != ''"> and formula_code = #{formulaCode}</if>
            <if test="picture != null  and picture != ''"> and picture = #{picture}</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>
            <if test="collectData != null  and collectData != ''"> and collect_data = #{collectData}</if>
            <if test="results != null  and results != ''"> and results = #{results}</if>
            <if test="ngTimes != null "> and ng_times = #{ngTimes}</if>
            <if test="ngCollectData != null  and ngCollectData != ''"> and ng_collect_data = #{ngCollectData}</if>
            <if test="ngResults != null  and ngResults != ''"> and ng_results = #{ngResults}</if>
        </where>
    </select>
    
    <select id="selectBsFormulaChildInfoTempById" parameterType="Long" resultMap="BsFormulaChildInfoTempResult">
        <include refid="selectBsFormulaChildInfoTempVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertBsFormulaChildInfoTemp" parameterType="BsFormulaChildInfoTemp" useGeneratedKeys="true" keyProperty="id">
        insert into bs_formula_child_info_temp
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="sfcCode != null">sfc_code,</if>
            <if test="lineCode != null">line_code,</if>
            <if test="processesCode != null">processes_code,</if>
            <if test="productCode != null">product_code,</if>
            <if test="operationSteps != null">operation_steps,</if>
            <if test="techRequirement != null">tech_requirement,</if>
            <if test="operationType != null">operation_type,</if>
            <if test="stepSort != null">step_sort,</if>
            <if test="paramCode != null">param_code,</if>
            <if test="materialCode != null">material_code,</if>
            <if test="formulaCode != null">formula_code,</if>
            <if test="picture != null">picture,</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="collectData != null">collect_data,</if>
            <if test="results != null">results,</if>
            <if test="ngTimes != null">ng_times,</if>
            <if test="ngCollectData != null">ng_collect_data,</if>
            <if test="ngResults != null">ng_results,</if>
            <if test="childId != null">child_id,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sfcCode != null">#{sfcCode},</if>
            <if test="lineCode != null">#{lineCode},</if>
            <if test="processesCode != null">#{processesCode},</if>
            <if test="productCode != null">#{productCode},</if>
            <if test="operationSteps != null">#{operationSteps},</if>
            <if test="techRequirement != null">#{techRequirement},</if>
            <if test="operationType != null">#{operationType},</if>
            <if test="stepSort != null">#{stepSort},</if>
            <if test="paramCode != null">#{paramCode},</if>
            <if test="materialCode != null">#{materialCode},</if>
            <if test="formulaCode != null">#{formulaCode},</if>
            <if test="picture != null">#{picture},</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="collectData != null">#{collectData},</if>
            <if test="results != null">#{results},</if>
            <if test="ngTimes != null">#{ngTimes},</if>
            <if test="ngCollectData != null">#{ngCollectData},</if>
            <if test="ngResults != null">#{ngResults},</if>
            <if test="childId != null">#{childId},</if>
 
        </trim>
    </insert>
 
    <update id="updateBsFormulaChildInfoTemp" parameterType="BsFormulaChildInfoTemp">
        update bs_formula_child_info_temp
        <trim prefix="SET" suffixOverrides=",">
            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
            <if test="lineCode != null">line_code = #{lineCode},</if>
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="operationSteps != null">operation_steps = #{operationSteps},</if>
            <if test="techRequirement != null">tech_requirement = #{techRequirement},</if>
            <if test="operationType != null">operation_type = #{operationType},</if>
            <if test="stepSort != null">step_sort = #{stepSort},</if>
            <if test="paramCode != null">param_code = #{paramCode},</if>
            <if test="materialCode != null">material_code = #{materialCode},</if>
            <if test="formulaCode != null">formula_code = #{formulaCode},</if>
            <if test="picture != null">picture = #{picture},</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="collectData != null">collect_data = #{collectData},</if>
            <if test="results != null">results = #{results},</if>
            <if test="ngTimes != null">ng_times = #{ngTimes},</if>
            <if test="ngCollectData != null">ng_collect_data = #{ngCollectData},</if>
            <if test="ngResults != null">ng_results = #{ngResults},</if>
            <if test="childId != null">child_id = #{childId},</if>
 
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteBsFormulaChildInfoTempById" parameterType="Long">
        delete from bs_formula_child_info_temp where id = #{id}
    </delete>
 
    <delete id="deleteBsFormulaChildInfoTempByIds" parameterType="String">
        delete from bs_formula_child_info_temp where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>