liding
2026-04-24 47cbc59169b787e8a5f9c6969e2a0259c06249ca
src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -12,7 +12,11 @@
        <result property="npsNo" column="nps_no"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="expectedSchedule" column="expected_schedule"/>
        <result property="manufacturingTeam" column="manufacturing_team"/>
        <result property="isEnd" column="is_end"/>
    </resultMap>
    <select id="pageProductOrder" resultType="com.ruoyi.production.dto.ProductOrderDto">
        select po.*,
        sl.sales_contract_no,
@@ -20,7 +24,9 @@
        p.product_name as product_category,
        pm.model as specification_model,
        pm.unit,
        pm.uid_no,
        ppr.process_route_code,
        pb.id as bomId,
        pb.bom_no,
        ROUND(po.complete_quantity / po.quantity * 100, 2) AS completionStatus,
        DATEDIFF(sl.delivery_date, CURDATE()) AS delivery_days_diff,
@@ -41,7 +47,7 @@
        ) shipping_status_counts ON sl.id = shipping_status_counts.sales_ledger_id
            left join product_model pm on po.product_model_id = pm.id
            left join product p on pm.product_id = p.id
        left join sales_ledger_product slp on po.sale_ledger_product_id = slp.id
        left join sales_ledger_product slp on po.sale_ledger_product_id = slp.id and slp.type = 1
        left join product_process_route ppr on po.id = ppr.product_order_id
        left join product_bom pb on pb.id = ppr.bom_id
        <where>
@@ -55,10 +61,10 @@
                and sl.customer_name like concat('%',#{c.customerName},'%')
            </if>
            <if test="c.productCategory != null and c.productCategory != ''">
                and slp.product_category like concat('%',#{c.productCategory},'%')
                and p.product_name like concat('%',#{c.productCategory},'%')
            </if>
            <if test="c.specificationModel != null and c.specificationModel != ''">
                and slp.specification_model like concat('%',#{c.specificationModel},'%')
                and pm.model like concat('%',#{c.specificationModel},'%')
            </if>
            <if test="c.startTime != null and c.endTime != null">
                and po.create_time between #{c.startTime} and #{c.endTime}
@@ -81,6 +87,7 @@
               p.product_name,
               pp.name as  process_name,
               pm.product_id,
               pm.uid_no,
               pm.model
        from
            product_structure ps