2 Commits c5c230e36c ... 1d07e496d6

Author SHA1 Message Date
  caozj 1d07e496d6 Merge remote-tracking branch 'origin/master' 1 year ago
  caozj f8dad5f451 利润结算表头部保留两位小数 1 year ago

+ 11 - 11
hx-sale/src/main/java/com/fjhx/sale/service/statement/impl/SaleStatementServiceImpl.java

@@ -616,18 +616,18 @@ public class SaleStatementServiceImpl implements SaleStatementService {
         if (totalIncomeSumAmount.compareTo(BigDecimal.ZERO)>0) {
             grossProfitMargin = new BigDecimal("100").multiply(grossProfitSum).divide(totalIncomeSumAmount, 2, RoundingMode.HALF_UP);//毛利率
         }
-        map.put("GrossProfitMargin",grossProfitMargin);
-        map.put("contractSumAmount",contractSumAmount);
+        map.put("GrossProfitMargin",grossProfitMargin.setScale(2, RoundingMode.HALF_UP));
+        map.put("contractSumAmount",contractSumAmount.setScale(2, RoundingMode.HALF_UP));
         map.put("contractCount",list.size());
-        map.put("purchaseSumAmount",purchaseSumAmount);
-        map.put("contractArrivalSumAmount",contractArrivalSumAmount);
-        map.put("taxReturnMoneySumAmount",taxReturnMoneySumAmount);
-        map.put("otherIncomeSumAmount",otherIncomeSumAmount);
-        map.put("payForGoodsSumAmount",payForGoodsSumAmount);
-        map.put("otherExpensesSumAmount",otherExpensesSumAmount);
-        map.put("totalIncomeSumAmount",totalIncomeSumAmount);
-        map.put("totalExpensesSumAmount",totalExpensesSumAmount);
-        map.put("grossProfitSum",grossProfitSum);
+        map.put("purchaseSumAmount",purchaseSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("contractArrivalSumAmount",contractArrivalSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("taxReturnMoneySumAmount",taxReturnMoneySumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("otherIncomeSumAmount",otherIncomeSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("payForGoodsSumAmount",payForGoodsSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("otherExpensesSumAmount",otherExpensesSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("totalIncomeSumAmount",totalIncomeSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("totalExpensesSumAmount",totalExpensesSumAmount.setScale(2, RoundingMode.HALF_UP));
+        map.put("grossProfitSum",grossProfitSum.setScale(2, RoundingMode.HALF_UP));
         return map;
     }