jk-GitHub-coder 3 lat temu
rodzic
commit
6cb87c723a

+ 4 - 4
YijiaRestful/src/main/java/com/platform/yijia/controller/PayOrderController.java

@@ -439,7 +439,7 @@ public class PayOrderController {
         PayOrderResultInfo payOrderResultInfo = new PayOrderResultInfo();
         BigDecimal oilPrice = new BigDecimal(params.get("oilPrice").toString());             //油品价格
         BigDecimal receivableAmt = new BigDecimal(params.get("receivableAmt").toString());   //应收金额
-        BigDecimal oilLiters = new BigDecimal("0.00");              //加油升数
+        BigDecimal oilLiters = new BigDecimal("0.0000");              //加油升数
         BigDecimal discountAmt = new BigDecimal(0);                 //油站销售价后优惠金额
         BigDecimal sellDiscountAmt = new BigDecimal(0);             //油站销售价后优惠金额
         BigDecimal dzkDiscountAmt = new BigDecimal(0);              //电子卡优惠金额
@@ -449,7 +449,7 @@ public class PayOrderController {
         BigDecimal sellPrice = discountPrice;                           //油站销售价
         BigDecimal driverDiscountAmt = new BigDecimal("0");         //司机价优惠金额
         //加油升数
-        oilLiters = receivableAmt.divide(oilPrice,2, BigDecimal.ROUND_HALF_UP);
+        oilLiters = receivableAmt.divide(oilPrice,4, BigDecimal.ROUND_HALF_UP);
 //        if(!oilLiters.toString().substring(oilLiters.toString().indexOf(".") + 1).equals("00")){
 //            oilLiters = receivableAmt.divide(oilPrice,2, BigDecimal.ROUND_UP);
 //        }
@@ -567,8 +567,8 @@ public class PayOrderController {
         BigDecimal oilPrice = new BigDecimal(params.get("oilPrice").toString());    //油品价格
         BigDecimal receivableAmt = new BigDecimal(params.get("receivableAmt").toString());   //应收金额
         BigDecimal oilLiters = new BigDecimal("0.0000");  //加油升数
-        BigDecimal discountAmt = new BigDecimal(0);     //标签方案优惠金额
-        BigDecimal dzkDiscountAmt = new BigDecimal(0);  //电子卡优惠金额
+        BigDecimal discountAmt = new BigDecimal(0);       //标签方案优惠金额
+        BigDecimal dzkDiscountAmt = new BigDecimal(0);    //电子卡优惠金额
         BigDecimal amt = receivableAmt;
         BigDecimal discountPrice = oilPrice;