|
|
|
@@ -403,9 +403,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
}else if ("MLB03S".equals(formCode)) { |
|
|
|
MLB03S_checkBox(form2, commonField); |
|
|
|
}else if("MLFNA_EN".equals(formCode)){ // This is ML FNA EN |
|
|
|
MLFNA_EN_checkBox(form2, commonField); |
|
|
|
MLFNA_EN_checkBox(form2, commonField, client); |
|
|
|
} else if("MLFNA_CHI".equals(formCode)){ // This is ML FNA CHI |
|
|
|
MLFNA_EN_checkBox(form2, commonField); |
|
|
|
MLFNA_EN_checkBox(form2, commonField, client); |
|
|
|
} else if("SLFNA_EN".equals(formCode)){ // This is SL FNA EN |
|
|
|
SLFNA_EN_checkBox(form2, commonField); |
|
|
|
} else if("SLFNA_CHI".equals(formCode)){ // This is SL FNA CHI |
|
|
|
@@ -798,7 +798,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "fna_c1c_1_amount", commonField.getFna_c1c_1_amount()); |
|
|
|
setValueIfPresent(form, "fna_c1c_2_amount", commonField.getFna_c1c_2_amount()); |
|
|
|
setValueIfPresent(form, "fna_c1c_3_amount", commonField.getFna_c1c_3_amount()); |
|
|
|
setValueIfPresent(form, "fna_c1d_amount", formatNum(client.getTotalIncomeCurrent())); |
|
|
|
setValueIfPresent(form, "fna_c1d_amount", formatNum(substractNums(substractNums(client.getTotalIncomeCurrent(), client.getTotalExpenditureCurrent()), form.getField("fna_c1c_3_amount").getValueAsString()))); |
|
|
|
setValueIfPresent(form, "fna_c2a_amount", commonField.getFna_c2a_amount()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "fna_c2b_amount", formatNum(client.getTotalLiabilitiesCurrent())); |
|
|
|
@@ -1050,14 +1050,17 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "toggle_1c", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
if("Yes".equals(commonField.getFna_c3b_salary()) |
|
|
|
&& "Yes".equals(commonField.getFna_c3b_income())){ |
|
|
|
setValueIfPresent(form2, "toggle_1f", "Yes"); |
|
|
|
} |
|
|
|
if("Yes".equals(commonField.getFna_c3b_investments()) |
|
|
|
|| ("Yes".equals(commonField.getFna_c3b_salary()) |
|
|
|
&& "Yes".equals(commonField.getFna_c3b_income()) |
|
|
|
) |
|
|
|
){ |
|
|
|
setValueIfPresent(form2, "toggle_1f", "Yes"); |
|
|
|
} |
|
|
|
if("Yes".equals(commonField.getFna_c3b_saving()) |
|
|
|
&& "Yes".equals(commonField.getFna_c3b_investments())){ |
|
|
|
setValueIfPresent(form2, "toggle_1g", "Yes"); |
|
|
|
} |
|
|
|
setValueIfPresent(form2, "toggle_1g", "Yes"); |
|
|
|
} |
|
|
|
setValueIfPresent(form2, "toggle_1h", commonField.getFna_c3c_yes()); |
|
|
|
setValueIfPresent(form2, "Check Box6", commonField.getFna_c1e_10()); |
|
|
|
setValueIfPresent(form2, "Check Box7", commonField.getFna_c1e_10_20()); |
|
|
|
@@ -1075,11 +1078,6 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
//one way mapping now |
|
|
|
setValueIfPresent(form2, "toggle_1c", commonField.getFna_c3a_single_pay()); |
|
|
|
|
|
|
|
//one way mapping now |
|
|
|
if("Yes".equals(commonField.getFna_c3b_salary()) && "Yes".equals(commonField.getFna_c3b_saving()) && "Yes".equals(commonField.getFna_c3b_investments())){ |
|
|
|
setValueIfPresent(form2, "toggle_1f", "Yes"); |
|
|
|
//setValueIfPresent(form2, "toggle_1g", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@@ -1093,8 +1091,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "part2_1f_desc", commonField.getFna_b1_f_other()); |
|
|
|
/* Page1 End */ |
|
|
|
/* Page2 Start */ |
|
|
|
setValueIfPresent(form, "part3_3_1", commonField.getTotalAnnualIncome()); |
|
|
|
setValueIfPresent(form, "part3_3_2", commonField.getFna_c1b_amount()); |
|
|
|
setValueIfPresent(form, "part3_3_1", formatNum(client.getTotalIncomeCurrent())); |
|
|
|
setValueIfPresent(form, "part3_3_2", formatNum(client.getTotalExpenditureCurrent())); |
|
|
|
|
|
|
|
setValueIfPresent(form, "part3_3_4", commonField.getFna_c2a_amount()); |
|
|
|
setValueIfPresent(form, "part3_3_5_2c_other", commonField.getFna_c3b_desc()); |
|
|
|
@@ -1119,8 +1117,11 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void MLFNA_EN_checkBox(PDAcroForm form2, CommonField commonField){ |
|
|
|
private void MLFNA_EN_checkBox(PDAcroForm form2, CommonField commonField, Client client){ |
|
|
|
/* Page1 Start */ |
|
|
|
//if(convertStringToNum(commonField.getFna_b1_d_amount()) > 0){ |
|
|
|
// setValueIfPresent(form2, "part2_1c", commonField.getFna_b1_a()); |
|
|
|
//} |
|
|
|
// exported year? only can one way from FNA b1 d year |
|
|
|
setValueIfPresent(form2, "part2_1a", commonField.getFna_b1_a()); |
|
|
|
setValueIfPresent(form2, "part2_1b", commonField.getFna_b1_c()); |
|
|
|
@@ -1151,10 +1152,20 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "part2_2_g", commonField.getFna_b2_g()); |
|
|
|
/* Page1 End */ |
|
|
|
/* Page2 Start */ |
|
|
|
setValueIfPresent(form2, "part3_3_5_2a", commonField.getFna_c3b_saving()); |
|
|
|
setValueIfPresent(form2, "part3_3_5_2b", commonField.getFna_c3b_investments()); |
|
|
|
setValueIfPresent(form2, "part3_3_5_2c", commonField.getFna_c3b_others()); |
|
|
|
setValueIfPresent(form2, "part3_3_5_2c_other", commonField.getFna_c3b_desc()); |
|
|
|
if(convertStringToNum(client.getCashDepositsCurrent()) > 0){ |
|
|
|
setValueIfPresent(form2, "part3_3_5_2a", "Yes"); |
|
|
|
} |
|
|
|
if(convertStringToNum(client.getInvestmentsCurrent()) > 0){ |
|
|
|
setValueIfPresent(form2, "part3_3_5_2b", "Yes"); |
|
|
|
} |
|
|
|
if(convertStringToNum(client.getOtherLiquidCurrent()) > 0){ |
|
|
|
setValueIfPresent(form2, "part3_3_5_2c", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
//setValueIfPresent(form2, "part3_3_5_2a", commonField.getFna_c3b_saving()); |
|
|
|
//setValueIfPresent(form2, "part3_3_5_2b", commonField.getFna_c3b_investments()); |
|
|
|
//setValueIfPresent(form2, "part3_3_5_2c", commonField.getFna_c3b_others()); |
|
|
|
//setValueIfPresent(form2, "part3_3_5_2c_other", commonField.getFna_c3b_desc()); |
|
|
|
|
|
|
|
setValueIfPresent(form2, "part3_3_6_yes", commonField.getFna_c3c_yes()); |
|
|
|
setValueIfPresent(form2, "part3_3_6_no", commonField.getFna_c3c_no()); |
|
|
|
@@ -1172,8 +1183,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "part3_4_4_1d", commonField.getFna_c3a_16_20()); |
|
|
|
setValueIfPresent(form2, "part3_4_4_1f", commonField.getFna_c3a_life()); |
|
|
|
if("Yes".equals(commonField.getFna_c3a_life()) || "Yes".equals(commonField.getFna_c3a_6_10()) |
|
|
|
|| "Yes".equals(commonField.getFna_c3a_11_15()) || "Yes".equals(commonField.getFna_c3a_16_20()) || "Yes".equals(commonField.getFna_c3a_life()) |
|
|
|
){ |
|
|
|
|| "Yes".equals(commonField.getFna_c3a_11_15()) || "Yes".equals(commonField.getFna_c3a_16_20()) || "Yes".equals(commonField.getFna_c3a_20()) ||"Yes".equals(commonField.getFna_c3a_life())){ |
|
|
|
setValueIfPresent(form2, "part3_4_regular", "Yes"); |
|
|
|
} |
|
|
|
setValueIfPresent(form2, "part3_4_single_pay", commonField.getFna_c3a_single_pay()); |
|
|
|
@@ -1222,7 +1232,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "4b5", substractNums(commonField.getFna_c2a_amount(), commonField.getFna_c2b_amount())); |
|
|
|
|
|
|
|
//tick cb4c7 |
|
|
|
setValueIfPresent(form, "4c3", commonField.getFna_c1d_amount()); |
|
|
|
setValueIfPresent(form, "4c3", formatNum(commonField.getOthers().get("singlePayAmount"))); |
|
|
|
/* Page2 End */ |
|
|
|
|
|
|
|
/* Page4 Start */ |
|
|
|
@@ -1269,8 +1279,18 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
} |
|
|
|
if(commonField.getMaritalStatus() != null && "MARRIED".equals(commonField.getMaritalStatus().toUpperCase())){ |
|
|
|
setValueIfPresent(form2, "chhm", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if(convertStringToNum(commonField.getFna_b1_d_amount()) > 0){ |
|
|
|
setValueIfPresent(form2, "cb6", "Yes"); |
|
|
|
} |
|
|
|
if(convertStringToNum(commonField.getFna_c1d_amount()) > 0){ |
|
|
|
setValueIfPresent(form2, "cb4a1", "Yes"); |
|
|
|
} |
|
|
|
logger.info("singlePayAmount:" + commonField.getOthers().get("singlePayAmount") + " " + convertStringToNum(commonField.getOthers().get("singlePayAmount"))); |
|
|
|
if(convertStringToNum(commonField.getOthers().get("singlePayAmount")) > 0){ |
|
|
|
setValueIfPresent(form2, "cb4c7", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
setValueIfPresent(form2, "chh1", commonField.getEduPri()); |
|
|
|
setValueIfPresent(form2, "chh2", commonField.getEduSec()); |
|
|
|
setValueIfPresent(form2, "chh4", commonField.getEduPostSec()); |
|
|
|
@@ -1301,7 +1321,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
/* Page2 Start */ |
|
|
|
//tick chech > 0 |
|
|
|
if(convertStringToNum(commonField.getFna_c1d_amount()) > 0){ |
|
|
|
setValueIfPresent(form2, "cb4a1", "Yes"); |
|
|
|
setValueIfPresent(form2, "cb4a2", "Yes"); |
|
|
|
setValueIfPresent(form2, "cb4a2f", "Yes"); |
|
|
|
} |
|
|
|
setValueIfPresent(form2, "cb4b1", commonField.getFna_c2a_cash()); |
|
|
|
setValueIfPresent(form2, "cb4b2", commonField.getFna_c2a_bank_account()); |
|
|
|
@@ -1315,9 +1336,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "cb4c2", commonField.getFna_c3a_6_10()); |
|
|
|
setValueIfPresent(form2, "cb4c3", commonField.getFna_c3a_11_15()); |
|
|
|
setValueIfPresent(form2, "cb4c4", commonField.getFna_c3a_16_20()); |
|
|
|
setValueIfPresent(form2, "cb4c5", commonField.getFna_c3a_life()); |
|
|
|
setValueIfPresent(form2, "cb4c6", commonField.getFna_c3a_single_pay()); |
|
|
|
setValueIfPresent(form2, "4c3", commonField.getOthers().get("singlePayAmount")); |
|
|
|
setValueIfPresent(form2, "cb4c5", commonField.getFna_c3a_20()); |
|
|
|
setValueIfPresent(form2, "cb4c6", commonField.getFna_c3a_life()); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "cb4d1", commonField.getFna_c1e_10()); |
|
|
|
setValueIfPresent(form2, "cb4d2", commonField.getFna_c1e_10_20()); |
|
|
|
@@ -1334,11 +1355,6 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
setValueIfPresent(form2, "cb4h1", commonField.getFna_c3c_yes()); |
|
|
|
setValueIfPresent(form2, "cb4h2", commonField.getFna_c3c_no()); |
|
|
|
|
|
|
|
//tick cb4c7 |
|
|
|
if(commonField.getFna_c3a_single_pay() != null){ |
|
|
|
setValueIfPresent(form2, "cb4c7", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
/* Page2 End */ |
|
|
|
|
|
|
|
@@ -1357,7 +1373,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "1_2_name_ch", commonField.getNameChi()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_6_dd", commonField.getDdDateOfBirth()); |
|
|
|
setValueIfPresent(form, "1_6_mm", commonField.getDdDateOfBirth()); |
|
|
|
setValueIfPresent(form, "1_6_mm", commonField.getMmDateOfBirth()); |
|
|
|
setValueIfPresent(form, "1_6_yyyy", commonField.getYyyyDateOfBirth()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_7_country", commonField.getPlaceOfBirth()); |
|
|
|
@@ -1371,8 +1387,16 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
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")) ) |
|
|
|
else if(StringUtils.trimToNull(commonField.getPassportNo()) != null || "Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
setValueIfPresent(form, "1_10_passport_num", commonField.getPassportNo()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_10_passport_dd", commonField.getOthers().get("passportExpiryDD")); |
|
|
|
setValueIfPresent(form, "1_10_passport_mm", commonField.getOthers().get("passportExpiryMM")); |
|
|
|
setValueIfPresent(form, "1_10_passport_yyyy", commonField.getOthers().get("passportExpiryYYYY")); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
if("HK".equals(commonField.getCountryOfIssue()) || "Hong Kong".equals(commonField.getCountryOfIssue())){ |
|
|
|
setValueIfPresent(form, "1_10_id_num", commonField.getIdCard()); |
|
|
|
@@ -1388,13 +1412,12 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "1_12_5_usd", "USD"); |
|
|
|
setValueIfPresent(form, "1_12_5_pa", "P.A."); |
|
|
|
} |
|
|
|
setValueIfPresent(form, "1_12_6", commonField.getCompanyName()); |
|
|
|
setValueIfPresent(form, "1_12_6", commonField.getOthers().get("empCompanyName")); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_12_7_1", commonField.getOthers().get("companyAddress1")); |
|
|
|
setValueIfPresent(form, "1_12_7_2", commonField.getOthers().get("companyAddress2")); |
|
|
|
setValueIfPresent(form, "1_12_7_1", commonField.getOthers().get("empCompanyAddress")); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_12_8_1", commonField.getCompanyNature1()); |
|
|
|
setValueIfPresent(form, "1_12_8_2", commonField.getCompanyNature2()); |
|
|
|
setValueIfPresent(form, "1_12_8_1", commonField.getOthers().get("empNatureA")); |
|
|
|
setValueIfPresent(form, "1_12_8_2", commonField.getOthers().get("empNatureB")); |
|
|
|
|
|
|
|
/* |
|
|
|
setValueIfPresent(form, "ch1_13_rm", commonField.getCrAddressRoom()); |
|
|
|
@@ -1439,7 +1462,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "ch1_13_corr_kln", commonField.getOthers().get("corAddressKln")); |
|
|
|
setValueIfPresent(form, "ch1_13_corr_nt", commonField.getOthers().get("corAddressNt")); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_13_tel_mobile", client.getPhone1Code() + " " + client.getPhone1()); |
|
|
|
setValueIfPresent(form, "1_13_tel_mobile_code", client.getPhone1Code()); |
|
|
|
setValueIfPresent(form, "1_13_tel_mobile", client.getPhone1()); |
|
|
|
setValueIfPresent(form, "1_13_delete", client.getEmail()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_14d_tax1", commonField.getTaxResidency1()); |
|
|
|
setValueIfPresent(form, "1_14d_tax_num1", commonField.getTaxPin1()); |
|
|
|
@@ -1453,9 +1478,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "1_14d_tax_num3", commonField.getTaxPin3()); |
|
|
|
setValueIfPresent(form, "1_14d_explain3", commonField.getTaxReasonB3()); |
|
|
|
|
|
|
|
/* |
|
|
|
setValueIfPresent(form, "4_1_name1_1", commonField.getInsuranceCompany1_1()); |
|
|
|
setValueIfPresent(form, "4_1_name1_2", commonField.getInsuranceCompany1_2()); |
|
|
|
//setValueIfPresent(form, "4_1_name1_3", commonField.getInsuranceCompany1_3()); |
|
|
|
setValueIfPresent(form, "4_1_year1", commonField.getInsuranceYear1()); |
|
|
|
setValueIfPresent(form, "4_1_currency1", commonField.getInsuranceCurrency1()); |
|
|
|
setValueIfPresent(form, "4_1_sum1_1", commonField.getOthers().get("insuranceSumInsured1_1")); |
|
|
|
@@ -1464,7 +1489,6 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
setValueIfPresent(form, "4_1_name2_1", commonField.getInsuranceCompany2_1()); |
|
|
|
setValueIfPresent(form, "4_1_name2_2", commonField.getInsuranceCompany2_2()); |
|
|
|
//setValueIfPresent(form, "4_1_name2_3", commonField.getInsuranceCompany2_3()); |
|
|
|
setValueIfPresent(form, "4_1_year2", commonField.getInsuranceYear2()); |
|
|
|
setValueIfPresent(form, "4_1_currency2", commonField.getInsuranceCurrency2()); |
|
|
|
setValueIfPresent(form, "4_1_sum2_1", commonField.getOthers().get("insuranceSumInsured2_1")); |
|
|
|
@@ -1473,13 +1497,13 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
setValueIfPresent(form, "4_1_name3_1", commonField.getInsuranceCompany3_1()); |
|
|
|
setValueIfPresent(form, "4_1_name3_2", commonField.getInsuranceCompany3_2()); |
|
|
|
//setValueIfPresent(form, "4_1_name3_3", commonField.getInsuranceCompany3_3()); |
|
|
|
setValueIfPresent(form, "4_1_year3", commonField.getInsuranceYear3()); |
|
|
|
setValueIfPresent(form, "4_1_currency3", commonField.getInsuranceCurrency3()); |
|
|
|
setValueIfPresent(form, "4_1_sum3_1", commonField.getOthers().get("insuranceSumInsured3_1")); |
|
|
|
setValueIfPresent(form, "4_1_sum3_2", commonField.getOthers().get("insuranceSumInsured3_2")); |
|
|
|
setValueIfPresent(form, "4_1_sum3_3", commonField.getOthers().get("insuranceSumInsured3_3")); |
|
|
|
|
|
|
|
*/ |
|
|
|
setValueIfPresent(form, "others_funds_desc", commonField.getFna_c3b_desc()); |
|
|
|
} |
|
|
|
|
|
|
|
private void SLAPP_checkBox(PDAcroForm form2, CommonField commonField){ |
|
|
|
@@ -1499,11 +1523,13 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "1_10_2", commonField.getOthers().get("hkidNon")); |
|
|
|
}else if("Yes".equals(commonField.getOthers().get("prcId"))){ |
|
|
|
setValueIfPresent(form2, "1_10_3", commonField.getOthers().get("prcId")); |
|
|
|
}else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
if("yes".equals(commonField.getOthers().get("passportYes")) || "yes".equals(commonField.getOthers().get("travelDocYes"))){ |
|
|
|
setValueIfPresent(form2, "1_10_6", "Yes"); |
|
|
|
} |
|
|
|
}else if(StringUtils.trimToNull(commonField.getPassportNo()) != null || "Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
setValueIfPresent(form2, "1_10_6", "Yes"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch1_5_s", commonField.getTobarccoYes()); |
|
|
|
setValueIfPresent(form2, "ch1_5_n", commonField.getTobarccoNo()); |
|
|
|
|
|
|
|
//page 2 |
|
|
|
setValueIfPresent(form2, "ch1_12_yes", commonField.getOthers().get("workHighYes")); |
|
|
|
@@ -1653,6 +1679,13 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "de_no", commonField.getReplaceInsuranceNo()); |
|
|
|
setValueIfPresent(form2, "de_not", commonField.getOthers().get("replaceInsuranceNotYet")); |
|
|
|
|
|
|
|
setValueIfPresent(form2, "salary", commonField.getFna_c3b_salary()); |
|
|
|
setValueIfPresent(form2, "investment", commonField.getFna_c3b_investments()); |
|
|
|
setValueIfPresent(form2, "savings", commonField.getFna_c3b_saving()); |
|
|
|
setValueIfPresent(form2, "rental_income", commonField.getFna_c3b_income()); |
|
|
|
setValueIfPresent(form2, "others", commonField.getFna_c3b_others()); |
|
|
|
|
|
|
|
// case "policy_replacement" -> commonField.setFna_c3b_policy(fieldValue);\ |
|
|
|
} |
|
|
|
|
|
|
|
private void HSBCA31_textBox(PdfAcroForm form, CommonField commonField, Client client){ |
|
|
|
@@ -1694,7 +1727,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "Text174", commonField.getOthers().get("empCompanyName")); |
|
|
|
setValueIfPresent(form, "Text173_1", StringUtils.trimToNull(StringUtils.trimToEmpty(StringUtils.trimToEmpty(commonField.getOthers().get("empNatureA")) + " " + StringUtils.trimToEmpty(commonField.getOthers().get("empNatureB"))))); |
|
|
|
setValueIfPresent(form, "fill_16_2", commonField.getOthers().get("empPosition")); |
|
|
|
setValueIfPresent(form, "fill_17_1", commonField.getOthers().get("empCompanyAddress1")); |
|
|
|
setValueIfPresent(form, "fill_17_1", commonField.getOthers().get("empCompanyAddress")); |
|
|
|
/* Page2 End */ |
|
|
|
/* Page3 Start */ |
|
|
|
//setValueIfPresent(form, "undefined_51", commonField.getContactNo()); |
|
|
|
@@ -1956,14 +1989,13 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
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()); |
|
|
|
}else if(StringUtils.trimToNull(commonField.getPassportNo()) != null || "Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
setValueIfPresent(form, "ID1", commonField.getPassportNo()); |
|
|
|
} |
|
|
|
|
|
|
|
setValueIfPresent(form, "Nationality1", commonField.getCountryOfCitizenship()); |
|
|
|
setValueIfPresent(form, "Company1", commonField.getOthers().get("empCompanyName")); |
|
|
|
setValueIfPresent(form, "BusinessNature1", commonField.getOthers().get("empNatureA")); |
|
|
|
setValueIfPresent(form, "BusinessNature2", commonField.getOthers().get("empNatureB")); |
|
|
|
setValueIfPresent(form, "BusinessNature1", StringUtils.trimToEmpty(commonField.getOthers().get("empNatureA")) + " " + StringUtils.trimToEmpty(commonField.getOthers().get("empNatureB"))); |
|
|
|
setValueIfPresent(form, "Occupation1", commonField.getOthers().get("empPosition")); |
|
|
|
setValueIfPresent(form, "JobNature1", StringUtils.trimToEmpty(commonField.getOthers().get("empNatureA")) + " " + StringUtils.trimToEmpty(commonField.getOthers().get("empNatureB"))); |
|
|
|
|
|
|
|
@@ -2036,6 +2068,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
setValueIfPresent(form2, "Checkbox_ID11", commonField.getOthers().get("hkidPerm")); |
|
|
|
setValueIfPresent(form2, "Checkbox_ID12", commonField.getOthers().get("hkidNon")); |
|
|
|
logger.info("##### prcId:" +commonField.getOthers().get("prcId")); |
|
|
|
setValueIfPresent(form2, "Checkbox_ID14", commonField.getOthers().get("prcId")); |
|
|
|
setValueIfPresent(form2, "Checkbox_ID16", commonField.getOthers().get("passportYes")); |
|
|
|
setValueIfPresent(form2, "Checkbox_ID17", commonField.getOthers().get("othersId")); |
|
|
|
@@ -2055,16 +2088,25 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "Checkbox_EudcationPri", commonField.getEduPri()); |
|
|
|
setValueIfPresent(form2, "Checkbox_EudcationSec", commonField.getEduSec()); |
|
|
|
setValueIfPresent(form2, "Checkbox_EudcationPostSec", commonField.getEduPostSec()); |
|
|
|
if("Yes".equals(commonField.getEduUni())){ |
|
|
|
setValueIfPresent(form2, "Checkbox_EudcationPostSec", "Off"); |
|
|
|
setValueIfPresent(form2, "Checkbox_EudcationTer", commonField.getEduUni()); |
|
|
|
} |
|
|
|
setValueIfPresent(form2, "Checkbox_EudcationTer", commonField.getEduUni()); |
|
|
|
|
|
|
|
|
|
|
|
/* Page3 End */ |
|
|
|
/* Page6 Start */ |
|
|
|
|
|
|
|
setValueIfPresent(form2, "c_USACitizen1yes", commonField.getOthers().get("usPerson")); |
|
|
|
setValueIfPresent(form2, "c_USACitizen1no", commonField.getOthers().get("usPersonNot")); |
|
|
|
|
|
|
|
/* Page6 End */ |
|
|
|
/* Page8 Start */ |
|
|
|
setValueIfPresent(form2, "c_DeclartionYes", commonField.getReplaceInsuranceYes()); |
|
|
|
setValueIfPresent(form2, "c_DeclartionNo", commonField.getReplaceInsuranceNo()); |
|
|
|
/* Page8 End */ |
|
|
|
/* Page8 End */ |
|
|
|
/* Page9 Start */ |
|
|
|
setValueIfPresent(form2, "c_Assessment1", commonField.getOthers().get("replaceInsuranceNotYet")); |
|
|
|
setValueIfPresent(form2, "c_Assessment12", commonField.getReplaceInsuranceYes()); |
|
|
|
setValueIfPresent(form2, "c_Assessment13", commonField.getReplaceInsuranceNo()); |
|
|
|
/* Page9 End */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@@ -2073,7 +2115,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form, "surname", StringUtils.trimToEmpty(client.getLastname())); |
|
|
|
setValueIfPresent(form, "given_name", StringUtils.trimToEmpty(client.getFirstname())); |
|
|
|
|
|
|
|
setValueIfPresent(form, "ChineseName1", commonField.getNameChi()); |
|
|
|
setValueIfPresent(form, "chinese_name", commonField.getNameChi()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "ch1_4_m", commonField.getGenderMale()); |
|
|
|
setValueIfPresent(form, "ch1_4_f", commonField.getGenderFemale()); |
|
|
|
@@ -2090,8 +2132,13 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
}else if("Yes".equals(commonField.getOthers().get("prcId"))){ |
|
|
|
setValueIfPresent(form, "1_10prc", commonField.getPassportNo()); |
|
|
|
|
|
|
|
}else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
}else if(StringUtils.trimToNull(commonField.getPassportNo()) != null || "Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
setValueIfPresent(form, "1_10passport", commonField.getPassportNo()); |
|
|
|
|
|
|
|
setValueIfPresent(form, "1_10_pexpiry_dd", commonField.getOthers().get("passportExpiryDD")); |
|
|
|
setValueIfPresent(form, "1_10_pexpiry_mm", commonField.getOthers().get("passportExpiryMM")); |
|
|
|
setValueIfPresent(form, "1_10_pexpiry_yyyy", commonField.getOthers().get("passportExpiryYYYY")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/* Page1 End */ |
|
|
|
@@ -2195,6 +2242,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
/* Page3 End */ |
|
|
|
/* Page6 Start */ |
|
|
|
|
|
|
|
/* |
|
|
|
setValueIfPresent(form, "4_1_name1_1", commonField.getInsuranceCompany1_1()); |
|
|
|
setValueIfPresent(form, "4_1_name2_1", commonField.getInsuranceCompany2_1()); |
|
|
|
setValueIfPresent(form, "4_1_name3_1", commonField.getInsuranceCompany3_1()); |
|
|
|
@@ -2248,6 +2296,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
if("Yes".equals(commonField.getInsuranceCritical3())){ |
|
|
|
setValueIfPresent(form, "ch4_3_critical", "Off"); |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
setValueIfPresent(form, "5_1a_city1", commonField.getOthers().get("travelCity1")); |
|
|
|
setValueIfPresent(form, "5_1a_city2", commonField.getOthers().get("travelCity2")); |
|
|
|
@@ -2386,13 +2435,21 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
/* Page1 Start */ |
|
|
|
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale()); |
|
|
|
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale()); |
|
|
|
|
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch1_5n", commonField.getTobarccoYes()); |
|
|
|
setValueIfPresent(form2, "ch1_5s", commonField.getTobarccoNo()); |
|
|
|
|
|
|
|
if("Yes".equals(commonField.getOthers().get("hkidPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))) |
|
|
|
setValueIfPresent(form2, "ch1_10birth", "Yes"); |
|
|
|
else if("Yes".equals(commonField.getOthers().get("prcId"))) |
|
|
|
setValueIfPresent(form2, "ch1_10orc", commonField.getIdCard()); |
|
|
|
else if("Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ) |
|
|
|
else if(StringUtils.trimToNull(commonField.getPassportNo()) != null || "Yes".equals(commonField.getOthers().get("passportYes")) || "Yes".equals(commonField.getOthers().get("travelDocYes")) ){ |
|
|
|
setValueIfPresent(form2, "ch1_10passport", "Yes"); |
|
|
|
if(StringUtils.trimToNull(commonField.getOthers().get("passportExpiryDD")) != null){ |
|
|
|
setValueIfPresent(form2, "ch1_10_pexpiry", "Yes"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* Page1 End */ |
|
|
|
/* Page2 Start */ |
|
|
|
@@ -2467,7 +2524,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
*/ |
|
|
|
/* Page3 End */ |
|
|
|
/* Page6 Start */ |
|
|
|
//f(commonField.getInsuranceSumInsured1() != null && !commonField.getInsuranceSumInsured1().isBlank()){ |
|
|
|
/* |
|
|
|
//f(commonField.getInsuranceSumInsured1() != null && !commonField.getInsuranceSumInsured1().isBlank()){ |
|
|
|
setValueIfPresent(form2, "ch4_1_life", "On"); |
|
|
|
setValueIfPresent(form2, "ch4_1_accident", "On"); |
|
|
|
setValueIfPresent(form2, "ch4_1_critical", "On"); |
|
|
|
@@ -2508,19 +2566,24 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
if("Yes".equals(commonField.getInsuranceCritical3())){ |
|
|
|
setValueIfPresent(form2, "ch4_3_critical", "Off"); |
|
|
|
} |
|
|
|
*/ |
|
|
|
setValueIfPresent(form2, "ch5_1_yes", commonField.getOthers().get("travelYes")); |
|
|
|
setValueIfPresent(form2, "ch5_1_no", commonField.getOthers().get("travelNo")); |
|
|
|
|
|
|
|
/* Page6 End */ |
|
|
|
/* Page7 Start */ |
|
|
|
setValueIfPresent(form2, "ch5_1c_yes", commonField.getOthers().get("futureAddressYes")); |
|
|
|
setValueIfPresent(form2, "ch5_1c_no", commonField.getOthers().get("futureAddressNo")); |
|
|
|
if("Yes".equals(commonField.getOthers().get("hazard"))){ |
|
|
|
setValueIfPresent(form2, "ch5_2_yes", "Yes"); |
|
|
|
} |
|
|
|
if("Off".equals(commonField.getOthers().get("hazard"))){ |
|
|
|
setValueIfPresent(form2, "ch5_2_no", "Yes"); |
|
|
|
} |
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch5_2_yes", commonField.getOthers().get("hazardYes")); |
|
|
|
setValueIfPresent(form2, "ch5_2_no", commonField.getOthers().get("hazardNo")); |
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch5_3_yes", commonField.getDeclinedYes()); |
|
|
|
setValueIfPresent(form2, "ch5_3_no", commonField.getDeclinedNo()); |
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch5_5_yes", commonField.getOthers().get("politicalYes")); |
|
|
|
setValueIfPresent(form2, "ch5_5_no", commonField.getOthers().get("politicalNo")); |
|
|
|
|
|
|
|
setValueIfPresent(form2, "ch5_6_yes", commonField.getOthers().get("pendingChargeYes")); |
|
|
|
setValueIfPresent(form2, "ch5_6_no", commonField.getOthers().get("pendingChargeNo")); |
|
|
|
|
|
|
|
@@ -2530,6 +2593,11 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
setValueIfPresent(form2, "7_2b_yes", commonField.getOthers().get("empOtherBenefitsYes")); |
|
|
|
setValueIfPresent(form2, "6_2b_no", commonField.getOthers().get("empOtherBenefitsNo")); |
|
|
|
/* Page10 End */ |
|
|
|
|
|
|
|
/* Page13 Start */ |
|
|
|
setValueIfPresent(form2, "8_yes", commonField.getReplaceInsuranceYes()); |
|
|
|
setValueIfPresent(form2, "8_no", commonField.getReplaceInsuranceNo()); |
|
|
|
setValueIfPresent(form2, "8_not", commonField.getOthers().get("replaceInsuranceNotYet")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@@ -2733,7 +2801,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
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_dd" -> commonField.getOthers().put("passportExpiryDD", fieldValue); |
|
|
|
case "fill_14_mm" -> commonField.getOthers().put("passportExpiryMM", fieldValue); |
|
|
|
case "fill_14_yyyy" -> commonField.getOthers().put("passportExpiryYYYY", fieldValue); |
|
|
|
case "fill_15" -> commonField.setPlaceOfBirth(fieldValue); |
|
|
|
case "fill_16" -> commonField.setCountryOfCitizenship(fieldValue); |
|
|
|
|
|
|
|
@@ -2778,6 +2848,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
case "others_funds" -> commonField.setFna_c3b_others(fieldValue); |
|
|
|
case "others_funds_desc" -> commonField.setFna_c3b_desc(fieldValue); |
|
|
|
|
|
|
|
case "politicalYes" -> commonField.getOthers().put("politicalYes", fieldValue); |
|
|
|
case "politicalNo" -> commonField.getOthers().put("politicalNo", fieldValue); |
|
|
|
|
|
|
|
case "relate1_name" -> { |
|
|
|
for(int i=1; i<=9; i++){ |
|
|
|
if(StringUtils.trimToNull(acroForm.getField("relate" + i + "_name").getValueAsString()) != null){ |
|
|
|
@@ -2935,6 +3008,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
case "fill_10_7" -> commonField.getOthers().put("replaceInsuranceDesc", fieldValue); |
|
|
|
/* Page7 End */ |
|
|
|
/* Page8 Start */ |
|
|
|
case "toggle_1_4" -> commonField.getOthers().put("usPerson", fieldValue); |
|
|
|
case "toggle_2_3" -> commonField.getOthers().put("usPersonNot", fieldValue); |
|
|
|
|
|
|
|
case "employed" -> commonField.setEmployed(fieldValue); |
|
|
|
case "homemaker" -> commonField.setHomemaker(fieldValue); |
|
|
|
case "student" -> commonField.setStudent(fieldValue); |
|
|
|
@@ -2977,6 +3053,14 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
/* Page9 End */ |
|
|
|
|
|
|
|
/* Page10 Start */ |
|
|
|
|
|
|
|
//case "ch1_12_self" -> commonField.setEmployedSelf(fieldValue); |
|
|
|
case "emp_employed" -> commonField.setEmployed(fieldValue); |
|
|
|
case "emp_homemaker" -> commonField.setHomemaker(fieldValue); |
|
|
|
case "emp_student" -> commonField.setStudent(fieldValue); |
|
|
|
//case "ch1_12_housewife" -> commonField.setEmployedSelf(fieldValue); |
|
|
|
case "emp_retired" -> commonField.setRetired(fieldValue); |
|
|
|
|
|
|
|
case "emp1_position" -> commonField.getOthers().put("empPosition", fieldValue); |
|
|
|
case "emp1_company_name" -> commonField.getOthers().put("empCompanyName", fieldValue); |
|
|
|
case "emp1_duties" -> commonField.getOthers().put("empDuties", fieldValue); |
|
|
|
@@ -3409,10 +3493,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
|
|
|
|
case "part3_3_4" -> commonField.setFna_c2a_amount(fieldValue); //need to /7.78 |
|
|
|
|
|
|
|
case "part3_3_5_2a" -> commonField.setFna_c3b_saving(fieldValue); |
|
|
|
case "part3_3_5_2b" -> commonField.setFna_c3b_investments(fieldValue); |
|
|
|
case "part3_3_5_2c" -> commonField.setFna_c3b_others(fieldValue); |
|
|
|
case "part3_3_5_2c_other" -> commonField.setFna_c3b_desc(fieldValue); |
|
|
|
//case "part3_3_5_2a" -> commonField.setFna_c3b_saving(fieldValue); |
|
|
|
//case "part3_3_5_2b" -> commonField.setFna_c3b_investments(fieldValue); |
|
|
|
//case "part3_3_5_2c" -> commonField.setFna_c3b_others(fieldValue); |
|
|
|
//case "part3_3_5_2c_other" -> commonField.setFna_c3b_desc(fieldValue); |
|
|
|
|
|
|
|
case "part3_3_6_yes" -> commonField.setFna_c3c_yes(fieldValue); |
|
|
|
case "part3_3_6_no" -> commonField.setFna_c3c_no(fieldValue); |
|
|
|
@@ -3499,8 +3583,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito |
|
|
|
case "cb4c2" -> commonField.setFna_c3a_6_10(fieldValue); |
|
|
|
case "cb4c3" -> commonField.setFna_c3a_11_15(fieldValue); |
|
|
|
case "cb4c4" -> commonField.setFna_c3a_16_20(fieldValue); |
|
|
|
case "cb4c5" -> commonField.setFna_c3a_life(fieldValue); |
|
|
|
case "cb4c6" -> commonField.setFna_c3a_single_pay(fieldValue); |
|
|
|
case "cb4c5" -> commonField.setFna_c3a_20(fieldValue); |
|
|
|
case "cb4c6" -> commonField.setFna_c3a_life(fieldValue); |
|
|
|
|
|
|
|
case "cb4d1" -> commonField.setFna_c1e_10(fieldValue); |
|
|
|
case "cb4d2" -> commonField.setFna_c1e_10_20(fieldValue); |
|
|
|
|