| | |
| | | <if test="params.productName != null and params.productName != ''"> |
| | | and p.product_name like concat('%',#{params.productName},'%') |
| | | </if> |
| | | <if test="params.model != null and params.model != ''"> |
| | | and pm.model like concat('%',#{params.model},'%') |
| | | </if> |
| | | <if test="params.batchNo != null and params.batchNo != ''"> |
| | | and sor.batch_no like concat('%',#{params.batchNo},'%') |
| | | </if> |
| | | <if test="params.type != null and params.type != ''"> |
| | | and sor.type = #{params.type} |
| | | </if> |
| | |
| | | order by sor.id desc |
| | | </select> |
| | | |
| | | <select id="listPageAccountSales" resultType="com.ruoyi.account.bean.vo.SalesOutboundVo"> |
| | | <select id="listPageAccountSales" resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo"> |
| | | SELECT |
| | | sor.id, |
| | | sor.outbound_batches, |
| | | sl.customer_name, |
| | | s.shipping_date, |
| | | sor.create_time as shippingDate, |
| | | p.product_name, |
| | | pm.model as specification_model, |
| | | sor.stock_out_num * slp.tax_inclusive_unit_price as outboundAmount, |
| | |
| | | LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1 |
| | | left join product_model pm on slp.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | WHERE s.status='已发货' and sor.record_type='13' |
| | | WHERE sor.record_type='13' and sor.approval_status=1 |
| | | <if test="req.outboundBatches != null and req.outboundBatches != ''"> |
| | | AND sor.outbound_batches LIKE CONCAT('%',#{req.outboundBatches},'%') |
| | | </if> |
| | |
| | | AND sl.customer_name LIKE CONCAT('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.startDate != null and req.endDate != null"> |
| | | AND s.shipping_date BETWEEN #{startDate} AND #{endDate} |
| | | AND s.shipping_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | order by sor.id DESC |
| | | </select> |