提交 | 用户 | 时间
|
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> |
|
44 |
<if test="formulaCode != null and formulaCode != ''"> and formula_code like concat('%', #{formulaCode}, '%')</if> |
|
45 |
|
|
46 |
</where> |
|
47 |
</select> |
|
48 |
|
|
49 |
<select id="selectBsFormulaChildInfoById" parameterType="Long" resultMap="BsFormulaChildInfoResult"> |
|
50 |
<include refid="selectBsFormulaChildInfoVo"/> |
|
51 |
where id = #{id} |
|
52 |
</select> |
|
53 |
|
|
54 |
<insert id="insertBsFormulaChildInfo" parameterType="BsFormulaChildInfo" useGeneratedKeys="true" keyProperty="id"> |
|
55 |
insert into bs_formula_child_info |
|
56 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
57 |
<if test="workshopCode != null">workshop_code,</if> |
|
58 |
<if test="lineCode != null">line_code,</if> |
|
59 |
<if test="processesCode != null">processes_code,</if> |
|
60 |
<if test="productCode != null">product_code,</if> |
|
61 |
<if test="operationSteps != null">operation_steps,</if> |
|
62 |
<if test="techRequirement != null">tech_requirement,</if> |
|
63 |
<if test="operationType != null">operation_type,</if> |
|
64 |
<if test="stepSort != null">step_sort,</if> |
|
65 |
<if test="paramCode != null">param_code,</if> |
|
66 |
<if test="materialCode != null">material_code,</if> |
|
67 |
<if test="formulaCode != null">formula_code,</if> |
|
68 |
<if test="picture != null">picture,</if> |
|
69 |
<if test="remarks != null">remarks,</if> |
|
70 |
<if test="createUser != null">create_user,</if> |
|
71 |
<if test="createTime != null">create_time,</if> |
|
72 |
<if test="updateUser != null">update_user,</if> |
|
73 |
<if test="updateTime != null">update_time,</if> |
|
74 |
<if test="spareField1 != null">spare_field_1,</if> |
|
75 |
<if test="spareField2 != null">spare_field_2,</if> |
|
76 |
<if test="spareField3 != null">spare_field_3,</if> |
|
77 |
<if test="spareField4 != null">spare_field_4,</if> |
|
78 |
</trim> |
|
79 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
80 |
<if test="workshopCode != null">#{workshopCode},</if> |
|
81 |
<if test="lineCode != null">#{lineCode},</if> |
|
82 |
<if test="processesCode != null">#{processesCode},</if> |
|
83 |
<if test="productCode != null">#{productCode},</if> |
|
84 |
<if test="operationSteps != null">#{operationSteps},</if> |
|
85 |
<if test="techRequirement != null">#{techRequirement},</if> |
|
86 |
<if test="operationType != null">#{operationType},</if> |
|
87 |
<if test="stepSort != null">#{stepSort},</if> |
|
88 |
<if test="paramCode != null">#{paramCode},</if> |
|
89 |
<if test="materialCode != null">#{materialCode},</if> |
|
90 |
<if test="formulaCode != null">#{formulaCode},</if> |
|
91 |
<if test="picture != null">#{picture},</if> |
|
92 |
<if test="remarks != null">#{remarks},</if> |
|
93 |
<if test="createUser != null">#{createUser},</if> |
|
94 |
<if test="createTime != null">#{createTime},</if> |
|
95 |
<if test="updateUser != null">#{updateUser},</if> |
|
96 |
<if test="updateTime != null">#{updateTime},</if> |
|
97 |
<if test="spareField1 != null">#{spareField1},</if> |
|
98 |
<if test="spareField2 != null">#{spareField2},</if> |
|
99 |
<if test="spareField3 != null">#{spareField3},</if> |
|
100 |
<if test="spareField4 != null">#{spareField4},</if> |
|
101 |
</trim> |
|
102 |
</insert> |
|
103 |
|
|
104 |
<update id="updateBsFormulaChildInfo" parameterType="BsFormulaChildInfo"> |
|
105 |
update bs_formula_child_info |
|
106 |
<trim prefix="SET" suffixOverrides=","> |
|
107 |
<if test="workshopCode != null">workshop_code = #{workshopCode},</if> |
|
108 |
<if test="lineCode != null">line_code = #{lineCode},</if> |
|
109 |
<if test="processesCode != null">processes_code = #{processesCode},</if> |
|
110 |
<if test="productCode != null">product_code = #{productCode},</if> |
|
111 |
<if test="operationSteps != null">operation_steps = #{operationSteps},</if> |
|
112 |
<if test="techRequirement != null">tech_requirement = #{techRequirement},</if> |
|
113 |
<if test="operationType != null">operation_type = #{operationType},</if> |
|
114 |
<if test="stepSort != null">step_sort = #{stepSort},</if> |
|
115 |
<if test="paramCode != null">param_code = #{paramCode},</if> |
|
116 |
<if test="materialCode != null">material_code = #{materialCode},</if> |
|
117 |
<if test="formulaCode != null">formula_code = #{formulaCode},</if> |
|
118 |
<if test="picture != null">picture = #{picture},</if> |
|
119 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
120 |
<if test="createUser != null">create_user = #{createUser},</if> |
|
121 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
122 |
<if test="updateUser != null">update_user = #{updateUser},</if> |
|
123 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
124 |
<if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
|
125 |
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
|
126 |
<if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
|
127 |
<if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
|
128 |
</trim> |
|
129 |
where id = #{id} |
|
130 |
</update> |
|
131 |
|
|
132 |
<delete id="deleteBsFormulaChildInfoById" parameterType="Long"> |
|
133 |
delete from bs_formula_child_info where id = #{id} |
|
134 |
</delete> |
|
135 |
|
|
136 |
<delete id="deleteBsFormulaChildInfoByIds" parameterType="String"> |
|
137 |
delete from bs_formula_child_info where id in |
|
138 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
139 |
#{id} |
|
140 |
</foreach> |
|
141 |
</delete> |
|
142 |
</mapper> |