瀏覽代碼

去掉车辆到达卡口扣除预存款功能

qzyReal 2 年之前
父節點
當前提交
b28a120c4d
共有 1 個文件被更改,包括 15 次插入15 次删除
  1. 15 15
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java

+ 15 - 15
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -199,13 +199,13 @@ public class OpenService {
         IOrderPriceRes businessRes = new IOrderPriceRes();
         List<IOrderItem> expenses = new ArrayList<>();
         List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(businessCarId);
-        BigDecimal hasPayPartMoney=tbBusinessCar.getMoney();
+        BigDecimal hasPayPartMoney = tbBusinessCar.getMoney();
         if (businessList.isEmpty()) {
             //无业务车辆===>计算停车费
             //如果已经支付过,则从支付时间算起,重新计算停车费
-            Date inTime=tbBusinessCar.getRealInTime();
-            if (hasPayPartMoney.compareTo(BigDecimal.ZERO)>0){
-                inTime=now;
+            Date inTime = tbBusinessCar.getRealInTime();
+            if (hasPayPartMoney.compareTo(BigDecimal.ZERO) > 0) {
+                inTime = now;
             }
             IOrderPriceRes res = tbBusinessService.getPartMoney(inTime, now, carNo, tbBusinessCar.getColor());
             double dif = res.getTotalOrderPrice().subtract(tbBusinessCar.getMoney()).doubleValue();
@@ -225,16 +225,16 @@ public class OpenService {
         } else {
             //有业务的车--->都要交停车费
             //该车所有的业务都是到达卡口才进行扣费才会进入自动扣费
-            Date inTime=tbBusinessCar.getRealInTime();
-            if (hasPayPartMoney.compareTo(BigDecimal.ZERO)>0){
-                inTime=now;
+            Date inTime = tbBusinessCar.getRealInTime();
+            if (hasPayPartMoney.compareTo(BigDecimal.ZERO) > 0) {
+                inTime = now;
             }
             partMoneyRes = tbBusinessService.getPartMoney(inTime, now, carNo, tbBusinessCar.getColor());
             double dif = partMoneyRes.getTotalOrderPrice().doubleValue();
             if (dif > 0) {
                 RedisUtil.setByMINUTES(channel, carNo, 5);
                 log.error("停车费:{},{}元", carNo, dif);
-            }else {
+            } else {
                 if (tbBusinessCar.getPayTime() == null) {
                     tbBusinessCar.setPayType(CarEnum.PayTypeEnum.FEE_TYPE.getType()).setPay(1);
                 }
@@ -289,13 +289,13 @@ public class OpenService {
                 desc += " 停车费" + carMoney.toString() + "元";
             }
             RedisUtil.setByMINUTES(channel, carNo, 5);
-            boolean flag = automaticPay.payBusinessAndPartMoney(businessList, tbBusinessCar, partMoneyRes);
-            if (flag) {
-                //
-                log.error("预存款扣款成功,返回:{},{}", carNo, desc);
-                freeOut(tbBusinessCar, now, channel, image);
-                return ResultJson.success();
-            }
+            // boolean flag = automaticPay.payBusinessAndPartMoney(businessList, tbBusinessCar, partMoneyRes);
+            // if (flag) {
+            //
+            //   log.error("预存款扣款成功,返回:{},{}", carNo, desc);
+            //    freeOut(tbBusinessCar, now, channel, image);
+            //   return ResultJson.success();
+            //   }
             log.error("请求返回:{},{}", carNo, desc);
             return ResultJson.error(desc);
         }