浏览代码

no message

master
父节点
当前提交
cd558c3b30
共有 4 个文件被更改,包括 133 次插入62 次删除
  1. +6
    -0
      build.gradle
  2. +95
    -62
      src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java
  3. +16
    -0
      src/main/resources/application-prod.yml
  4. +16
    -0
      src/main/resources/application.yml

+ 6
- 0
build.gradle 查看文件

@@ -61,11 +61,17 @@ dependencies {
implementation 'com.itextpdf:kernel:7.2.5'
implementation 'com.itextpdf:io:7.2.5'

implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.security:spring-security-oauth2-jose'
implementation 'com.azure.spring:spring-cloud-azure-starter-active-directory:5.12.0'
runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'com.unboundid:unboundid-ldapsdk:6.0.9'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}

configurations {


+ 95
- 62
src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java 查看文件

@@ -798,20 +798,20 @@ 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", commonField.getFna_c1d_amount());
setValueIfPresent(form, "fna_c1d_amount", formatNum(client.getTotalIncomeCurrent()));
setValueIfPresent(form, "fna_c2a_amount", commonField.getFna_c2a_amount());

setValueIfPresent(form, "fna_c2b_amount", commonField.getFna_c2b_amount());
setValueIfPresent(form, "fna_c2b_amount", formatNum(client.getTotalLiabilitiesCurrent()));
setValueIfPresent(form, "fna_c2c_amount", commonField.getFna_c2c_amount());
setValueIfPresent(form, "fna_c2d_amount", formatNum(client.getPrincipalCurrent()));
setValueIfPresent(form, "fna_c2e_amount", commonField.getFna_c2e_amount());
setValueIfPresent(form, "fna_c2e_amount", formatNum(client.getTotalLiquidAssetCurrent()));
setValueIfPresent(form, "fna_b1_a", commonField.getFna_b1_a());
setValueIfPresent(form, "fna_b1_a_amount", commonField.getFna_b1_a_amount());

setValueIfPresent(form, "fna_b1a_4_amount", commonField.getFna_b1a_4_amount());
setValueIfPresent(form, "fna_b1_d_year", commonField.getFna_b1_d_year());
setValueIfPresent(form, "fna_b1_d_amount", commonField.getFna_b1_d_amount());
setValueIfPresent(form, "fna_b1_d_amount", formatNum(commonField.getFna_b1_d_amount()));
/* Page1 End */
/* Page2 Start */
setValueIfPresent(form, "fna_b1_f_other", commonField.getFna_b1_f_other());
@@ -827,6 +827,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
/* Page5 Start */
setValueIfPresent(form, "fna_a_retire", commonField.getFna_a_retire());

setValueIfPresent(form, "fna_c3a_single_pay_max", formatNum(commonField.getOthers().get("singlePayAmount")));
setValueIfPresent(form, "fna_c3a_single_pay_max_ch", formatNum(commonField.getOthers().get("singlePayAmount")));
setValueIfPresent(form, "fna_c3b_desc", commonField.getFna_c3b_desc());
/* Page5 End */

@@ -876,6 +879,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "fna_a_life_less_5", commonField.getFna_a_life_less_5());
setValueIfPresent(form2, "fna_a_life_above_5", commonField.getFna_a_life_above_5());

if(convertStringToNum(commonField.getFna_b1_d_amount()) > 0){
setValueIfPresent(form2, "fna_b1_d", "Yes");
}

