Commit b8a9447a authored by eddie.woo's avatar eddie.woo

报表导出报错问题

parent 29dd5042
...@@ -581,7 +581,7 @@ public class ReportGeneratorImpl { ...@@ -581,7 +581,7 @@ public class ReportGeneratorImpl {
}else if(StringUtils.isNotBlank(cellData.getManualAmount())){ }else if(StringUtils.isNotBlank(cellData.getManualAmount())){
manualAmount = new BigDecimal(cellData.getManualAmount()); manualAmount = new BigDecimal(cellData.getManualAmount());
} }
sheet.getRow(cellData.getRowIndex()).getCell(cellData.getColumnIndex()).setCellValue(amount.add(manualAmount).setScale(2).toString()); sheet.getRow(cellData.getRowIndex()).getCell(cellData.getColumnIndex()).setCellValue(amount.add(manualAmount).setScale(2, BigDecimal.ROUND_HALF_UP).toString());
}catch (NumberFormatException e){ }catch (NumberFormatException e){
//判断是否有手工数据源有得话以手工数据源为主 //判断是否有手工数据源有得话以手工数据源为主
if(StringUtils.isNotBlank(cellData.getKeyinData())){ if(StringUtils.isNotBlank(cellData.getKeyinData())){
...@@ -668,7 +668,7 @@ public class ReportGeneratorImpl { ...@@ -668,7 +668,7 @@ public class ReportGeneratorImpl {
}else if(StringUtils.isNotBlank(cellData.getManualAmount())){ }else if(StringUtils.isNotBlank(cellData.getManualAmount())){
manualAmount = new BigDecimal(cellData.getManualAmount()); manualAmount = new BigDecimal(cellData.getManualAmount());
} }
sheet.getRow(cellData.getRowIndex()).getCell(cellData.getColumnIndex()).setCellValue(amount.add(manualAmount).setScale(2).toString()); sheet.getRow(cellData.getRowIndex()).getCell(cellData.getColumnIndex()).setCellValue(amount.add(manualAmount).setScale(2, BigDecimal.ROUND_HALF_UP).toString());
}catch (NumberFormatException e){ }catch (NumberFormatException e){
//判断是否有手工数据源有得话以手工数据源为主 //判断是否有手工数据源有得话以手工数据源为主
if(StringUtils.isNotBlank(cellData.getKeyinData())){ if(StringUtils.isNotBlank(cellData.getKeyinData())){
......
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