|
@@ -47,6 +47,7 @@ import vip.xiaonuo.common.util.CommonPdfUtil;
|
|
|
import vip.xiaonuo.dev.api.DevFileApi;
|
|
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -212,7 +213,7 @@ public class QySecondlineWarehouseServiceImpl extends ServiceImpl<QySecondlineWa
|
|
|
pdfPTable.addCell(remarkHead);
|
|
|
|
|
|
|
|
|
-
|
|
|
+ BigDecimal amount = BigDecimal.ZERO;
|
|
|
for (int i = 1; i <= list.size(); i++) {
|
|
|
QySecondlineWarehouse item = list.get(i - 1);
|
|
|
PdfPCell indexNoCell = CommonPdfUtil.createCenterPdfPCell(String.valueOf(i),1, 1, CommonPdfUtil.NORMALFONT);
|
|
@@ -230,8 +231,16 @@ public class QySecondlineWarehouseServiceImpl extends ServiceImpl<QySecondlineWa
|
|
|
pdfPTable.addCell(accountNumberCell);
|
|
|
pdfPTable.addCell(unitPriceCell);
|
|
|
pdfPTable.addCell(remarkCell);
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ amount = amount.add(new BigDecimal(item.getAccountNumber()).multiply(new BigDecimal(item.getUnitPrice())));
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
- PdfPCell amountCell = CommonPdfUtil.createCenterPdfPCell("合计",1, 2, CommonPdfUtil.NORMALFONT);
|
|
|
+ PdfPCell amountCell = CommonPdfUtil.createCenterPdfPCell("合计:"+amount.toPlainString(),1, 2, CommonPdfUtil.NORMALFONT);
|
|
|
amountCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|
|
|
PdfPCell companyNameCell = CommonPdfUtil.createCenterPdfPCell("单位: " + qySecondlineWarehouse.getCompanyName() ,1, 3, CommonPdfUtil.NORMALFONT);
|
|
|
companyNameCell.setHorizontalAlignment(Element.ALIGN_LEFT);
|