[email protected] преди 3 месеца
родител
ревизия
af515a51a7
променени са 4 файла, в които са добавени 1219 реда и са изтрити 4 реда
  1. +618
    -0
      src/main/java/com/ffii/lioner/modules/lioner/commonField/entity/CommonField.java
  2. +528
    -4
      src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java
  3. +61
    -0
      src/main/resources/db/changelog/changes/16_add_common_fields_APP_FORM/01_add_fields.sql
  4. +12
    -0
      src/main/resources/db/changelog/changes/16_add_common_fields_APP_FORM/02_edit_fields.sql

+ 618
- 0
src/main/java/com/ffii/lioner/modules/lioner/commonField/entity/CommonField.java Целия файл

@@ -328,7 +328,175 @@ public class CommonField extends BaseEntity<Long>{
@Column
private String others_funds_desc;
@Column
private String placeOfBirth;

@Column
private String countryOfIssue;

@Column
private String countryOfCitizenship;

@Column
private String passportNo;

@Column
private String occupationTitle;

@Column
private String companyName;
@Column
private String companyAddress1;
@Column
private String companyAddress2;

@Column
private String companyNature1;

@Column
private String companyNature2;

@Column
private String taxResidency1;

@Column
private String taxResidency2;

@Column
private String taxResidency3;

@Column
private String taxPin1;
@Column
private String taxPin2;

@Column
private String taxPin3;

@Column
private String taxReason1;
@Column
private String taxReason2;

@Column
private String taxReason3;

@Column
private String taxReasonB1;

@Column
private String taxReasonB2;

@Column
private String taxReasonB3;

@Column
private String eduUni;

@Column
private String insuranceCompany1_1;

@Column
private String insuranceCompany1_2;
@Column
private String insuranceCompany1_3;

@Column
private String insuranceCompany2_1;

@Column
private String insuranceCompany2_2;
@Column
private String insuranceCompany2_3;

@Column
private String insuranceCompany3_1;

@Column
private String insuranceCompany3_2;
@Column
private String insuranceCompany3_3;

@Column
private String insuranceSumInsured1;

@Column
private String insuranceSumInsured2;

@Column
private String insuranceSumInsured3;

@Column
private String insuranceLife1;

@Column
private String insuranceSaving1;

@Column
private String insuranceCritical1;

@Column
private String insuranceOther1;

@Column
private String insuranceOtherDesc1;

@Column
private String insuranceLife2;

@Column
private String insuranceSaving2;

@Column
private String insuranceCritical2;

@Column
private String insuranceOther2;

@Column
private String insuranceOtherDesc2;

@Column
private String insuranceLife3;

@Column
private String insuranceSaving3;

@Column
private String insuranceCritical3;

@Column
private String insuranceOther3;

@Column
private String insuranceOtherDesc3;

@Column
private String insuranceYear1;

@Column
private String insuranceYear2;

@Column
private String insuranceYear3;

@Column
private String insuranceCurrency1;

@Column
private String insuranceCurrency2;

@Column
private String insuranceCurrency3;


//this is a logical field
@Column
private String gender;
@@ -1174,8 +1342,458 @@ public class CommonField extends BaseEntity<Long>{
public void setOthers_funds_desc(String others_funds_desc) {
this.others_funds_desc = others_funds_desc;
}

public String getPlaceOfBirth() {
return placeOfBirth;
}

public void setPlaceOfBirth(String placeOfBirth) {
this.placeOfBirth = placeOfBirth;
}

public String getCountryOfCitizenship() {
return countryOfCitizenship;
}

public void setCountryOfCitizenship(String countryOfCitizenship) {
this.countryOfCitizenship = countryOfCitizenship;
}

public String getCountryOfIssue() {
return countryOfIssue;
}

public void setCountryOfIssue(String countryOfIssue) {
this.countryOfIssue = countryOfIssue;
}
public String getPassportNo() {
return passportNo;
}

public void setPassportNo(String passportNo) {
this.passportNo = passportNo;
}

public String getOccupationTitle() {
return occupationTitle;
}

public void setOccupationTitle(String occupationTitle) {
this.occupationTitle = occupationTitle;
}

public String getCompanyName() {
return companyName;
}

public void setCompanyName(String companyName) {
this.companyName = companyName;
}

public String getCompanyAddress1() {
return companyAddress1;
}

public void setCompanyAddress1(String companyAddress1) {
this.companyAddress1 = companyAddress1;
}

public String getCompanyAddress2() {
return companyAddress2;
}

public void setCompanyAddress2(String companyAddress2) {
this.companyAddress2 = companyAddress2;
}

public String getCompanyNature1() {
return companyNature1;
}

public void setCompanyNature1(String companyNature1) {
this.companyNature1 = companyNature1;
}

public String getCompanyNature2() {
return companyNature2;
}

public void setCompanyNature2(String companyNature2) {
this.companyNature2 = companyNature2;
}

public String getTaxResidency1() {
return taxResidency1;
}

public void setTaxResidency1(String taxResidency1) {
this.taxResidency1 = taxResidency1;
}

public String getTaxResidency2() {
return taxResidency2;
}

public void setTaxResidency2(String taxResidency2) {
this.taxResidency2 = taxResidency2;
}

public String getTaxResidency3() {
return taxResidency3;
}

public void setTaxResidency3(String taxResidency3) {
this.taxResidency3 = taxResidency3;
}

public String getTaxPin1() {
return taxPin1;
}

public void setTaxPin1(String taxPin1) {
this.taxPin1 = taxPin1;
}

public String getTaxPin2() {
return taxPin2;
}

public void setTaxPin2(String taxPin2) {
this.taxPin2 = taxPin2;
}

public String getTaxPin3() {
return taxPin3;
}

public void setTaxPin3(String taxPin3) {
this.taxPin3 = taxPin3;
}

public String getTaxReason1() {
return taxReason1;
}

public void setTaxReason1(String taxReason1) {
this.taxReason1 = taxReason1;
}

public String getTaxReason2() {
return taxReason2;
}

public void setTaxReason2(String taxReason2) {
this.taxReason2 = taxReason2;
}

public String getTaxReason3() {
return taxReason3;
}

public void setTaxReason3(String taxReason3) {
this.taxReason3 = taxReason3;
}

public String getTaxReasonB1() {
return taxReasonB1;
}

public void setTaxReasonB1(String taxReasonB1) {
this.taxReasonB1 = taxReasonB1;
}

public String getTaxReasonB2() {
return taxReasonB2;
}

public void setTaxReasonB2(String taxReasonB2) {
this.taxReasonB2 = taxReasonB2;
}

public String getTaxReasonB3() {
return taxReasonB3;
}

public void setTaxReasonB3(String taxReasonB3) {
this.taxReasonB3 = taxReasonB3;
}

public String getEduUni() {
return eduUni;
}

public void setEduUni(String eduUni) {
this.eduUni = eduUni;
}

public String getInsuranceCompany1_1() {
return insuranceCompany1_1;
}

public void setInsuranceCompany1_1(String insuranceCompany1_1) {
this.insuranceCompany1_1 = insuranceCompany1_1;
}

public String getInsuranceCompany1_2() {
return insuranceCompany1_2;
}

public void setInsuranceCompany1_2(String insuranceCompany1_2) {
this.insuranceCompany1_2 = insuranceCompany1_2;
}

public String getInsuranceCompany1_3() {
return insuranceCompany1_3;
}

public void setInsuranceCompany1_3(String insuranceCompany1_3) {
this.insuranceCompany1_3 = insuranceCompany1_3;
}

public String getInsuranceCompany2_1() {
return insuranceCompany2_1;
}

public void setInsuranceCompany2_1(String insuranceCompany2_1) {
this.insuranceCompany2_1 = insuranceCompany2_1;
}

public String getInsuranceCompany2_2() {
return insuranceCompany2_2;
}

public void setInsuranceCompany2_2(String insuranceCompany2_2) {
this.insuranceCompany2_2 = insuranceCompany2_2;
}

public String getInsuranceCompany2_3() {
return insuranceCompany2_3;
}

public void setInsuranceCompany2_3(String insuranceCompany2_3) {
this.insuranceCompany2_3 = insuranceCompany2_3;
}

public String getInsuranceCompany3_1() {
return insuranceCompany3_1;
}

public void setInsuranceCompany3_1(String insuranceCompany3_1) {
this.insuranceCompany3_1 = insuranceCompany3_1;
}

public String getInsuranceCompany3_2() {
return insuranceCompany3_2;
}

public void setInsuranceCompany3_2(String insuranceCompany3_2) {
this.insuranceCompany3_2 = insuranceCompany3_2;
}

public String getInsuranceCompany3_3() {
return insuranceCompany3_3;
}

public void setInsuranceCompany3_3(String insuranceCompany3_3) {
this.insuranceCompany3_3 = insuranceCompany3_3;
}

public String getInsuranceSumInsured1() {
return insuranceSumInsured1;
}

public void setInsuranceSumInsured1(String insuranceSumInsured1) {
this.insuranceSumInsured1 = insuranceSumInsured1;
}

public String getInsuranceSumInsured2() {
return insuranceSumInsured2;
}

public void setInsuranceSumInsured2(String insuranceSumInsured2) {
this.insuranceSumInsured2 = insuranceSumInsured2;
}

public String getInsuranceSumInsured3() {
return insuranceSumInsured3;
}

public void setInsuranceSumInsured3(String insuranceSumInsured3) {
this.insuranceSumInsured3 = insuranceSumInsured3;
}

public String getInsuranceLife1() {
return insuranceLife1;
}

public void setInsuranceLife1(String insuranceLife1) {
this.insuranceLife1 = insuranceLife1;
}

public String getInsuranceSaving1() {
return insuranceSaving1;
}

public void setInsuranceSaving1(String insuranceSaving1) {
this.insuranceSaving1 = insuranceSaving1;
}

public String getInsuranceCritical1() {
return insuranceCritical1;
}

public void setInsuranceCritical1(String insuranceCritical1) {
this.insuranceCritical1 = insuranceCritical1;
}

public String getInsuranceOther1() {
return insuranceOther1;
}

public void setInsuranceOther1(String insuranceOther1) {
this.insuranceOther1 = insuranceOther1;
}

public String getInsuranceOtherDesc1() {
return insuranceOtherDesc1;
}

public void setInsuranceOtherDesc1(String insuranceOtherDesc1) {
this.insuranceOtherDesc1 = insuranceOtherDesc1;
}

public String getInsuranceSaving2() {
return insuranceSaving2;
}

public void setInsuranceSaving2(String insuranceSaving2) {
this.insuranceSaving2 = insuranceSaving2;
}

public String getInsuranceCritical2() {
return insuranceCritical2;
}

public void setInsuranceCritical2(String insuranceCritical2) {
this.insuranceCritical2 = insuranceCritical2;
}

public String getInsuranceOther2() {
return insuranceOther2;
}

public void setInsuranceOther2(String insuranceOther2) {
this.insuranceOther2 = insuranceOther2;
}

public String getInsuranceOtherDesc2() {
return insuranceOtherDesc2;
}

public void setInsuranceOtherDesc2(String insuranceOtherDesc2) {
this.insuranceOtherDesc2 = insuranceOtherDesc2;
}

public String getInsuranceSaving3() {
return insuranceSaving3;
}

public void setInsuranceSaving3(String insuranceSaving3) {
this.insuranceSaving3 = insuranceSaving3;
}

public String getInsuranceCritical3() {
return insuranceCritical3;
}

public void setInsuranceCritical3(String insuranceCritical3) {
this.insuranceCritical3 = insuranceCritical3;
}

public String getInsuranceOther3() {
return insuranceOther3;
}

public void setInsuranceOther3(String insuranceOther3) {
this.insuranceOther3 = insuranceOther3;
}

public String getInsuranceOtherDesc3() {
return insuranceOtherDesc3;
}

public void setInsuranceOtherDesc3(String insuranceOtherDesc3) {
this.insuranceOtherDesc3 = insuranceOtherDesc3;
}

public String getInsuranceYear1() {
return insuranceYear1;
}

public void setInsuranceYear1(String insuranceYear1) {
this.insuranceYear1 = insuranceYear1;
}

public String getInsuranceYear2() {
return insuranceYear2;
}

public void setInsuranceYear2(String insuranceYear2) {
this.insuranceYear2 = insuranceYear2;
}

public String getInsuranceYear3() {
return insuranceYear3;
}

public void setInsuranceYear3(String insuranceYear3) {
this.insuranceYear3 = insuranceYear3;
}

public String getInsuranceCurrency1() {
return insuranceCurrency1;
}

public void setInsuranceCurrency1(String insuranceCurrency1) {
this.insuranceCurrency1 = insuranceCurrency1;
}

public String getInsuranceCurrency2() {
return insuranceCurrency2;
}

public void setInsuranceCurrency2(String insuranceCurrency2) {
this.insuranceCurrency2 = insuranceCurrency2;
}

public String getInsuranceCurrency3() {
return insuranceCurrency3;
}

public void setInsuranceCurrency3(String insuranceCurrency3) {
this.insuranceCurrency3 = insuranceCurrency3;
}

public String getInsuranceLife2() {
return insuranceLife2;
}

public void setInsuranceLife2(String insuranceLife2) {
this.insuranceLife2 = insuranceLife2;
}

public String getInsuranceLife3() {
return insuranceLife3;
}

public void setInsuranceLife3(String insuranceLife3) {
this.insuranceLife3 = insuranceLife3;
}



}


+ 528
- 4
src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java Целия файл

@@ -310,6 +310,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "fill_6", commonField.getName());
setValueIfPresent(form, "fill_7", commonField.getNameChi());
setValueIfPresent(form, "fill_11", commonField.getIdCard());
setValueIfPresent(form, "fill_12", commonField.getCountryOfIssue());
setValueIfPresent(form, "fill_13", commonField.getPassportNo());
setValueIfPresent(form, "fill_15", commonField.getPlaceOfBirth());
setValueIfPresent(form, "fill_16", commonField.getCountryOfCitizenship());

