guoyuji
2024-07-05 4098ea2b95d6da283ac62f2ebb30ce37fe0d6d3f
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -63,6 +63,7 @@
        sum(c.compute_gross_area) as compute_gross_area,
        a.founder,
        c.processing_note,
        b.customer_name,
        if(a.layout_status=0,'不可排版',if(a.layout_status=1,'可排版','已排版')) as layout_status
        from (select id,order_id,process_id,order_number, quantity,founder,layout_status,create_time from flow_card
        group by process_Id,order_number) as a left join sd.`order` as b on a.order_Id=b.order_id
@@ -93,7 +94,9 @@
        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '已排版'">
            and a.layout_status regexp 2
        </if>
        <if test="flowCard.order.customerName != null and flowCard.order.customerName!= ''">
            and b.customer_name regexp #{flowCard.order.customerName}
        </if>
        group by a.process_Id
        ORDER BY a.id desc
        limit #{offset},#{pageSize};
@@ -459,7 +462,9 @@
               od.product_name,
               ogd.glass_child,
               fc.founder,
               date(fc.splitFrame_time) as splitFrame_time
               date(fc.splitFrame_time) as splitFrame_time,
              /* if(fc.print_status=0,'未打印','已打印') as  print_status*/
        fc.print_status
        from flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
@@ -483,7 +488,7 @@
               fc.process_id,
               SUM(od.quantity)                                as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               round(SUM(ogd.child_width*ogd.child_height*od.quantity*p.thickness/1000000*2.5),2)                   as weight,
               sum(od.weight)                   as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber
        from flow_card as fc
@@ -505,7 +510,7 @@
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               od.remarks
               concat(od.processing_note,od.remarks) as remarks
        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
@@ -551,7 +556,8 @@
               ogd.glass_child,
               e.type_name,
               opd.stock_id,
               od.quantity
               od.quantity,
               od.other_columns
        from pp.optimize_detail opd
                 left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id
                 left join sd.order_detail od
@@ -575,7 +581,10 @@
               fc.technology_number as technologyNumber,
               ogd.glass_child,
               c.customer_abbreviation as customer_name,
               ifnull(od.processing_note,'') as processing_note
               ifnull(od.processing_note,'') as processing_note,
               bgt.type_name,
               od.other_columns,
               od.building_number
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number
@@ -583,6 +592,7 @@
                                                 od.order_number = fc.order_number and fc.technology_number=ogd.technology_number
                 left join sd.product pt on pt.id=od.product_id
                 left join sd.customer c on c.id=o.customer_id
                 left join sd.basic_glass_type bgt on bgt.type_id=pt.type_id
        where fc.process_id = #{processId}
          and fc.technology_number=#{technologyNumber}
        group by od.order_number,od.width,od.height
@@ -684,7 +694,8 @@
               od.product_name      as productName,
               od.edging_type       as edgingType,
               p.remarks,
               c.customer_abbreviation as customerAbbreviation
               c.customer_abbreviation as customerAbbreviation,
               od.other_columns
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
@@ -778,4 +789,9 @@
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.order_number)
    </select>
    <update id="updatePrintStateMp">
        update  pp.flow_card
        set print_status = #{printState}
        where process_id = #{processId} and technology_number = #{technologyNumber}
    </update>
</mapper>