hdy
2025-03-14 4cb4e41df7c2cc7954e09ef3751ecb24de7c06d2
billion-main/src/main/resources/mapper/om/OmProductionOrderInfoMapper.xml
@@ -41,6 +41,7 @@
            SELECT TOP 1 *
            FROM om_production_order_info
            WHERE body_status IN (0,1)
            AND body_qty != plan_qty
            ORDER BY plan_start_time ASC
    </select>
    <select id="updateBodyStatus1" resultType="OmProductionOrderInfo">
@@ -56,7 +57,7 @@
    </select>
    <select id="updateBodyStatus2" resultType="OmProductionOrderInfo">
        UPDATE om_production_order_info
        SET body_status = 2
        SET body_status = 4
        WHERE id = (
            SELECT TOP 1 id
            FROM om_production_order_info
@@ -68,6 +69,7 @@
        SELECT TOP 1 *
        FROM om_production_order_info
        WHERE head_status IN (0,1)
          AND head_qty != plan_qty
        ORDER BY plan_start_time ASC
    </select>
    <select id="updateHeadStatus1" resultType="OmProductionOrderInfo">
@@ -83,7 +85,7 @@
    </select>
    <select id="updateHeadStatus2" resultType="OmProductionOrderInfo">
        UPDATE om_production_order_info
        SET head_status = 2
        SET head_status = 4
        WHERE id = (
            SELECT TOP 1 id
            FROM om_production_order_info
@@ -95,6 +97,7 @@
        SELECT TOP 1 *
        FROM om_production_order_info
        WHERE pre_status IN (0,1)
          AND pre_qty != plan_qty
        ORDER BY plan_start_time ASC
    </select>
    <select id="updatePreStatus1" resultType="OmProductionOrderInfo">
@@ -110,7 +113,7 @@
    </select>
    <select id="updatePreStatus2" resultType="OmProductionOrderInfo">
        UPDATE om_production_order_info
        SET pre_status = 2
        SET pre_status = 4
        WHERE id = (
            SELECT TOP 1 id
            FROM om_production_order_info
@@ -188,6 +191,12 @@
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="bodyQty != null">body_qty = #{bodyQty},</if>
            <if test="headQty != null">head_qty = #{headQty},</if>
            <if test="preQty != null">pre_qty = #{preQty},</if>
            <if test="bodyStatus != null">body_status = #{bodyStatus},</if>
            <if test="headStatus != null">head_status = #{headStatus},</if>
            <if test="preStatus != null">pre_status = #{preStatus},</if>
        </trim>
        where id = #{id}
    </update>