/* Page1 Start */
setValueIfPresent(form, "gender_m", commonField.getGenderMale());
@@ -332,6 +336,61 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form, "others_funds", commonField.getOthers_funds());
setValueIfPresent(form, "others_funds_desc", commonField.getOthers_funds_desc());
/* Page2 End */
/* Page6 Start */
setValueIfPresent(form, "fill_8_country_1", commonField.getTaxResidency1());
setValueIfPresent(form, "fill_1_6", commonField.getTaxPin1());
setValueIfPresent(form, "fill_2_6", commonField.getTaxReason1());
setValueIfPresent(form, "fill_3_6", commonField.getTaxReasonB1());
setValueIfPresent(form, "fill_8_country_2", commonField.getTaxResidency2());
setValueIfPresent(form, "fill_4_5", commonField.getTaxPin2());
setValueIfPresent(form, "fill_5_6", commonField.getTaxReason2());
setValueIfPresent(form, "fill_6_6", commonField.getTaxReasonB2());
setValueIfPresent(form, "fill_8_country_3", commonField.getTaxResidency3());
setValueIfPresent(form, "fill_7_6", commonField.getTaxPin3());
setValueIfPresent(form, "fill_8_6", commonField.getTaxReason3());
setValueIfPresent(form, "fill_9_6", commonField.getTaxReasonB3());
/* Page6 End */
/* Page7 Start */
setValueIfPresent(form, "fill_11_7", commonField.getInsuranceCompany1_1());
setValueIfPresent(form, "fill_11_7_1", commonField.getInsuranceCompany1_2());
setValueIfPresent(form, "fill_11_7_2", commonField.getInsuranceCompany1_3());
setValueIfPresent(form, "fill_12_7", commonField.getInsuranceSumInsured1());
setValueIfPresent(form, "toggle_3_5", commonField.getInsuranceLife1());
setValueIfPresent(form, "toggle_4_4", commonField.getInsuranceSaving1());
setValueIfPresent(form, "toggle_5_5", commonField.getInsuranceCritical1());
setValueIfPresent(form, "toggle_6_3", commonField.getInsuranceOther1());
setValueIfPresent(form, "undefined_21", commonField.getInsuranceOtherDesc1());
setValueIfPresent(form, "fill_1_7", commonField.getInsuranceYear1());
setValueIfPresent(form, "fill_13_7", commonField.getInsuranceCompany2_1());
setValueIfPresent(form, "fill_13_7_1", commonField.getInsuranceCompany2_2());
setValueIfPresent(form, "fill_13_7_2", commonField.getInsuranceCompany2_3());
setValueIfPresent(form, "fill_14_7", commonField.getInsuranceSumInsured2());
setValueIfPresent(form, "toggle_9_3", commonField.getInsuranceLife2());
setValueIfPresent(form, "toggle_10_3", commonField.getInsuranceSaving2());
setValueIfPresent(form, "toggle_11_3", commonField.getInsuranceCritical2());
setValueIfPresent(form, "toggle_12_2", commonField.getInsuranceOther2());
setValueIfPresent(form, "undefined_22", commonField.getInsuranceOtherDesc2());
setValueIfPresent(form, "fill_3_7", commonField.getInsuranceYear2());
setValueIfPresent(form, "fill_15_7", commonField.getInsuranceCompany3_1());
setValueIfPresent(form, "fill_15_7_1", commonField.getInsuranceCompany3_2());
setValueIfPresent(form, "fill_15_7_2", commonField.getInsuranceCompany3_3());
setValueIfPresent(form, "fill_16_7", commonField.getInsuranceSumInsured3());
setValueIfPresent(form, "toggle_15", commonField.getInsuranceLife3());
setValueIfPresent(form, "toggle_16_2", commonField.getInsuranceSaving3());
setValueIfPresent(form, "toggle_17_3", commonField.getInsuranceCritical3());
setValueIfPresent(form, "toggle_18_2", commonField.getInsuranceOther3());
setValueIfPresent(form, "undefined_23", commonField.getInsuranceOtherDesc3());
setValueIfPresent(form, "fill_5_7", commonField.getInsuranceYear3());
/* Page7 End */
/* Page8 Start */
setValueIfPresent(form, "fill_3_8", commonField.getOccupationTitle());
setValueIfPresent(form, "fill_4_6_1", commonField.getCompanyName());
setValueIfPresent(form, "fill_4_6_2", commonField.getCompanyAddress1());
setValueIfPresent(form, "fill_4_6_3", commonField.getCompanyAddress2());
setValueIfPresent(form, "fill_5_8_1", commonField.getCompanyNature1());
setValueIfPresent(form, "fill_5_8_2", commonField.getCompanyNature2());
/* Page8 End */
/* Page9 Start */
setValueIfPresent(form, "fill_26_4", commonField.getFna_c1a_amount());
@@ -568,11 +627,75 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
}
setValueIfPresent(form, "applicant_name", commonField.getName());
}
}else if("SLAPP".equals(formCode)){
/* Page1 Start */
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_yyyy", commonField.getYyyyDateOfBirth());

setValueIfPresent(form, "1_7_country", commonField.getPlaceOfBirth());
setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship());
if("HK".equals(commonField.getCountryOfIssue()) || "Hong Kong".equals(commonField.getCountryOfIssue())){
setValueIfPresent(form, "1_10_id_num", commonField.getIdCard());
}

