Browse Source

去掉PDF最后一列,修改前一列表头确认到货数量

qxm 4 years ago
parent
commit
3450c72ba6

+ 7 - 7
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/pdf/PDFUtil.java

@@ -301,12 +301,12 @@ public class PDFUtil {
         //document.add(image);
         int size = 0;
         // 表格
-        PdfPTable table = createTable(new float[] { 100, 80, 80,80});
+        PdfPTable table = createTable(new float[] { 180, 80, 80});
         table.addCell(createCell("物品明细", headfont, Element.ALIGN_CENTER, 8, false));
         table.addCell(createCell("材料名称", keyfont, Element.ALIGN_CENTER));
         table.addCell(createCell("规格", keyfont, Element.ALIGN_CENTER));
-        table.addCell(createCell("数量", keyfont, Element.ALIGN_CENTER));
-        table.addCell(createCell("到货数量", keyfont, Element.ALIGN_CENTER));
+        table.addCell(createCell("确认收货数量", keyfont, Element.ALIGN_CENTER));
+//        table.addCell(createCell("到货数量", keyfont, Element.ALIGN_CENTER));
         table.addCell(createCell("订单号: "+receivingNote.getOrderNumber()+"  交货单号:  " + receivingNote.getDeliveryNumber() + "   重量:" + receivingNote.getWeight(), keyfont, Element.ALIGN_LEFT, 4));
 //        table.addCell(createCell("未交货数量", keyfont, Element.ALIGN_CENTER));
 //        table.addCell(createCell("发货数量", keyfont, Element.ALIGN_CENTER));
@@ -315,9 +315,9 @@ public class PDFUtil {
             for (ConfirmCollectLineDetailModel line : receivingNote.getDeliveryLineDetail()) {
                 table.addCell(createCell(line.getMaterialName(), textfont));
                 table.addCell(createCell(line.getSizeDim(), textfont));
-                table.addCell(createCell(line.getDeliveryCount(), textfont));
                 table.addCell(createCell(line.getConfirmQuantity(), textfont));
-                size += line.getMaterialName().length() / 12 + 1;
+//                table.addCell(createCell(line.getDeliveryCount(), textfont));
+                size += line.getMaterialName().length() / 21 + 1;
 
             }
             for (ConfirmCollectOtherDeliveryModel otherLine : receivingNote.getOtherDeliveryModels()) {
@@ -325,9 +325,9 @@ public class PDFUtil {
                 for (ConfirmCollectLineDetailModel line : otherLine.getDeliveryLineDetail()) {
                     table.addCell(createCell(line.getMaterialName(), textfont));
                     table.addCell(createCell(line.getSizeDim(), textfont));
-                    table.addCell(createCell(line.getDeliveryCount(), textfont));
                     table.addCell(createCell(line.getConfirmQuantity(), textfont));
-                    size += line.getMaterialName().length() / 12 + 1;
+//                    table.addCell(createCell(line.getDeliveryCount(), textfont));
+                    size += line.getMaterialName().length() / 21 + 1;
                 }
             }