From 3cd8fb915fbe0b7a3ac3ce0caf0978515a969ebc Mon Sep 17 00:00:00 2001 From: "vluk@2fi-solutions.com.hk" Date: Sun, 26 Oct 2025 02:11:43 +0800 Subject: [PATCH] no message --- .../modules/lioner/client/entity/Client.java | 851 ++++++++++++++++++ .../lioner/client/req/UpdateClientReq.java | 761 ++++++++++++++++ .../lioner/client/service/ClientService.java | 70 +- .../commonField/entity/CommonField.java | 1 - .../lioner/pdf/service/PdfService.java | 54 +- .../changes/33_client_json/01_add_json.sql | 6 + .../34_client_income1/01_add_income1.sql | 11 + .../34_client_income1/02_edit_income1.sql | 7 + .../34_client_income1/03_add_income2.sql | 75 ++ 9 files changed, 1735 insertions(+), 101 deletions(-) create mode 100644 src/main/resources/db/changelog/changes/33_client_json/01_add_json.sql create mode 100644 src/main/resources/db/changelog/changes/34_client_income1/01_add_income1.sql create mode 100644 src/main/resources/db/changelog/changes/34_client_income1/02_edit_income1.sql create mode 100644 src/main/resources/db/changelog/changes/34_client_income1/03_add_income2.sql diff --git a/src/main/java/com/ffii/lioner/modules/lioner/client/entity/Client.java b/src/main/java/com/ffii/lioner/modules/lioner/client/entity/Client.java index d98e8cf..060ff91 100644 --- a/src/main/java/com/ffii/lioner/modules/lioner/client/entity/Client.java +++ b/src/main/java/com/ffii/lioner/modules/lioner/client/entity/Client.java @@ -1,6 +1,11 @@ package com.ffii.lioner.modules.lioner.client.entity; import java.time.LocalDate; +import java.util.HashMap; +import java.util.Map; + +import org.hibernate.annotations.JdbcTypeCode; +import org.hibernate.type.SqlTypes; import com.ffii.core.entity.BaseEntity; @@ -76,9 +81,240 @@ public class Client extends BaseEntity{ @Column private String crAddressCountry; + @Column(columnDefinition = "json") + @JdbcTypeCode(SqlTypes.JSON) + private Map others = new HashMap<>(); + @Column private String crAddressPostalCode; + @Column + private String salaryCurrent; + + @Column + private String salaryLast; + + @Column + private String bonusCurrent; + + @Column + private String bonusLast; + + @Column + private String otherEarnedCurrent; + + @Column + private String otherEarnedLast; + + @Column + private String companyInterestCurrent; + + @Column + private String companyInterestLast; + + @Column + private String dividendsCurrent; + + @Column + private String dividendsLast; + + @Column + private String rentalsCurrent; + + @Column + private String rentalsLast; + + @Column + private String investmentIncomeCurrent; + + @Column + private String investmentIncomeLast; + + @Column + private String otherUnearnedCurrent; + + @Column + private String otherUnearnedLast; + + @Column + private String mortgageCurrent; + + @Column + private String mortgageLast; + + @Column + private String rentCurrent; + + @Column + private String rentLast; + + @Column + private String schoolingCurrent; + + @Column + private String schoolingLast; + + @Column + private String membershipsCurrent; + + @Column + private String membershipsLast; + + @Column + private String otherExpenditureCurrent; + + @Column + private String otherExpenditureLast; + + @Column + private String cashDepositsCurrent; + + @Column + private String cashDepositsLast; + + @Column + private String investmentsCurrent; + + @Column + private String investmentsLast; + + @Column + private String otherLiquidCurrent; + + @Column + private String otherLiquidLast; + + @Column + private String netBusinessInterestCurrent; + + @Column + private String netBusinessInterestLast; + + @Column + private String personalPropertiesCurrent; + + @Column + private String personalPropertiesLast; + + @Column + private String otherNonLiquidCurrent; + + @Column + private String otherNonLiquidLast; + + @Column + private String personalLoansCurrent; + + @Column + private String personalLoansLast; + + @Column + private String mortgagesCurrent; + + @Column + private String mortgagesLast; + + @Column + private String marginAccountCurrent; + + @Column + private String marginAccountLast; + + @Column + private String loanGuaranteesCurrent; + + @Column + private String loanGuaranteesLast; + + @Column + private String bankingFacilityCurrent; + + @Column + private String bankingFacilityLast; + + @Column + private String prefFinancePrincipalCurrent; + + @Column + private String prefFinancePrincipalLast; + + @Column + private String prefFinanceOtherCurrent; + + @Column + private String prefFinanceOtherLast; + + @Column + private String interestCurrent; + + @Column + private String interestLast; + + @Column + private String principalCurrent; + + @Column + private String principalLast; + + @Column + private String otherPrefFinanceCurrent; + + @Column + private String otherPrefFinanceLast; + + @Column + private String totalEarnedCurrent; + + @Column + private String totalEarnedLast; + + @Column + private String totalUnearnedCurrent; + + @Column + private String totalUnearnedLast; + + @Column + private String totalIncomeCurrent; + + @Column + private String totalIncomeLast; + + @Column + private String totalExpenditureCurrent; + + @Column + private String totalExpenditureLast; + + @Column + private String totalLiquidAssetCurrent; + + @Column + private String totalLiquidAssetLast; + + @Column + private String totalNonLiquidAssetCurrent; + + @Column + private String totalNonLiquidAssetLast; + + @Column + private String totalAssetsCurrent; + + @Column + private String totalAssetsLast; + + @Column + private String totalLiabilitiesCurrent; + + @Column + private String totalLiabilitiesLast; + + @Column + private String totalFinalExpenditureCurrent; + + @Column + private String totalFinalExpenditureLast; public String getClientCode() { return clientCode; @@ -240,6 +476,621 @@ public class Client extends BaseEntity{ this.crAddressPostalCode = crAddressPostalCode; } + public Map getOthers() { + return others; + } + + public void setOthers(Map others) { + this.others = others; + } + + public String getSalaryCurrent() { + return salaryCurrent; + } + + public void setSalaryCurrent(String salaryCurrent) { + this.salaryCurrent = salaryCurrent; + } + + public String getSalaryLast() { + return salaryLast; + } + + public void setSalaryLast(String salaryLast) { + this.salaryLast = salaryLast; + } + + public String getBonusCurrent() { + return bonusCurrent; + } + + public void setBonusCurrent(String bonusCurrent) { + this.bonusCurrent = bonusCurrent; + } + + public String getBonusLast() { + return bonusLast; + } + + public void setBonusLast(String bonusLast) { + this.bonusLast = bonusLast; + } + + public String getTotalEarnedCurrent() { + return totalEarnedCurrent; + } + + public void setTotalEarnedCurrent(String totalEarnedCurrent) { + this.totalEarnedCurrent = totalEarnedCurrent; + } + + public String getTotalEarnedLast() { + return totalEarnedLast; + } + + public void setTotalEarnedLast(String totalEarnedLast) { + this.totalEarnedLast = totalEarnedLast; + } + + public String getOtherEarnedCurrent() { + return otherEarnedCurrent; + } + + public void setOtherEarnedCurrent(String otherEarnedCurrent) { + this.otherEarnedCurrent = otherEarnedCurrent; + } + + public String getOtherEarnedLast() { + return otherEarnedLast; + } + + public void setOtherEarnedLast(String otherEarnedLast) { + this.otherEarnedLast = otherEarnedLast; + } + + public String getCompanyInterestCurrent() { + return companyInterestCurrent; + } + + public void setCompanyInterestCurrent(String companyInterestCurrent) { + this.companyInterestCurrent = companyInterestCurrent; + } + + public String getCompanyInterestLast() { + return companyInterestLast; + } + + public void setCompanyInterestLast(String companyInterestLast) { + this.companyInterestLast = companyInterestLast; + } + + public String getDividendsCurrent() { + return dividendsCurrent; + } + + public void setDividendsCurrent(String dividendsCurrent) { + this.dividendsCurrent = dividendsCurrent; + } + + public String getDividendsLast() { + return dividendsLast; + } + + public void setDividendsLast(String dividendsLast) { + this.dividendsLast = dividendsLast; + } + + public String getRentalsCurrent() { + return rentalsCurrent; + } + + public void setRentalsCurrent(String rentalsCurrent) { + this.rentalsCurrent = rentalsCurrent; + } + + public String getRentalsLast() { + return rentalsLast; + } + + public void setRentalsLast(String rentalsLast) { + this.rentalsLast = rentalsLast; + } + + public String getInvestmentIncomeCurrent() { + return investmentIncomeCurrent; + } + + public void setInvestmentIncomeCurrent(String investmentIncomeCurrent) { + this.investmentIncomeCurrent = investmentIncomeCurrent; + } + + public String getInvestmentIncomeLast() { + return investmentIncomeLast; + } + + public void setInvestmentIncomeLast(String investmentIncomeLast) { + this.investmentIncomeLast = investmentIncomeLast; + } + + public String getOtherUnearnedCurrent() { + return otherUnearnedCurrent; + } + + public void setOtherUnearnedCurrent(String otherUnearnedCurrent) { + this.otherUnearnedCurrent = otherUnearnedCurrent; + } + + public String getOtherUnearnedLast() { + return otherUnearnedLast; + } + + public void setOtherUnearnedLast(String otherUnearnedLast) { + this.otherUnearnedLast = otherUnearnedLast; + } + + public String getMortgageCurrent() { + return mortgageCurrent; + } + + public void setMortgageCurrent(String mortgageCurrent) { + this.mortgageCurrent = mortgageCurrent; + } + + public String getMortgageLast() { + return mortgageLast; + } + + public void setMortgageLast(String mortgageLast) { + this.mortgageLast = mortgageLast; + } + + public String getRentCurrent() { + return rentCurrent; + } + + public void setRentCurrent(String rentCurrent) { + this.rentCurrent = rentCurrent; + } + + public String getRentLast() { + return rentLast; + } + + public void setRentLast(String rentLast) { + this.rentLast = rentLast; + } + + public String getSchoolingCurrent() { + return schoolingCurrent; + } + + public void setSchoolingCurrent(String schoolingCurrent) { + this.schoolingCurrent = schoolingCurrent; + } + + public String getSchoolingLast() { + return schoolingLast; + } + + public void setSchoolingLast(String schoolingLast) { + this.schoolingLast = schoolingLast; + } + + public String getMembershipsCurrent() { + return membershipsCurrent; + } + + public void setMembershipsCurrent(String membershipsCurrent) { + this.membershipsCurrent = membershipsCurrent; + } + + public String getMembershipsLast() { + return membershipsLast; + } + + public void setMembershipsLast(String membershipsLast) { + this.membershipsLast = membershipsLast; + } + + public String getOtherExpenditureCurrent() { + return otherExpenditureCurrent; + } + + public void setOtherExpenditureCurrent(String otherExpenditureCurrent) { + this.otherExpenditureCurrent = otherExpenditureCurrent; + } + + public String getOtherExpenditureLast() { + return otherExpenditureLast; + } + + public void setOtherExpenditureLast(String otherExpenditureLast) { + this.otherExpenditureLast = otherExpenditureLast; + } + + public String getCashDepositsCurrent() { + return cashDepositsCurrent; + } + + public void setCashDepositsCurrent(String cashDepositsCurrent) { + this.cashDepositsCurrent = cashDepositsCurrent; + } + + public String getCashDepositsLast() { + return cashDepositsLast; + } + + public void setCashDepositsLast(String cashDepositsLast) { + this.cashDepositsLast = cashDepositsLast; + } + + public String getInvestmentsCurrent() { + return investmentsCurrent; + } + + public void setInvestmentsCurrent(String investmentsCurrent) { + this.investmentsCurrent = investmentsCurrent; + } + + public String getInvestmentsLast() { + return investmentsLast; + } + + public void setInvestmentsLast(String investmentsLast) { + this.investmentsLast = investmentsLast; + } + + public String getOtherLiquidCurrent() { + return otherLiquidCurrent; + } + + public void setOtherLiquidCurrent(String otherLiquidCurrent) { + this.otherLiquidCurrent = otherLiquidCurrent; + } + + public String getOtherLiquidLast() { + return otherLiquidLast; + } + + public void setOtherLiquidLast(String otherLiquidLast) { + this.otherLiquidLast = otherLiquidLast; + } + + public String getNetBusinessInterestCurrent() { + return netBusinessInterestCurrent; + } + + public void setNetBusinessInterestCurrent(String netBusinessInterestCurrent) { + this.netBusinessInterestCurrent = netBusinessInterestCurrent; + } + + public String getNetBusinessInterestLast() { + return netBusinessInterestLast; + } + + public void setNetBusinessInterestLast(String netBusinessInterestLast) { + this.netBusinessInterestLast = netBusinessInterestLast; + } + + public String getPersonalPropertiesCurrent() { + return personalPropertiesCurrent; + } + + public void setPersonalPropertiesCurrent(String personalPropertiesCurrent) { + this.personalPropertiesCurrent = personalPropertiesCurrent; + } + + public String getPersonalPropertiesLast() { + return personalPropertiesLast; + } + + public void setPersonalPropertiesLast(String personalPropertiesLast) { + this.personalPropertiesLast = personalPropertiesLast; + } + + public String getOtherNonLiquidCurrent() { + return otherNonLiquidCurrent; + } + + public void setOtherNonLiquidCurrent(String otherNonLiquidCurrent) { + this.otherNonLiquidCurrent = otherNonLiquidCurrent; + } + + public String getOtherNonLiquidLast() { + return otherNonLiquidLast; + } + + public void setOtherNonLiquidLast(String otherNonLiquidLast) { + this.otherNonLiquidLast = otherNonLiquidLast; + } + + public String getPersonalLoansCurrent() { + return personalLoansCurrent; + } + + public void setPersonalLoansCurrent(String personalLoansCurrent) { + this.personalLoansCurrent = personalLoansCurrent; + } + + public String getPersonalLoansLast() { + return personalLoansLast; + } + + public void setPersonalLoansLast(String personalLoansLast) { + this.personalLoansLast = personalLoansLast; + } + + public String getMortgagesCurrent() { + return mortgagesCurrent; + } + + public void setMortgagesCurrent(String mortgagesCurrent) { + this.mortgagesCurrent = mortgagesCurrent; + } + + public String getMortgagesLast() { + return mortgagesLast; + } + + public void setMortgagesLast(String mortgagesLast) { + this.mortgagesLast = mortgagesLast; + } + + public String getMarginAccountCurrent() { + return marginAccountCurrent; + } + + public void setMarginAccountCurrent(String marginAccountCurrent) { + this.marginAccountCurrent = marginAccountCurrent; + } + + public String getMarginAccountLast() { + return marginAccountLast; + } + + public void setMarginAccountLast(String marginAccountLast) { + this.marginAccountLast = marginAccountLast; + } + + public String getLoanGuaranteesCurrent() { + return loanGuaranteesCurrent; + } + + public void setLoanGuaranteesCurrent(String loanGuaranteesCurrent) { + this.loanGuaranteesCurrent = loanGuaranteesCurrent; + } + + public String getLoanGuaranteesLast() { + return loanGuaranteesLast; + } + + public void setLoanGuaranteesLast(String loanGuaranteesLast) { + this.loanGuaranteesLast = loanGuaranteesLast; + } + + public String getBankingFacilityCurrent() { + return bankingFacilityCurrent; + } + + public void setBankingFacilityCurrent(String bankingFacilityCurrent) { + this.bankingFacilityCurrent = bankingFacilityCurrent; + } + + public String getBankingFacilityLast() { + return bankingFacilityLast; + } + + public void setBankingFacilityLast(String bankingFacilityLast) { + this.bankingFacilityLast = bankingFacilityLast; + } + + public String getPrefFinancePrincipalCurrent() { + return prefFinancePrincipalCurrent; + } + + public void setPrefFinancePrincipalCurrent(String prefFinancePrincipalCurrent) { + this.prefFinancePrincipalCurrent = prefFinancePrincipalCurrent; + } + + public String getPrefFinancePrincipalLast() { + return prefFinancePrincipalLast; + } + + public void setPrefFinancePrincipalLast(String prefFinancePrincipalLast) { + this.prefFinancePrincipalLast = prefFinancePrincipalLast; + } + + public String getPrefFinanceOtherCurrent() { + return prefFinanceOtherCurrent; + } + + public void setPrefFinanceOtherCurrent(String prefFinanceOtherCurrent) { + this.prefFinanceOtherCurrent = prefFinanceOtherCurrent; + } + + public String getPrefFinanceOtherLast() { + return prefFinanceOtherLast; + } + + public void setPrefFinanceOtherLast(String prefFinanceOtherLast) { + this.prefFinanceOtherLast = prefFinanceOtherLast; + } + + public String getInterestCurrent() { + return interestCurrent; + } + + public void setInterestCurrent(String interestCurrent) { + this.interestCurrent = interestCurrent; + } + + public String getInterestLast() { + return interestLast; + } + + public void setInterestLast(String interestLast) { + this.interestLast = interestLast; + } + + public String getPrincipalCurrent() { + return principalCurrent; + } + + public void setPrincipalCurrent(String principalCurrent) { + this.principalCurrent = principalCurrent; + } + + public String getPrincipalLast() { + return principalLast; + } + + public void setPrincipalLast(String principalLast) { + this.principalLast = principalLast; + } + + public String getOtherPrefFinanceCurrent() { + return otherPrefFinanceCurrent; + } + + public void setOtherPrefFinanceCurrent(String otherPrefFinanceCurrent) { + this.otherPrefFinanceCurrent = otherPrefFinanceCurrent; + } + + public String getOtherPrefFinanceLast() { + return otherPrefFinanceLast; + } + + public void setOtherPrefFinanceLast(String otherPrefFinanceLast) { + this.otherPrefFinanceLast = otherPrefFinanceLast; + } + + public String getTotalUnearnedCurrent() { + return totalUnearnedCurrent; + } + + public void setTotalUnearnedCurrent(String totalUnearnedCurrent) { + this.totalUnearnedCurrent = totalUnearnedCurrent; + } + + public String getTotalUnearnedLast() { + return totalUnearnedLast; + } + + public void setTotalUnearnedLast(String totalUnearnedLast) { + this.totalUnearnedLast = totalUnearnedLast; + } + + public String getTotalIncomeCurrent() { + return totalIncomeCurrent; + } + + public void setTotalIncomeCurrent(String totalIncomeCurrent) { + this.totalIncomeCurrent = totalIncomeCurrent; + } + + public String getTotalIncomeLast() { + return totalIncomeLast; + } + + public void setTotalIncomeLast(String totalIncomeLast) { + this.totalIncomeLast = totalIncomeLast; + } + + public String getTotalExpenditureCurrent() { + return totalExpenditureCurrent; + } + + public void setTotalExpenditureCurrent(String totalExpenditureCurrent) { + this.totalExpenditureCurrent = totalExpenditureCurrent; + } + + public String getTotalExpenditureLast() { + return totalExpenditureLast; + } + + public void setTotalExpenditureLast(String totalExpenditureLast) { + this.totalExpenditureLast = totalExpenditureLast; + } + + public String getTotalLiquidAssetCurrent() { + return totalLiquidAssetCurrent; + } + + public void setTotalLiquidAssetCurrent(String totalLiquidAssetCurrent) { + this.totalLiquidAssetCurrent = totalLiquidAssetCurrent; + } + + public String getTotalLiquidAssetLast() { + return totalLiquidAssetLast; + } + + public void setTotalLiquidAssetLast(String totalLiquidAssetLast) { + this.totalLiquidAssetLast = totalLiquidAssetLast; + } + + public String getTotalNonLiquidAssetCurrent() { + return totalNonLiquidAssetCurrent; + } + + public void setTotalNonLiquidAssetCurrent(String totalNonLiquidAssetCurrent) { + this.totalNonLiquidAssetCurrent = totalNonLiquidAssetCurrent; + } + + public String getTotalNonLiquidAssetLast() { + return totalNonLiquidAssetLast; + } + + public void setTotalNonLiquidAssetLast(String totalNonLiquidAssetLast) { + this.totalNonLiquidAssetLast = totalNonLiquidAssetLast; + } + + public String getTotalAssetsCurrent() { + return totalAssetsCurrent; + } + + public void setTotalAssetsCurrent(String totalAssetsCurrent) { + this.totalAssetsCurrent = totalAssetsCurrent; + } + + public String getTotalAssetsLast() { + return totalAssetsLast; + } + + public void setTotalAssetsLast(String totalAssetsLast) { + this.totalAssetsLast = totalAssetsLast; + } + + public String getTotalLiabilitiesCurrent() { + return totalLiabilitiesCurrent; + } + + public void setTotalLiabilitiesCurrent(String totalLiabilitiesCurrent) { + this.totalLiabilitiesCurrent = totalLiabilitiesCurrent; + } + + public String getTotalLiabilitiesLast() { + return totalLiabilitiesLast; + } + + public void setTotalLiabilitiesLast(String totalLiabilitiesLast) { + this.totalLiabilitiesLast = totalLiabilitiesLast; + } + + public String getTotalFinalExpenditureCurrent() { + return totalFinalExpenditureCurrent; + } + + public void setTotalFinalExpenditureCurrent(String totalFinalExpenditureCurrent) { + this.totalFinalExpenditureCurrent = totalFinalExpenditureCurrent; + } + + public String getTotalFinalExpenditureLast() { + return totalFinalExpenditureLast; + } + + public void setTotalFinalExpenditureLast(String totalFinalExpenditureLast) { + this.totalFinalExpenditureLast = totalFinalExpenditureLast; + } } diff --git a/src/main/java/com/ffii/lioner/modules/lioner/client/req/UpdateClientReq.java b/src/main/java/com/ffii/lioner/modules/lioner/client/req/UpdateClientReq.java index 4626677..ba8b396 100644 --- a/src/main/java/com/ffii/lioner/modules/lioner/client/req/UpdateClientReq.java +++ b/src/main/java/com/ffii/lioner/modules/lioner/client/req/UpdateClientReq.java @@ -55,6 +55,158 @@ public class UpdateClientReq { String crAddressPostalCode; + String salaryCurrent; + + String salaryLast; + + String bonusCurrent; + + String bonusLast; + + String otherEarnedCurrent; + + String otherEarnedLast; + + String companyInterestCurrent; + + String companyInterestLast; + + String dividendsCurrent; + + String dividendsLast; + + String rentalsCurrent; + + String rentalsLast; + + String investmentIncomeCurrent; + + String investmentIncomeLast; + + String otherUnearnedCurrent; + + String otherUnearnedLast; + + String mortgageCurrent; + + String mortgageLast; + + String rentCurrent; + + String rentLast; + + String schoolingCurrent; + + String schoolingLast; + + String membershipsCurrent; + + String membershipsLast; + + String otherExpenditureCurrent; + + String otherExpenditureLast; + + String cashDepositsCurrent; + + String cashDepositsLast; + + String investmentsCurrent; + + String investmentsLast; + + String otherLiquidCurrent; + + String otherLiquidLast; + + String netBusinessInterestCurrent; + + String netBusinessInterestLast; + + String personalPropertiesCurrent; + + String personalPropertiesLast; + + String otherNonLiquidCurrent; + + String otherNonLiquidLast; + + String personalLoansCurrent; + + String personalLoansLast; + + String mortgagesCurrent; + + String mortgagesLast; + + String marginAccountCurrent; + + String marginAccountLast; + + String loanGuaranteesCurrent; + + String loanGuaranteesLast; + + String bankingFacilityCurrent; + + String bankingFacilityLast; + + String prefFinancePrincipalCurrent; + + String prefFinancePrincipalLast; + + String prefFinanceOtherCurrent; + + String prefFinanceOtherLast; + + String interestCurrent; + + String interestLast; + + String principalCurrent; + + String principalLast; + + String otherPrefFinanceCurrent; + + String otherPrefFinanceLast; + + String totalEarnedCurrent; + + String totalEarnedLast; + + String totalUnearnedCurrent; + + String totalUnearnedLast; + + String totalIncomeCurrent; + + String totalIncomeLast; + + String totalExpenditureCurrent; + + String totalExpenditureLast; + + String totalLiquidAssetCurrent; + + String totalLiquidAssetLast; + + String totalNonLiquidAssetCurrent; + + String totalNonLiquidAssetLast; + + String totalAssetsCurrent; + + String totalAssetsLast; + + String totalLiabilitiesCurrent; + + String totalLiabilitiesLast; + + String totalFinalExpenditureCurrent; + + String totalFinalExpenditureLast; + public Long getId() { return id; } @@ -223,4 +375,613 @@ public class UpdateClientReq { this.crAddressPostalCode = crAddressPostalCode; } + public String getBonusCurrent() { + return bonusCurrent; + } + + public void setBonusCurrent(String bonusCurrent) { + this.bonusCurrent = bonusCurrent; + } + + public String getBonusLast() { + return bonusLast; + } + + public void setBonusLast(String bonusLast) { + this.bonusLast = bonusLast; + } + + public String getTotalEarnedCurrent() { + return totalEarnedCurrent; + } + + public void setTotalEarnedCurrent(String totalEarnedCurrent) { + this.totalEarnedCurrent = totalEarnedCurrent; + } + + public String getTotalEarnedLast() { + return totalEarnedLast; + } + + public void setTotalEarnedLast(String totalEarnedLast) { + this.totalEarnedLast = totalEarnedLast; + } + + public String getSalaryCurrent() { + return salaryCurrent; + } + + public void setSalaryCurrent(String salaryCurrent) { + this.salaryCurrent = salaryCurrent; + } + + public String getSalaryLast() { + return salaryLast; + } + + public void setSalaryLast(String salaryLast) { + this.salaryLast = salaryLast; + } + + public String getOtherEarnedCurrent() { + return otherEarnedCurrent; + } + + public void setOtherEarnedCurrent(String otherEarnedCurrent) { + this.otherEarnedCurrent = otherEarnedCurrent; + } + + public String getOtherEarnedLast() { + return otherEarnedLast; + } + + public void setOtherEarnedLast(String otherEarnedLast) { + this.otherEarnedLast = otherEarnedLast; + } + + public String getCompanyInterestCurrent() { + return companyInterestCurrent; + } + + public void setCompanyInterestCurrent(String companyInterestCurrent) { + this.companyInterestCurrent = companyInterestCurrent; + } + + public String getCompanyInterestLast() { + return companyInterestLast; + } + + public void setCompanyInterestLast(String companyInterestLast) { + this.companyInterestLast = companyInterestLast; + } + + public String getDividendsCurrent() { + return dividendsCurrent; + } + + public void setDividendsCurrent(String dividendsCurrent) { + this.dividendsCurrent = dividendsCurrent; + } + + public String getDividendsLast() { + return dividendsLast; + } + + public void setDividendsLast(String dividendsLast) { + this.dividendsLast = dividendsLast; + } + + public String getRentalsCurrent() { + return rentalsCurrent; + } + + public void setRentalsCurrent(String rentalsCurrent) { + this.rentalsCurrent = rentalsCurrent; + } + + public String getRentalsLast() { + return rentalsLast; + } + + public void setRentalsLast(String rentalsLast) { + this.rentalsLast = rentalsLast; + } + + public String getInvestmentIncomeCurrent() { + return investmentIncomeCurrent; + } + + public void setInvestmentIncomeCurrent(String investmentIncomeCurrent) { + this.investmentIncomeCurrent = investmentIncomeCurrent; + } + + public String getInvestmentIncomeLast() { + return investmentIncomeLast; + } + + public void setInvestmentIncomeLast(String investmentIncomeLast) { + this.investmentIncomeLast = investmentIncomeLast; + } + + public String getOtherUnearnedCurrent() { + return otherUnearnedCurrent; + } + + public void setOtherUnearnedCurrent(String otherUnearnedCurrent) { + this.otherUnearnedCurrent = otherUnearnedCurrent; + } + + public String getOtherUnearnedLast() { + return otherUnearnedLast; + } + + public void setOtherUnearnedLast(String otherUnearnedLast) { + this.otherUnearnedLast = otherUnearnedLast; + } + + public String getMortgageCurrent() { + return mortgageCurrent; + } + + public void setMortgageCurrent(String mortgageCurrent) { + this.mortgageCurrent = mortgageCurrent; + } + + public String getMortgageLast() { + return mortgageLast; + } + + public void setMortgageLast(String mortgageLast) { + this.mortgageLast = mortgageLast; + } + + public String getRentCurrent() { + return rentCurrent; + } + + public void setRentCurrent(String rentCurrent) { + this.rentCurrent = rentCurrent; + } + + public String getRentLast() { + return rentLast; + } + + public void setRentLast(String rentLast) { + this.rentLast = rentLast; + } + + public String getSchoolingCurrent() { + return schoolingCurrent; + } + + public void setSchoolingCurrent(String schoolingCurrent) { + this.schoolingCurrent = schoolingCurrent; + } + + public String getSchoolingLast() { + return schoolingLast; + } + + public void setSchoolingLast(String schoolingLast) { + this.schoolingLast = schoolingLast; + } + + public String getMembershipsCurrent() { + return membershipsCurrent; + } + + public void setMembershipsCurrent(String membershipsCurrent) { + this.membershipsCurrent = membershipsCurrent; + } + + public String getMembershipsLast() { + return membershipsLast; + } + + public void setMembershipsLast(String membershipsLast) { + this.membershipsLast = membershipsLast; + } + + public String getOtherExpenditureCurrent() { + return otherExpenditureCurrent; + } + + public void setOtherExpenditureCurrent(String otherExpenditureCurrent) { + this.otherExpenditureCurrent = otherExpenditureCurrent; + } + + public String getOtherExpenditureLast() { + return otherExpenditureLast; + } + + public void setOtherExpenditureLast(String otherExpenditureLast) { + this.otherExpenditureLast = otherExpenditureLast; + } + + public String getCashDepositsCurrent() { + return cashDepositsCurrent; + } + + public void setCashDepositsCurrent(String cashDepositsCurrent) { + this.cashDepositsCurrent = cashDepositsCurrent; + } + + public String getCashDepositsLast() { + return cashDepositsLast; + } + + public void setCashDepositsLast(String cashDepositsLast) { + this.cashDepositsLast = cashDepositsLast; + } + + public String getInvestmentsCurrent() { + return investmentsCurrent; + } + + public void setInvestmentsCurrent(String investmentsCurrent) { + this.investmentsCurrent = investmentsCurrent; + } + + public String getInvestmentsLast() { + return investmentsLast; + } + + public void setInvestmentsLast(String investmentsLast) { + this.investmentsLast = investmentsLast; + } + + public String getOtherLiquidCurrent() { + return otherLiquidCurrent; + } + + public void setOtherLiquidCurrent(String otherLiquidCurrent) { + this.otherLiquidCurrent = otherLiquidCurrent; + } + + public String getOtherLiquidLast() { + return otherLiquidLast; + } + + public void setOtherLiquidLast(String otherLiquidLast) { + this.otherLiquidLast = otherLiquidLast; + } + + public String getNetBusinessInterestCurrent() { + return netBusinessInterestCurrent; + } + + public void setNetBusinessInterestCurrent(String netBusinessInterestCurrent) { + this.netBusinessInterestCurrent = netBusinessInterestCurrent; + } + + public String getNetBusinessInterestLast() { + return netBusinessInterestLast; + } + + public void setNetBusinessInterestLast(String netBusinessInterestLast) { + this.netBusinessInterestLast = netBusinessInterestLast; + } + + public String getPersonalPropertiesCurrent() { + return personalPropertiesCurrent; + } + + public void setPersonalPropertiesCurrent(String personalPropertiesCurrent) { + this.personalPropertiesCurrent = personalPropertiesCurrent; + } + + public String getPersonalPropertiesLast() { + return personalPropertiesLast; + } + + public void setPersonalPropertiesLast(String personalPropertiesLast) { + this.personalPropertiesLast = personalPropertiesLast; + } + + public String getOtherNonLiquidCurrent() { + return otherNonLiquidCurrent; + } + + public void setOtherNonLiquidCurrent(String otherNonLiquidCurrent) { + this.otherNonLiquidCurrent = otherNonLiquidCurrent; + } + + public String getOtherNonLiquidLast() { + return otherNonLiquidLast; + } + + public void setOtherNonLiquidLast(String otherNonLiquidLast) { + this.otherNonLiquidLast = otherNonLiquidLast; + } + + public String getPersonalLoansCurrent() { + return personalLoansCurrent; + } + + public void setPersonalLoansCurrent(String personalLoansCurrent) { + this.personalLoansCurrent = personalLoansCurrent; + } + + public String getPersonalLoansLast() { + return personalLoansLast; + } + + public void setPersonalLoansLast(String personalLoansLast) { + this.personalLoansLast = personalLoansLast; + } + + public String getMortgagesCurrent() { + return mortgagesCurrent; + } + + public void setMortgagesCurrent(String mortgagesCurrent) { + this.mortgagesCurrent = mortgagesCurrent; + } + + public String getMortgagesLast() { + return mortgagesLast; + } + + public void setMortgagesLast(String mortgagesLast) { + this.mortgagesLast = mortgagesLast; + } + + public String getMarginAccountCurrent() { + return marginAccountCurrent; + } + + public void setMarginAccountCurrent(String marginAccountCurrent) { + this.marginAccountCurrent = marginAccountCurrent; + } + + public String getMarginAccountLast() { + return marginAccountLast; + } + + public void setMarginAccountLast(String marginAccountLast) { + this.marginAccountLast = marginAccountLast; + } + + public String getLoanGuaranteesCurrent() { + return loanGuaranteesCurrent; + } + + public void setLoanGuaranteesCurrent(String loanGuaranteesCurrent) { + this.loanGuaranteesCurrent = loanGuaranteesCurrent; + } + + public String getLoanGuaranteesLast() { + return loanGuaranteesLast; + } + + public void setLoanGuaranteesLast(String loanGuaranteesLast) { + this.loanGuaranteesLast = loanGuaranteesLast; + } + + public String getBankingFacilityCurrent() { + return bankingFacilityCurrent; + } + + public void setBankingFacilityCurrent(String bankingFacilityCurrent) { + this.bankingFacilityCurrent = bankingFacilityCurrent; + } + + public String getBankingFacilityLast() { + return bankingFacilityLast; + } + + public void setBankingFacilityLast(String bankingFacilityLast) { + this.bankingFacilityLast = bankingFacilityLast; + } + + public String getPrefFinancePrincipalCurrent() { + return prefFinancePrincipalCurrent; + } + + public void setPrefFinancePrincipalCurrent(String prefFinancePrincipalCurrent) { + this.prefFinancePrincipalCurrent = prefFinancePrincipalCurrent; + } + + public String getPrefFinancePrincipalLast() { + return prefFinancePrincipalLast; + } + + public void setPrefFinancePrincipalLast(String prefFinancePrincipalLast) { + this.prefFinancePrincipalLast = prefFinancePrincipalLast; + } + + public String getPrefFinanceOtherCurrent() { + return prefFinanceOtherCurrent; + } + + public void setPrefFinanceOtherCurrent(String prefFinanceOtherCurrent) { + this.prefFinanceOtherCurrent = prefFinanceOtherCurrent; + } + + public String getPrefFinanceOtherLast() { + return prefFinanceOtherLast; + } + + public void setPrefFinanceOtherLast(String prefFinanceOtherLast) { + this.prefFinanceOtherLast = prefFinanceOtherLast; + } + + public String getInterestCurrent() { + return interestCurrent; + } + + public void setInterestCurrent(String interestCurrent) { + this.interestCurrent = interestCurrent; + } + + public String getInterestLast() { + return interestLast; + } + + public void setInterestLast(String interestLast) { + this.interestLast = interestLast; + } + + public String getPrincipalCurrent() { + return principalCurrent; + } + + public void setPrincipalCurrent(String principalCurrent) { + this.principalCurrent = principalCurrent; + } + + public String getPrincipalLast() { + return principalLast; + } + + public void setPrincipalLast(String principalLast) { + this.principalLast = principalLast; + } + + public String getOtherPrefFinanceCurrent() { + return otherPrefFinanceCurrent; + } + + public void setOtherPrefFinanceCurrent(String otherPrefFinanceCurrent) { + this.otherPrefFinanceCurrent = otherPrefFinanceCurrent; + } + + public String getOtherPrefFinanceLast() { + return otherPrefFinanceLast; + } + + public void setOtherPrefFinanceLast(String otherPrefFinanceLast) { + this.otherPrefFinanceLast = otherPrefFinanceLast; + } + + public String getTotalUnearnedCurrent() { + return totalUnearnedCurrent; + } + + public void setTotalUnearnedCurrent(String totalUnearnedCurrent) { + this.totalUnearnedCurrent = totalUnearnedCurrent; + } + + public String getTotalUnearnedLast() { + return totalUnearnedLast; + } + + public void setTotalUnearnedLast(String totalUnearnedLast) { + this.totalUnearnedLast = totalUnearnedLast; + } + + public String getTotalIncomeCurrent() { + return totalIncomeCurrent; + } + + public void setTotalIncomeCurrent(String totalIncomeCurrent) { + this.totalIncomeCurrent = totalIncomeCurrent; + } + + public String getTotalIncomeLast() { + return totalIncomeLast; + } + + public void setTotalIncomeLast(String totalIncomeLast) { + this.totalIncomeLast = totalIncomeLast; + } + + public String getTotalExpenditureCurrent() { + return totalExpenditureCurrent; + } + + public void setTotalExpenditureCurrent(String totalExpenditureCurrent) { + this.totalExpenditureCurrent = totalExpenditureCurrent; + } + + public String getTotalExpenditureLast() { + return totalExpenditureLast; + } + + public void setTotalExpenditureLast(String totalExpenditureLast) { + this.totalExpenditureLast = totalExpenditureLast; + } + + public String getTotalLiquidAssetCurrent() { + return totalLiquidAssetCurrent; + } + + public void setTotalLiquidAssetCurrent(String totalLiquidAssetCurrent) { + this.totalLiquidAssetCurrent = totalLiquidAssetCurrent; + } + + public String getTotalLiquidAssetLast() { + return totalLiquidAssetLast; + } + + public void setTotalLiquidAssetLast(String totalLiquidAssetLast) { + this.totalLiquidAssetLast = totalLiquidAssetLast; + } + + public String getTotalNonLiquidAssetCurrent() { + return totalNonLiquidAssetCurrent; + } + + public void setTotalNonLiquidAssetCurrent(String totalNonLiquidAssetCurrent) { + this.totalNonLiquidAssetCurrent = totalNonLiquidAssetCurrent; + } + + public String getTotalNonLiquidAssetLast() { + return totalNonLiquidAssetLast; + } + + public void setTotalNonLiquidAssetLast(String totalNonLiquidAssetLast) { + this.totalNonLiquidAssetLast = totalNonLiquidAssetLast; + } + + public String getTotalAssetsCurrent() { + return totalAssetsCurrent; + } + + public void setTotalAssetsCurrent(String totalAssetsCurrent) { + this.totalAssetsCurrent = totalAssetsCurrent; + } + + public String getTotalAssetsLast() { + return totalAssetsLast; + } + + public void setTotalAssetsLast(String totalAssetsLast) { + this.totalAssetsLast = totalAssetsLast; + } + + public String getTotalLiabilitiesCurrent() { + return totalLiabilitiesCurrent; + } + + public void setTotalLiabilitiesCurrent(String totalLiabilitiesCurrent) { + this.totalLiabilitiesCurrent = totalLiabilitiesCurrent; + } + + public String getTotalLiabilitiesLast() { + return totalLiabilitiesLast; + } + + public void setTotalLiabilitiesLast(String totalLiabilitiesLast) { + this.totalLiabilitiesLast = totalLiabilitiesLast; + } + + public String getTotalFinalExpenditureCurrent() { + return totalFinalExpenditureCurrent; + } + + public void setTotalFinalExpenditureCurrent(String totalFinalExpenditureCurrent) { + this.totalFinalExpenditureCurrent = totalFinalExpenditureCurrent; + } + + public String getTotalFinalExpenditureLast() { + return totalFinalExpenditureLast; + } + + public void setTotalFinalExpenditureLast(String totalFinalExpenditureLast) { + this.totalFinalExpenditureLast = totalFinalExpenditureLast; + } + + } diff --git a/src/main/java/com/ffii/lioner/modules/lioner/client/service/ClientService.java b/src/main/java/com/ffii/lioner/modules/lioner/client/service/ClientService.java index fa72062..c5d99bb 100644 --- a/src/main/java/com/ffii/lioner/modules/lioner/client/service/ClientService.java +++ b/src/main/java/com/ffii/lioner/modules/lioner/client/service/ClientService.java @@ -13,7 +13,6 @@ import com.ffii.lioner.modules.common.service.AuditLogService; import com.ffii.lioner.modules.lioner.client.entity.Client; import com.ffii.lioner.modules.lioner.client.entity.ClientRepository; import com.ffii.lioner.modules.lioner.client.req.UpdateClientReq; -import com.ffii.lioner.modules.lioner.pdf.service.PdfService; @Service public class ClientService extends AbstractBaseEntityService { @@ -115,84 +114,19 @@ public class ClientService extends AbstractBaseEntityService saveOrUpdate(UpdateClientReq req) { Client instance; - // List onUsingIdList = new ArrayList(); + if (req.getId() > 0){ instance = find(req.getId()).get(); - // onUsingIdList = this.getSelectedSubDivisionList(req.getId()); } else { instance = new Client(); instance.setClientCode(getNewClientCode()); } - // List subDivisionNameList = new ArrayList(); - // for (SubDivision subDivision : onUsingIdList) { - // for (Long deleteId: req.getSubDivisionRemoveIds()) { - // if(deleteId == subDivision.getId()){ - // subDivisionNameList.add(subDivision.getName()); - // } - // } - // } - - // if(subDivisionNameList.size() > 0){ - // String temp = ""; - // for (String subDivisionName : subDivisionNameList) { - // temp = temp + subDivisionName + "\n"; - // } - // throw new UnprocessableEntityException( - // "Below Sub-Division already exist in application, cannot be deleted: \n" - // + temp - // ); - // } - BeanUtils.copyProperties(req,instance); - // if(!instance.getReminderFlag()){ - // instance.setReminderThreshold((long) 0); - // instance.setReminderInterval((long) 0); - // instance.setReminderLimit((long) 0); - // } - - //=====GET OLD AUDIT LOG=====// - // String tableName = instance.getClass().getAnnotation(Table.class).name(); - // Map oldValueObject = new HashMap(); - // Map newValueObject = new HashMap(); - - // if (instance != null && instance.getId() != null && instance.getId() > 0) { - // Map input = Map.of("id", instance.getId()); - // Map logData= getAuditLogObject(input); - // logData.put("subDivision", this.getEventDivisionName(input)); - // oldValueObject = logData; - // } - // //=====GET OLD AUDIT LOG=====// instance = save(instance); - // Long eventId = instance.getId(); - // updateSubDivision(req.getSubDivisionIds(),req.getSubDivisionRemoveIds(),eventId); - - //=====GET NEW AUDIT LOG=====// - // if (instance != null && instance.getId() != null && instance.getId() > 0) { - // Map input = Map.of("id", instance.getId()); - // Map logData= getAuditLogObject(input); - // logData.put("subDivision", this.getEventDivisionName(input)); - // newValueObject = logData; - // } - - - // if(auditLogService.compareMaps(newValueObject,oldValueObject).size() != 0 || - // auditLogService.compareMaps(oldValueObject,newValueObject).size() != 0 - // ){ - // auditLogService.save( - // tableName, - // instance.getId(), - // instance.getName(), - // SecurityUtils.getUser() != null ? SecurityUtils.getUser().get().getId() : null, - // new Date(), - // JsonUtils.toJsonString(auditLogService.compareMaps(newValueObject,oldValueObject)), - // JsonUtils.toJsonString(auditLogService.compareMaps(oldValueObject,newValueObject))); - // } - //=====GET NEW AUDIT LOG=====// - - + return Map.of( "id", instance.getId() ); diff --git a/src/main/java/com/ffii/lioner/modules/lioner/commonField/entity/CommonField.java b/src/main/java/com/ffii/lioner/modules/lioner/commonField/entity/CommonField.java index 0c3a07f..ddec13b 100644 --- a/src/main/java/com/ffii/lioner/modules/lioner/commonField/entity/CommonField.java +++ b/src/main/java/com/ffii/lioner/modules/lioner/commonField/entity/CommonField.java @@ -4,7 +4,6 @@ import java.util.HashMap; import java.util.Map; import org.hibernate.annotations.JdbcTypeCode; -import org.hibernate.annotations.Type; import org.hibernate.type.SqlTypes; import com.ffii.core.entity.BaseEntity; diff --git a/src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java b/src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java index 1eec366..1dbb467 100644 --- a/src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java +++ b/src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java @@ -180,8 +180,14 @@ public class PdfService extends AbstractBaseEntityService template = templateService.loadTemplate(instance.getTemplateId()); + if("IDA".equals(template.get("remarks"))) + reload = true; + response = Map.of( - "id", instance.getId() + "id", instance.getId(), + "reload", reload ); return response; @@ -565,38 +571,7 @@ public class PdfService extends AbstractBaseEntityService