春风项目四线(合箱线、总装线)
yyt
2024-06-03 5030f3d30ccc1bd16db371c6970a48103aff9191
提交 | 用户 | 时间
d9cf6b 1 <?xml version="1.0" encoding="UTF-8" ?>
J 2 <!DOCTYPE mapper
5030f3 3         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
Y 4         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
d9cf6b 5 <mapper namespace="com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper">
5030f3 6
d9cf6b 7     <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult">
2aea64 8         <result property="id"    column="id"    />
J 9         <result property="orderNo"    column="order_no"    />
d9cf6b 10         <result property="engineNo"    column="engine_no"    />
J 11         <result property="productType"    column="product_type"    />
12         <result property="model"    column="model"    />
13         <result property="productionStatus"    column="production_status"    />
14         <result property="workingHours"    column="working_hours"    />
15         <result property="currentWorkstation"    column="current_workstation"    />
16         <result property="qualityStatus"    column="quality_status"    />
17         <result property="whetherOrPrint"    column="whether_or_print"    />
18         <result property="report10"    column="report_10"    />
19         <result property="report20"    column="report_20"    />
2aea64 20         <result property="combinedBoxTime"    column="combined_box_time"    />
J 21         <result property="finalAssemblyTime"    column="final_assembly_time"    />
d9cf6b 22         <result property="operator"    column="operator"    />
J 23         <result property="operateTime"    column="operate_time"    />
2aea64 24         <result property="status"    column="status"    />
J 25         <result property="spareField1"    column="spare_field_1"    />
26         <result property="spareField2"    column="spare_field_2"    />
27         <result property="spareField3"    column="spare_field_3"    />
28         <result property="spareField4"    column="spare_field_4"    />
29         <result property="createUser"    column="create_user"    />
30         <result property="createTime"    column="create_time"    />
31         <result property="updateUser"    column="update_user"    />
32         <result property="updateTime"    column="update_time"    />
33         <result property="remarks"    column="remarks"    />
1391b3 34         <result property="report30"    column="report_30"    />
797845 35         <result property="boxClosingOnlineTime"    column="box_closing_online_time"    />
36         <result property="closingBoxOfflineTime"    column="closing_box_offline_time"    />
37         <result property="finalAssemblyLaunchTime"    column="final_assembly_launch_time"    />
38         <result property="finalAssemblyOfflineTime"    column="final_assembly_offline_time"    />
39         <result property="cvtLaunchTime"    column="cvt_launch_time"    />
40         <result property="cvtOfflineTime"    column="cvt_offline_time"    />
1391b3 41
d9cf6b 42     </resultMap>
J 43
44     <sql id="selectBsOrderSchedulingVo">
797845 45         select id, order_no, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_time, final_assembly_time, operator, operate_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks, report_30, box_closing_online_time, closing_box_offline_time, final_assembly_launch_time, final_assembly_offline_time, cvt_launch_time, cvt_offline_time from bs_order_scheduling
d9cf6b 46     </sql>
J 47
48     <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
49         <include refid="selectBsOrderSchedulingVo"/>
5030f3 50         <where>
2aea64 51             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
d9cf6b 52             <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
J 53             <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
54             <if test="model != null  and model != ''"> and model = #{model}</if>
55             <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
56             <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
57             <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
58             <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
59             <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
60             <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
61             <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
2aea64 62             <if test="combinedBoxTime != null  and combinedBoxTime != ''"> and combined_box_time = #{combinedBoxTime}</if>
J 63             <if test="finalAssemblyTime != null  and finalAssemblyTime != ''"> and final_assembly_time = #{finalAssemblyTime}</if>
d9cf6b 64             <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
J 65             <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
2aea64 66             <if test="status != null  and status != ''"> and status = #{status}</if>
5030f3 67             <if test="spareField1 != null  and spareField1 != ''"> and isnull(spare_field_1,'') != #{spareField1}</if>
Y 68             <if test="spareField2 != null  and spareField2 != ''"> and isnull(spare_field_2,'') != #{spareField2}</if>
2aea64 69             <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
J 70             <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
71             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
72             <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
73             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
1391b3 74             <if test="report30 != null  and report30 != ''"> and report_30 = #{report30}</if>
d2b752 75             <if test="dateConditions != null  and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if>
797845 76             <if test="boxClosingOnlineTime != null  and boxClosingOnlineTime != ''"> and box_closing_online_time = #{boxClosingOnlineTime}</if>
77             <if test="closingBoxOfflineTime != null  and closingBoxOfflineTime != ''"> and closing_box_offline_time = #{closingBoxOfflineTime}</if>
78             <if test="finalAssemblyLaunchTime != null  and finalAssemblyLaunchTime != ''"> and final_assembly_launch_time = #{finalAssemblyLaunchTime}</if>
79             <if test="finalAssemblyOfflineTime != null  and finalAssemblyOfflineTime != ''"> and final_assembly_offline_time = #{finalAssemblyOfflineTime}</if>
80             <if test="cvtLaunchTime != null  and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if>
81             <if test="cvtOfflineTime != null  and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if>
bbc578 82             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and final_assembly_offline_time between #{startTime} and #{endTime}</if>
c74dcb 83             <if test="engineNoList != null and engineNoList.size() > 0">
W 84                 and engine_no in
85                 <foreach collection="engineNoList" open="(" close=")" separator="," item="engine">
86                     #{engine}
87                 </foreach>
88             </if>
89             <if test="engineNoListExcel != null and engineNoListExcel.size() > 0">
90                 and engine_no in
91                 <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine">
bbc578 92                     #{engine} order by order_no,engine_no
c74dcb 93                 </foreach>
W 94             </if>
d9cf6b 95         </where>
J 96     </select>
d4f437 97
Y 98     <select id="selectBsOrderSchedulingPage" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
99         <include refid="selectBsOrderSchedulingVo"/>
100         <where>
101             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
102             <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
103             <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
104             <if test="model != null  and model != ''"> and model = #{model}</if>
105             <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
106             <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
107             <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
108             <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
109             <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
110             <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
111             <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
112             <if test="combinedBoxTime != null  and combinedBoxTime != ''"> and combined_box_time = #{combinedBoxTime}</if>
113             <if test="finalAssemblyTime != null  and finalAssemblyTime != ''"> and final_assembly_time = #{finalAssemblyTime}</if>
114             <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
115             <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
116             <if test="status != null  and status != ''"> and status = #{status}</if>
117             <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
118             <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
119             <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
120             <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
121             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
122             <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
123             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
124             <if test="report30 != null  and report30 != ''"> and report_30 = #{report30}</if>
125             <if test="dateConditions != null  and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if>
126             <if test="boxClosingOnlineTime != null  and boxClosingOnlineTime != ''"> and box_closing_online_time = #{boxClosingOnlineTime}</if>
127             <if test="closingBoxOfflineTime != null  and closingBoxOfflineTime != ''"> and closing_box_offline_time = #{closingBoxOfflineTime}</if>
128             <if test="finalAssemblyLaunchTime != null  and finalAssemblyLaunchTime != ''"> and final_assembly_launch_time = #{finalAssemblyLaunchTime}</if>
129             <if test="finalAssemblyOfflineTime != null  and finalAssemblyOfflineTime != ''"> and final_assembly_offline_time = #{finalAssemblyOfflineTime}</if>
130             <if test="cvtLaunchTime != null  and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if>
131             <if test="cvtOfflineTime != null  and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if>
132             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and cvt_offline_time between #{startTime} and #{endTime}</if>
133             <if test="engineNoList != null and engineNoList.size() > 0">
134                 and engine_no in
135                 <foreach collection="engineNoList" open="(" close=")" separator="," item="engine">
136                     #{engine}
137                 </foreach>
138             </if>
139             <if test="engineNoListExcel != null and engineNoListExcel.size() > 0">
140                 and engine_no in
141                 <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine">
142                     #{engine}
143                 </foreach>
144             </if>
145             and (production_status = '2' or production_status = '3')
146         </where>
147         order by create_time DESC
148     </select>
5030f3 149
2aea64 150     <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
d9cf6b 151         <include refid="selectBsOrderSchedulingVo"/>
2aea64 152         where id = #{id}
d9cf6b 153     </select>
1a444b 154
Y 155     <select id="selectBsOrderSchedulingSNCode" parameterType="String" resultMap="BsOrderSchedulingResult">
156         <include refid="selectBsOrderSchedulingVo"/>
157         where engine_no = #{sncode}
158     </select>
159
0ae9ac 160     <select id="getPrepareOnlineList" resultType="com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling">
W 161         select bos.* from bs_order_scheduling bos
162         <where>
163             <if test="prepareOnlineQuery.orderNo != null and prepareOnlineQuery.orderNo != '' ">
164                 and bos.order_no = #{prepareOnlineQuery.orderNo}
165             </if>
166             <if test="prepareOnlineQuery.engineNo != null and prepareOnlineQuery.engineNo != '' ">
167                 and bos.engine_no = #{prepareOnlineQuery.engineNo}
168             </if>
169         </where>
170     </select>
9ebb88 171     <select id="getProduceNumToday" resultType="java.lang.Integer">
W 172         select count(*) from bs_order_scheduling
173         where ${queryField} BETWEEN #{startTime} AND #{endTime}
174     </select>
0ae9ac 175
W 176
2aea64 177     <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling" useGeneratedKeys="true" keyProperty="id">
d9cf6b 178         insert into bs_order_scheduling
J 179         <trim prefix="(" suffix=")" suffixOverrides=",">
2aea64 180             <if test="orderNo != null">order_no,</if>
d9cf6b 181             <if test="engineNo != null">engine_no,</if>
J 182             <if test="productType != null">product_type,</if>
183             <if test="model != null">model,</if>
184             <if test="productionStatus != null">production_status,</if>
185             <if test="workingHours != null">working_hours,</if>
186             <if test="currentWorkstation != null">current_workstation,</if>
187             <if test="qualityStatus != null">quality_status,</if>
188             <if test="whetherOrPrint != null">whether_or_print,</if>
189             <if test="report10 != null">report_10,</if>
190             <if test="report20 != null">report_20,</if>
2aea64 191             <if test="combinedBoxTime != null">combined_box_time,</if>
J 192             <if test="finalAssemblyTime != null">final_assembly_time,</if>
d9cf6b 193             <if test="operator != null">operator,</if>
J 194             <if test="operateTime != null">operate_time,</if>
2aea64 195             <if test="status != null">status,</if>
J 196             <if test="spareField1 != null">spare_field_1,</if>
197             <if test="spareField2 != null">spare_field_2,</if>
198             <if test="spareField3 != null">spare_field_3,</if>
199             <if test="spareField4 != null">spare_field_4,</if>
200             <if test="createUser != null">create_user,</if>
201             <if test="createTime != null">create_time,</if>
202             <if test="updateUser != null">update_user,</if>
203             <if test="updateTime != null">update_time,</if>
204             <if test="remarks != null">remarks,</if>
1391b3 205             <if test="report30 != null">report_30,</if>
797845 206             <if test="boxClosingOnlineTime != null">box_closing_online_time,</if>
207             <if test="closingBoxOfflineTime != null">closing_box_offline_time,</if>
208             <if test="finalAssemblyLaunchTime != null">final_assembly_launch_time,</if>
209             <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time,</if>
210             <if test="cvtLaunchTime != null">cvt_launch_time,</if>
211             <if test="cvtOfflineTime != null">cvt_offline_time,</if>
5030f3 212         </trim>
d9cf6b 213         <trim prefix="values (" suffix=")" suffixOverrides=",">
2aea64 214             <if test="orderNo != null">#{orderNo},</if>
d9cf6b 215             <if test="engineNo != null">#{engineNo},</if>
J 216             <if test="productType != null">#{productType},</if>
217             <if test="model != null">#{model},</if>
218             <if test="productionStatus != null">#{productionStatus},</if>
219             <if test="workingHours != null">#{workingHours},</if>
220             <if test="currentWorkstation != null">#{currentWorkstation},</if>
221             <if test="qualityStatus != null">#{qualityStatus},</if>
222             <if test="whetherOrPrint != null">#{whetherOrPrint},</if>
223             <if test="report10 != null">#{report10},</if>
224             <if test="report20 != null">#{report20},</if>
2aea64 225             <if test="combinedBoxTime != null">#{combinedBoxTime},</if>
J 226             <if test="finalAssemblyTime != null">#{finalAssemblyTime},</if>
d9cf6b 227             <if test="operator != null">#{operator},</if>
J 228             <if test="operateTime != null">#{operateTime},</if>
2aea64 229             <if test="status != null">#{status},</if>
J 230             <if test="spareField1 != null">#{spareField1},</if>
231             <if test="spareField2 != null">#{spareField2},</if>
232             <if test="spareField3 != null">#{spareField3},</if>
233             <if test="spareField4 != null">#{spareField4},</if>
234             <if test="createUser != null">#{createUser},</if>
235             <if test="createTime != null">#{createTime},</if>
236             <if test="updateUser != null">#{updateUser},</if>
237             <if test="updateTime != null">#{updateTime},</if>
238             <if test="remarks != null">#{remarks},</if>
1391b3 239             <if test="report30 != null">#{report30},</if>
797845 240             <if test="boxClosingOnlineTime != null">#{boxClosingOnlineTime},</if>
241             <if test="closingBoxOfflineTime != null">#{closingBoxOfflineTime},</if>
242             <if test="finalAssemblyLaunchTime != null">#{finalAssemblyLaunchTime},</if>
243             <if test="finalAssemblyOfflineTime != null">#{finalAssemblyOfflineTime},</if>
244             <if test="cvtLaunchTime != null">#{cvtLaunchTime},</if>
245             <if test="cvtOfflineTime != null">#{cvtOfflineTime},</if>
1391b3 246
247         </trim>
d9cf6b 248     </insert>
J 249
250     <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling">
251         update bs_order_scheduling
252         <trim prefix="SET" suffixOverrides=",">
2aea64 253             <if test="orderNo != null">order_no = #{orderNo},</if>
d9cf6b 254             <if test="engineNo != null">engine_no = #{engineNo},</if>
J 255             <if test="productType != null">product_type = #{productType},</if>
256             <if test="model != null">model = #{model},</if>
257             <if test="productionStatus != null">production_status = #{productionStatus},</if>
258             <if test="workingHours != null">working_hours = #{workingHours},</if>
259             <if test="currentWorkstation != null">current_workstation = #{currentWorkstation},</if>
260             <if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
261             <if test="whetherOrPrint != null">whether_or_print = #{whetherOrPrint},</if>
262             <if test="report10 != null">report_10 = #{report10},</if>
263             <if test="report20 != null">report_20 = #{report20},</if>
2aea64 264             <if test="combinedBoxTime != null">combined_box_time = #{combinedBoxTime},</if>
J 265             <if test="finalAssemblyTime != null">final_assembly_time = #{finalAssemblyTime},</if>
d9cf6b 266             <if test="operator != null">operator = #{operator},</if>
J 267             <if test="operateTime != null">operate_time = #{operateTime},</if>
2aea64 268             <if test="status != null">status = #{status},</if>
J 269             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
270             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
271             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
272             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
273             <if test="createUser != null">create_user = #{createUser},</if>
274             <if test="createTime != null">create_time = #{createTime},</if>
275             <if test="updateUser != null">update_user = #{updateUser},</if>
276             <if test="updateTime != null">update_time = #{updateTime},</if>
277             <if test="remarks != null">remarks = #{remarks},</if>
1391b3 278             <if test="report30 != null">report_30 = #{report30},</if>
797845 279             <if test="boxClosingOnlineTime != null">box_closing_online_time = #{boxClosingOnlineTime},</if>
280             <if test="closingBoxOfflineTime != null">closing_box_offline_time = #{closingBoxOfflineTime},</if>
281             <if test="finalAssemblyLaunchTime != null">final_assembly_launch_time = #{finalAssemblyLaunchTime},</if>
282             <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time = #{finalAssemblyOfflineTime},</if>
283             <if test="cvtLaunchTime != null">cvt_launch_time = #{cvtLaunchTime},</if>
284             <if test="cvtOfflineTime != null">cvt_offline_time = #{cvtOfflineTime},</if>
1391b3 285
d9cf6b 286         </trim>
2aea64 287         where id = #{id}
d9cf6b 288     </update>
J 289
2aea64 290     <delete id="deleteBsOrderSchedulingById" parameterType="Long">
J 291         delete from bs_order_scheduling where id = #{id}
d9cf6b 292     </delete>
J 293
2aea64 294     <delete id="deleteBsOrderSchedulingByIds" parameterType="String">
5030f3 295         delete from bs_order_scheduling where id in
2aea64 296         <foreach item="id" collection="array" open="(" separator="," close=")">
J 297             #{id}
d9cf6b 298         </foreach>
J 299     </delete>
300 </mapper>