春风项目四线(合箱线、总装线)
jiang
2024-01-22 9a90543b32701590952806ed583347460bc04f76
提交 | 用户 | 时间
fd2207 1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.jcdm.main.bs.formulaChild.mapper.BsFormulaChildInfoMapper">
6     
7     <resultMap type="BsFormulaChildInfo" id="BsFormulaChildInfoResult">
8         <result property="id"    column="id"    />
9         <result property="workshopCode"    column="workshop_code"    />
10         <result property="lineCode"    column="line_code"    />
11         <result property="processesCode"    column="processes_code"    />
12         <result property="productCode"    column="product_code"    />
13         <result property="operationSteps"    column="operation_steps"    />
14         <result property="techRequirement"    column="tech_requirement"    />
15         <result property="operationType"    column="operation_type"    />
16         <result property="stepSort"    column="step_sort"    />
17         <result property="paramCode"    column="param_code"    />
18         <result property="materialCode"    column="material_code"    />
19         <result property="formulaCode"    column="formula_code"    />
20         <result property="picture"    column="picture"    />
21         <result property="remarks"    column="remarks"    />
22         <result property="createUser"    column="create_user"    />
23         <result property="createTime"    column="create_time"    />
24         <result property="updateUser"    column="update_user"    />
25         <result property="updateTime"    column="update_time"    />
26         <result property="spareField1"    column="spare_field_1"    />
27         <result property="spareField2"    column="spare_field_2"    />
28         <result property="spareField3"    column="spare_field_3"    />
29         <result property="spareField4"    column="spare_field_4"    />
30     </resultMap>
31
32     <sql id="selectBsFormulaChildInfoVo">
33         select id, workshop_code, 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_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_formula_child_info
34     </sql>
35
36     <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult">
37         <include refid="selectBsFormulaChildInfoVo"/>
38         <where>  
39             <if test="workshopCode != null  and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if>
40             <if test="lineCode != null  and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
41             <if test="processesCode != null  and processesCode != ''"> and processes_code like concat('%', #{processesCode}, '%')</if>
42             <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
43             <if test="operationType != null  and operationType != ''"> and operation_type like concat('%', #{operationType}, '%')</if>
207eac 44             <if test="formulaCode != null  and formulaCode != ''"> and formula_code = #{formulaCode}</if>
fd2207 45
46         </where>
47     </select>
48     
49     <select id="selectBsFormulaChildInfoById" parameterType="Long" resultMap="BsFormulaChildInfoResult">
50         <include refid="selectBsFormulaChildInfoVo"/>
51         where id = #{id}
52     </select>
83923e 53
W 54     <select id="getProductProcess" parameterType="com.jcdm.main.bs.formulaChild.Query.ProductProcessQuery" resultMap="BsFormulaChildInfoResult">
55         <include refid="selectBsFormulaChildInfoVo"/>
56         <where>
57             <if test="processesCode != null and processesCode != '' ">and processes_code = #{processesCode}</if>
58             <if test="productCode != null and productCode != '' ">and product_code = #{productCode}</if>
59         </where>
60         order by step_sort
61     </select>
62
fd2207 63     <insert id="insertBsFormulaChildInfo" parameterType="BsFormulaChildInfo" useGeneratedKeys="true" keyProperty="id">
64         insert into bs_formula_child_info
65         <trim prefix="(" suffix=")" suffixOverrides=",">
66             <if test="workshopCode != null">workshop_code,</if>
67             <if test="lineCode != null">line_code,</if>
68             <if test="processesCode != null">processes_code,</if>
69             <if test="productCode != null">product_code,</if>
70             <if test="operationSteps != null">operation_steps,</if>
71             <if test="techRequirement != null">tech_requirement,</if>
72             <if test="operationType != null">operation_type,</if>
73             <if test="stepSort != null">step_sort,</if>
74             <if test="paramCode != null">param_code,</if>
75             <if test="materialCode != null">material_code,</if>
76             <if test="formulaCode != null">formula_code,</if>
77             <if test="picture != null">picture,</if>
78             <if test="remarks != null">remarks,</if>
79             <if test="createUser != null">create_user,</if>
80             <if test="createTime != null">create_time,</if>
81             <if test="updateUser != null">update_user,</if>
82             <if test="updateTime != null">update_time,</if>
83             <if test="spareField1 != null">spare_field_1,</if>
84             <if test="spareField2 != null">spare_field_2,</if>
85             <if test="spareField3 != null">spare_field_3,</if>
86             <if test="spareField4 != null">spare_field_4,</if>
87          </trim>
88         <trim prefix="values (" suffix=")" suffixOverrides=",">
89             <if test="workshopCode != null">#{workshopCode},</if>
90             <if test="lineCode != null">#{lineCode},</if>
91             <if test="processesCode != null">#{processesCode},</if>
92             <if test="productCode != null">#{productCode},</if>
93             <if test="operationSteps != null">#{operationSteps},</if>
94             <if test="techRequirement != null">#{techRequirement},</if>
95             <if test="operationType != null">#{operationType},</if>
96             <if test="stepSort != null">#{stepSort},</if>
97             <if test="paramCode != null">#{paramCode},</if>
98             <if test="materialCode != null">#{materialCode},</if>
99             <if test="formulaCode != null">#{formulaCode},</if>
100             <if test="picture != null">#{picture},</if>
101             <if test="remarks != null">#{remarks},</if>
102             <if test="createUser != null">#{createUser},</if>
103             <if test="createTime != null">#{createTime},</if>
104             <if test="updateUser != null">#{updateUser},</if>
105             <if test="updateTime != null">#{updateTime},</if>
106             <if test="spareField1 != null">#{spareField1},</if>
107             <if test="spareField2 != null">#{spareField2},</if>
108             <if test="spareField3 != null">#{spareField3},</if>
109             <if test="spareField4 != null">#{spareField4},</if>
110          </trim>
111     </insert>
112
113     <update id="updateBsFormulaChildInfo" parameterType="BsFormulaChildInfo">
114         update bs_formula_child_info
115         <trim prefix="SET" suffixOverrides=",">
116             <if test="workshopCode != null">workshop_code = #{workshopCode},</if>
117             <if test="lineCode != null">line_code = #{lineCode},</if>
118             <if test="processesCode != null">processes_code = #{processesCode},</if>
119             <if test="productCode != null">product_code = #{productCode},</if>
120             <if test="operationSteps != null">operation_steps = #{operationSteps},</if>
121             <if test="techRequirement != null">tech_requirement = #{techRequirement},</if>
122             <if test="operationType != null">operation_type = #{operationType},</if>
123             <if test="stepSort != null">step_sort = #{stepSort},</if>
124             <if test="paramCode != null">param_code = #{paramCode},</if>
125             <if test="materialCode != null">material_code = #{materialCode},</if>
126             <if test="formulaCode != null">formula_code = #{formulaCode},</if>
127             <if test="picture != null">picture = #{picture},</if>
128             <if test="remarks != null">remarks = #{remarks},</if>
129             <if test="createUser != null">create_user = #{createUser},</if>
130             <if test="createTime != null">create_time = #{createTime},</if>
131             <if test="updateUser != null">update_user = #{updateUser},</if>
132             <if test="updateTime != null">update_time = #{updateTime},</if>
133             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
134             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
135             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
136             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
137         </trim>
138         where id = #{id}
139     </update>
140
141     <delete id="deleteBsFormulaChildInfoById" parameterType="Long">
142         delete from bs_formula_child_info where id = #{id}
143     </delete>
144
145     <delete id="deleteBsFormulaChildInfoByIds" parameterType="String">
146         delete from bs_formula_child_info where id in 
147         <foreach item="id" collection="array" open="(" separator="," close=")">
148             #{id}
149         </foreach>
150     </delete>
151 </mapper>