setValueIfPresent(form2, "fna_b1_a", commonField.getFna_b1_a());
setValueIfPresent(form2, "fna_b1b_1", commonField.getFna_b1b_1());
setValueIfPresent(form2, "fna_b1b_2", commonField.getFna_b1b_2());
@@ -918,8 +925,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "fna_c3a_16_20", commonField.getFna_c3a_16_20());
setValueIfPresent(form2, "fna_c3a_20", commonField.getFna_c3a_20());
setValueIfPresent(form2, "fna_c3a_life", commonField.getFna_c3a_life());
setValueIfPresent(form2, "fna_c3a_single_pay", commonField.getFna_c3a_single_pay());
setValueIfPresent(form2, "fna_c3a_single_pay_max", commonField.getOthers().get("singlePayAmount"));
if(convertStringToNum(commonField.getOthers().get("singlePayAmount")) > 0){
setValueIfPresent(form2, "fna_c3a_single_pay", "Yes");
}
setValueIfPresent(form2, "fna_c3b_salary", commonField.getFna_c3b_salary());
setValueIfPresent(form2, "fna_c3b_income", commonField.getFna_c3b_income());
@@ -960,13 +968,14 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "fill_12", commonField.getFna_c1b_amount() ); //annual
}
setValueIfPresent(form, "fill_12a", commonField.getFna_c1c_3_amount());
setValueIfPresent(form, "fill_12a", addNums(commonField.getFna_c1c_3_amount(), commonField.getFna_c1c_2_amount()));
setValueIfPresent(form, "fill_13", commonField.getFna_c1c_3_amount());
setValueIfPresent(form, "fill_14", commonField.getFna_c1c_2_amount());
setValueIfPresent(form, "fill_16", commonField.getFna_c1d_amount());
setValueIfPresent(form, "fill_16", substractNums(commonField.getTotalAnnualIncome(), substractNums(commonField.getFna_c1b_amount(), addNums(commonField.getFna_c1c_3_amount(), commonField.getFna_c1c_2_amount()))));
/* Page1 End */
/* Page2 Start */
setValueIfPresent(form, "fill_01", commonField.getFna_c2a_amount());
setValueIfPresent(form, "fill_01", formatNum(client.getTotalLiquidAssetCurrent()));
setValueIfPresent(form, "fill_02", commonField.getFna_c2b_amount());
setValueIfPresent(form, "fill_03", commonField.getFna_c2c_amount());
setValueIfPresent(form, "fill_04", commonField.getFna_c2d_amount());
@@ -1037,13 +1046,17 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "toggle_5_2", commonField.getFna_c3a_20());
setValueIfPresent(form2, "toggle_6_2", commonField.getFna_c3a_life());
setValueIfPresent(form2, "toggle_6_2_sum", commonField.getFna_c3a_single_pay());
if("yes".equals(commonField.getFna_c3b_salary())
&& "yes".equals(commonField.getFna_c3b_income())){
setValueIfPresent(form2, "toggle_1f", "yes");
if("Yes".equals(commonField.getFna_c3a_single_pay())){
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_saving())
&& "yes".equals(commonField.getFna_c3b_investments())){
setValueIfPresent(form2, "toggle_1g", "yes");
if("Yes".equals(commonField.getFna_c3b_saving())
&& "Yes".equals(commonField.getFna_c3b_investments())){
setValueIfPresent(form2, "toggle_1g", "Yes");
}
setValueIfPresent(form2, "toggle_1h", commonField.getFna_c3c_yes());
setValueIfPresent(form2, "Check Box6", commonField.getFna_c1e_10());
@@ -1065,7 +1078,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
//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");
//setValueIfPresent(form2, "toggle_1g", "Yes");
}
}
@@ -1199,6 +1212,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito

/* Page1 End */
/* Page2 Start */
setValueIfPresent(form, "4a1", commonField.getFna_c1d_amount());
setValueIfPresent(form, "4a3", commonField.getFna_c1d_amount());
setValueIfPresent(form, "4b1", commonField.getFna_c2a_amount());
setValueIfPresent(form, "4b2", commonField.getFna_c2a_desc());
@@ -1284,7 +1299,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito

/* Page1 END */
/* Page2 Start */
setValueIfPresent(form2, "cb4a1", commonField.getFna_c1d_amount());
//tick chech > 0
if(convertStringToNum(commonField.getFna_c1d_amount()) > 0){
setValueIfPresent(form2, "cb4a1", "Yes");
}
setValueIfPresent(form2, "cb4b1", commonField.getFna_c2a_cash());
setValueIfPresent(form2, "cb4b2", commonField.getFna_c2a_bank_account());
setValueIfPresent(form2, "cb4b3", commonField.getFna_c2a_market_account());
@@ -1318,7 +1336,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "cb4h2", commonField.getFna_c3c_no());

//tick cb4c7
if(commonField.getFna_c1d_amount() != null){
if(commonField.getFna_c3a_single_pay() != null){
setValueIfPresent(form2, "cb4c7", "Yes");
}
@@ -1349,7 +1367,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "1_12_3", commonField.getOthers().get("workHighDesc"));
if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon")))
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());
@@ -1663,6 +1681,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
/* Page2 Start */
setValueIfPresent(form, "Text16_1", getCrAddress1(client));
setValueIfPresent(form, "Text16_2", getCrAddress2(client));
setValueIfPresent(form, "fill_2b_1", client.getCrAddressPostalCode());

