chenlu
2024-06-17 ca014b7e7ed13cf155c8a62296ea1a9fb64942da
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -49,6 +49,8 @@
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <!--    流程卡管理查询-->
    <select id="selectFlowCard" resultMap="flowCardMap">
        select
@@ -433,6 +435,7 @@
               fc.process_id,
               o.customer_name,
               o.project,
               fc.order_number,
               ogd.technology_number,
               ogd.glass_address,
               sum(od.quantity) as quantity,
@@ -463,7 +466,7 @@
               o.processing_note,
               fc.process_id,
               SUM( od.quantity) as quantity,
               SUM(ogd.total_area) as gross_area,
               round(SUM(ogd.total_area),2) as gross_area,
               SUM(od.weight) as weight,
               #{technologyNumber} as technologyNumber,
               concat(fc.process_id,'/',#{technologyNumber}) as  processIdNumber
@@ -480,7 +483,7 @@
    <select id="getDetailList">
        select fc.order_number,
               concat(ogd.child_width, "*", ogd.child_height) as child_width,
               concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
               od.quantity,
               round(ogd.total_area,2) as total_area,
               od.perimeter,
@@ -494,7 +497,7 @@
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by fc.process_id, fc.order_number
        order by fc.order_number
        order by IF(sort!=NULL||sort!='',sort,fc.order_number)
    </select>
    <select id="getProcessList">
@@ -545,15 +548,93 @@
        order by d.technology_number
    </select>
    <select id="selectPrintSetup">
        select id,
               print_type as printType,
               print_type_name as printTypeName,
               print_state as printState
        from pp.print_setup
    <select id="printFlowCardDetailsMp">
        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
        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.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
    </select>
    <update id="updatePrintSetup">
        update pp.print_setup set print_state=#{printState} where alias=#{alias}
    <update id="printSortMp">
        update flow_card
        set sort = #{sort}
        where process_id = #{processId}
          and order_number=#{orderNumber}
          and technology_number = #{technologyNumber}
    </update>
    <select id="selectType">
        select * from pp.tag_style
    </select>
<select id="getPrintTitle">
    select value from pp.tag_style as a where  a.name=#{type}
</select>
    <select id="getCustomLabelDetailMp">
        select #{name} from #{form} where order_id=#{id}
    </select>
    <resultMap id="orderDetial" type="com.example.erp.entity.sd.OrderDetail">
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="order_id" property="order.orderId"/>
        <result column="project" property="order.project"/>
        <result column="customer_id" property="order.customerId"/>
        <result column="customer_name" property="order.customerName"/>
        <result column="order_type" property="order.orderType"/>
        <result column="order_classify" property="order.orderClassify"/>
        <result column="batch" property="order.batch"/>
        <result column="icon" property="order.icon"/>
        <result column="pack_type" property="order.packType"/>
        <result column="delivery_date" property="order.deliveryDate"/>
        <result column="al_type" property="order.alType"/>
        <result column="money" property="order.money"/>
        <result column="contract_id" property="order.contractId"/>
        <result column="customer_batch" property="order.customerBatch"/>
        <result column="contacts" property="order.contacts"/>
        <result column="delivery_address" property="order.deliveryAddress"/>
        <result column="processing_note" property="processingNote"/>
        <result column="quantity" property="quantity"/>
    </resultMap>
    <select id="getPrintCustomData" resultMap="orderDetial">
        select o.order_id,
               project,
               customer_id,
               customer_name,
               order_type,
               order_classify,
               batch,
               icon,
               pack_type,
               delivery_date,
               al_type,
               money,
               contract_id,
               customer_batch,
               contacts,
               delivery_address,
               od.processing_note,
               width,
               height,
               od.quantity
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
        where o.order_id = #{orderId}
          and od.order_number = #{orderNumber}
    </select>
</mapper>