春风项目四线(合箱线、总装线)
jiang
2024-01-10 d9cf6b35c5d21a72d5f9f9a37ef5fab93b5fa86d
提交 | 用户 | 时间
d9cf6b 1 <?xml version="1.0" encoding="UTF-8" ?>
J 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.orderScheduling.mapper.BsOrderSchedulingMapper">
6     
7     <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult">
8         <result property="orderNumber"    column="order_number"    />
9         <result property="engineNo"    column="engine_no"    />
10         <result property="productType"    column="product_type"    />
11         <result property="model"    column="model"    />
12         <result property="productionStatus"    column="production_status"    />
13         <result property="workingHours"    column="working_hours"    />
14         <result property="currentWorkstation"    column="current_workstation"    />
15         <result property="qualityStatus"    column="quality_status"    />
16         <result property="whetherOrPrint"    column="whether_or_print"    />
17         <result property="report10"    column="report_10"    />
18         <result property="report20"    column="report_20"    />
19         <result property="combinedBoxLaunch"    column="combined_box_launch"    />
20         <result property="finalAssemblyOffline"    column="final_assembly_offline"    />
21         <result property="operator"    column="operator"    />
22         <result property="operateTime"    column="operate_time"    />
23     </resultMap>
24
25     <sql id="selectBsOrderSchedulingVo">
26         select order_number, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_launch, final_assembly_offline, operator, operate_time from bs_order_scheduling
27     </sql>
28
29     <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
30         <include refid="selectBsOrderSchedulingVo"/>
31         <where>  
32             <if test="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
33             <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
34             <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
35             <if test="model != null  and model != ''"> and model = #{model}</if>
36             <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
37             <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
38             <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
39             <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
40             <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
41             <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
42             <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
43             <if test="combinedBoxLaunch != null  and combinedBoxLaunch != ''"> and combined_box_launch = #{combinedBoxLaunch}</if>
44             <if test="finalAssemblyOffline != null  and finalAssemblyOffline != ''"> and final_assembly_offline = #{finalAssemblyOffline}</if>
45             <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
46             <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
47         </where>
48     </select>
49     
50     <select id="selectBsOrderSchedulingByOrderNumber" parameterType="String" resultMap="BsOrderSchedulingResult">
51         <include refid="selectBsOrderSchedulingVo"/>
52         where order_number = #{orderNumber}
53     </select>
54         
55     <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling">
56         insert into bs_order_scheduling
57         <trim prefix="(" suffix=")" suffixOverrides=",">
58             <if test="orderNumber != null">order_number,</if>
59             <if test="engineNo != null">engine_no,</if>
60             <if test="productType != null">product_type,</if>
61             <if test="model != null">model,</if>
62             <if test="productionStatus != null">production_status,</if>
63             <if test="workingHours != null">working_hours,</if>
64             <if test="currentWorkstation != null">current_workstation,</if>
65             <if test="qualityStatus != null">quality_status,</if>
66             <if test="whetherOrPrint != null">whether_or_print,</if>
67             <if test="report10 != null">report_10,</if>
68             <if test="report20 != null">report_20,</if>
69             <if test="combinedBoxLaunch != null">combined_box_launch,</if>
70             <if test="finalAssemblyOffline != null">final_assembly_offline,</if>
71             <if test="operator != null">operator,</if>
72             <if test="operateTime != null">operate_time,</if>
73          </trim>
74         <trim prefix="values (" suffix=")" suffixOverrides=",">
75             <if test="orderNumber != null">#{orderNumber},</if>
76             <if test="engineNo != null">#{engineNo},</if>
77             <if test="productType != null">#{productType},</if>
78             <if test="model != null">#{model},</if>
79             <if test="productionStatus != null">#{productionStatus},</if>
80             <if test="workingHours != null">#{workingHours},</if>
81             <if test="currentWorkstation != null">#{currentWorkstation},</if>
82             <if test="qualityStatus != null">#{qualityStatus},</if>
83             <if test="whetherOrPrint != null">#{whetherOrPrint},</if>
84             <if test="report10 != null">#{report10},</if>
85             <if test="report20 != null">#{report20},</if>
86             <if test="combinedBoxLaunch != null">#{combinedBoxLaunch},</if>
87             <if test="finalAssemblyOffline != null">#{finalAssemblyOffline},</if>
88             <if test="operator != null">#{operator},</if>
89             <if test="operateTime != null">#{operateTime},</if>
90          </trim>
91     </insert>
92
93     <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling">
94         update bs_order_scheduling
95         <trim prefix="SET" suffixOverrides=",">
96             <if test="engineNo != null">engine_no = #{engineNo},</if>
97             <if test="productType != null">product_type = #{productType},</if>
98             <if test="model != null">model = #{model},</if>
99             <if test="productionStatus != null">production_status = #{productionStatus},</if>
100             <if test="workingHours != null">working_hours = #{workingHours},</if>
101             <if test="currentWorkstation != null">current_workstation = #{currentWorkstation},</if>
102             <if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
103             <if test="whetherOrPrint != null">whether_or_print = #{whetherOrPrint},</if>
104             <if test="report10 != null">report_10 = #{report10},</if>
105             <if test="report20 != null">report_20 = #{report20},</if>
106             <if test="combinedBoxLaunch != null">combined_box_launch = #{combinedBoxLaunch},</if>
107             <if test="finalAssemblyOffline != null">final_assembly_offline = #{finalAssemblyOffline},</if>
108             <if test="operator != null">operator = #{operator},</if>
109             <if test="operateTime != null">operate_time = #{operateTime},</if>
110         </trim>
111         where order_number = #{orderNumber}
112     </update>
113
114     <delete id="deleteBsOrderSchedulingByOrderNumber" parameterType="String">
115         delete from bs_order_scheduling where order_number = #{orderNumber}
116     </delete>
117
118     <delete id="deleteBsOrderSchedulingByOrderNumbers" parameterType="String">
119         delete from bs_order_scheduling where order_number in 
120         <foreach item="orderNumber" collection="array" open="(" separator="," close=")">
121             #{orderNumber}
122         </foreach>
123     </delete>
124 </mapper>