春风项目四线(合箱线、总装线)
wujian
2024-01-18 0ae9acad17724f5da4bfd68250ae2b5f3aefd188
提交 | 用户 | 时间
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">
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"    />
35
d9cf6b 36     </resultMap>
J 37
38     <sql id="selectBsOrderSchedulingVo">
1391b3 39         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 from bs_order_scheduling
d9cf6b 40     </sql>
J 41
42     <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
43         <include refid="selectBsOrderSchedulingVo"/>
44         <where>  
2aea64 45             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
d9cf6b 46             <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
J 47             <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
48             <if test="model != null  and model != ''"> and model = #{model}</if>
49             <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
50             <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
51             <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
52             <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
53             <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
54             <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
55             <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
2aea64 56             <if test="combinedBoxTime != null  and combinedBoxTime != ''"> and combined_box_time = #{combinedBoxTime}</if>
J 57             <if test="finalAssemblyTime != null  and finalAssemblyTime != ''"> and final_assembly_time = #{finalAssemblyTime}</if>
d9cf6b 58             <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
J 59             <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
2aea64 60             <if test="status != null  and status != ''"> and status = #{status}</if>
J 61             <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
62             <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
63             <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
64             <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
65             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
66             <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
67             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
1391b3 68             <if test="report30 != null  and report30 != ''"> and report_30 = #{report30}</if>
d2b752 69             <if test="dateConditions != null  and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if>
70
1391b3 71
d9cf6b 72         </where>
J 73     </select>
74     
2aea64 75     <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
d9cf6b 76         <include refid="selectBsOrderSchedulingVo"/>
2aea64 77         where id = #{id}
d9cf6b 78     </select>
0ae9ac 79     <select id="getPrepareOnlineList" resultType="com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling">
W 80         select bos.* from bs_order_scheduling bos
81         <where>
82             <if test="prepareOnlineQuery.orderNo != null and prepareOnlineQuery.orderNo != '' ">
83                 and bos.order_no = #{prepareOnlineQuery.orderNo}
84             </if>
85             <if test="prepareOnlineQuery.engineNo != null and prepareOnlineQuery.engineNo != '' ">
86                 and bos.engine_no = #{prepareOnlineQuery.engineNo}
87             </if>
88         </where>
89     </select>
90
91
2aea64 92     <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling" useGeneratedKeys="true" keyProperty="id">
d9cf6b 93         insert into bs_order_scheduling
J 94         <trim prefix="(" suffix=")" suffixOverrides=",">
2aea64 95             <if test="orderNo != null">order_no,</if>
d9cf6b 96             <if test="engineNo != null">engine_no,</if>
J 97             <if test="productType != null">product_type,</if>
98             <if test="model != null">model,</if>
99             <if test="productionStatus != null">production_status,</if>
100             <if test="workingHours != null">working_hours,</if>
101             <if test="currentWorkstation != null">current_workstation,</if>
102             <if test="qualityStatus != null">quality_status,</if>
103             <if test="whetherOrPrint != null">whether_or_print,</if>
104             <if test="report10 != null">report_10,</if>
105             <if test="report20 != null">report_20,</if>
2aea64 106             <if test="combinedBoxTime != null">combined_box_time,</if>
J 107             <if test="finalAssemblyTime != null">final_assembly_time,</if>
d9cf6b 108             <if test="operator != null">operator,</if>
J 109             <if test="operateTime != null">operate_time,</if>
2aea64 110             <if test="status != null">status,</if>
J 111             <if test="spareField1 != null">spare_field_1,</if>
112             <if test="spareField2 != null">spare_field_2,</if>
113             <if test="spareField3 != null">spare_field_3,</if>
114             <if test="spareField4 != null">spare_field_4,</if>
115             <if test="createUser != null">create_user,</if>
116             <if test="createTime != null">create_time,</if>
117             <if test="updateUser != null">update_user,</if>
118             <if test="updateTime != null">update_time,</if>
119             <if test="remarks != null">remarks,</if>
1391b3 120             <if test="report30 != null">report_30,</if>
d9cf6b 121          </trim>
J 122         <trim prefix="values (" suffix=")" suffixOverrides=",">
2aea64 123             <if test="orderNo != null">#{orderNo},</if>
d9cf6b 124             <if test="engineNo != null">#{engineNo},</if>
J 125             <if test="productType != null">#{productType},</if>
126             <if test="model != null">#{model},</if>
127             <if test="productionStatus != null">#{productionStatus},</if>
128             <if test="workingHours != null">#{workingHours},</if>
129             <if test="currentWorkstation != null">#{currentWorkstation},</if>
130             <if test="qualityStatus != null">#{qualityStatus},</if>
131             <if test="whetherOrPrint != null">#{whetherOrPrint},</if>
132             <if test="report10 != null">#{report10},</if>
133             <if test="report20 != null">#{report20},</if>
2aea64 134             <if test="combinedBoxTime != null">#{combinedBoxTime},</if>
J 135             <if test="finalAssemblyTime != null">#{finalAssemblyTime},</if>
d9cf6b 136             <if test="operator != null">#{operator},</if>
J 137             <if test="operateTime != null">#{operateTime},</if>
2aea64 138             <if test="status != null">#{status},</if>
J 139             <if test="spareField1 != null">#{spareField1},</if>
140             <if test="spareField2 != null">#{spareField2},</if>
141             <if test="spareField3 != null">#{spareField3},</if>
142             <if test="spareField4 != null">#{spareField4},</if>
143             <if test="createUser != null">#{createUser},</if>
144             <if test="createTime != null">#{createTime},</if>
145             <if test="updateUser != null">#{updateUser},</if>
146             <if test="updateTime != null">#{updateTime},</if>
147             <if test="remarks != null">#{remarks},</if>
1391b3 148             <if test="report30 != null">#{report30},</if>
149
150         </trim>
d9cf6b 151     </insert>
J 152
153     <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling">
154         update bs_order_scheduling
155         <trim prefix="SET" suffixOverrides=",">
2aea64 156             <if test="orderNo != null">order_no = #{orderNo},</if>
d9cf6b 157             <if test="engineNo != null">engine_no = #{engineNo},</if>
J 158             <if test="productType != null">product_type = #{productType},</if>
159             <if test="model != null">model = #{model},</if>
160             <if test="productionStatus != null">production_status = #{productionStatus},</if>
161             <if test="workingHours != null">working_hours = #{workingHours},</if>
162             <if test="currentWorkstation != null">current_workstation = #{currentWorkstation},</if>
163             <if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
164             <if test="whetherOrPrint != null">whether_or_print = #{whetherOrPrint},</if>
165             <if test="report10 != null">report_10 = #{report10},</if>
166             <if test="report20 != null">report_20 = #{report20},</if>
2aea64 167             <if test="combinedBoxTime != null">combined_box_time = #{combinedBoxTime},</if>
J 168             <if test="finalAssemblyTime != null">final_assembly_time = #{finalAssemblyTime},</if>
d9cf6b 169             <if test="operator != null">operator = #{operator},</if>
J 170             <if test="operateTime != null">operate_time = #{operateTime},</if>
2aea64 171             <if test="status != null">status = #{status},</if>
J 172             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
173             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
174             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
175             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
176             <if test="createUser != null">create_user = #{createUser},</if>
177             <if test="createTime != null">create_time = #{createTime},</if>
178             <if test="updateUser != null">update_user = #{updateUser},</if>
179             <if test="updateTime != null">update_time = #{updateTime},</if>
180             <if test="remarks != null">remarks = #{remarks},</if>
1391b3 181             <if test="report30 != null">report_30 = #{report30},</if>
182
d9cf6b 183         </trim>
2aea64 184         where id = #{id}
d9cf6b 185     </update>
J 186
2aea64 187     <delete id="deleteBsOrderSchedulingById" parameterType="Long">
J 188         delete from bs_order_scheduling where id = #{id}
d9cf6b 189     </delete>
J 190
2aea64 191     <delete id="deleteBsOrderSchedulingByIds" parameterType="String">
J 192         delete from bs_order_scheduling where id in 
193         <foreach item="id" collection="array" open="(" separator="," close=")">
194             #{id}
d9cf6b 195         </foreach>
J 196     </delete>
197 </mapper>