Ver código fonte

金额除以100

guoshuai 4 semanas atrás
pai
commit
d7e66d7b10

+ 2 - 1
src/main/java/com/qmrb/system/service/impl/BarnRecordServiceImpl.java

@@ -242,7 +242,8 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
         // 计费
         form.setPendingAmount(carParkChargingRulesService.calcuExpenses(form.getId(),form.getCarNumber(),isMonthlyCardMode));//待收金额
         if(form.getPendingAmount() != null){
-            form.setBillingAmount(form.getReceivedAmount().add(form.getPendingAmount()));//计费金额
+            form.setPendingAmount(form.getPendingAmount().divide(new BigDecimal(100)));
+            form.setBillingAmount((form.getReceivedAmount().add(form.getPendingAmount())).divide(new BigDecimal(100)));//计费金额
         }else{
             form.setBillingAmount(form.getReceivedAmount());//计费金额
         }

+ 1 - 1
src/main/java/com/qmrb/system/service/impl/OrderServiceImpl.java

@@ -294,7 +294,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
                         Order order = this.getById(orderNo);
                         // 支付金额
                         BigDecimal amountsPayable = new BigDecimal(order.getAmountsPayable()).divide(new BigDecimal(100)); 
-                        barnRecordForm.setReceivedAmount(barnRecordForm.getReceivedAmount().add(new BigDecimal(order.getAmountsPayable())));
+                        barnRecordForm.setReceivedAmount(barnRecordForm.getReceivedAmount().add(amountsPayable));
                         barnRecordForm.setBillingStartTime(new Date());
                         barnRecordService.updateForm(barnRecordForm.getId(),barnRecordForm);
                     }