//setValueIfPresent(form, "address1", commonField.getOthers().get("address1"));
//setValueIfPresent(form, "address2", commonField.getOthers().get("address2"));
@@ -1772,7 +1791,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "fill_61", formatNum(client.getBankingFacilityCurrent()));
setValueIfPresent(form, "fill_62", formatNum(client.getBankingFacilityLast()));
//other 1
setValueIfPresent(form, "fill_5_7", "Principal");
logger.info("getPrefFinancePrincipalCurrent:" + convertStringToNum(client.getPrefFinancePrincipalCurrent()));
if(convertStringToNum(client.getPrefFinancePrincipalCurrent()) > 0){
setValueIfPresent(form, "fill_5_7", "Principal");
}
setValueIfPresent(form, "fill_65", formatNum(client.getPrefFinancePrincipalCurrent()));
setValueIfPresent(form, "fill_66", formatNum(client.getPrefFinancePrincipalLast()));
setValueIfPresent(form, "fill_69", formatNum(client.getPrefFinanceOtherCurrent()));
@@ -1793,8 +1815,6 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "fill_78", commonField.getRealEstatePurchaseDate2());
setValueIfPresent(form, "fill_82", commonField.getRealEstatePurchaseDate3());


setValueIfPresent(form, "Text26001", commonField.getBankruptDesc());
/* Page14 End */
setValueIfPresent(form, "fill_4_12", commonField.getFna_a_retire());
@@ -1820,6 +1840,17 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "Check Box22", commonField.getOthers().get("passportYes"));
setValueIfPresent(form2, "Check Boxk23", commonField.getOthers().get("travelDocYes"));
}

if("Yes".equals(commonField.getGenderMale())){
setValueIfPresent(form2, "Check Box2", "Yes");
}else if("Yes".equals(commonField.getGenderMale())){
if("Yes".equals(commonField.getOthers().get("maritalStatusMarried"))){
setValueIfPresent(form2, "Check Box3", "Yes");
}else{
setValueIfPresent(form2, "Check Box4", "Yes");
}
}
/* Page1 End */
@@ -1892,6 +1923,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "Check Box65c", commonField.getOthers().get("sourceInvestment"));
setValueIfPresent(form2, "Check Box65d", commonField.getOthers().get("premiumFinanceYes"));
setValueIfPresent(form2, "Check Box65e", commonField.getOthers().get("sourceOther"));

setValueIfPresent(form2, "Check Box65b", commonField.getBankruptYes());
setValueIfPresent(form2, "Check Box83", commonField.getBankruptNo());
/* Page14 End */
/* Page25 Start */
setValueIfPresent(form2, "Check Box18211", commonField.getReplaceInsuranceYes());
@@ -1905,8 +1940,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito

private void MLB03S_textBox(PdfAcroForm form, CommonField commonField, Client client){
/* Page1 Start */
setValueIfPresent(form, "SurName1", StringUtils.trimToEmpty(client.getFirstname()));
setValueIfPresent(form, "GivenName1", StringUtils.trimToEmpty(client.getLastname()));
setValueIfPresent(form, "SurName1", StringUtils.trimToEmpty(client.getLastname()));
setValueIfPresent(form, "GivenName1", StringUtils.trimToEmpty(client.getFirstname()));

setValueIfPresent(form, "ChineseName1", commonField.getNameChi());

@@ -1915,9 +1950,9 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "YYYY1", commonField.getYyyyDateOfBirth());
setValueIfPresent(form, "Field_LocationA1", commonField.getPlaceOfBirth());
//setValueIfPresent(form, "Field_LocationB1", commonField.getPlaceOfBirth());
setValueIfPresent(form, "Field_LocationB1", commonField.getCountryOfCitizenship());
if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))){
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());
@@ -1925,17 +1960,16 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "1_10passport", commonField.getPassportNo());
}

