guoshuai 4 semanas atrás
pai
commit
d722d90551

+ 6 - 4
src/main/java/com/qmrb/system/service/impl/BarnRecordServiceImpl.java

@@ -242,8 +242,8 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
         // 计费
         form.setPendingAmount(carParkChargingRulesService.calcuExpenses(form.getId(),form.getCarNumber(),isMonthlyCardMode));//待收金额
         if(form.getPendingAmount() != null){
-            form.setPendingAmount(form.getPendingAmount().divide(new BigDecimal(100)));
-            form.setBillingAmount((form.getReceivedAmount().add(form.getPendingAmount())).divide(new BigDecimal(100)));//计费金额
+            form.setPendingAmount(form.getPendingAmount());
+            form.setBillingAmount(form.getReceivedAmount().add(form.getPendingAmount()));//计费金额
         }else{
             form.setBillingAmount(form.getReceivedAmount());//计费金额
         }
@@ -343,8 +343,10 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
 
         long seconds = tempDateTime.until(toDateTime, ChronoUnit.SECONDS);
 
-
-        return (DateUtil.between(endDate, startDate, DateUnit.HOUR) + ":") + (minutes + ":") + (seconds + "");
+        long between = DateUtil.between(endDate, startDate, DateUnit.DAY);
+        String res =  (between > 0   ? ( between + "天") : "") + (hours > 0 ? (hours + "小时") : "") + (minutes > 0 ? (minutes + "分") : "");
+        
+        return res;
 
     }