feat(election): server-side pagination, family loan CEO pre-check, extended checks
- PagedResponse<T>: generic paginated wrapper with statusCounts and summary fields - ElectionConfigRepository: pageable query + countGroupByStatus - ElectionNominationRepository: pageable queries + count-by-status helpers - ElectionCandidateRepository: pageable queries by election and post - ElectionReadPlatformService: all list methods return PagedResponse with page/size params - ElectionReadPlatformServiceImpl: add missing Pageable import; paginated impls with summary data - API resources: @QueryParam page/size with @DefaultValue on all 3 list endpoints - ElectionCeoPrecheck: add familyLoanCheckResult + familyLoanCheckRemarks (7th auto-check) - ElectionCeoPreCheckServiceImpl: fix directorLoan check (overdue only); add family loan check covering manual members (unverifiable→FAIL) and linked CBS clients (overdue→FAIL) - Liquibase 0338/0339: extended CEO pre-check columns + family loan check columns - changelog-tenant.xml: include both new changesets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
fc80869d4b
commit
ed139d6e68
@@ -365,4 +365,6 @@
|
||||
<include file="parts/0335_create_bank_transfer_log.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0336_add_request_type_to_clerk_disbursement.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0337_create_election_module.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0338_election_ceo_precheck_extended_checks.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0339_election_ceo_precheck_family_loan_check.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<changeSet id="0338_add_kyc_check_to_ceo_precheck" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_election_ceo_precheck" columnName="kyc_check_result"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_election_ceo_precheck">
|
||||
<column name="kyc_check_result" type="VARCHAR(20)" defaultValue="PENDING">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="kyc_check_remarks" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0338_add_family_kyc_check_to_ceo_precheck" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_election_ceo_precheck" columnName="family_kyc_check_result"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_election_ceo_precheck">
|
||||
<column name="family_kyc_check_result" type="VARCHAR(20)" defaultValue="PENDING">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="family_kyc_check_remarks" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0338_add_guarantor_check_to_ceo_precheck" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_election_ceo_precheck" columnName="guarantor_check_result"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_election_ceo_precheck">
|
||||
<column name="guarantor_check_result" type="VARCHAR(20)" defaultValue="PENDING">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="guarantor_check_remarks" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0338_add_aml_check_to_ceo_precheck" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_election_ceo_precheck" columnName="aml_check_result"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_election_ceo_precheck">
|
||||
<column name="aml_check_result" type="VARCHAR(20)" defaultValue="PENDING">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="aml_check_remarks" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
|
||||
<!-- Migrate existing nomination records with removed statuses -->
|
||||
<changeSet id="0338_migrate_nomination_statuses" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_election_nomination"/>
|
||||
</preConditions>
|
||||
<!-- DRAFT → SUBMITTED (never submitted, treat as submitted) -->
|
||||
<update tableName="m_election_nomination">
|
||||
<column name="status" value="SUBMITTED"/>
|
||||
<where>status = 'DRAFT'</where>
|
||||
</update>
|
||||
<!-- CEO_CHECK_PENDING → UNDER_REVIEW (was in check phase, re-run check) -->
|
||||
<update tableName="m_election_nomination">
|
||||
<column name="status" value="UNDER_REVIEW"/>
|
||||
<where>status = 'CEO_CHECK_PENDING'</where>
|
||||
</update>
|
||||
<!-- CEO_APPROVED → APPROVAL_PENDING (checks passed, board approval pending) -->
|
||||
<update tableName="m_election_nomination">
|
||||
<column name="status" value="APPROVAL_PENDING"/>
|
||||
<where>status = 'CEO_APPROVED'</where>
|
||||
</update>
|
||||
<!-- CEO_REJECTED → REJECTED (failed checks) -->
|
||||
<update tableName="m_election_nomination">
|
||||
<column name="status" value="REJECTED"/>
|
||||
<where>status = 'CEO_REJECTED'</where>
|
||||
</update>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<changeSet id="0339_add_family_loan_check_to_ceo_precheck" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_election_ceo_precheck" columnName="family_loan_check_result"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_election_ceo_precheck">
|
||||
<column name="family_loan_check_result" type="VARCHAR(20)" defaultValue="PENDING">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="family_loan_check_remarks" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user