|
|
@@ -128,8 +128,19 @@ public class TextbookIssueRecordServiceImpl extends MPJBaseServiceImpl<TextbookI
|
|
|
.eq(ObjectUtils.isNotEmpty(dto.getReturnState()) && dto.getReturnState() == 0, TextbookIssueRecord::getRecedeNumber, 0)
|
|
|
.orderByDesc(TextbookIssueRecord::getCreateDate)
|
|
|
;
|
|
|
-
|
|
|
- return textbookIssueRecordMapper.selectJoinPage(ConventPage.getPage(dto), TextbookIssueRecordPageVo.class, textbookIssueRecordMPJLambdaWrapper);
|
|
|
+ IPage<TextbookIssueRecordPageVo> result = textbookIssueRecordMapper.selectJoinPage(ConventPage.getPage(dto), TextbookIssueRecordPageVo.class, textbookIssueRecordMPJLambdaWrapper);
|
|
|
+ for (TextbookIssueRecordPageVo vo : result.getRecords()){
|
|
|
+ if(ObjectUtils.isNotEmpty(vo.getPrice())){
|
|
|
+ vo.setPrice(vo.getPrice().stripTrailingZeros());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotEmpty(vo.getSubtotal())){
|
|
|
+ vo.setSubtotal(vo.getSubtotal().stripTrailingZeros());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotEmpty(vo.getActualTotalPrice())){
|
|
|
+ vo.setActualTotalPrice(vo.getActualTotalPrice().stripTrailingZeros());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
// return textbookIssueRecordMapper.getPage(page, dto);
|
|
|
}
|
|
|
|
|
|
@@ -467,12 +478,12 @@ public class TextbookIssueRecordServiceImpl extends MPJBaseServiceImpl<TextbookI
|
|
|
data.add(vo.getIssn());
|
|
|
data.add(vo.getEditorInChief());
|
|
|
data.add(vo.getPublishingHouse());
|
|
|
- data.add(vo.getPrice() + "");
|
|
|
- data.add(vo.getSubtotal() + "");
|
|
|
+ data.add(ObjectUtils.isNotEmpty(vo.getPrice()) ? vo.getPrice().stripTrailingZeros().toPlainString() : BigDecimal.ZERO.toPlainString());
|
|
|
+ data.add(ObjectUtils.isNotEmpty(vo.getSubtotal()) ? vo.getSubtotal().stripTrailingZeros().toPlainString() : BigDecimal.ZERO.toPlainString());
|
|
|
if (ObjectUtils.isEmpty(vo.getSummation())) {
|
|
|
data.add("0");
|
|
|
} else {
|
|
|
- data.add(vo.getSummation() + "");
|
|
|
+ data.add(vo.getSummation().stripTrailingZeros().toPlainString());
|
|
|
}
|
|
|
|
|
|
numMap = vo.getNumMap();
|
|
|
@@ -494,7 +505,7 @@ public class TextbookIssueRecordServiceImpl extends MPJBaseServiceImpl<TextbookI
|
|
|
data.add(vo.getIssueNumber() + "");
|
|
|
data.add(vo.getRecedeNumber() + "");
|
|
|
data.add(vo.getActualIssueNumber() + "");
|
|
|
- data.add(vo.getActualTotalPrice() + "");
|
|
|
+ data.add(ObjectUtils.isNotEmpty(vo.getActualTotalPrice()) ? vo.getActualTotalPrice().stripTrailingZeros().toPlainString() : BigDecimal.ZERO.toPlainString());
|
|
|
data.add(vo.getRemark());
|
|
|
|
|
|
resultList.add(data);
|
|
|
@@ -572,7 +583,7 @@ public class TextbookIssueRecordServiceImpl extends MPJBaseServiceImpl<TextbookI
|
|
|
totalSubtotalRowCell.setCellStyle(cellStyle);
|
|
|
|
|
|
Cell totalPriceRowCell = totalSubtotalRow.createCell(eachImportConfigs.size() - 2);
|
|
|
- totalPriceRowCell.setCellValue(totalPrice.toString());
|
|
|
+ totalPriceRowCell.setCellValue(totalPrice.stripTrailingZeros().toPlainString());
|
|
|
totalPriceRowCell.setCellStyle(cellStyle);
|
|
|
|
|
|
sheet.addMergedRegion(new CellRangeAddress(rowNumber, rowNumber, 0, 6));
|