From 5fa6e6f8410ef9d057174bcff2a3c5038c54a551 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期日, 27 四月 2025 18:41:20 +0800 Subject: [PATCH] bug修改 --- ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 56 insertions(+), 2 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml index 56ca1b4..890c59c 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TFaultRepairMessageMapper.xml @@ -61,11 +61,13 @@ t.attachment, t.attachment_name, t.status, + t.code, t.create_time, t.update_time, t.create_by, t.update_by, t.disabled, + t.fault_cause, i.item_name AS itemName, it.type_name AS itemTypeName, tnt.resident_name AS residentName @@ -103,6 +105,7 @@ t.create_by, t.update_by, t.disabled, + t.code, i.item_name AS itemName, it.type_name AS itemTypeName, tnt.resident_name AS residentName @@ -110,9 +113,10 @@ LEFT JOIN t_item i ON t.item_id = i.id LEFT JOIN t_item_type it ON t.item_type_id = it.id LEFT JOIN t_tenant tnt ON t.tenant_id = tnt.id + LEFT JOIN t_contract tc ON t.contract_id = tc.id <where> - <if test="query.tenantId != null and query.tenantId != ''"> - AND t.tenant_id = #{query.tenantId} + <if test="query.residentName != null and query.residentName != ''"> + AND tnt.resident_name LIKE CONCAT('%', #{query.residentName}, '%') </if> <if test="query.contactNumber != null and query.contactNumber != ''"> AND t.contact_number LIKE CONCAT('%', #{query.contactNumber}, '%') @@ -126,6 +130,56 @@ <if test="query.handlePerson != null and query.handlePerson != ''"> AND t.handle_person LIKE CONCAT('%', #{query.handlePerson}, '%') </if> + <if test="query.businessDeptId != null and query.businessDeptId != '' and query.businessDeptId != 0"> + AND tc.business_dept_id = #{query.businessDeptId} + </if> + AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + </where> + ORDER BY t.create_time DESC + </select> + <select id="pageListApplet" resultType="com.ruoyi.system.vo.TFaultRepairMessageVO"> + SELECT + t.id, + t.tenant_id, + t.item_id, + t.item_type_id, + t.contract_id, + t.fault_area_name, + t.describe_name, + t.describe_detail, + t.fault_pictures, + t.service_address, + t.repair_type, + t.visit_time, + t.contact_number, + t.leave_message, + t.handle_person, + t.handle_time, + t.result_describe, + t.repair_picture, + t.attachment, + t.attachment_name, + t.status, + t.create_time, + t.update_time, + t.create_by, + t.update_by, + t.disabled, + t.code, + i.item_name AS itemName, + it.type_name AS itemTypeName, + tnt.resident_name AS residentName + from t_fault_repair_message t + LEFT JOIN t_item i ON t.item_id = i.id + LEFT JOIN t_item_type it ON t.item_type_id = it.id + LEFT JOIN t_tenant tnt ON t.tenant_id = tnt.id + <where> + <if test="query.houseAddress != null and query.houseAddress != ''"> + AND t.service_address LIKE CONCAT('%', #{query.houseAddress}, '%') + </if> + <if test="query.status != null"> + AND t.status = #{query.status} + </if> AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} </where> ORDER BY t.create_time DESC -- Gitblit v1.7.1