| | |
| | | AND A.collection_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | |
| | | order by A.id desc |
| | | </select> |
| | | <select id="existsByStockOutRecordId" resultType="java.lang.Boolean"> |
| | | SELECT COUNT(*) > 0 |
| | |
| | | GROUP BY dateStr |
| | | ORDER BY dateStr |
| | | </select> |
| | | <select id="selectStockOutRecordIdsBySalesLedgerId" resultType="java.lang.Long"> |
| | | SELECT sor.id |
| | | FROM stock_out_record sor |
| | | JOIN shipping_info s ON sor.record_id = s.id |
| | | WHERE s.sales_ledger_id = #{salesLedgerId} |
| | | AND sor.record_type = '13' |
| | | AND sor.approval_status = 1 |
| | | </select> |
| | | |
| | | </mapper> |