setValueIfPresent(form, "1_8", commonField.getCountryOfCitizenship());
setValueIfPresent(form, "1_12_1", commonField.getOccupation());
setValueIfPresent(form, "1_12_2", commonField.getOccupationTitle());
setValueIfPresent(form, "1_12_5", commonField.getFna_c1a_amount());
if(!commonField.getFna_c1a_amount().isBlank()){
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_7_1", commonField.getCompanyAddress1());
setValueIfPresent(form, "1_12_7_2", commonField.getCompanyAddress2());
setValueIfPresent(form, "1_12_8_1", commonField.getCompanyNature1());
setValueIfPresent(form, "1_12_8_2", commonField.getCompanyNature2());
setValueIfPresent(form, "1_13_tel_mobile", commonField.getContactNo());
setValueIfPresent(form, "1_14d_tax1", commonField.getTaxResidency1());
setValueIfPresent(form, "1_14d_tax_num1", commonField.getTaxPin1());
setValueIfPresent(form, "1_14d_explain1", commonField.getTaxReasonB1());
setValueIfPresent(form, "1_14d_tax2", commonField.getTaxResidency2());
setValueIfPresent(form, "1_14d_tax_num2", commonField.getTaxPin2());
setValueIfPresent(form, "1_14d_explain2", commonField.getTaxReasonB2());
setValueIfPresent(form, "1_14d_tax3", commonField.getTaxResidency3());
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", commonField.getInsuranceSumInsured1());
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", commonField.getInsuranceSumInsured2());
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", commonField.getInsuranceSumInsured3());
}
}

