Commit 4116029a authored by sherlock's avatar sherlock

xxfp bug

parent d978f2c9
......@@ -534,9 +534,9 @@ public class ReportGeneratorImpl {
if (result.isPresent()) {
CellCalcInfoDto cellCalcInfoDto = new CellCalcInfoDto();
cellCalcInfoDto.setColumnIndex(Integer.parseInt(result.get().get("columnIndex").toString()));
cellCalcInfoDto.setColumnName(result.get().get("columnName").toString());
cellCalcInfoDto.setColumnName(result.get().get("columnName") == null ? "" : result.get().get("columnName").toString());
cellCalcInfoDto.setRowIndex(Integer.parseInt(result.get().get("rowIndex").toString()));
cellCalcInfoDto.setRowName(result.get().get("rowName").toString());
cellCalcInfoDto.setRowName(result.get().get("rowName") == null ? "" : result.get().get("rowName").toString());
cellCalcInfoDto.setFormula(convertListToString(y.stream()
.map(PeriodCellTemplateConfig::getFormula).collect(Collectors.toList())));
cellCalcInfoDto.setParsedFormula(convertListToString(y.stream()
......@@ -546,7 +546,7 @@ public class ReportGeneratorImpl {
cellCalcInfoDto.setReportTemplateId(Long.parseLong(result.get().get("reportTemplateId").toString()));
cellCalcInfoDto.setDataType(Integer.parseInt(result.get().get("dataType").toString()));
cellCalcInfoDto.setIsReadOnly(Boolean.valueOf(result.get().get("isReadOnly").toString()));
cellCalcInfoDto.setComment(result.get().get("comment").toString());
cellCalcInfoDto.setComment(result.get().get("comment") == null ? "" : result.get().get("comment").toString());
cellCalcInfoDto.setConfigList(y.stream()
.map(PeriodCellTemplateConfigExtendDto::getPeriodCellTemplateConfig)
.collect(Collectors.toList()));
......
......@@ -170,7 +170,7 @@ public class FunctionBase {
periodFormulaBlock.setReportId(0L);
periodFormulaBlock.setCellTemplateId(cellTemplateId);
periodFormulaBlock.setFormulaExpression(formulaExpression);
periodFormulaBlock.setData(val.toString());
periodFormulaBlock.setData(val.setScale(2, BigDecimal.ROUND_HALF_UP).toString());
periodFormulaBlock.setDataSourceId(dataSourceId);
periodFormulaBlock.setCreateBy("Admin");
periodFormulaBlock.setCreateTime(creatime);
......
......@@ -48,7 +48,7 @@ public class XXFP extends FunctionBase implements FreeRefFunction {
int period = getIntParam(args[3], ec);
String invoiceType = "004";
String formulaExpression = "XXFP(\"" + taxRate + "\"," + invoiceType + "," + amountType + "," + period + ")";
String formulaExpression = "XXFP(\"" + taxRate + "\"," + invoiceTypeParam + "," + amountType + "," + period + ")";
logger.debug(formulaExpression);
Integer curYear = formulaContext.getYear();
......
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