From deff787716b00b4f491de429ba092915d7fa1a9e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 27 三月 2026 13:07:05 +0800
Subject: [PATCH] 过程检数据查询+原有生产订单表增加产品规格id
---
src/main/resources/mapper/production/ProductionProductRouteItemMapper.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductionProductRouteItemMapper.xml b/src/main/resources/mapper/production/ProductionProductRouteItemMapper.xml
index bae946b..a56128c 100644
--- a/src/main/resources/mapper/production/ProductionProductRouteItemMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductRouteItemMapper.xml
@@ -14,5 +14,54 @@
<result column="update_time" property="updateTime"/>
<result column="tenant_id" property="tenantId"/>
</resultMap>
+ <select id="processPage" resultType="com.ruoyi.quality.dto.ProcessPageDto">
+ select ppri.id ProductionProductRouteItemId,
+ ppri.create_time,
+ ppm.product_no,
+ po.nps_no,
+ pp.name process,
+ ppri.post_name,
+ ppm.schedule,
+ pms.material_code,
+ pm.product_name,
+ pms.model,
+ po.strength,
+ ppo.quantity qualifiedQuantity,
+ ppo.scrap_qty unqualifiedQuantity,
+ ppo.quantity + ppo.scrap_qty quantity
+ from production_product_route_item ppri
+ left join production_product_main ppm on ppri.product_main_id = ppm.id
+ left join production_product_output ppo on ppo.product_main_id = ppm.id
+ left join product_order po on ppm.product_order_id = po.id
+ left join product_process pp on ppri.process_id = pp.id
+ left join product_material_sku pms on pms.id = po.product_material_sku_id
+ left join product_material pm on pm.id = pms.product_id
+ where 1=1
+ <if test="c.npsNo != null and c.npsNo != ''">
+ AND po.nps_no LIKE CONCAT('%', #{c.npsNo}, '%')
+ </if>
+ <if test="c.process != null and c.process != ''">
+ AND pp.name LIKE CONCAT('%', #{c.process}, '%')
+ </if>
+ <if test="c.productNo != null and c.productNo != ''">
+ AND ppm.product_no LIKE CONCAT('%', #{c.productNo}, '%')
+ </if>
+ <if test="c.productName != null and c.productName != ''">
+ AND pm.product_name LIKE CONCAT('%', #{c.productName}, '%')
+ </if>
+ <if test="c.materialCode != null and c.materialCode != ''">
+ AND pms.material_code LIKE CONCAT('%', #{c.materialCode}, '%')
+ </if>
+ <if test="c.model != null and c.model != ''">
+ AND pms.model LIKE CONCAT('%', #{c.model}, '%')
+ </if>
+ <if test="c.strength != null and c.strength != ''">
+ AND po.strength = #{c.strength}
+ </if>
+ <if test="c.startTime != null and c.endTime != null">
+ AND po.create_time BETWEEN #{c.startTime} AND #{c.endTime}
+ </if>
+ order by ppri.id desc
+ </select>
</mapper>
--
Gitblit v1.9.3