Commit 6c91a5cc authored by neo's avatar neo

[bugfix] fixed replace parsed formular to reference cell data

parent b3cbba16
......@@ -572,16 +572,15 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
});
configMapToPCTs.forEach((k, v) -> {
String passedFormula = k.getParsedFormula();
v.forEach(pctStr -> {
List<PCTEntity> entities = formulaMapToPCT.get(pctStr);
BigDecimal result = new BigDecimal("0");
for (PCTEntity entity : entities) {
result = result.add(pctCache.get(entity));
}
passedFormula.replaceAll(pctStr, result.toString());
k.setParsedFormula(k.getParsedFormula().replaceAll(pctStr, result.toString()));
});
k.setParsedFormula(passedFormula);
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment