| | |
| | | <if test="req.status != null and req.status "> |
| | | AND slp.pending_tickets_total > 0 |
| | | </if> |
| | | <if test="req.supplierNameOrContractNo != null and req.supplierNameOrContractNo != ''"> |
| | | AND (sl.supplier_name like concat('%',#{req.supplierNameOrContractNo},'%') or |
| | | sl.purchase_contract_number like concat('%',#{req.supplierNameOrContractNo},'%')) |
| | | </if> |
| | | </where> |
| | | order by slp.register_date desc |
| | | </select> |
| | |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | AND slp.product_category = #{req.productCategory} |
| | | </if> |
| | | <!-- 按产品大类分组聚合 --> |
| | | GROUP BY slp.product_category |
| | | <!-- 按产品大类排序 --> |
| | | GROUP BY slp.product_category, slp.specification_model, sl.supplier_name |
| | | ORDER BY slp.product_category |
| | | </select> |
| | | <select id="selectProductBomStructure" resultType="com.ruoyi.sales.dto.LossProductModelDto"> |