| | |
| | | pb.bom_no AS bomNo, |
| | | ROUND(po.complete_quantity / po.quantity * 100, 2) AS completionStatus, |
| | | pms.model, |
| | | pms.material_code AS materialCode |
| | | pms.material_code AS materialCode, |
| | | pms.id AS productId |
| | | FROM product_order po |
| | | LEFT JOIN process_route pr ON po.route_id = pr.id |
| | | LEFT JOIN product_bom pb ON pr.bom_id = pb.id |
| | |
| | | <if test="c.startTime != null and c.endTime != null"> |
| | | AND po.create_time BETWEEN #{c.startTime} AND #{c.endTime} |
| | | </if> |
| | | <if test="c.status != null"> |
| | | AND po.status = #{c.status} |
| | | </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> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="listProcessRoute" resultType="com.ruoyi.production.pojo.ProcessRoute"> |
| | | select pr.* |
| | | from process_route pr |