//form.flattenFields(); // Flatten fields after setting all values
@@ -637,6 +760,22 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "others_funds", commonField.getOthers_funds());
setValueIfPresent(form2, "others_funds_desc", commonField.getOthers_funds_desc());
/* Page7 Start */
setValueIfPresent(form2, "toggle_3_5", commonField.getInsuranceLife1());
setValueIfPresent(form2, "toggle_4_4", commonField.getInsuranceSaving1());
setValueIfPresent(form2, "toggle_5_5", commonField.getInsuranceCritical1());
setValueIfPresent(form2, "toggle_6_3", commonField.getInsuranceOther1());
setValueIfPresent(form2, "toggle_9_3", commonField.getInsuranceLife2());
setValueIfPresent(form2, "toggle_10_3", commonField.getInsuranceSaving2());
setValueIfPresent(form2, "toggle_11_3", commonField.getInsuranceCritical2());
setValueIfPresent(form2, "toggle_12_2", commonField.getInsuranceOther2());
setValueIfPresent(form2, "toggle_15", commonField.getInsuranceLife3());
setValueIfPresent(form2, "toggle_16_2", commonField.getInsuranceSaving3());
setValueIfPresent(form2, "toggle_17_3", commonField.getInsuranceCritical3());
setValueIfPresent(form2, "toggle_18_2", commonField.getInsuranceOther3());
/* Page7 End */
} else if ("FNA".equals(formCode)) {
setValueIfPresent(form2, "fna_a_primary", commonField.getEduPri());
setValueIfPresent(form2, "fna_a_secondary", commonField.getEduSec());
@@ -880,9 +1019,134 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
setValueIfPresent(form2, "cb6a1", commonField.getFna_d_1());
setValueIfPresent(form2, "cb6a2", commonField.getFna_d_3());
/* Page4 End */
}
}else if("SLAPP".equals(formCode)){
/* Page1 Start */
setValueIfPresent(form2, "ch1_4_m", commonField.getGenderMale());
setValueIfPresent(form2, "ch1_4_f", commonField.getGenderFemale());

if("HK".equals(commonField.getCountryOfIssue()) || "Hong Kong".equals(commonField.getCountryOfIssue())){
setValueIfPresent(form2, "1_10_6", "Yes");
}

if(!commonField.getPassportNo().isBlank()){
setValueIfPresent(form2, "1_10_6", "Yes");
}
if("A".equals(commonField.getTaxReason1())){
setValueIfPresent(form2, "ch1_14d_reason1_a", "Yes");
}
if("B".equals(commonField.getTaxReason1())){
setValueIfPresent(form2, "ch1_14d_reason1_b", "Yes");
}
if("C".equals(commonField.getTaxReason1())){
setValueIfPresent(form2, "ch1_14d_reason1_c", "Yes");
}
if("A".equals(commonField.getTaxReason2())){
setValueIfPresent(form2, "ch1_14d_reason2_a", "Yes");
}
if("B".equals(commonField.getTaxReason2())){
setValueIfPresent(form2, "ch1_14d_reason2_b", "Yes");
}
if("C".equals(commonField.getTaxReason2())){
setValueIfPresent(form2, "ch1_14d_reason2_c", "Yes");
}
if("A".equals(commonField.getTaxReason3())){
setValueIfPresent(form2, "ch1_14d_reason3_a", "Yes");
}
if("B".equals(commonField.getTaxReason3())){
setValueIfPresent(form2, "ch1_14d_reason3_b", "Yes");
}
if("C".equals(commonField.getTaxReason3())){
setValueIfPresent(form2, "ch1_14d_reason3_c", "Yes");
}
setValueIfPresent(form2, "ch2_5_1p", commonField.getEduPri());
setValueIfPresent(form2, "ch2_5_1s", commonField.getEduSec());
setValueIfPresent(form2, "ch2_5_1m", commonField.getEduPostSec());
if("Yes".equals(commonField.getEduUni())){
setValueIfPresent(form2, "ch2_5_1m", "Off");
setValueIfPresent(form2, "ch2_5_1u", commonField.getEduUni());
}

setValueIfPresent(form2, "ch2_5_2w", commonField.getFna_a_life_0());
setValueIfPresent(form2, "ch2_5_2_less5", commonField.getFna_a_life_less_5());
setValueIfPresent(form2, "ch2_5_2_5above", commonField.getFna_a_life_above_5());
if("Yes".equals(commonField.getInsuranceLife1())){
setValueIfPresent(form2, "ch4_1_life", "Off");
setValueIfPresent(form2, "ch4_1_accident", "On");
setValueIfPresent(form2, "ch4_1_critical", "On");
setValueIfPresent(form2, "ch4_1_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceCritical1())){
setValueIfPresent(form2, "ch4_1_life", "On");
setValueIfPresent(form2, "ch4_1_accident", "On");
setValueIfPresent(form2, "ch4_1_critical", "Off");
setValueIfPresent(form2, "ch4_1_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceOther1())
&& "Accident".equals(commonField.getInsuranceOtherDesc1())){
setValueIfPresent(form2, "ch4_1_life", "On");
setValueIfPresent(form2, "ch4_1_accident", "Off");
setValueIfPresent(form2, "ch4_1_critical", "On");
setValueIfPresent(form2, "ch4_1_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceOther1())
&& "Hospital".equals(commonField.getInsuranceOtherDesc1())){
setValueIfPresent(form2, "ch4_1_life", "On");
setValueIfPresent(form2, "ch4_1_accident", "On");
setValueIfPresent(form2, "ch4_1_critical", "On");
setValueIfPresent(form2, "ch4_1_hospital", "Off");
}
if("Yes".equals(commonField.getInsuranceLife2())){
setValueIfPresent(form2, "ch4_2_life", "Off");
setValueIfPresent(form2, "ch4_2_accident", "On");
setValueIfPresent(form2, "ch4_2_critical", "On");
setValueIfPresent(form2, "ch4_2_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceCritical2())){
setValueIfPresent(form2, "ch4_2_life", "On");
setValueIfPresent(form2, "ch4_2_accident", "On");
setValueIfPresent(form2, "ch4_2_critical", "Off");
setValueIfPresent(form2, "ch4_2_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceOther2())
&& "Accident".equals(commonField.getInsuranceOtherDesc2())){
setValueIfPresent(form2, "ch4_2_life", "On");
setValueIfPresent(form2, "ch4_2_accident", "Off");
setValueIfPresent(form2, "ch4_2_critical", "On");
setValueIfPresent(form2, "ch4_2_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceOther2())
&& "Hospital".equals(commonField.getInsuranceOtherDesc2())){
setValueIfPresent(form2, "ch4_2_life", "On");
setValueIfPresent(form2, "ch4_2_accident", "On");
setValueIfPresent(form2, "ch4_2_critical", "On");
setValueIfPresent(form2, "ch4_2_hospital", "Off");
}

if("Yes".equals(commonField.getInsuranceLife3())){
setValueIfPresent(form2, "ch4_3_life", "Off");
setValueIfPresent(form2, "ch4_3_accident", "On");
setValueIfPresent(form2, "ch4_3_critical", "On");
setValueIfPresent(form2, "ch4_3_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceCritical3())){
setValueIfPresent(form2, "ch4_3_life", "On");
setValueIfPresent(form2, "ch4_3_accident", "On");
setValueIfPresent(form2, "ch4_3_critical", "Off");
setValueIfPresent(form2, "ch4_3_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceOther3())
&& "Accident".equals(commonField.getInsuranceOtherDesc3())){
setValueIfPresent(form2, "ch4_3_life", "On");
setValueIfPresent(form2, "ch4_3_accident", "Off");
setValueIfPresent(form2, "ch4_3_critical", "On");
setValueIfPresent(form2, "ch4_3_hospital", "On");
}else if("Yes".equals(commonField.getInsuranceOther3())
&& "Hospital".equals(commonField.getInsuranceOtherDesc3())){
setValueIfPresent(form2, "ch4_3_life", "On");
setValueIfPresent(form2, "ch4_3_accident", "On");
setValueIfPresent(form2, "ch4_3_critical", "On");
setValueIfPresent(form2, "ch4_3_hospital", "Off");
}
}
}
// Save the modified document to the output stream
@@ -1022,6 +1286,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
case "fill_6" -> commonField.setName(fieldValue);
case "fill_7" -> commonField.setNameChi(fieldValue);
case "fill_11" -> commonField.setIdCard(fieldValue);
case "fill_12" -> commonField.setCountryOfIssue(fieldValue);
case "fill_13" -> commonField.setPassportNo(fieldValue);
case "fill_15" -> commonField.setPlaceOfBirth(fieldValue);
case "fill_16" -> commonField.setCountryOfCitizenship(fieldValue);

case "gender_m" -> {
commonField.setGenderMale(fieldValue);
@@ -1056,6 +1324,80 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
case "others_funds" -> commonField.setOthers_funds(fieldValue);
case "others_funds_desc" -> commonField.setOthers_funds_desc(fieldValue);
/* Page2 End */
/* Page6 Start */
case "fill_8_country_1" -> commonField.setTaxResidency1(fieldValue);
case "fill_1_6" -> commonField.setTaxPin1(fieldValue);
case "fill_2_6" -> commonField.setTaxReason1(fieldValue);
case "fill_3_6" -> commonField.setTaxReasonB1(fieldValue);
case "fill_8_country_2" -> commonField.setTaxResidency2(fieldValue);
case "fill_4_5" -> commonField.setTaxPin2(fieldValue);
case "fill_5_6" -> commonField.setTaxReason2(fieldValue);
case "fill_6_6" -> commonField.setTaxReasonB2(fieldValue);
case "fill_8_country_3" -> commonField.setTaxResidency3(fieldValue);
case "fill_7_6" -> commonField.setTaxPin3(fieldValue);
case "fill_8_6" -> commonField.setTaxReason3(fieldValue);
case "fill_9_6" -> commonField.setTaxReasonB3(fieldValue);
/* Page7 Start */
case "fill_11_7" -> commonField.setInsuranceCompany1_1(fieldValue);
case "fill_11_7_1" -> commonField.setInsuranceCompany1_2(fieldValue);
case "fill_11_7_2" -> commonField.setInsuranceCompany1_3(fieldValue);
case "fill_12_7" -> {
commonField.setInsuranceSumInsured1(fieldValue);

if(!commonField.getInsuranceSumInsured1().isBlank()){
commonField.setInsuranceCurrency1("USD");
}
}
case "toggle_3_5" -> commonField.setInsuranceLife1(fieldValue);
case "toggle_4_4" -> commonField.setInsuranceSaving1(fieldValue);
case "toggle_5_5" -> commonField.setInsuranceCritical1(fieldValue);
case "toggle_6_3" -> commonField.setInsuranceOther1(fieldValue);
case "undefined_21" -> commonField.setInsuranceOtherDesc1(fieldValue);
case "fill_1_7" -> commonField.setInsuranceYear1(fieldValue);

case "fill_13_7" -> commonField.setInsuranceCompany2_1(fieldValue);
case "fill_13_7_1" -> commonField.setInsuranceCompany2_2(fieldValue);
case "fill_13_7_2" -> commonField.setInsuranceCompany2_3(fieldValue);
case "fill_14_7" -> {
commonField.setInsuranceSumInsured2(fieldValue);

if(!commonField.getInsuranceSumInsured2().isBlank()){
commonField.setInsuranceCurrency2("USD");
}
}
case "toggle_9_3" -> commonField.setInsuranceLife2(fieldValue);
case "toggle_10_3" -> commonField.setInsuranceSaving2(fieldValue);
case "toggle_11_3" -> commonField.setInsuranceCritical2(fieldValue);
case "toggle_12_2" -> commonField.setInsuranceOther2(fieldValue);
case "undefined_22" -> commonField.setInsuranceOtherDesc2(fieldValue);
case "fill_3_7" -> commonField.setInsuranceYear2(fieldValue);


case "fill_15_7" -> commonField.setInsuranceCompany3_1(fieldValue);
case "fill_15_7_1" -> commonField.setInsuranceCompany3_2(fieldValue);
case "fill_15_7_2" -> commonField.setInsuranceCompany3_3(fieldValue);
case "fill_16_7" -> {
commonField.setInsuranceSumInsured3(fieldValue);

if(!commonField.getInsuranceSumInsured3().isBlank()){
commonField.setInsuranceCurrency3("USD");
}
}
case "toggle_15" -> commonField.setInsuranceLife3(fieldValue);
case "toggle_16_2" -> commonField.setInsuranceSaving3(fieldValue);
case "toggle_17_3" -> commonField.setInsuranceCritical3(fieldValue);
case "toggle_18_2" -> commonField.setInsuranceOther3(fieldValue);
case "undefined_23" -> commonField.setInsuranceOtherDesc3(fieldValue);
case "fill_5_7" -> commonField.setInsuranceYear3(fieldValue);
/* Page7 End */
/* Page8 Start */
case "fill_3_8" -> commonField.setOccupationTitle(fieldValue);
case "fill_4_6_1" -> commonField.setCompanyName(fieldValue);
case "fill_4_6_2" -> commonField.setCompanyAddress1(fieldValue);
case "fill_4_6_3" -> commonField.setCompanyAddress2(fieldValue);
case "fill_5_8_1" -> commonField.setCompanyNature1(fieldValue);
case "fill_5_8_2" -> commonField.setCompanyNature2(fieldValue);
/* Page8 End */
/* Page9 Start */
case "fill_26_4" -> commonField.setFna_c1a_amount(fieldValue);
@@ -1468,6 +1810,188 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
/* Special logic End */
}

if ("SLAPP".equals(formCode)) {
switch (fieldName) {
/* Page1 Start */
case "1_2_name_ch" -> commonField.setNameChi(fieldValue);
case "ch1_4_m" -> commonField.setGenderMale(fieldValue);
case "ch1_4_f" -> commonField.setGenderFemale(fieldValue);

case "1_6_dd" -> commonField.setDdDateOfBirth(fieldValue);
case "1_6_mm" -> commonField.setMmDateOfBirth(fieldValue);
case "1_6_yyyy" -> commonField.setYyyyDateOfBirth(fieldValue);

case "1_7_country" -> commonField.setPlaceOfBirth(fieldValue);
case "1_8" -> commonField.setCountryOfCitizenship(fieldValue);
//if set countryOfIssue = HK
//tick th 1_10_2 if have value
case "1_10_id_num" -> {
commonField.setIdCard(fieldValue);
commonField.setCountryOfIssue("HK");
}

//tick the 1_10_6 if have value
case "1_10_passport_num" -> commonField.setPassportNo(fieldValue);

case "1_12_1" -> commonField.setOccupation(fieldValue);
case "1_12_2" -> commonField.setOccupationTitle(fieldValue);

case "1_12_5" -> commonField.setFna_c1a_amount(fieldValue);
case "1_12_6" -> commonField.setCompanyName(fieldValue);
case "1_12_7_1" -> commonField.setCompanyAddress1(fieldValue);
case "1_12_7_2" -> commonField.setCompanyAddress2(fieldValue);

case "1_12_8_1" -> commonField.setCompanyNature1(fieldValue);
case "1_12_8_2" -> commonField.setCompanyNature2(fieldValue);

case "1_13_tel_mobile" -> commonField.setContactNo(fieldValue);

case "1_14d_tax1" -> commonField.setTaxResidency1(fieldValue);
case "1_14d_tax_num1" -> commonField.setTaxPin1(fieldValue);
case "ch1_14d_reason1_a" -> commonField.setTaxReason1("A");
case "ch1_14d_reason1_b" -> commonField.setTaxReason1("B");
case "ch1_14d_reason1_c" -> commonField.setTaxReason1("C");
case "1_14d_explain1" -> commonField.setTaxReasonB1(fieldValue);

case "1_14d_tax2" -> commonField.setTaxResidency2(fieldValue);
case "1_14d_tax_num2" -> commonField.setTaxPin2(fieldValue);
case "ch1_14d_reason2_a" -> commonField.setTaxReason2("A");
case "ch1_14d_reason2_b" -> commonField.setTaxReason2("B");
case "ch1_14d_reason2_c" -> commonField.setTaxReason2("C");
case "1_14d_explain2" -> commonField.setTaxReasonB2(fieldValue);

case "1_14d_tax3" -> commonField.setTaxResidency3(fieldValue);
case "1_14d_tax_num3" -> commonField.setTaxPin3(fieldValue);
case "ch1_14d_reason3_a" -> commonField.setTaxReason3("A");
case "ch1_14d_reason3_b" -> commonField.setTaxReason3("B");
case "ch1_14d_reason3_c" -> commonField.setTaxReason3("C");
case "1_14d_explain3" -> commonField.setTaxReasonB3(fieldValue);

case "ch2_5_1p" -> commonField.setEduPri(fieldValue);
case "ch2_5_1s" -> commonField.setEduSec(fieldValue);
case "ch2_5_1m" -> commonField.setEduPostSec(fieldValue);
case "ch2_5_1u" -> commonField.setEduUni(fieldValue);

case "ch2_5_2w" -> commonField.setFna_a_life_0(fieldValue);
case "ch2_5_2_less5" -> commonField.setFna_a_life_less_5(fieldValue);
case "ch2_5_2_5above" -> commonField.setFna_a_life_above_5(fieldValue);
case "4_1_name1_1" -> commonField.setInsuranceCompany1_1(fieldValue);
case "4_1_name1_2" -> commonField.setInsuranceCompany1_2(fieldValue);
case "4_1_name1_3" -> commonField.setInsuranceCompany1_3(fieldValue);
case "4_1_year1" -> commonField.setInsuranceYear1(fieldValue);
case "4_1_currency1" -> commonField.setInsuranceCurrency1(fieldValue);
case "4_1_sum1" -> commonField.setInsuranceSumInsured1(fieldValue);
case "ch4_1_life" -> {
if("Off".equals(fieldValue))
commonField.setInsuranceLife1("Yes");
else if("On".equals(fieldValue))
commonField.setInsuranceLife1("Off");
}
case "ch4_1_accident" -> {
if("Off".equals(fieldValue)){
commonField.setInsuranceOther1("Yes");
commonField.setInsuranceOtherDesc1("Accident");
}else if("On".equals(fieldValue)){
//commonField.setInsuranceOther1("Off");
//commonField.setInsuranceOtherDesc1("");
}
}
case "ch4_1_critical" -> {
if("Off".equals(fieldValue))
commonField.setInsuranceCritical1("Yes");
else if("On".equals(fieldValue))
commonField.setInsuranceCritical1("Off");
}
case "ch4_1_hospital" -> {
if("Off".equals(fieldValue)){
commonField.setInsuranceOther1("Yes");
commonField.setInsuranceOtherDesc1("Hospital");
}else if("On".equals(fieldValue)){
//commonField.setInsuranceOther1("Off");
//commonField.setInsuranceOtherDesc1("");
}
}
case "4_1_name2_1" -> commonField.setInsuranceCompany2_1(fieldValue);
case "4_1_name2_2" -> commonField.setInsuranceCompany2_2(fieldValue);
case "4_1_name2_3" -> commonField.setInsuranceCompany2_3(fieldValue);
case "4_1_year2" -> commonField.setInsuranceYear2(fieldValue);
case "4_1_currency2" -> commonField.setInsuranceCurrency2(fieldValue);
case "4_1_sum2" -> commonField.setInsuranceSumInsured2(fieldValue);
case "ch4_2_life" -> {
if("Off".equals(fieldValue))
commonField.setInsuranceLife2("Yes");
else if("On".equals(fieldValue))
commonField.setInsuranceLife2("Off");
}
case "ch4_2_accident" -> {
if("Off".equals(fieldValue)){
commonField.setInsuranceOther2("Yes");
commonField.setInsuranceOtherDesc2("Accident");
}else if("On".equals(fieldValue)){
//commonField.setInsuranceOther1("Off");
//commonField.setInsuranceOtherDesc1("");
}
}
case "ch4_2_critical" -> {
if("Off".equals(fieldValue))
commonField.setInsuranceCritical2("Yes");
else if("On".equals(fieldValue))
commonField.setInsuranceCritical2("Off");
}
case "ch4_2_hospital" -> {
if("Off".equals(fieldValue)){
commonField.setInsuranceOther2("Yes");
commonField.setInsuranceOtherDesc2("Hospital");
}else if("On".equals(fieldValue)){
//commonField.setInsuranceOther1("Off");
//commonField.setInsuranceOtherDesc1("");
}
}

case "4_1_name3_1" -> commonField.setInsuranceCompany3_1(fieldValue);
case "4_1_name3_2" -> commonField.setInsuranceCompany3_2(fieldValue);
case "4_1_name3_3" -> commonField.setInsuranceCompany3_3(fieldValue);
case "4_1_year3" -> commonField.setInsuranceYear3(fieldValue);
case "4_1_currency3" -> commonField.setInsuranceCurrency3(fieldValue);
case "4_1_sum3" -> commonField.setInsuranceSumInsured3(fieldValue);
case "ch4_3_life" -> {
if("Off".equals(fieldValue))
commonField.setInsuranceLife3("Yes");
else if("On".equals(fieldValue))
commonField.setInsuranceLife3("Off");
}
case "ch4_3_accident" -> {
if("Off".equals(fieldValue)){
commonField.setInsuranceOther3("Yes");
commonField.setInsuranceOtherDesc3("Accident");
}else if("On".equals(fieldValue)){
//commonField.setInsuranceOther1("Off");
//commonField.setInsuranceOtherDesc1("");
}
}
case "ch4_3_critical" -> {
if("Off".equals(fieldValue))
commonField.setInsuranceCritical3("Yes");
else if("On".equals(fieldValue))
commonField.setInsuranceCritical3("Off");
}
case "ch4_3_hospital" -> {
if("Off".equals(fieldValue)){
commonField.setInsuranceOther3("Yes");
commonField.setInsuranceOtherDesc3("Hospital");
}else if("On".equals(fieldValue)){
//commonField.setInsuranceOther1("Off");
//commonField.setInsuranceOtherDesc1("");
}
}
}
}
//logger.info("end Field: " + field.getPartialName() + ", Value: " + field.getValueAsString());
// You can save this data to a database, or perform other operations


+ 61
- 0
src/main/resources/db/changelog/changes/16_add_common_fields_APP_FORM/01_add_fields.sql Целия файл

@@ -0,0 +1,61 @@
--liquibase formatted sql

--changeset vin:add common fields

ALTER TABLE `common_field`
ADD COLUMN `placeOfBirth` VARCHAR(100) NULL AFTER `address2`,
ADD COLUMN `countryOfIssue` VARCHAR(100) NULL AFTER `placeOfBirth`,
ADD COLUMN `countryOfCitizenship` VARCHAR(100) NULL AFTER `countryOfIssue`,
ADD COLUMN `passportNo` TEXT NULL AFTER `countryOfCitizenship`,
ADD COLUMN `occupationTitle` TEXT NULL AFTER `passportNo`,
ADD COLUMN `companyName` TEXT NULL AFTER `occupationTitle`,
ADD COLUMN `companyAddress1` TEXT NULL AFTER `companyName`,
ADD COLUMN `companyAddress2` TEXT NULL AFTER `companyAddress1`,
ADD COLUMN `companyNature1` TEXT NULL AFTER `companyAddress2`,
ADD COLUMN `companyNature2` TEXT NULL AFTER `companyNature1`,
ADD COLUMN `taxResidency1` TEXT NULL AFTER `companyNature2`,
ADD COLUMN `taxResidency2` TEXT NULL AFTER `taxResidency1`,
ADD COLUMN `taxResidency3` TEXT NULL AFTER `taxResidency2`,
ADD COLUMN `taxPin1` TEXT NULL AFTER `taxResidency3`,
ADD COLUMN `taxPin2` TEXT NULL AFTER `taxPin1`,
ADD COLUMN `taxPin3` TEXT NULL AFTER `taxPin2`,
ADD COLUMN `taxReason1` VARCHAR(45) NULL AFTER `taxPin3`,
ADD COLUMN `taxReason2` VARCHAR(45) NULL AFTER `taxReason1`,
ADD COLUMN `taxReason3` VARCHAR(45) NULL AFTER `taxReason2`,
ADD COLUMN `taxReasonB1` TEXT NULL AFTER `taxReason3`,
ADD COLUMN `taxReasonB2` TEXT NULL AFTER `taxReasonB1`,
ADD COLUMN `taxReasonB3` TEXT NULL AFTER `taxReasonB2`,
ADD COLUMN `eduUni` VARCHAR(45) NULL AFTER `taxReasonB3`,
ADD COLUMN `insuranceCompany1_1` TEXT NULL AFTER `eduUni`,
ADD COLUMN `insuranceCompany1_2` TEXT NULL AFTER `insuranceCompany1_1`,
ADD COLUMN `insuranceCompany1_3` TEXT NULL AFTER `insuranceCompany1_2`,
ADD COLUMN `insuranceCompany2_1` TEXT NULL AFTER `insuranceCompany1_3`,
ADD COLUMN `insuranceCompany2_2` TEXT NULL AFTER `insuranceCompany2_1`,
ADD COLUMN `insuranceCompany2_3` TEXT NULL AFTER `insuranceCompany2_2`,
ADD COLUMN `insuranceCompany3_1` TEXT NULL AFTER `insuranceCompany2_3`,
ADD COLUMN `insuranceCompany3_2` TEXT NULL AFTER `insuranceCompany3_1`,
ADD COLUMN `insuranceCompany3_3` TEXT NULL AFTER `insuranceCompany3_2`,
ADD COLUMN `insuranceSumInsured1` TEXT NULL AFTER `insuranceCompany3_3`,
ADD COLUMN `insuranceSumInsured2` TEXT NULL AFTER `insuranceSumInsured1`,
ADD COLUMN `insuranceSumInsured3` TEXT NULL AFTER `insuranceSumInsured2`,
ADD COLUMN `insuranceLife1` VARCHAR(45) NULL AFTER `insuranceSumInsured3`,
ADD COLUMN `insuranceSaving1` VARCHAR(45) NULL AFTER `insuranceLife1`,
ADD COLUMN `insuranceCritical1` VARCHAR(45) NULL AFTER `insuranceSaving1`,
ADD COLUMN `insuranceOther1` VARCHAR(45) NULL AFTER `insuranceCritical1`,
ADD COLUMN `insuranceOtherDesc1` TEXT NULL AFTER `insuranceOther1`,
ADD COLUMN `insuranceLife2` VARCHAR(45) NULL AFTER `insuranceOtherDesc1`,
ADD COLUMN `insuranceSaving2` VARCHAR(45) NULL AFTER `insuranceLife2`,
ADD COLUMN `insuranceCritical2` VARCHAR(45) NULL AFTER `insuranceSaving2`,
ADD COLUMN `insuranceOther2` VARCHAR(45) NULL AFTER `insuranceCritical2`,
ADD COLUMN `insuranceOtherDesc2` TEXT NULL AFTER `insuranceOther2`,
ADD COLUMN `insuranceLife3` VARCHAR(45) NULL AFTER `insuranceOtherDesc2`,
ADD COLUMN `insuranceSaving3` VARCHAR(45) NULL AFTER `insuranceLife3`,
ADD COLUMN `insuranceCritical3` VARCHAR(45) NULL AFTER `insuranceSaving3`,
ADD COLUMN `insuranceOther3` VARCHAR(45) NULL AFTER `insuranceCritical3`,
ADD COLUMN `insuranceOtherDesc3` TEXT NULL AFTER `insuranceOther3`,
ADD COLUMN `insuranceYear1` VARCHAR(100) NULL AFTER `insuranceOtherDesc3`,
ADD COLUMN `insuranceYear2` VARCHAR(100) NULL AFTER `insuranceYear1`,
ADD COLUMN `insuranceYear3` VARCHAR(100) NULL AFTER `insuranceYear2`,
ADD COLUMN `insuranceCurrency1` VARCHAR(45) NULL AFTER `insuranceYear3`,
ADD COLUMN `insuranceCurrency2` VARCHAR(45) NULL AFTER `insuranceCurrency1`,
ADD COLUMN `insuranceCurrency3` VARCHAR(45) NULL AFTER `insuranceCurrency2`;

+ 12
- 0
src/main/resources/db/changelog/changes/16_add_common_fields_APP_FORM/02_edit_fields.sql Целия файл

@@ -0,0 +1,12 @@
--liquibase formatted sql

--changeset vin:change long field to TEXT


ALTER TABLE `common_field`
CHANGE COLUMN `others_funds_desc` `others_funds_desc` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `fna_c2a_desc` `fna_c2a_desc` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `fna_d_desc` `fna_d_desc` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `email` `email` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `address1` `address1` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `address2` `address2` TEXT NULL DEFAULT NULL ;

Зареждане…
Отказ
Запис