From bb5ce8ef60a63815f222716c40111bd045464689 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 30 九月 2025 18:32:10 +0800 Subject: [PATCH] 资产维修记录列表查询接口 --- ruoyi-system/src/main/resources/mapper/system/AssetRepairRecordMapper.xml | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/AssetRepairRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AssetRepairRecordMapper.xml index a1b48a1..facab9f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/AssetRepairRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/AssetRepairRecordMapper.xml @@ -36,4 +36,32 @@ 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> -- Gitblit v1.7.1