| | |
| | | <!-- create_time,create_user,update_time,--> |
| | | <!-- update_user,tenant_id--> |
| | | <!-- </sql>--> |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.pojo.DocumentationBorrowManagement"> |
| | | select *from documentation_borrow_management |
| | | <select id="listPage" resultType="com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto"> |
| | | select dbm.*,doc.doc_name,su.nick_name,sur.nick_name as return_nick_name |
| | | from documentation_borrow_management dbm |
| | | LEFT JOIN documentation doc on doc.id = dbm.documentation_id |
| | | LEFT JOIN sys_user su on su.user_id = dbm.borrower_id |
| | | LEFT JOIN sys_user sur on sur.user_id = dbm.returner_id |
| | | where 1=1 |
| | | <if test="documentationBorrowManagement.borrowStatus != null"> |
| | | and borrow_status = #{documentationBorrowManagement.borrowStatus} |
| | |
| | | <if test="documentationBorrowManagement.borrowerId != null"> |
| | | and borrower_id = #{documentationBorrowManagement.borrowerId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.returnerId != null"> |
| | | and returner_id = #{documentationBorrowManagement.returnerId} |
| | | </if> |
| | | <if test="documentationBorrowManagement.entryDateStart != null and documentationBorrowManagement.entryDateStart != ''"> |
| | | and borrow_date >= DATE_FORMAT(#{documentationBorrowManagement.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="export" resultType="com.ruoyi.warehouse.dto.DocumentationBorrowManagementDto"> |
| | | select dbm.*,doc.doc_name,su.nick_name |
| | | select dbm.*,doc.doc_name,su.nick_name,sur.nick_name as return_nick_name |
| | | from documentation_borrow_management dbm |
| | | LEFT JOIN documentation doc on doc.id = dbm.documentation_id |
| | | LEFT JOIN sys_user su on su.user_id = dbm.borrower_id |
| | | where 1=1 |
| | | LEFT JOIN sys_user sur on sur.user_id = dbm.returner_id |
| | | where sur.nick_name IS NOT NULL |
| | | <if test="documentationBorrowManagement.borrowStatus != null"> |
| | | and borrow_status = #{documentationBorrowManagement.borrowStatus} |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="exportrevent" resultType="com.ruoyi.warehouse.dto.ReturnExportDto"> |
| | | select dbm.*,doc.doc_name,su.nick_name,su.nick_name as return_nick_name |
| | | select dbm.*,doc.doc_name,su.nick_name,sur.nick_name as return_nick_name |
| | | from documentation_borrow_management dbm |
| | | LEFT JOIN documentation doc on doc.id = dbm.documentation_id |
| | | LEFT JOIN sys_user su on su.user_id = dbm.borrower_id |
| | | where 1=1 |
| | | LEFT JOIN sys_user sur on sur.user_id = dbm.returner_id |
| | | where sur.nick_name IS NOT NULL |
| | | <if test="documentationBorrowManagement.borrowStatus != null"> |
| | | and borrow_status = #{documentationBorrowManagement.borrowStatus} |
| | | </if> |