Browse Source

Merge remote-tracking branch 'origin/master'

24282 1 năm trước cách đây
mục cha
commit
b5d920faa3

+ 5 - 5
sd-business/src/main/java/com/sd/business/entity/statement/vo/DocumentByOrderVo.java

@@ -48,6 +48,11 @@ public class DocumentByOrderVo {
      */
     private BigDecimal outerBoxPackingFee;
 
+    /**
+     * 合计
+     */
+    private BigDecimal total;
+
     @Getter
     @Setter
     @Builder
@@ -94,11 +99,6 @@ public class DocumentByOrderVo {
         private BigDecimal subtotal;
 
         /**
-         * 合计
-         */
-        private BigDecimal total;
-
-        /**
          * bom规格列表
          */
         private List<BomSpec> bomSpecList;

+ 1 - 1
sd-business/src/main/java/com/sd/business/service/statement/impl/DocumentByOrderExcelCellMergeStrategy.java

@@ -21,7 +21,7 @@ public class DocumentByOrderExcelCellMergeStrategy implements CellWriteHandler {
     // 订单无需合并的行
     private final List<Integer> orderRowIndex = new ArrayList<>();
     // 订单需要合并的列
-    private final List<Integer> orderColIndex = Arrays.asList(0, 1, 2);
+    private final List<Integer> orderColIndex = Arrays.asList(0, 1, 2, 20, 21);
     // sku无需合并的行
     private final List<Integer> skuRowIndex = new ArrayList<>();
     // sku需要合并的列

+ 2 - 2
sd-business/src/main/java/com/sd/business/service/statement/impl/StatementOfAccountExportServiceImpl.java

@@ -86,7 +86,6 @@ public class StatementOfAccountExportServiceImpl implements StatementOfAccountEx
                             .quantity(skuSpec.getQuantity())
                             .unitPrice(skuSpec.getUnitPrice())
                             .subtotal(skuSpec.getSubtotal())
-                            .total(skuSpec.getTotal())
                             .bomSpecCode(bomSpec.getBomSpecCode())
                             .bomSpecName(bomSpec.getBomSpecName())
                             .bomQuantity(bomSpec.getQuantity())
@@ -98,11 +97,12 @@ public class StatementOfAccountExportServiceImpl implements StatementOfAccountEx
                             .packingLaborSummary(bomSpec.getPackingLaborSummary())
                             .managementFeeSummary(bomSpec.getManagementFeeSummary())
                             .outerBoxPackingFee(documentByOrderVo.getOuterBoxPackingFee())
+                            .total(documentByOrderVo.getTotal())
                             .build();
                     exportDocumentByOrderBos.add(exportDocumentByOrderBo);
                 }
-                all = all.add(skuSpec.getTotal());
             }
+            all = all.add(documentByOrderVo.getTotal());
         }
 
         Map<String, Object> map = new HashMap<>();

+ 1 - 1
sd-business/src/main/java/com/sd/business/service/statement/impl/StatementOfAccountServiceImpl.java

@@ -428,6 +428,7 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
                         .code(item.getCode())
                         .wlnCode(item.getWlnCode())
                         .outerBoxPackingFee(item.getOuterBoxPackingFee())
+                        .total(item.getTotalAmount())
                         .build()
         ).collect(Collectors.toList());
 
@@ -540,7 +541,6 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
                                 .add(item.getManagementFee()))
                         .build())
                 .peek(item -> item.setSubtotal(item.getQuantity().multiply(item.getUnitPrice())))
-                .peek(item -> item.setTotal(item.getSubtotal()))
                 .peek(item -> {
                     // 判断是否是委外订单,如果是委外订单时将bom数量修改为0
                     OrderInfo orderInfo = orderService.getOne(q -> q.eq(OrderInfo::getId, item.getOrderId()).eq(OrderInfo::getType, 2));

BIN
sd-starter/src/main/resources/template/orderDocument.xlsx