setValueIfPresent(form, "Nationality1", commonField.getCountryOfCitizenship());
setValueIfPresent(form, "Company1", commonField.getCompanyName());
setValueIfPresent(form, "BusinessNature1", commonField.getCompanyNature1());
setValueIfPresent(form, "BusinessNature2", commonField.getCompanyNature2());
setValueIfPresent(form, "Occupation1", commonField.getOccupation());
setValueIfPresent(form, "JobNature1", commonField.getOccupationTitle());
setValueIfPresent(form, "Company1", commonField.getOthers().get("empCompanyName"));
setValueIfPresent(form, "BusinessNature1", commonField.getOthers().get("empNatureA"));
setValueIfPresent(form, "BusinessNature2", 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")));
setValueIfPresent(form, "Income1", addNums(commonField.getIncomeSalary(), commonField.getIncomeBonus()) );

setValueIfPresent(form, "JobNature1", client.getCrAddressRoom());
setValueIfPresent(form, "Room1", client.getCrAddressRoom());
setValueIfPresent(form, "Floor1", client.getCrAddressFloor());
setValueIfPresent(form, "Block1", client.getCrAddressBlock());
setValueIfPresent(form, "Building1", client.getCrAddressBuilding());
@@ -1948,7 +1982,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
/* Page1 End */
/* Page2 Start */
setValueIfPresent(form, "Room3", client.getCorAddressRoom());
setValueIfPresent(form, "Room3", client.getCorAddressBlock());
setValueIfPresent(form, "Floor3", client.getCorAddressBlock());
setValueIfPresent(form, "Block3", client.getCorAddressBlock());
setValueIfPresent(form, "Building3", client.getCorAddressBuilding());
setValueIfPresent(form, "Street3", client.getCorAddressStreet());
@@ -2007,7 +2041,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "Checkbox_ID17", commonField.getOthers().get("othersId"));
setValueIfPresent(form2, "Checkbox_Y", commonField.getTobarccoYes());
setValueIfPresent(form2, "Checkbox_N", commonField.getTobarccoYes());
setValueIfPresent(form2, "Checkbox_N", commonField.getTobarccoNo());
/* Page1 End */
/* Page3 Start */
setValueIfPresent(form2, "Checkbox_Wealth1", commonField.getOthers().get("sourceIncome"));
@@ -2021,7 +2055,11 @@ 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());
setValueIfPresent(form2, "Checkbox_EudcationTer", commonField.getEduUni());
if("Yes".equals(commonField.getEduUni())){
setValueIfPresent(form2, "Checkbox_EudcationPostSec", "Off");
setValueIfPresent(form2, "Checkbox_EudcationTer", commonField.getEduUni());
}
/* Page3 End */
/* Page8 Start */
setValueIfPresent(form2, "c_DeclartionYes", commonField.getReplaceInsuranceYes());
@@ -2032,8 +2070,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito

private void SLGII_textBox(PdfAcroForm form, CommonField commonField, Client client){
/* Page1 Start */
setValueIfPresent(form, "surname", StringUtils.trimToEmpty(client.getFirstname()));
setValueIfPresent(form, "given_name", StringUtils.trimToEmpty(client.getLastname()));
setValueIfPresent(form, "surname", StringUtils.trimToEmpty(client.getLastname()));
setValueIfPresent(form, "given_name", StringUtils.trimToEmpty(client.getFirstname()));

setValueIfPresent(form, "ChineseName1", commonField.getNameChi());

@@ -2047,7 +2085,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "1_7", commonField.getPlaceOfBirth());
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship());

if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))){
if("Yes".equals(commonField.getOthers().get("hkidPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon"))){
setValueIfPresent(form, "1_10id", commonField.getIdCard());
}else if("Yes".equals(commonField.getOthers().get("prcId"))){
setValueIfPresent(form, "1_10prc", commonField.getPassportNo());
@@ -2057,14 +2095,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
}
/* Page1 End */
/* Page2 Start */
setValueIfPresent(form, "ch1_12_self", commonField.getEmployedSelf());
setValueIfPresent(form, "ch1_12_full", commonField.getEmployed());
setValueIfPresent(form, "ch1_12_student", commonField.getStudent());
setValueIfPresent(form, "ch1_12_housewife", commonField.getPartTime());
setValueIfPresent(form, "ch1_12_part", commonField.getHomemaker());
setValueIfPresent(form, "ch1_12_retired", commonField.getRetired());
/* Page2 Start */
setValueIfPresent(form, "1_12_detail1", commonField.getOthers().get("workHighDesc"));

setValueIfPresent(form, "1_12_occupation", commonField.getOthers().get("empPosition"));
@@ -2306,8 +2337,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "7_2c_stocks_24", formatNum(client.getInvestmentsLast()));
setValueIfPresent(form, "7_2c_business", formatNum(client.getNetBusinessInterestCurrent()));
setValueIfPresent(form, "7_2c_business_24", formatNum(client.getNetBusinessInterestLast()));
setValueIfPresent(form, "7_2c_high", formatNum(client.getPersonalPropertiesCurrent()));
setValueIfPresent(form, "7_2c_high_24", formatNum(client.getPersonalPropertiesLast()));
//setValueIfPresent(form, "7_2c_high", formatNum(client.getPersonalPropertiesCurrent()));
//setValueIfPresent(form, "7_2c_high_24", formatNum(client.getPersonalPropertiesLast()));
setValueIfPresent(form, "7_2c_other", addNums(formatNum(client.getOtherLiquidCurrent()), formatNum(client.getOtherNonLiquidCurrent())));
setValueIfPresent(form, "7_2c_other_24", addNums(formatNum(client.getOtherLiquidLast()), formatNum(client.getOtherNonLiquidLast())));

