<?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>
|