修正征信维护列表筛选与上传展示逻辑

This commit is contained in:
wkc
2026-03-24 14:00:21 +08:00
parent 47eed3e63c
commit 8fa1b6e098
10 changed files with 160 additions and 26 deletions

View File

@@ -29,6 +29,7 @@
) debt_agg ON debt_agg.person_id = s.id_card
LEFT JOIN ccdi_credit_negative_info neg ON neg.person_id = s.id_card
<where>
AND (debt_agg.person_id IS NOT NULL OR neg.person_id IS NOT NULL)
<if test="query != null and query.name != null and query.name != ''">
AND s.name LIKE CONCAT('%', #{query.name}, '%')
</if>
@@ -38,13 +39,6 @@
<if test="query != null and query.idCard != null and query.idCard != ''">
AND s.id_card LIKE CONCAT('%', #{query.idCard}, '%')
</if>
<if test="query != null and query.maintained == '1'">
AND (debt_agg.person_id IS NOT NULL OR neg.person_id IS NOT NULL)
</if>
<if test="query != null and query.maintained == '0'">
AND debt_agg.person_id IS NULL
AND neg.person_id IS NULL
</if>
</where>
ORDER BY debt_agg.query_date DESC, s.staff_id DESC
</select>

View File

@@ -0,0 +1,24 @@
package com.ruoyi.info.collection.mapper;
import org.junit.jupiter.api.Test;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
class CcdiCreditInfoQueryMapperXmlTest {
@Test
void selectCreditInfoPage_shouldOnlyQueryMaintainedCreditInfo() throws Exception {
Path xmlPath = Path.of("src/main/resources/mapper/info/collection/CcdiCreditInfoQueryMapper.xml");
String source = Files.readString(xmlPath, StandardCharsets.UTF_8);
assertTrue(source.contains("AND (debt_agg.person_id IS NOT NULL OR neg.person_id IS NOT NULL)"),
"征信维护列表必须默认只返回已维护征信的员工");
assertFalse(source.contains("query.maintained == '0'"),
"征信维护列表不应再支持未维护员工列表");
}
}