| | |
| | | SUM(t1.total_price) AS totalPrice, |
| | | t1.unit_price, |
| | | SUM(t1.inbound_num) AS inboundNum, |
| | | SUM(t1.inbound_num) AS inboundNum0, |
| | | (SUM(t1.inbound_num) - IFNULL(SUM(t4.total_outbound_num), 0)) AS inboundNum0, |
| | | MAX(t1.create_time) AS create_time, |
| | | MAX(t1.update_time) AS update_time, |
| | | GROUP_CONCAT(DISTINCT t1.create_by) AS create_by, |
| | |
| | | WHERE type = 2 |
| | | GROUP BY procurement_record_storage_id |
| | | ) t4 ON t1.id = t4.procurement_record_storage_id |
| | | WHERE t1.type = 2 |
| | | <where> |
| | | t1.type = 2 |
| | | <if test="req.customerName != null and req.customerName != ''"> |
| | | and t3.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |