| | |
| | | <if test="c.model != null and c.model != '' "> |
| | | AND pms.model LIKE CONCAT('%',#{c.model},'%') |
| | | </if> |
| | | <if test="c.status != null"> |
| | | AND pp.status =#{c.status} |
| | | </if> |
| | | <if test="c.applyNo != null and c.applyNo != '' "> |
| | | AND pp.apply_no LIKE CONCAT('%',#{c.applyNo},'%') |
| | | </if> |
| | |
| | | pp.height, |
| | | pm.unit AS unit, |
| | | COALESCE(SUM(pp.quantity),0) AS quantity, |
| | | COALESCE(SUM(pp.volume),0) AS volume |
| | | COALESCE(SUM(pp.volume-pp.assigned_quantity),0) AS volume |
| | | FROM production_plan pp |
| | | LEFT JOIN product_material_sku sku |
| | | ON pp.product_material_sku_id = sku.id |
| | | LEFT JOIN product_material pm |
| | | ON sku.product_id = pm.id |
| | | <where> |
| | | where |
| | | pp.status!=2 |
| | | <if test="materialCode != null and materialCode != ''"> |
| | | AND sku.material_code LIKE CONCAT('%', #{materialCode}, '%') |
| | | </if> |
| | |
| | | <if test="model != null and model != ''"> |
| | | AND sku.model LIKE CONCAT('%', #{model}, '%') |
| | | </if> |
| | | </where> |
| | | GROUP BY |
| | | sku.material_code, |
| | | pm.product_name, |
| | |
| | | </foreach> |
| | | ORDER BY pp.id ASC |
| | | </select> |
| | | </mapper> |
| | | </mapper> |