xuhy
2025-04-27 5fa6e6f8410ef9d057174bcff2a3c5038c54a551
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,6 +113,7 @@
                 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.residentName != null and query.residentName != ''">
                AND tnt.resident_name LIKE CONCAT('%', #{query.residentName}, '%')
@@ -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