@@ -2322,17 +2353,17 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "7_2c_lia_mortgages_24", formatNum(client.getMortgageLast()));
setValueIfPresent(form, "7_2c_lia_margin", formatNum(client.getMarginAccountCurrent()));
setValueIfPresent(form, "7_2c_lia_margin_24", formatNum(client.getMarginAccountLast()));
setValueIfPresent(form, "7_2c_lia_loan", formatNum(client.getLoanGuaranteesCurrent()));
setValueIfPresent(form, "7_2c_lia_loan_24", formatNum(client.getLoanGuaranteesLast()));
setValueIfPresent(form, "7_2c_lia_loan_gr", formatNum(client.getLoanGuaranteesCurrent()));
setValueIfPresent(form, "7_2c_lia_loan_gr_24", formatNum(client.getLoanGuaranteesLast()));
setValueIfPresent(form, "7_2c_lia_banking", formatNum(client.getBankingFacilityCurrent()));
setValueIfPresent(form, "7_2c_lia_banking_24", formatNum(client.getBankingFacilityLast()));
setValueIfPresent(form, "7_2c_lia_other", addNums(formatNum(client.getOtherPrefFinanceCurrent()), formatNum(client.getPrincipalCurrent())));
setValueIfPresent(form, "7_2c_lia_other_24", addNums(formatNum(client.getOtherPrefFinanceLast()), formatNum(client.getPrincipalLast())));
//sum liabilities
setValueIfPresent(form, "7_2c_lia_total", addNums(form.getField("7_2c_lia_loan").getValueAsString(), form.getField("7_2c_lia_mortgages").getValueAsString(), form.getField("7_2c_lia_margin").getValueAsString(), form.getField("7_2c_lia_loan").getValueAsString(), form.getField("7_2c_lia_other").getValueAsString()));
setValueIfPresent(form, "7_2c_lia_total_24", addNums(form.getField("7_2c_lia_loan_24").getValueAsString(), form.getField("7_2c_lia_mortgages_24").getValueAsString(), form.getField("7_2c_lia_margin_24").getValueAsString(), form.getField("7_2c_lia_loan_24").getValueAsString(), form.getField("7_2c_lia_other_24").getValueAsString()));
setValueIfPresent(form, "7_2c_lia_total", addNums(form.getField("7_2c_lia_loan").getValueAsString(), form.getField("7_2c_lia_loan_gr").getValueAsString(), form.getField("7_2c_lia_mortgages").getValueAsString(), form.getField("7_2c_lia_margin").getValueAsString(), form.getField("7_2c_lia_banking").getValueAsString(), form.getField("7_2c_lia_other").getValueAsString()));
setValueIfPresent(form, "7_2c_lia_total_24", addNums(form.getField("7_2c_lia_loan_24").getValueAsString(), form.getField("7_2c_lia_loan_gr_24").getValueAsString(), form.getField("7_2c_lia_mortgages_24").getValueAsString(), form.getField("7_2c_lia_margin_24").getValueAsString(), form.getField("7_2c_lia_banking_24").getValueAsString(), form.getField("7_2c_lia_other_24").getValueAsString()));
setValueIfPresent(form, "7_2d_address1_1", commonField.getOthers().get("realEstateAddress1_1"));
setValueIfPresent(form, "7_2d_address1_2", commonField.getOthers().get("realEstateAddress1_2"));
setValueIfPresent(form, "7_2d_address2_1", commonField.getOthers().get("realEstateAddress2_1"));
@@ -2356,7 +2387,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale());
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale());
if("Yes".equals(commonField.getOthers().get("hkIdPerm")) || "Yes".equals(commonField.getOthers().get("hkidNon")))
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());
@@ -2377,7 +2408,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "ch1_12_student", commonField.getStudent());
setValueIfPresent(form2, "ch1_12_housewife", commonField.getPartTime());
setValueIfPresent(form2, "ch1_12_part", commonField.getHomemaker());
setValueIfPresent(form2, "ch1_12_retired", commonField.getBankruptNo());
setValueIfPresent(form2, "ch1_12_retired", commonField.getRetired());

