chenlu
2024-03-15 dbec8a881baf27254a13f1f9c7b0167b9f064ab5
north-glass-erp/target/classes/mapper/pp/WordOrder.xml
@@ -110,15 +110,15 @@
    <select id="addWordOrder" >
        select od.order_id,
               od.product_id,
               od.product_name,
               od.quantity,
               od.compute_gross_area,
               od.perimeter
        from order_detail as od
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}  and ISNULL(ogd.production_id)
        od.product_id,
        od.product_name,
        sum( od.quantity) as quantity,
        od.compute_gross_area,
        od.perimeter
        from sd.order_detail as od
        left join sd.order as o
        on od.order_id =o.order_id
        where od.order_id = #{orderId}  and  o.production_order!=2
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
@@ -132,13 +132,13 @@
        ;
    </select>
    <select id="SelectOrderNumber" resultMap="wordOrderMap">
        select count(ogd.production_id)
    <select id="selectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
    <update id="AddOrderWorkMp" >
    <update id="addOrderWorkMp" >
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -151,7 +151,8 @@
          and od.product_name = #{productName}
    </update>
    <update id="DeleteOrderWorkMp">
<!--    删除工单-->
    <update id="deleteOrderWorkMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
        set ogd.production_id=null,
@@ -161,20 +162,20 @@
          and od.product_name = #{productName}
    </update>
    <select id="SelectWorkCount">
    <select id="selectWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where ISNULL(production_id)
          and order_id = #{orderId}
    </select>
    <select id="SelectYesWorkCount">
    <select id="selectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
    </select>
    <update id="UpdateWorkType">
    <update id="updateWorkType">
        update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId}
    </update>
</mapper>