廖井涛
2024-07-10 78809560f4315777e770acec0e24cb42e2ca97a7
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -511,12 +511,16 @@
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               od.other_columns
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               pd.separation
        from flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
        left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by fc.process_id, fc.order_number
@@ -794,7 +798,33 @@
    <update id="updatePrintStateMp">
        update  pp.flow_card
        set print_status = #{printState}
        set print_status = print_status+1
        where process_id = #{processId} and technology_number = #{technologyNumber}
    </update>
    <select id="printFlowCardOrderSortMp">
        SELECT fc.process_id,
               fc.order_number,
               fc.technology_number,
               ogd.glass_address,
               ogd.child_width,
               ogd.child_height,
               fc.quantity,
               ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
               fc.sort
        FROM flow_card AS fc
                 LEFT JOIN sd.order_glass_detail AS ogd ON fc.order_id = ogd.order_id
            AND fc.order_number = ogd.order_number
            AND fc.technology_number = ogd.technology_number
        where fc.order_id=#{orderId}
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.technology_number)
    </select>
    <update id="printOrderSortMp">
        update flow_card
        set sort = #{sort}
        where process_id = #{processId}
          and order_number = #{orderNumber}
          and technology_number = #{technologyNumber}
    </update>
</mapper>