| | |
| | | order by t1.repair_status, t1.urgency_level asc |
| | | </select> |
| | | |
| | | <!-- 分页查询维修记录列表 --> |
| | | <select id="getRepairRecordPageList" resultType="com.ruoyi.system.vo.asset.AssetRepairRecordPageVO"> |
| | | SELECT |
| | | arr.repair_no AS repairNo, |
| | | arr.title, |
| | | pt.type_name AS assetTypeFirstLevel, |
| | | ct.type_name AS assetTypeSecondLevel, |
| | | u.nick_name AS reporterName, |
| | | arr.total_fee AS totalFee, |
| | | arr.repair_time AS repairTime, |
| | | arr.repair_status AS repairStatus |
| | | FROM asset_repair_record arr |
| | | LEFT JOIN asset_repair_request req ON arr.repair_request_id = req.id |
| | | LEFT JOIN sys_user u ON req.reporter_id = u.user_id |
| | | LEFT JOIN asset_type ct ON arr.asset_type_id = ct.id |
| | | LEFT JOIN asset_type pt ON ct.parent_id = pt.id |
| | | LEFT JOIN t_dept d ON u.dept_id = d.id |
| | | WHERE arr.disabled = 0 |
| | | <if test="query.keyword != null and query.keyword != ''"> |
| | | AND (arr.repair_no LIKE CONCAT('%', #{query.keyword}, '%') |
| | | OR arr.title LIKE CONCAT('%', #{query.keyword}, '%')) |
| | | </if> |
| | | <if test="query.deptId != null"> |
| | | AND (d.id = #{query.deptId} OR FIND_IN_SET(#{query.deptId}, d.parent_id)) |
| | | </if> |
| | | ORDER BY arr.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |