|
|
@@ -608,6 +608,86 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "total_earned_income_current", formatNum(client.getTotalEarnedCurrent())); |
|
|
setValueIfPresent(form, "total_earned_income_current", formatNum(client.getTotalEarnedCurrent())); |
|
|
setValueIfPresent(form, "total_earned_income_last", formatNum(client.getTotalEarnedLast())); |
|
|
setValueIfPresent(form, "total_earned_income_last", formatNum(client.getTotalEarnedLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "incomeInterest", formatNum(client.getCompanyInterestCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "incomeInterestLastYear", formatNum(client.getCompanyInterestLast())); |
|
|
|
|
|
setValueIfPresent(form, "incomeDividents", formatNum(client.getDividendsCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "incomeDividentsLastYear", formatNum(client.getDividendsLast())); |
|
|
|
|
|
setValueIfPresent(form, "incomeRentals", formatNum(client.getRentalsCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "incomeRentalsLastYear", formatNum(client.getRentalsLast())); |
|
|
|
|
|
setValueIfPresent(form, "fill_24_4", formatNum(client.getInvestmentIncomeCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "fill_25_4", formatNum(client.getInvestmentIncomeLast())); |
|
|
|
|
|
setValueIfPresent(form, "fill_28_4", formatNum(client.getOtherUnearnedCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "fill_29_4", formatNum(client.getOtherUnearnedLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "total_unearned_income", formatNum(client.getTotalUnearnedCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "total_unearned_income_last", formatNum(client.getTotalUnearnedLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "total_income", formatNum(client.getTotalIncomeCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "total_income_last", formatNum(client.getTotalIncomeLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "mortgage", formatNum(client.getMortgageCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "mortgageLastYear", formatNum(client.getMortgageLast())); |
|
|
|
|
|
setValueIfPresent(form, "rent", formatNum(client.getRentCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "rentLastYear", formatNum(client.getRentLast())); |
|
|
|
|
|
setValueIfPresent(form, "schooling", formatNum(client.getSchoolingCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "schoolingLastYear", formatNum(client.getSchoolingLast())); |
|
|
|
|
|
setValueIfPresent(form, "membership", formatNum(client.getMembershipsCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "membershipLastYear", formatNum(client.getMembershipsLast())); |
|
|
|
|
|
setValueIfPresent(form, "otherExpenditure", formatNum(client.getOtherExpenditureCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "otherExpenditureLastYear", formatNum(client.getOtherExpenditureLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "interest", formatNum(client.getInterestCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "interestLastYear", formatNum(client.getInterestLast())); |
|
|
|
|
|
setValueIfPresent(form, "principal", formatNum(client.getPrincipalCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "principalLastYear", formatNum(client.getPrincipalLast())); |
|
|
|
|
|
setValueIfPresent(form, "otherPrefFinance", formatNum(client.getOtherPrefFinanceCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "otherPrefFinanceLastYear", formatNum(client.getOtherPrefFinanceLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "totalExpenditure", formatNum(client.getTotalExpenditureCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "totalExpenditureLastYear", formatNum(client.getTotalExpenditureLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "assetCash", formatNum(client.getCashDepositsCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "assetCashLast", formatNum(client.getCashDepositsLast())); |
|
|
|
|
|
setValueIfPresent(form, "assetInvestment", formatNum(client.getInvestmentsCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "assetInvestmentLast", formatNum(client.getInvestmentsLast())); |
|
|
|
|
|
setValueIfPresent(form, "assetOtherLiquid", formatNum(client.getOtherLiquidCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "assetOtherLiquidLast", formatNum(client.getOtherLiquidLast())); |
|
|
|
|
|
setValueIfPresent(form, "totalLiquidAsset", formatNum(client.getTotalLiquidAssetCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "totalLiquidAssetLast", formatNum(client.getTotalLiquidAssetLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "assetNetBusinessInterest", formatNum(client.getNetBusinessInterestCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "assetNetBusinessInterestLast", formatNum(client.getNetBusinessInterestLast())); |
|
|
|
|
|
setValueIfPresent(form, "assetProperties", formatNum(client.getPersonalPropertiesCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "assetPropertiesLast", formatNum(client.getPersonalPropertiesLast())); |
|
|
|
|
|
setValueIfPresent(form, "assetOtherNonLiquid", formatNum(client.getOtherNonLiquidCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "assetOtherNonLiquidLast", formatNum(client.getOtherNonLiquidLast())); |
|
|
|
|
|
setValueIfPresent(form, "totalNonLiquidAsset", formatNum(client.getTotalNonLiquidAssetCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "totalNonLiquidAssetLast", formatNum(client.getTotalNonLiquidAssetLast())); |
|
|
|
|
|
setValueIfPresent(form, "total_asset", formatNum(client.getTotalAssetsCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "total_assetLast", formatNum(client.getTotalAssetsLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "liaLoan", formatNum(client.getPersonalLoansCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "liaLoanLast", formatNum(client.getPersonalLoansLast())); |
|
|
|
|
|
setValueIfPresent(form, "liaMortgage", formatNum(client.getMortgagesLast())); |
|
|
|
|
|
setValueIfPresent(form, "liaMortgageLast", formatNum(client.getMortgagesLast())); |
|
|
|
|
|
setValueIfPresent(form, "liaMargin", formatNum(client.getMarginAccountCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "liaMarginLast", formatNum(client.getMarginAccountLast())); |
|
|
|
|
|
setValueIfPresent(form, "liaLoanGurantee", formatNum(client.getLoanGuaranteesCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "liaLoanGuaranteeLast", formatNum(client.getLoanGuaranteesLast())); |
|
|
|
|
|
setValueIfPresent(form, "liaBankingFacility", formatNum(client.getBankingFacilityCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "liaBankingFacilityLast", formatNum(client.getBankingFacilityLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "liaPrincipal", formatNum(client.getPrefFinancePrincipalCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "liaPrincipalLast", formatNum(client.getPrefFinancePrincipalLast())); |
|
|
|
|
|
setValueIfPresent(form, "liaOther", formatNum(client.getPrefFinanceOtherCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "liaOtherLast", formatNum(client.getPrefFinanceOtherLast())); |
|
|
|
|
|
setValueIfPresent(form, "fill_6_8", formatNum(client.getTotalLiabilitiesCurrent())); |
|
|
|
|
|
setValueIfPresent(form, "totalLiabilitiesLast", formatNum(client.getTotalLiabilitiesLast())); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "totalNet", substractNums(client.getTotalAssetsCurrent(), client.getTotalLiabilitiesCurrent())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Page11 End */ |
|
|
/* Page11 End */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -615,6 +695,11 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
setValueIfPresent(form2, "gender_m", commonField.getGenderMale()); |
|
|
setValueIfPresent(form2, "gender_m", commonField.getGenderMale()); |
|
|
setValueIfPresent(form2, "gender_f", commonField.getGenderFemale()); |
|
|
setValueIfPresent(form2, "gender_f", commonField.getGenderFemale()); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch_hkid", commonField.getOthers().get("hkidPerm")); |
|
|
|
|
|
setValueIfPresent(form2, "ch_hkid_non", commonField.getOthers().get("hkidNon")); |
|
|
|
|
|
setValueIfPresent(form2, "ch_prcid", commonField.getOthers().get("prcId")); |
|
|
|
|
|
setValueIfPresent(form2, "ch_othersid", commonField.getOthers().get("othersId")); |
|
|
|
|
|
|
|
|
//setValueIfPresent(form2, "fill_7", commonField.getNameChi()); |
|
|
//setValueIfPresent(form2, "fill_7", commonField.getNameChi()); |
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "edu_pri", commonField.getEduPri()); |
|
|
setValueIfPresent(form2, "edu_pri", commonField.getEduPri()); |
|
|
@@ -698,7 +783,14 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
setValueIfPresent(form, "fna_a_secondary", commonField.getEduSec()); |
|
|
setValueIfPresent(form, "fna_a_secondary", commonField.getEduSec()); |
|
|
setValueIfPresent(form, "fna_a_tertiary", commonField.getEduPostSec()); |
|
|
setValueIfPresent(form, "fna_a_tertiary", commonField.getEduPostSec()); |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "fna_a_marital", commonField.getMaritalStatus()); |
|
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("maritalStatusSingle"))){ |
|
|
|
|
|
setValueIfPresent(form, "fna_a_marital", "Single"); |
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("maritalStatusMarried"))){ |
|
|
|
|
|
setValueIfPresent(form, "fna_a_marital", "Married"); |
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("maritalStatusOther")) && StringUtils.trimToNull(commonField.getOthers().get("maritalStatusOtherDesc")) != null){ |
|
|
|
|
|
setValueIfPresent(form, "fna_a_marital", commonField.getOthers().get("maritalStatusOtherDesc")); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "fna_a_contact", commonField.getContactNo()); |
|
|
setValueIfPresent(form, "fna_a_contact", commonField.getContactNo()); |
|
|
setValueIfPresent(form, "fna_a_dependents", commonField.getNoOfDependents()); |
|
|
setValueIfPresent(form, "fna_a_dependents", commonField.getNoOfDependents()); |
|
|
|
|
|
|
|
|
@@ -1286,9 +1378,16 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
setValueIfPresent(form, "1_7_country", commonField.getPlaceOfBirth()); |
|
|
setValueIfPresent(form, "1_7_country", commonField.getPlaceOfBirth()); |
|
|
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship()); |
|
|
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship()); |
|
|
|
|
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))) |
|
|
|
|
|
setValueIfPresent(form, "1_10_id_num", commonField.getIdCard()); |
|
|
|
|
|
else if("Yes".equals(commonField.getOthers().get("prcId"))) |
|
|
|
|
|
setValueIfPresent(form, "1_10_num", commonField.getIdCard()); |
|
|
|
|
|
else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ) |
|
|
|
|
|
setValueIfPresent(form, "1_10_passport_num", commonField.getPassportNo()); |
|
|
|
|
|
/* |
|
|
if("HK".equals(commonField.getCountryOfIssue()) || "Hong Kong".equals(commonField.getCountryOfIssue())){ |
|
|
if("HK".equals(commonField.getCountryOfIssue()) || "Hong Kong".equals(commonField.getCountryOfIssue())){ |
|
|
setValueIfPresent(form, "1_10_id_num", commonField.getIdCard()); |
|
|
setValueIfPresent(form, "1_10_id_num", commonField.getIdCard()); |
|
|
} |
|
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship()); |
|
|
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship()); |
|
|
|
|
|
|
|
|
@@ -1393,17 +1492,24 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void SLAPP_checkBox(PDAcroForm form2, CommonField commonField){ |
|
|
private void SLAPP_checkBox(PDAcroForm form2, CommonField commonField){ |
|
|
|
|
|
setValueIfPresent(form2, "hnm", commonField.getOthers().get("formNonMedical")); |
|
|
|
|
|
setValueIfPresent(form2, "hm", commonField.getOthers().get("formMedical")); |
|
|
|
|
|
|
|
|
/* Page1 Start */ |
|
|
/* Page1 Start */ |
|
|
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale()); |
|
|
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale()); |
|
|
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale()); |
|
|
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale()); |
|
|
|
|
|
|
|
|
if("HK".equals(commonField.getCountryOfIssue()) || "Hong Kong".equals(commonField.getCountryOfIssue())){ |
|
|
|
|
|
setValueIfPresent(form2, "1_10_6", "Yes"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "1_11_s", commonField.getOthers().get("maritalStatusSingle")); |
|
|
|
|
|
setValueIfPresent(form2, "1_11_m", commonField.getOthers().get("maritalStatusMarried")); |
|
|
|
|
|
setValueIfPresent(form2, "1_11_o", commonField.getOthers().get("maritalStatusOther")); |
|
|
|
|
|
|
|
|
if(commonField.getPassportNo() != null && !commonField.getPassportNo().isBlank()){ |
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "1_10_1", commonField.getOthers().get("hkidPerm")); |
|
|
|
|
|
setValueIfPresent(form2, "1_10_2", commonField.getOthers().get("hkidNon")); |
|
|
|
|
|
setValueIfPresent(form2, "1_10_3", commonField.getOthers().get("prcId")); |
|
|
|
|
|
if("yes".equals(commonField.getOthers().get("passportYes")) || "yes".equals(commonField.getOthers().get("travelDocYes"))){ |
|
|
setValueIfPresent(form2, "1_10_6", "Yes"); |
|
|
setValueIfPresent(form2, "1_10_6", "Yes"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
if(!form2.getField("1_14d_tax1").getValueAsString().isBlank()){ |
|
|
if(!form2.getField("1_14d_tax1").getValueAsString().isBlank()){ |
|
|
setValueIfPresent(form2, "ch1_14d_reason1_b", "On"); |
|
|
setValueIfPresent(form2, "ch1_14d_reason1_b", "On"); |
|
|
@@ -1553,8 +1659,15 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
//setValueIfPresent(form, "applicant_name", StringUtils.trimToEmpty(StringUtils.trimToEmpty(client.getLastname()) + " " + StringUtils.trimToEmpty(client.getFirstname()))); |
|
|
//setValueIfPresent(form, "applicant_name", StringUtils.trimToEmpty(StringUtils.trimToEmpty(client.getLastname()) + " " + StringUtils.trimToEmpty(client.getFirstname()))); |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "fill_17", commonField.getNameChi()); |
|
|
setValueIfPresent(form, "fill_17", commonField.getNameChi()); |
|
|
setValueIfPresent(form, "Text1", commonField.getIdCard()); |
|
|
|
|
|
setValueIfPresent(form, "passportNo", commonField.getPassportNo()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("hkidNon")) || "Yes".equals(commonField.getOthers().get("hkidPerm"))){ |
|
|
|
|
|
setValueIfPresent(form, "Text1", commonField.getIdCard()); |
|
|
|
|
|
//}else if("Yes".equals(commonField.getOthers().get("prcId"))){ |
|
|
|
|
|
// setValueIfPresent(form, "ID1", commonField.getIdCard()); |
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
|
|
setValueIfPresent(form, "passportNo", commonField.getPassportNo()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "Text12", commonField.getCountryOfIssue()); |
|
|
setValueIfPresent(form, "Text12", commonField.getCountryOfIssue()); |
|
|
setValueIfPresent(form, "fill_18", commonField.getDateOfBirth()); |
|
|
setValueIfPresent(form, "fill_18", commonField.getDateOfBirth()); |
|
|
setValueIfPresent(form, "Text12", commonField.getCountryOfIssue()); |
|
|
setValueIfPresent(form, "Text12", commonField.getCountryOfIssue()); |
|
|
@@ -1700,6 +1813,13 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
){ |
|
|
){ |
|
|
setValueIfPresent(form2, "Check Bokx21", "Yes"); |
|
|
setValueIfPresent(form2, "Check Bokx21", "Yes"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("hkidNon")) || "Yes".equals(commonField.getOthers().get("hkidPerm"))) |
|
|
|
|
|
setValueIfPresent(form2, "Check Bokx21", "Yes"); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "Check Box22", commonField.getOthers().get("passportYes")); |
|
|
|
|
|
setValueIfPresent(form2, "Check Boxk23", commonField.getOthers().get("travelDocYes")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Page1 End */ |
|
|
/* Page1 End */ |
|
|
|
|
|
|
|
|
@@ -1734,8 +1854,16 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
setValueIfPresent(form2, "Check Box178", commonField.getHomemaker()); |
|
|
setValueIfPresent(form2, "Check Box178", commonField.getHomemaker()); |
|
|
setValueIfPresent(form2, "Check Box180", commonField.getRetired()); |
|
|
setValueIfPresent(form2, "Check Box180", commonField.getRetired()); |
|
|
/* Page2 End |
|
|
/* Page2 End |
|
|
|
|
|
|
|
|
|
|
|
/* Page7 Start */ |
|
|
|
|
|
setValueIfPresent(form2, "Check Box74", commonField.getOthers().get("formMedical")); |
|
|
|
|
|
setValueIfPresent(form2, "Check Box75", commonField.getOthers().get("formNonMedical")); |
|
|
|
|
|
/* Page7 End */ |
|
|
|
|
|
|
|
|
/* Page12 Start */ |
|
|
/* Page12 Start */ |
|
|
|
|
|
setValueIfPresent(form2, "Check Box74bb", commonField.getOthers().get("travelYes")); |
|
|
|
|
|
setValueIfPresent(form2, "Check Box74_1ag", commonField.getOthers().get("travelNo")); |
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "Check Box74b", commonField.getDeclinedYes()); |
|
|
setValueIfPresent(form2, "Check Box74b", commonField.getDeclinedYes()); |
|
|
setValueIfPresent(form2, "Check Box74_1a", commonField.getDeclinedNo()); |
|
|
setValueIfPresent(form2, "Check Box74_1a", commonField.getDeclinedNo()); |
|
|
|
|
|
|
|
|
@@ -1767,7 +1895,15 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "Field_LocationA1", commonField.getPlaceOfBirth()); |
|
|
setValueIfPresent(form, "Field_LocationA1", commonField.getPlaceOfBirth()); |
|
|
//setValueIfPresent(form, "Field_LocationB1", commonField.getPlaceOfBirth()); |
|
|
//setValueIfPresent(form, "Field_LocationB1", commonField.getPlaceOfBirth()); |
|
|
setValueIfPresent(form, "ID1", commonField.getIdCard()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))){ |
|
|
|
|
|
setValueIfPresent(form, "ID1", commonField.getIdCard()); |
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("prcId"))){ |
|
|
|
|
|
setValueIfPresent(form, "ID1", commonField.getIdCard()); |
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
|
|
setValueIfPresent(form, "1_10passport", commonField.getPassportNo()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "Nationality1", commonField.getCountryOfCitizenship()); |
|
|
setValueIfPresent(form, "Nationality1", commonField.getCountryOfCitizenship()); |
|
|
setValueIfPresent(form, "Company1", commonField.getCompanyName()); |
|
|
setValueIfPresent(form, "Company1", commonField.getCompanyName()); |
|
|
@@ -1800,6 +1936,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
setValueIfPresent(form, "Country3", commonField.getOthers().get("corAddressCountry")); |
|
|
setValueIfPresent(form, "Country3", commonField.getOthers().get("corAddressCountry")); |
|
|
setValueIfPresent(form, "PostalCode3", commonField.getOthers().get("corAddressPostalCode")); |
|
|
setValueIfPresent(form, "PostalCode3", commonField.getOthers().get("corAddressPostalCode")); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form, "ContactA1", commonField.getOthers().get("contactNoCode")); |
|
|
setValueIfPresent(form, "ContactB1", commonField.getContactNo()); |
|
|
setValueIfPresent(form, "ContactB1", commonField.getContactNo()); |
|
|
setValueIfPresent(form, "Email", commonField.getEmail()); |
|
|
setValueIfPresent(form, "Email", commonField.getEmail()); |
|
|
/* Page2 End */ |
|
|
/* Page2 End */ |
|
|
@@ -1841,6 +1978,12 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|| "澳門".equals(commonField.getPlaceOfBirth().toUpperCase())){ |
|
|
|| "澳門".equals(commonField.getPlaceOfBirth().toUpperCase())){ |
|
|
setValueIfPresent(form2, "macau", "Yes"); |
|
|
setValueIfPresent(form2, "macau", "Yes"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_ID11", commonField.getOthers().get("hkidPerm")); |
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_ID12", commonField.getOthers().get("hkidNon")); |
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_ID14", commonField.getOthers().get("prcId")); |
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_ID16", commonField.getOthers().get("passportYes")); |
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_ID17", commonField.getOthers().get("othersId")); |
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_Y", commonField.getTobarccoYes()); |
|
|
setValueIfPresent(form2, "Checkbox_Y", commonField.getTobarccoYes()); |
|
|
setValueIfPresent(form2, "Checkbox_N", commonField.getTobarccoYes()); |
|
|
setValueIfPresent(form2, "Checkbox_N", commonField.getTobarccoYes()); |
|
|
@@ -1883,12 +2026,16 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
setValueIfPresent(form, "1_7", commonField.getPlaceOfBirth()); |
|
|
setValueIfPresent(form, "1_7", commonField.getPlaceOfBirth()); |
|
|
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship()); |
|
|
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship()); |
|
|
|
|
|
|
|
|
if("HONG KONG".equals(commonField.getPlaceOfBirth())){ |
|
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))){ |
|
|
setValueIfPresent(form, "1_10id", commonField.getIdCard()); |
|
|
setValueIfPresent(form, "1_10id", commonField.getIdCard()); |
|
|
} |
|
|
|
|
|
setValueIfPresent(form, "1_10passport", commonField.getPassportNo()); |
|
|
|
|
|
setValueIfPresent(form, "fill_14_date", commonField.getOthers().get("passportExpiryDate")); |
|
|
|
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("prcId"))){ |
|
|
|
|
|
setValueIfPresent(form, "1_10prc", commonField.getPassportNo()); |
|
|
|
|
|
//setValueIfPresent(form, "fill_14_date", commonField.getOthers().get("passportExpiryDate")); |
|
|
|
|
|
|
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
|
|
setValueIfPresent(form, "1_10passport", commonField.getPassportNo()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* Page1 End */ |
|
|
/* Page1 End */ |
|
|
/* Page2 Start */ |
|
|
/* Page2 Start */ |
|
|
setValueIfPresent(form, "ch1_12_self", commonField.getEmployedSelf()); |
|
|
setValueIfPresent(form, "ch1_12_self", commonField.getEmployedSelf()); |
|
|
@@ -1932,7 +2079,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
|
/* Page2 End */ |
|
|
/* Page2 End */ |
|
|
/* Page3 Start */ |
|
|
/* Page3 Start */ |
|
|
setValueIfPresent(form, "1_13b_tel_mobile_code", commonField.getContactNo()); |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "1_13b_tel_mobile_code", commonField.getOthers().get("contactNoCode")); |
|
|
|
|
|
setValueIfPresent(form, "1_13b_tel_mobile", commonField.getContactNo()); |
|
|
setValueIfPresent(form, "1_13b_email", commonField.getEmail()); |
|
|
setValueIfPresent(form, "1_13b_email", commonField.getEmail()); |
|
|
|
|
|
|
|
|
setValueIfPresent(form, "1_14d_tax1", commonField.getTaxResidency1()); |
|
|
setValueIfPresent(form, "1_14d_tax1", commonField.getTaxResidency1()); |
|
|
@@ -2221,13 +2369,19 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
|
private void SLGII_checkBox(PDAcroForm form2, CommonField commonField){ |
|
|
private void SLGII_checkBox(PDAcroForm form2, CommonField commonField){ |
|
|
//setValueIfPresent(form2, "Checkbox_EudcationPri", commonField.getEduPri()); |
|
|
//setValueIfPresent(form2, "Checkbox_EudcationPri", commonField.getEduPri()); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "chhn", commonField.getOthers().get("formNonMedical")); |
|
|
|
|
|
setValueIfPresent(form2, "chhm", commonField.getOthers().get("formMedical")); |
|
|
|
|
|
|
|
|
/* Page1 Start */ |
|
|
/* Page1 Start */ |
|
|
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale()); |
|
|
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale()); |
|
|
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale()); |
|
|
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale()); |
|
|
|
|
|
|
|
|
/* Page1 End */ |
|
|
/* Page1 End */ |
|
|
/* Page2 Start */ |
|
|
/* Page2 Start */ |
|
|
|
|
|
setValueIfPresent(form2, "ch1_11_s", commonField.getOthers().get("maritalStatusSingle")); |
|
|
|
|
|
setValueIfPresent(form2, "ch1_11_m", commonField.getOthers().get("maritalStatusMarried")); |
|
|
|
|
|
setValueIfPresent(form2, "ch1_11_o", commonField.getOthers().get("maritalStatusOther")); |
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch1_12_self", commonField.getEmployedSelf()); |
|
|
setValueIfPresent(form2, "ch1_12_self", commonField.getEmployedSelf()); |
|
|
setValueIfPresent(form2, "ch1_12_full", commonField.getEmployed()); |
|
|
setValueIfPresent(form2, "ch1_12_full", commonField.getEmployed()); |
|
|
setValueIfPresent(form2, "ch1_12_student", commonField.getStudent()); |
|
|
setValueIfPresent(form2, "ch1_12_student", commonField.getStudent()); |
|
|
@@ -2532,9 +2686,26 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
switch (fieldName) { |
|
|
switch (fieldName) { |
|
|
/* Page1 Start */ |
|
|
/* Page1 Start */ |
|
|
case "fill_7" -> commonField.setNameChi(fieldValue); |
|
|
case "fill_7" -> commonField.setNameChi(fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
case "formMedical" -> commonField.getOthers().put("formMedical", fieldValue); |
|
|
|
|
|
case "formNonMedical" -> commonField.getOthers().put("formNonMedical", fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
case "ch_single" -> commonField.getOthers().put("maritalStatusSingle", fieldValue); |
|
|
|
|
|
case "ch_married" -> commonField.getOthers().put("maritalStatusMarried", fieldValue); |
|
|
|
|
|
case "ch_marital_others" -> commonField.getOthers().put("maritalStatusOther", fieldValue); |
|
|
|
|
|
case "fill_marital_others" -> commonField.getOthers().put("maritalStatusOtherDesc", fieldValue); |
|
|
|
|
|
|
|
|
case "fill_11" -> commonField.setIdCard(fieldValue); |
|
|
case "fill_11" -> commonField.setIdCard(fieldValue); |
|
|
case "fill_12" -> commonField.setCountryOfIssue(fieldValue); |
|
|
|
|
|
|
|
|
case "ch_hkid" -> commonField.getOthers().put("hkidPerm", fieldValue); |
|
|
|
|
|
case "ch_hkid_non" -> commonField.getOthers().put("hkidNon", fieldValue); |
|
|
|
|
|
case "ch_prcid" -> commonField.getOthers().put("prcId", fieldValue); |
|
|
|
|
|
case "ch_othersid" -> commonField.getOthers().put("othersId", fieldValue); |
|
|
|
|
|
case "ch_passport" -> commonField.getOthers().put("passportYes", fieldValue); |
|
|
|
|
|
case "ch_travel_doc" -> commonField.getOthers().put("travelDocYes", fieldValue); |
|
|
case "fill_13" -> commonField.setPassportNo(fieldValue); |
|
|
case "fill_13" -> commonField.setPassportNo(fieldValue); |
|
|
|
|
|
case "fill_14" -> commonField.getOthers().put("othersIdType", fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
case "fill_12" -> commonField.setCountryOfIssue(fieldValue); |
|
|
case "fill_14_date" -> commonField.getOthers().put("passportExpiryDate", fieldValue); |
|
|
case "fill_14_date" -> commonField.getOthers().put("passportExpiryDate", fieldValue); |
|
|
case "fill_15" -> commonField.setPlaceOfBirth(fieldValue); |
|
|
case "fill_15" -> commonField.setPlaceOfBirth(fieldValue); |
|
|
case "fill_16" -> commonField.setCountryOfCitizenship(fieldValue); |
|
|
case "fill_16" -> commonField.setCountryOfCitizenship(fieldValue); |
|
|
@@ -2556,6 +2727,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
case "date_mm" -> commonField.setMmDateOfBirth(fieldValue); |
|
|
case "date_mm" -> commonField.setMmDateOfBirth(fieldValue); |
|
|
case "date_yyyy" -> commonField.setYyyyDateOfBirth(fieldValue); |
|
|
case "date_yyyy" -> commonField.setYyyyDateOfBirth(fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
case "fill_phone_code" -> commonField.getOthers().put("contactNoCode", fieldValue); |
|
|
case "fill_17" -> commonField.setContactNo(fieldValue); |
|
|
case "fill_17" -> commonField.setContactNo(fieldValue); |
|
|
case "fill_18" -> commonField.setEmail(fieldValue); |
|
|
case "fill_18" -> commonField.setEmail(fieldValue); |
|
|
//case "fill_19" -> commonField.getOthers().put("address1", fieldValue); |
|
|
//case "fill_19" -> commonField.getOthers().put("address1", fieldValue); |
|
|
@@ -2568,50 +2740,25 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
case "edu_post_sec" -> commonField.setEduPostSec(fieldValue); |
|
|
case "edu_post_sec" -> commonField.setEduPostSec(fieldValue); |
|
|
/* Page1 End */ |
|
|
/* Page1 End */ |
|
|
/* Page2 Start */ |
|
|
/* Page2 Start */ |
|
|
case "own_income" -> commonField.setOwn_income(fieldValue); |
|
|
|
|
|
case "savings" -> commonField.setSavings(fieldValue); |
|
|
|
|
|
case "premium_financing" -> commonField.setPremium_financing(fieldValue); |
|
|
|
|
|
case "others_funds" -> commonField.setOthers_funds(fieldValue); |
|
|
|
|
|
case "others_funds_desc" -> commonField.setOthers_funds_desc(fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "fill_1_2" -> { |
|
|
|
|
|
commonField.getOthers().put("relateFatherRelation", "Father"); |
|
|
|
|
|
commonField.getOthers().put("relateFatherName", fieldValue); |
|
|
|
|
|
} |
|
|
|
|
|
case "fill_2_2" -> commonField.getOthers().put("relateFatherAge", fieldValue); |
|
|
|
|
|
case "fill_6_2" -> { |
|
|
|
|
|
commonField.getOthers().put("relateMotherRelation", "Mother"); |
|
|
|
|
|
commonField.getOthers().put("relateMotherName", fieldValue); |
|
|
|
|
|
} |
|
|
|
|
|
case "fill_7_2" -> commonField.getOthers().put("relateMotherAge", fieldValue); |
|
|
|
|
|
case "fill_11_2" -> { |
|
|
|
|
|
commonField.getOthers().put("relateSpouseRelation", "Spouse"); |
|
|
|
|
|
commonField.getOthers().put("relateSpouseName", fieldValue); |
|
|
|
|
|
} |
|
|
|
|
|
case "fill_12_2" -> commonField.getOthers().put("relateSpouseAge", fieldValue); |
|
|
|
|
|
case "fill_16_2" -> { |
|
|
|
|
|
commonField.getOthers().put("relateSonRelation", "Son"); |
|
|
|
|
|
commonField.getOthers().put("relateSonName", fieldValue); |
|
|
|
|
|
} |
|
|
|
|
|
case "fill_17_2" -> commonField.getOthers().put("relateSonAge", fieldValue); |
|
|
|
|
|
case "fill_21_2" -> { |
|
|
|
|
|
commonField.getOthers().put("relateDaughterRelation", "Daughter"); |
|
|
|
|
|
commonField.getOthers().put("relateDaughterName", fieldValue); |
|
|
|
|
|
} |
|
|
|
|
|
case "fill_22_2" -> commonField.getOthers().put("relateDaughterAge", fieldValue); |
|
|
|
|
|
case "fill_26" -> { |
|
|
|
|
|
commonField.getOthers().put("relateBotherRelation", "Bother"); |
|
|
|
|
|
commonField.getOthers().put("relateBotherName", fieldValue); |
|
|
|
|
|
} |
|
|
|
|
|
case "fill_27" -> commonField.getOthers().put("relateBotherAge", fieldValue); |
|
|
|
|
|
case "fill_31" -> { |
|
|
|
|
|
commonField.getOthers().put("relateSisterRelation", "Sister"); |
|
|
|
|
|
commonField.getOthers().put("relateSisterName", fieldValue); |
|
|
|
|
|
|
|
|
case "salary" -> commonField.setFna_c3b_salary(fieldValue); |
|
|
|
|
|
case "income" -> commonField.setFna_c3b_income(fieldValue); |
|
|
|
|
|
case "savings" -> commonField.setFna_c3b_saving(fieldValue); |
|
|
|
|
|
case "premium_financing" -> commonField.setFna_c3b_policy(fieldValue); |
|
|
|
|
|
case "policy_replacement" -> commonField.setFna_c3b_policy(fieldValue); |
|
|
|
|
|
case "others_funds" -> commonField.setFna_c3b_others(fieldValue); |
|
|
|
|
|
case "others_funds_desc" -> commonField.setFna_c3b_desc(fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
case "relate1_name" -> { |
|
|
|
|
|
for(int i=1; i<=9; i++){ |
|
|
|
|
|
commonField.getOthers().put("relate" + i + "_name", "relate" + i + "_name"); |
|
|
|
|
|
commonField.getOthers().put("relate" + i + "_relationship", "relate" + i + "_relationship"); |
|
|
|
|
|
commonField.getOthers().put("relate" + i + "_age", "relate" + i + "_age"); |
|
|
|
|
|
commonField.getOthers().put("relate" + i + "_occ", "relate" + i + "_occ"); |
|
|
|
|
|
commonField.getOthers().put("relate" + i + "_marital", "relate" + i + "_marital"); |
|
|
|
|
|
commonField.getOthers().put("relate" + i + "_dep_dd", "relate" + i + "_dep_dd"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
case "fill_32" -> commonField.getOthers().put("relateSisterAge", fieldValue); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Page2 End */ |
|
|
/* Page2 End */ |
|
|
/* Page3 Start */ |
|
|
/* Page3 Start */ |
|
|
case "toggle_3_2" -> commonField.setBankruptYes(fieldValue); |
|
|
case "toggle_3_2" -> commonField.setBankruptYes(fieldValue); |
|
|
@@ -2630,6 +2777,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
|
/* Page3 End */ |
|
|
/* Page3 End */ |
|
|
/* Page4 Start */ |
|
|
/* Page4 Start */ |
|
|
|
|
|
case "ch_travel_yes" -> commonField.getOthers().put("travelYes", fieldValue); |
|
|
|
|
|
case "ch_travel_no" -> commonField.getOthers().put("travelNo", fieldValue); |
|
|
|
|
|
|
|
|
case "toggle_1_3" -> commonField.getOthers().put("futureAddressYes", fieldValue); |
|
|
case "toggle_1_3" -> commonField.getOthers().put("futureAddressYes", fieldValue); |
|
|
case "toggle_2_2" -> commonField.getOthers().put("futureAddressNo", fieldValue); |
|
|
case "toggle_2_2" -> commonField.getOthers().put("futureAddressNo", fieldValue); |
|
|
case "fill_1_4_1" -> commonField.getOthers().put("futureAddress", fieldValue); |
|
|
case "fill_1_4_1" -> commonField.getOthers().put("futureAddress", fieldValue); |
|
|
@@ -3452,8 +3602,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
commonField.setCountryOfIssue("HK"); |
|
|
commonField.setCountryOfIssue("HK"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//tick the 1_10_6 if have value |
|
|
|
|
|
case "1_10_passport_num" -> commonField.setPassportNo(fieldValue); |
|
|
|
|
|
|
|
|
//case "1_10_passport_num" -> commonField.setPassportNo(fieldValue); |
|
|
|
|
|
|
|
|
case "1_12_1" -> commonField.setOccupation(fieldValue); |
|
|
case "1_12_1" -> commonField.setOccupation(fieldValue); |
|
|
case "1_12_2" -> commonField.setOccupationTitle(fieldValue); |
|
|
case "1_12_2" -> commonField.setOccupationTitle(fieldValue); |
|
|
@@ -3860,8 +4009,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
case "ch1_13bc_nt" -> commonField.getOthers().put("corAddressNt", fieldValue); |
|
|
case "ch1_13bc_nt" -> commonField.getOthers().put("corAddressNt", fieldValue); |
|
|
/* Page2 End */ |
|
|
/* Page2 End */ |
|
|
/* Page3 Start */ |
|
|
/* Page3 Start */ |
|
|
case "1_13b_tel_mobile_code" -> commonField.setContactNo(fieldValue); |
|
|
|
|
|
case "1_13b_email" -> commonField.setEmail(fieldValue); |
|
|
|
|
|
|
|
|
//case "1_13b_tel_mobile_code" -> commonField.setContactNo(fieldValue); |
|
|
|
|
|
//case "1_13b_email" -> commonField.setEmail(fieldValue); |
|
|
|
|
|
|
|
|
case "1_14d_tax1" -> commonField.setTaxResidency1(fieldValue); |
|
|
case "1_14d_tax1" -> commonField.setTaxResidency1(fieldValue); |
|
|
case "1_14d_tax2" -> commonField.setTaxResidency2(fieldValue); |
|
|
case "1_14d_tax2" -> commonField.setTaxResidency2(fieldValue); |
|
|
|