| | |
| | | T1.payment_method, |
| | | T1.delivery_date, |
| | | DATEDIFF(T1.delivery_date, CURDATE()) AS delivery_days_diff, |
| | | COALESCE(T1.stock_type, 'qualified') AS stock_type, |
| | | IFNULL(shipping_status_counts.is_all_shipped, FALSE) AS is_fh |
| | | FROM sales_ledger T1 |
| | | LEFT JOIN sys_user T2 ON T1.entry_person = T2.user_id |
| | |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' "> |
| | | AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | |
| | | <if test="salesLedgerDto.stockType != null and salesLedgerDto.stockType != '' "> |
| | | AND COALESCE(T1.stock_type, 'qualified') = #{salesLedgerDto.stockType} |
| | | </if> |
| | | </where> |
| | | order by T1.entry_date desc |
| | |
| | | and c.customer_name like concat('%',#{customerName},'%') |
| | | </if> |
| | | </where> |
| | | order by sl.create_time desc |
| | | order by sl.entry_date desc |
| | | </select> |
| | | |
| | | </mapper> |