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