setValueIfPresent(form2, "ch1_13a_hk", commonField.getOthers().get("crAddressHK"));
setValueIfPresent(form2, "ch1_13a_kln", commonField.getOthers().get("crAddressKln"));
@@ -2733,14 +2764,16 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
case "edu_pri" -> commonField.setEduPri(fieldValue);
case "edu_sec" -> commonField.setEduSec(fieldValue);
//case "edu_post_sec" -> commonField.setEduPostSec(fieldValue);
case "edu_post_sec" -> commonField.setEduUni(fieldValue);
case "edu_post_sec" -> {
commonField.setEduPostSec(fieldValue);
commonField.setEduUni(fieldValue);
}
/* Page1 End */
/* Page2 Start */
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 "investments" -> commonField.setFna_c3b_investments(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);
@@ -3208,7 +3241,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
//since it will tick both income and salary and make SLHK income and salary ticked
//case "toggle_1f" -> {commonField.setFna_c3b_income(fieldValue); commonField.setFna_c3b_salary(fieldValue);}
case "toggle_1g" -> {commonField.setFna_c3b_saving(fieldValue); commonField.setFna_c3b_investments(fieldValue);}
//case "toggle_1g" -> {commonField.setFna_c3b_saving(fieldValue); commonField.setFna_c3b_investments(fieldValue);}
//case "toggle_1h" -> commonField.setFna_c3b_policy(fieldValue);
case "toggle_1i56" -> commonField.setFna_c3b_others(fieldValue);
case "Text3" -> commonField.setFna_c3b_desc(fieldValue);
@@ -3253,8 +3286,8 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
commonField.setPlaceOfBirth("Macau");
}
*/
case "Field_LocationA1" -> commonField.setPlaceOfBirth(fieldValue);
case "Field_LocationB1" -> commonField.setPlaceOfBirth(fieldValue);
//case "Field_LocationA1" -> commonField.setPlaceOfBirth(fieldValue);
//case "Field_LocationB1" -> commonField.setPlaceOfBirth(fieldValue);

//case "ID1" -> commonField.setIdCard(fieldValue);



+ 16
- 0
src/main/resources/application-prod.yml 查看文件

@@ -41,6 +41,22 @@ spring:
basename: i18n/messages
use-code-as-default-message: true
fallback-to-system-locale: false
security:
oauth2:
resourceserver:
jwt:
# This is the standard Microsoft Entra ID endpoint for fetching public keys (JWKS)
# to validate the JWT signature.
issuer-uri: https://login.microsoftonline.com/cb3fc669-059d-4f8c-85eb-5c6564032c53/v2.0
cloud:
azure:
active-directory:
profile:
# Your Azure Tenant ID (GUID) or 'common' for multi-tenant apps
tenant-id: cb3fc669-059d-4f8c-85eb-5c6564032c53
resource-server:
# The App ID URI you defined for your Spring Boot API in Azure App Registration (e.g., api://<client_id>)
app-id-uri: api://d82560a8-8fac-401d-9173-10668acb7dfa

logging:
config: 'classpath:log4j2.yml'

+ 16
- 0
src/main/resources/application.yml 查看文件

@@ -34,6 +34,22 @@ spring:
basename: i18n/messages
use-code-as-default-message: true
fallback-to-system-locale: false
security:
oauth2:
resourceserver:
jwt:
# This is the standard Microsoft Entra ID endpoint for fetching public keys (JWKS)
# to validate the JWT signature.
issuer-uri: https://login.microsoftonline.com/cb3fc669-059d-4f8c-85eb-5c6564032c53/v2.0
cloud:
azure:
active-directory:
profile:
# Your Azure Tenant ID (GUID) or 'common' for multi-tenant apps
tenant-id: cb3fc669-059d-4f8c-85eb-5c6564032c53
resource-server:
# The App ID URI you defined for your Spring Boot API in Azure App Registration (e.g., api://<client_id>)
app-id-uri: api://d82560a8-8fac-401d-9173-10668acb7dfa

logging:
config: 'classpath:log4j2.yml'


正在加载...
取消
保存