廖井涛
2025-04-16 7aac0b821663de152ef665a030ebbef1d34b41f2
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -531,7 +531,7 @@
    </select>
    <select id="selectPrintFlowCard">
        select op.project_no,glass_total,glass_total_area,labelPrintNum,processPrintNum
        select op.project_no,glass_total,glass_total_area,labelPrintNum,processPrintNum,glass_type,glass_thickness
        from pp.optimize_project as op
                 left join pp.flow_card as fc on op.project_no=fc.project_no
                 left join sd.`order` as o on o.order_id=fc.order_id
@@ -853,18 +853,18 @@
               o.project,
               od.building_number,
               od.processing_note,
               ogd.child_width         as width,
               ogd.child_height        as height,
               opd.o_width         as width,
               opd.o_height        as height,
               ogd.glass_child,
               ogd.process,
               e.type_name,
               opd.stock_id,
               opd.polys_id,
               od.quantity,
               IFNULL(od.quantity,1) as quantity,
               od.other_columns,
               od.bend_radius,
               od.order_number as heat_layout_id,
               a.id as heat_layout_sort,
               ifnull(od.order_number,0) as heat_layout_id,
               ifnull(a.id,0) as heat_layout_sort,
               od.product_name
        from pp.optimize_detail opd
                 left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id
@@ -912,7 +912,7 @@
                 left join sd.product p on od.product_id = p.id
                 left join sd.basic_glass_type e on e.type_id = p.type_id
                 left join sd.customer c on c.id = o.customer_id
        where opd.project_no = #{projectNo}
        where opd.project_no = #{projectNo} and o.order_id is not null
        order by opd.heat_layout_id, opd.heat_layout_sort desc
    </select>
@@ -2790,7 +2790,7 @@
                 left join
             (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a
             on a.process_id=opd.process_id
        where opd.project_no = #{projectNo}
        where opd.project_no = #{projectNo} and o.order_id is not null
        group by  order_id,od.order_number
        order by ogd.child_width desc,ogd.child_height desc
    </select>
@@ -2847,7 +2847,7 @@
                  left join sd.order_detail as od on od.order_id = SUBSTRING(fc.process_id,1,10)  and od.order_number = fc.order_sort
                  left join sd.`order` as o on o.order_id = SUBSTRING(fc.process_id,1,10)
                  left join pp.`flow_card` as fcd on fcd.process_id=fc.process_id and fcd.technology_number=ogd.technology_number and fcd.order_number=od.order_number
        where fc.project_no = #{printProject}
        where fc.project_no = #{printProject} and fc.process_id is not null and fc.process_id!=""
        GROUP BY fc.process_id, ogd.technology_number
        order by fc.process_id, ogd.technology_number
    </select>
@@ -3061,4 +3061,13 @@
    <select id="getOrderIdByProcessId">
        select order_id from pp.flow_card  where process_id = #{processId} limit 1;
    </select>
    <select id="flowCardDetailMergeMp">
        select merge from pp.flow_card where process_id = #{processId}  group by id ORDER BY merge desc LIMIT 1
    </select>
    <update id="updateFlowCardIsMerge">
        update  pp.flow_card fc set fc.merge=0
        where fc.process_id = #{processId}
    </update>
</mapper>