Commit a62941fb by jianshuqin

修复导出明细人民币金额

parent 035b08d0
......@@ -119,7 +119,12 @@ public class CostExportServiceImpl implements CostExportService {
row.createCell(21).setCellValue(costDto.getAccountingSubjectName());
row.createCell(22).setCellValue(costDto.getProject());
row.createCell(23).setCellValue(costDto.getProjectDate() != null ? new SimpleDateFormat("yyyy-MM").format(costDto.getProjectDate()) : "");
row.createCell(24).setCellValue(costDto.getAmountRmb().toString());
//人民币金额
String amountRmbDto = costDto.getAmountRmb().toString();
if (costDto.getAmount() != null && costDto.getAmount().compareTo(BigDecimal.ZERO) > 0 && costDto.getToRmbRate() != null && costDto.getToRmbRate().compareTo(BigDecimal.ZERO) > 0) {
amountRmbDto = costDto.getAmount().multiply(costDto.getToRmbRate()).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
}
row.createCell(24).setCellValue(amountRmbDto);
rows++;
}
// 保存到本地,并且返回路径
......
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