[email protected] пре 2 месеци
родитељ
комит
ebf6260eaf
1 измењених фајлова са 24 додато и 11 уклоњено
  1. +24
    -11
      src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java

+ 24
- 11
src/main/java/com/ffii/lioner/modules/lioner/pdf/service/PdfService.java Прегледај датотеку

@@ -1275,6 +1275,12 @@ 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_c1d_amount() != null){
setValueIfPresent(form2, "cb4c7", "Yes");
}
/* Page2 End */

/* Page4 Start */
@@ -2091,42 +2097,49 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
/* Page7 End */
/* Page10 Start */
int i = 1;
if("Father".equals(commonField.getOthers().get("relateFatherRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateFatherName")) != null ){
if("Father".equals(commonField.getOthers().get("relateFatherRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateFatherAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateFatherName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateFatherAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateFatherRelation"));

i++;
}
if("Mother".equals(commonField.getOthers().get("relateMotherRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateMotherName")) != null ){
if("Mother".equals(commonField.getOthers().get("relateMotherRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateMotherAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateMotherName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateMotherAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateMotherRelation"));

i++;
}
if("Spouse".equals(commonField.getOthers().get("relateSpouseRelation"))){
if("Spouse".equals(commonField.getOthers().get("relateSpouseRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateSpouseAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateSpouseName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateSpouseAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateSpouseRelation"));

i++;
}
if(i <= 4 && "Son".equals(commonField.getOthers().get("relateSonRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateSonName")) != null ){
if("Son".equals(commonField.getOthers().get("relateSonRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateSonAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateSonName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateSonAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateSonRelation"));

i++;
}
if(i <= 4 && "Bother".equals(commonField.getOthers().get("relateBotherRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateBotherName")) != null ){
if("Daughter".equals(commonField.getOthers().get("relateDaughterRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateDaughterAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateDaughterName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateDaughterAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateDaughterRelation"));

i++;
}
if("Bother".equals(commonField.getOthers().get("relateBotherRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateBotherAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateBotherName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateBotherAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateBotherRelation"));

i++;
}
if(i <= 4 && "Sister".equals(commonField.getOthers().get("relateSisterRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateSisterName")) != null ){
if("Sister".equals(commonField.getOthers().get("relateSisterRelation")) && StringUtils.trimToNull(commonField.getOthers().get("relateSisterAge")) != null ){
setValueIfPresent(form, "7_1a_name" + i, commonField.getOthers().get("relateSisterName"));
setValueIfPresent(form, "7_1a_age" + i, commonField.getOthers().get("relateSisterAge"));
setValueIfPresent(form, "7_1a_relation" + i, commonField.getOthers().get("relateSisterRelation"));
@@ -2567,10 +2580,10 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
}
case "fill_17_2" -> commonField.getOthers().put("relateSonAge", fieldValue);
case "fill_21_2" -> {
commonField.getOthers().put("relateSonRelation", "Daughter");
commonField.getOthers().put("relateSonName", fieldValue);
commonField.getOthers().put("relateDaughterRelation", "Daughter");
commonField.getOthers().put("relateDaughterName", fieldValue);
}
case "fill_22_2" -> commonField.getOthers().put("relateSonAge", fieldValue);
case "fill_22_2" -> commonField.getOthers().put("relateDaughterAge", fieldValue);
case "fill_26" -> {
commonField.getOthers().put("relateBotherRelation", "Bother");
commonField.getOthers().put("relateBotherName", fieldValue);
@@ -4231,7 +4244,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
// - Thousands grouping (,)
// - At least one digit before the decimal (0)
// - Exactly two digits after the decimal (.00)
decimalFormatter.applyPattern("#,##0.00");
decimalFormatter.applyPattern("#,##0");

return decimalFormatter.format(totalSum);
}
@@ -4249,7 +4262,7 @@ public class PdfService extends AbstractBaseEntityService<Pdf, Long, PdfReposito
DecimalFormat decimalFormatter = (DecimalFormat) formatter;
// 2. Apply the desired pattern: #,##0.00
decimalFormatter.applyPattern("#,##0.00");
decimalFormatter.applyPattern("#,##0");

// 3. Format and return the difference
return decimalFormatter.format(difference);


Loading…
Откажи
Сачувај