春风项目四线(合箱线、总装线)
jiang
2024-01-12 c9a5c5c9a57abee05470e958e4dc161809f73cf4
提交 | 用户 | 时间
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.da.paramCollection.mapper.DaParamCollectionMapper">
6     
7     <resultMap type="DaParamCollection" id="DaParamCollectionResult">
8         <result property="id"    column="id"    />
9         <result property="workOrderNo"    column="work_order_no"    />
10         <result property="sfcCode"    column="sfc_code"    />
11         <result property="productCode"    column="product_code"    />
12         <result property="productionLine"    column="production_line"    />
13         <result property="locationCode"    column="location_code"    />
14         <result property="equipmentNo"    column="equipment_no"    />
15         <result property="paramCode"    column="param_code"    />
16         <result property="paramValue"    column="param_value"    />
17         <result property="paramUpper"    column="param_upper"    />
18         <result property="paramLower"    column="param_lower"    />
19         <result property="paramStandard"    column="param_standard"    />
20         <result property="collectionTime"    column="collection_time"    />
21         <result property="spareField1"    column="spare_field_1"    />
22         <result property="spareField2"    column="spare_field_2"    />
23         <result property="createUser"    column="create_user"    />
24         <result property="createTime"    column="create_time"    />
25         <result property="updateUser"    column="update_user"    />
26         <result property="updateTime"    column="update_time"    />
27         <result property="state"    column="state"    />
28         <result property="paramName"    column="param_name"    />
29         <result property="unit"    column="unit"    />
30         <result property="type"    column="type"    />
31     </resultMap>
32
33     <sql id="selectDaParamCollectionVo">
34         select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection
35     </sql>
36
37     <select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult">
38         <include refid="selectDaParamCollectionVo"/>
39         <where>  
40             <if test="workOrderNo != null  and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
41             <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
42             <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
43             <if test="productionLine != null  and productionLine != ''"> and production_line = #{productionLine}</if>
44             <if test="locationCode != null  and locationCode != ''"> and location_code = #{locationCode}</if>
45             <if test="equipmentNo != null  and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if>
46             <if test="paramCode != null  and paramCode != ''"> and param_code = #{paramCode}</if>
47         </where>
48     </select>
49     
50     <select id="selectDaParamCollectionById" parameterType="Long" resultMap="DaParamCollectionResult">
51         <include refid="selectDaParamCollectionVo"/>
52         where id = #{id}
53     </select>
54         
55     <insert id="insertDaParamCollection" parameterType="DaParamCollection">
56         insert into da_param_collection
57         <trim prefix="(" suffix=")" suffixOverrides=",">
58             <if test="id != null">id,</if>
59             <if test="workOrderNo != null and workOrderNo != ''">work_order_no,</if>
60             <if test="sfcCode != null and sfcCode != ''">sfc_code,</if>
61             <if test="productCode != null and productCode != ''">product_code,</if>
62             <if test="productionLine != null and productionLine != ''">production_line,</if>
63             <if test="locationCode != null and locationCode != ''">location_code,</if>
64             <if test="equipmentNo != null">equipment_no,</if>
65             <if test="paramCode != null and paramCode != ''">param_code,</if>
66             <if test="paramValue != null and paramValue != ''">param_value,</if>
67             <if test="paramUpper != null">param_upper,</if>
68             <if test="paramLower != null">param_lower,</if>
69             <if test="paramStandard != null">param_standard,</if>
70             <if test="collectionTime != null">collection_time,</if>
71             <if test="spareField1 != null">spare_field_1,</if>
72             <if test="spareField2 != null">spare_field_2,</if>
73             <if test="createUser != null">create_user,</if>
74             <if test="createTime != null">create_time,</if>
75             <if test="updateUser != null">update_user,</if>
76             <if test="updateTime != null">update_time,</if>
77             <if test="state != null">state,</if>
78             <if test="paramName != null">param_name,</if>
79             <if test="unit != null">unit,</if>
80             <if test="type != null">type,</if>
81          </trim>
82         <trim prefix="values (" suffix=")" suffixOverrides=",">
83             <if test="id != null">#{id},</if>
84             <if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if>
85             <if test="sfcCode != null and sfcCode != ''">#{sfcCode},</if>
86             <if test="productCode != null and productCode != ''">#{productCode},</if>
87             <if test="productionLine != null and productionLine != ''">#{productionLine},</if>
88             <if test="locationCode != null and locationCode != ''">#{locationCode},</if>
89             <if test="equipmentNo != null">#{equipmentNo},</if>
90             <if test="paramCode != null and paramCode != ''">#{paramCode},</if>
91             <if test="paramValue != null and paramValue != ''">#{paramValue},</if>
92             <if test="paramUpper != null">#{paramUpper},</if>
93             <if test="paramLower != null">#{paramLower},</if>
94             <if test="paramStandard != null">#{paramStandard},</if>
95             <if test="collectionTime != null">#{collectionTime},</if>
96             <if test="spareField1 != null">#{spareField1},</if>
97             <if test="spareField2 != null">#{spareField2},</if>
98             <if test="createUser != null">#{createUser},</if>
99             <if test="createTime != null">#{createTime},</if>
100             <if test="updateUser != null">#{updateUser},</if>
101             <if test="updateTime != null">#{updateTime},</if>
102             <if test="state != null">#{state},</if>
103             <if test="paramName != null">#{paramName},</if>
104             <if test="unit != null">#{unit},</if>
105             <if test="type != null">#{type},</if>
106          </trim>
107     </insert>
108
109     <update id="updateDaParamCollection" parameterType="DaParamCollection">
110         update da_param_collection
111         <trim prefix="SET" suffixOverrides=",">
112             <if test="workOrderNo != null and workOrderNo != ''">work_order_no = #{workOrderNo},</if>
113             <if test="sfcCode != null and sfcCode != ''">sfc_code = #{sfcCode},</if>
114             <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
115             <if test="productionLine != null and productionLine != ''">production_line = #{productionLine},</if>
116             <if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
117             <if test="equipmentNo != null">equipment_no = #{equipmentNo},</if>
118             <if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if>
119             <if test="paramValue != null and paramValue != ''">param_value = #{paramValue},</if>
120             <if test="paramUpper != null">param_upper = #{paramUpper},</if>
121             <if test="paramLower != null">param_lower = #{paramLower},</if>
122             <if test="paramStandard != null">param_standard = #{paramStandard},</if>
123             <if test="collectionTime != null">collection_time = #{collectionTime},</if>
124             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
125             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
126             <if test="createUser != null">create_user = #{createUser},</if>
127             <if test="createTime != null">create_time = #{createTime},</if>
128             <if test="updateUser != null">update_user = #{updateUser},</if>
129             <if test="updateTime != null">update_time = #{updateTime},</if>
130             <if test="state != null">state = #{state},</if>
131             <if test="paramName != null">param_name = #{paramName},</if>
132             <if test="unit != null">unit = #{unit},</if>
133             <if test="type != null">type = #{type},</if>
134         </trim>
135         where id = #{id}
136     </update>
137
138     <delete id="deleteDaParamCollectionById" parameterType="Long">
139         delete from da_param_collection where id = #{id}
140     </delete>
141
142     <delete id="deleteDaParamCollectionByIds" parameterType="String">
143         delete from da_param_collection where id in 
144         <foreach item="id" collection="array" open="(" separator="," close=")">
145             #{id}
146         </foreach>
147     </delete>
148 </mapper>