春风项目四线(合箱线、总装线)
wujian
2024-10-23 2c65c31aceb16c1d06c692266e3fb555ecafdfb5
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -1,9 +1,9 @@
<?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">
        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="id"    column="id"    />
        <result property="orderNo"    column="order_no"    />
@@ -47,7 +47,7 @@
    <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        <where>
        <where>
            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
            <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
            <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
@@ -64,8 +64,8 @@
            <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
            <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and isnull(spare_field_1,'') != #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and isnull(spare_field_2,'') != #{spareField2}</if>
            <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
            <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
@@ -89,7 +89,7 @@
            <if test="engineNoListExcel != null and engineNoListExcel.size() > 0">
                and engine_no in
                <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine">
                    #{engine} order by order_no,engine_no
                    #{engine}
                </foreach>
            </if>
        </where>
@@ -146,7 +146,7 @@
        </where>
        order by create_time DESC
    </select>
    <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        where id = #{id}
@@ -171,6 +171,28 @@
    <select id="getProduceNumToday" resultType="java.lang.Integer">
        select count(*) from bs_order_scheduling
        where ${queryField} BETWEEN #{startTime} AND #{endTime}
    </select>
    <select id="getProductNum" resultType="com.jcdm.main.da.passingStationCollection.domain.ProductNumVO">
        SELECT model,count(*) as num FROM bs_order_scheduling
        <where>
            <if test="queryDate != null and queryDate != ''">
             final_assembly_offline_time between #{queryDate} and #{addQueryDate}
            </if>
        </where>
        GROUP BY model
    </select>
    <select id="selectBsOrderSchedulingListForNum"
            parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
        select model,final_assembly_offline_time,final_assembly_launch_time,box_closing_online_time
        from bs_order_scheduling
        <where>
            <if test="queryDate != null and queryDate != ''">
                final_assembly_offline_time between #{queryDate} and #{addQueryDate}
        or final_assembly_launch_time between #{queryDate} and #{addQueryDate}
        or box_closing_online_time between #{queryDate} and #{addQueryDate}
            </if>
        </where>
    </select>
@@ -209,7 +231,7 @@
            <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time,</if>
            <if test="cvtLaunchTime != null">cvt_launch_time,</if>
            <if test="cvtOfflineTime != null">cvt_offline_time,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="orderNo != null">#{orderNo},</if>
            <if test="engineNo != null">#{engineNo},</if>
@@ -292,9 +314,11 @@
    </delete>
    <delete id="deleteBsOrderSchedulingByIds" parameterType="String">
        delete from bs_order_scheduling where id in
        delete from bs_order_scheduling where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>