Bladeren bron

停车费支付优化

qzyReal 2 jaren geleden
bovenliggende
commit
b093adcc0b

+ 1 - 1
app-ui/manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "防疫管理系统",
+    "name" : "场站管理系统",
     "appid" : "__UNI__8AC923A",
     "description" : "",
     "versionName" : "1.0.0",

+ 3 - 5
app-ui/pages/wx/pay.vue

@@ -29,8 +29,7 @@
 								</u-checkbox>
 							</view>
 							<view class="c">{{ item.carNo }}</view>
-							<view class="r" v-if="item.price>0">{{ item.price }}元</view>
-							<view class="r" v-else>无需缴费</view>
+							<view class="r">{{ item.price }}元</view>
 						</label>
 					</view>
 				</u-checkbox-group>
@@ -313,7 +312,8 @@
 					state: this.state
 				}).then(resp => {
 					let data = resp.data;
-					this.cars = data.carList;
+					let cars=data.carList;
+					this.cars = cars;
 					this.goodsName = data.goodsName;
 					this.showPay = data.showPay;
 					this.judge = data.noJudgeCount == 0;
@@ -327,8 +327,6 @@
 						list: list
 					})
 					this.businessAble = list.filter(obj => obj.pay == 1).length == list.length;
-					let selectCar = this.list.filter(obj => obj.id == carId).pop();
-					let carNo = selectCar.carNo;
 					this.itemSelect = data.itemList.filter(obj => obj.pay == 0).map(obj => obj.id)
 					this.businessSelect = this.itemSelect.length == 0 ? [] : [1]
 					this.list = [];

+ 2 - 2
app-ui/utils/request.js

@@ -1,8 +1,8 @@
 // const server = 'http://127.0.0.1:8099/pro';
-const server = 'https://pco.aseanbusiness.cn/pro';
+// const server = 'https://pco.aseanbusiness.cn/pro';
 
 
-// const server = 'https://dxkaa1.gxbtka.com/pro';
+const server = 'https://dxkaa1.gxbtka.com/pro';
 
 
 import common from '../common/js/common.js';

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

@@ -86,9 +86,7 @@ public class OpenService {
 
     @Resource
     private TbGoodsService tbGoodsService;
-    @Resource
-    @Lazy
-    AutomaticPay automaticPay;
+
     @Resource
     private TbDeductionBindService tbDeductionBindService;
     @Resource
@@ -212,13 +210,14 @@ public class OpenService {
         String carType = tbBusinessCar.getCarType();
         BigDecimal carMoney = new BigDecimal(0);
         List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(businessCarId);
+        int payPart=tbBusinessCar.getPay();
         if (businessList.isEmpty()) {//无业务车辆===>计算停车费
             //如果已经支付过,则从支付时间算起,重新计算停车费
-            double dif = caulatePrice(tbBusinessCar, now);
-            if (dif > 0) {
-                RedisUtil.setByMINUTES(channel, carNo, 1);
+            double dif = tbBusinessService.calculationPartMoney(tbBusinessCar.getRealInTime(), now,tbBusinessCar.getCarSize()).doubleValue();
+            if (dif > 0&&payPart==0) {
+                RedisUtil.setByMINUTES(channel, carNo, 5);
                 log.error("请求返回:请缴停车费:{},{}元", carNo, dif);
-                automaticPay.run(null, tbBusinessCar.getCarNo(), 1);
+               // automaticPay.run(null, tbBusinessCar.getCarNo(), 1);
                 return ResultJson.error("请缴停车费" + dif + "元");
             } else {
                 //无需交停车费,又没有支付的--->设置成免费车辆
@@ -254,10 +253,10 @@ public class OpenService {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
                     return tbGoods.getChinaCarPay() == 1;
                 });
-                if (chinaCarPay) {
-                    double dif = caulatePrice(tbBusinessCar, now);
+                if (chinaCarPay&&payPart==0) {
+                    double dif = tbBusinessService.calculationPartMoney(tbBusinessCar.getRealInTime(), now,tbBusinessCar.getCarSize()).doubleValue();
                     if (dif > 0) {
-                        RedisUtil.setByMINUTES(channel, carNo, 1);
+                        RedisUtil.setByMINUTES(channel, carNo, 5);
                         log.error("中国车停车费:{},{}元", carNo, dif);
                         carMoney = new BigDecimal(dif);
                         //  return ResultJson.error("请缴停车费" + dif + "元");
@@ -272,10 +271,10 @@ public class OpenService {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
                     return tbGoods.getVietnamCarPay() == 1;
                 });
-                if (vietnamCarPay) {
-                    double dif = caulatePrice(tbBusinessCar, now);
+                if (vietnamCarPay&&payPart==0) {
+                    double dif = tbBusinessService.calculationPartMoney(tbBusinessCar.getRealInTime(), now,tbBusinessCar.getCarSize()).doubleValue();
                     if (dif > 0) {
-                        RedisUtil.setByMINUTES(channel, carNo, 1);
+                        RedisUtil.setByMINUTES(channel, carNo, 5);
                         log.error("越南车停车费:{},{}元", carNo, dif);
                         carMoney = new BigDecimal(dif);
                         //  return ResultJson.error("请缴停车费" + dif + "元");
@@ -298,7 +297,7 @@ public class OpenService {
             if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType)) {//越南车==重车
                 if (TbGoods.LeaveEnum.PART_MONEY.getCode() != vietnamLeave
                         && !pay) {
-                    RedisUtil.setByMINUTES(channel, carNo, 1);
+                    RedisUtil.setByMINUTES(channel, carNo, 5);
                     log.error("越南车==重车:缴纳业务费用:{}", carNo);
                     businessMoney = businessMoney.add(tbBusiness.getItemPrice());
                     // return ResultJson.error("请缴纳业务费用");
@@ -306,7 +305,7 @@ public class OpenService {
             } else {
                 if (TbGoods.LeaveEnum.PART_MONEY.getCode() != chinaCarLeave
                         && !pay) {
-                    RedisUtil.setByMINUTES(channel, carNo, 1);
+                    RedisUtil.setByMINUTES(channel, carNo, 5);
                     businessMoney = businessMoney.add(tbBusiness.getItemPrice());
                     log.error("需要缴纳业务费用:{},{}", carNo, businessMoney.toString());
                     // return ResultJson.error("请缴纳业务费用");
@@ -332,14 +331,7 @@ public class OpenService {
     }
 
 
-    private double caulatePrice(TbBusinessCar tbBusinessCar, Date now) {
-        Date inTime = tbBusinessCar.getRealInTime();
-        if (tbBusinessCar.getPay() == 1 && tbBusinessCar.getRealOutTime() == null && tbBusinessCar.getPayTime() != null) {
-            inTime = tbBusinessCar.getPayTime();
-        }
-        BigDecimal price = tbBusinessService.calculationPartMoney(inTime, now, tbBusinessCar.getCarSize());
-        return price.doubleValue();
-    }
+
 
     private void freeOut(TbBusinessCar tbBusinessCar, Date now, String outChannel, String base64Image) {
         if (StrUtil.equals(tbBusinessCar.getPayType(), TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType())) {

+ 3 - 9
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -123,18 +123,12 @@ public class ApiService {
             return Collections.emptyList();
         }
         carNo = carNo.toUpperCase();
-        //查询出未缴费的车辆
-        //有业务的车
-        List<TbBusinessCar> businessCarList = tbBusinessCarService.searchForPayCar(carNo);
-        //无业务的车
-        List<TbBusinessCar> noBusinessCarList = tbBusinessCarService.findTheNoBusinessCar(carNo);
-        businessCarList.addAll(noBusinessCarList);
-        List<SearchBO> searchBOList = businessCarList.stream().map(tbBusinessCar -> {
+        List<TbBusinessCar> businessCarList = tbBusinessCarService.findNotPayByCarNo(carNo);
+        return businessCarList.stream().map(tbBusinessCar -> {
             SearchBO searchBO = new SearchBO();
             searchBO.setId(tbBusinessCar.getId()).setCarNo(tbBusinessCar.getCarNo());
             return searchBO;
         }).distinct().collect(Collectors.toList());
-        return searchBOList;
     }
 
     public void confirm(List<String> ids) {
@@ -160,7 +154,7 @@ public class ApiService {
         if (tbBusinessCar.getPayTime() != null) {
             startTime = tbBusinessCar.getPayTime();
         }
-        BigDecimal price = tbBusinessService.calculationPartMoney(startTime, now,tbBusinessCar.getCarSize());
+        BigDecimal price = tbBusinessService.calculationPartMoney(startTime, now, tbBusinessCar.getCarSize());
         Map<String, Object> car = new HashMap<>();
         car.put("id", tbBusinessCar.getId());
         car.put("carNo", tbBusinessCar.getCarNo());

+ 50 - 57
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -70,6 +70,7 @@ import com.pj.project.tb_unit.TbUnitService;
 import com.pj.project4sp.admin.SpAdmin;
 import com.pj.project4sp.admin.SpAdminService;
 import com.pj.project4sp.global.BusinessException;
+import com.pj.utils.cache.RedisUtil;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import lombok.extern.slf4j.Slf4j;
@@ -162,8 +163,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     @Resource
     private TbFeeDetailsService tbFeeDetailsService;
 
-    @Resource
-    private TbMildCarService tbMildCarService;
 
     private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
 
@@ -513,14 +512,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
      * 微信端获取缴费信息
      *
      * @param businessCarId
-     * @param state
+     * @param channel
      * @return
      */
-    public Map<String, Object> getBusinessMoney(String businessCarId, String state) {
+    public Map<String, Object> getBusinessMoney(String businessCarId, String channel) {
         Map<String, Object> result = new HashMap<>();
         //对应的业务
         List<TbBusiness> businessList = this.findOtherBusinessByCarId(businessCarId);
-        Set<TbBusinessCar> cars = new HashSet<>();
+        TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(businessCarId);
         //越南车是否需要支付
         int vietnamCarPay = businessList.stream().anyMatch(tbBusiness -> {
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
@@ -535,7 +534,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         if (businessList.isEmpty()) {
             vietnamCarPay = 1;
             chinaCarPay = 1;
-            cars.add(tbBusinessCarService.getById(businessCarId));
         }
         businessList = businessList.stream().filter(tbBusiness -> {
             TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
@@ -545,65 +543,66 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     //或者下单后可缴费
                     || TbGoods.PayStep.BEFORE_CONFIRM.getCode().equals(payStep) && tbBusiness.getAdminConfirmInput() >= 0;
         }).collect(Collectors.toList());
-        businessList.forEach(tbBusiness -> {
-            List<TbBusinessCar> businessCars = tbBusinessCarService.findOtherBusinessCar(tbBusiness.getId());
-            cars.addAll(businessCars);
-        });
+
         List<String> businessIdList = businessList.stream().map(TbBusiness::getId).collect(Collectors.toList());
         String businessIds = StrUtil.join(",", businessIdList);
-//        result.put("type", businessType);
         result.put("showPay", true);
         result.put("businessId", businessIds);
+        result.put("noJudgeCount", 0);
+        if (TbBusinessCar.BusinessTypeEnum.BUSINESS_CAR.getType().equals(tbBusinessCar.getBusinessType())) {
+            if (tbBusinessCar.getConfirmJudge() != TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
+                result.put("noJudgeCount", 1);
+            }
+        }
         List<TbBusinessItem> items = tbBusinessItemService.findByBusinessIdList(businessIdList);
-        Date now = new Date();
-        List<Map<String, Object>> carsList = new ArrayList<>();
-        for (TbBusinessCar tbBusinessCar : cars) {
-            Date inTime = tbBusinessCar.getRealInTime();
-            BigDecimal partMoney = new BigDecimal("0");
-            String carType = tbBusinessCar.getCarType();
-            if (StrUtil.isEmpty(carType)) {
-                carType = TbItem.ItemTypeEnum.EMPTY_TYPE.getType();
+        Date inTime = tbBusinessCar.getRealInTime();
+        int pay = tbBusinessCar.getPay();
+        Map<String, Object> carMap = new HashMap<>();
+        carMap.put("price", 0);
+        if (pay == 0 && inTime != null) {
+            Date outTime = tbBusinessCar.getRealOutTime();
+            String cacheCarNo = RedisUtil.get(channel);
+            if (outTime == null && StrUtil.isNotEmpty(cacheCarNo)) {
+                outTime = new Date();
             }
-            if (inTime != null && tbBusinessCar.getRealOutTime() == null) {
-                if (tbBusinessCar.getPay() == 1 && tbBusinessCar.getPayTime() != null) {
-                    inTime = tbBusinessCar.getPayTime();
+            if (outTime != null) {
+                String carType = tbBusinessCar.getCarType();
+                if (StrUtil.isEmpty(carType)) {
+                    carType = TbItem.ItemTypeEnum.EMPTY_TYPE.getType();
                 }
-                partMoney = this.calculationPartMoney(inTime, now, tbBusinessCar.getCarSize());
-            }
-            if (StrUtil.isNotEmpty(tbBusinessCar.getColor()) && tbBusinessCar.getCarSize() != null) {
-                String freeColor = partConfig.getFreeColor();
-                //4.2米以下蓝色车辆
-                if (tbBusinessCar.getColor().contains(freeColor) && tbBusinessCar.getCarSize() <= partConfig.getFreeCarLength()) {
+                BigDecimal partMoney = calculationPartMoney(inTime, outTime, tbBusinessCar.getCarSize());
+                carMap.put("price", partMoney);
+                if (StrUtil.isNotEmpty(tbBusinessCar.getColor()) && tbBusinessCar.getCarSize() != null) {
+                    String freeColor = partConfig.getFreeColor();
+                    //4.2米以下蓝色车辆
+                    if (tbBusinessCar.getColor().contains(freeColor) && tbBusinessCar.getCarSize() <= partConfig.getFreeCarLength()) {
+                        partMoney = new BigDecimal("0");
+                    }
+                }
+                //越南车牌,是否免费
+                if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0) {
                     partMoney = new BigDecimal("0");
                 }
+                //中国车,是否免费
+                if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) {
+                    partMoney = new BigDecimal("0");
+                }
+                if (TbBusinessCar.PayTypeEnum.FEE_TYPE.getType().equals(tbBusinessCar.getPayType())) {
+                    carMap.put("price", 0);
+                }
             }
-            //越南车牌,是否免费
-            if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0) {
-                partMoney = new BigDecimal("0");
-            }
-            //中国车,是否免费
-            if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) {
-                partMoney = new BigDecimal("0");
-            }
-            Map<String, Object> carMap = new HashMap<>();
-            carMap.put("price", partMoney);
-            carMap.put("id", tbBusinessCar.getId());
-            carMap.put("carNo", tbBusinessCar.getCarNo());
-            carMap.put("pay", tbBusinessCar.getPay());
-            carMap.put("no", tbBusinessCar.getNo());
-            if (TbBusinessCar.PayTypeEnum.FEE_TYPE.getType().equals(tbBusinessCar.getPayType())) {
-                carMap.put("price", 0);
-            }
-            carsList.add(carMap);
         }
-        result.put("carList", carsList.stream().sorted(Comparator.comparingDouble(obj -> Double.valueOf(obj.get("price").toString()))).collect(Collectors.toList()));
+        carMap.put("id", tbBusinessCar.getId());
+        carMap.put("carNo", tbBusinessCar.getCarNo());
+        carMap.put("pay", pay);
+        carMap.put("no", tbBusinessCar.getNo());
+        result.put("carList",Collections.singleton(carMap));
         BigDecimal itemsPrice = new BigDecimal("0");
         List<Map<String, Object>> itemList = new ArrayList<>();
+        //未支付的
+        items = items.stream().filter(item -> item.getPayStatus() == 0).collect(Collectors.toList());
         for (TbBusinessItem item : items) {
             BigDecimal itemPrice = item.getItemPrice().multiply(new BigDecimal(item.getNum()));
-            if (item.getPayStatus() == 1) {
-                continue;
-            }
             itemsPrice = itemsPrice.add(itemPrice);
             Map<String, Object> itemMap = new HashMap<>();
             itemMap.put("id", item.getId());
@@ -626,13 +625,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 }
             }
         }
-        result.put("noJudgeCount", 0);
-        TbBusinessCar tbBusinessCar = tbBusinessCarService.getById(businessCarId);
-        if (TbBusinessCar.BusinessTypeEnum.BUSINESS_CAR.getType().equals(tbBusinessCar.getBusinessType())) {
-            if (tbBusinessCar.getConfirmJudge() != TbBusinessCar.ConfirmJudgeEnum.JUDGE_PASS.getCode()) {
-                result.put("noJudgeCount", 1);
-            }
-        }
         result.put("itemsPrice", itemsPrice);
         result.put("itemList", itemList);
         result.put("businessNo", businessList.stream().map(TbBusiness::getNo).distinct().collect(Collectors.joining("、")));
@@ -640,6 +632,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         return result;
     }
 
+
     public List<TbBusiness> findOtherBusinessByCarId(String businessCarId) {
         return tbBusinessMapper.findOtherBusinessByCarId(businessCarId);
     }

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java

@@ -102,7 +102,7 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
     /**
      * 是否支付 0 否 1 是
      */
-    private Integer pay;
+    private Integer pay=0;
     private Date payTime;
     private BigDecimal basePartMoney;
     private String inChannel;

+ 0 - 2
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.java

@@ -37,13 +37,11 @@ public interface TbBusinessCarMapper extends BaseMapper<TbBusinessCar> {
 
     List<TbBusinessCar> findTodayRecord(@Param("carNo") String carNo, @Param("itemId") String itemId);
 
-    int checkCarBusinessType(@Param("typeId") String typeId, @Param("carNo") String carNo, @Param("timeEnd") String timeEnd);
 
     void removeBusinessId(String id);
 
     List<TbBusinessCar> findOtherBusinessCar(String businessId);
 
-    List<TbBusinessCar> searchForPayCar(@Param("carNo") String carNo);
 
     CarStatics staticsCar(@Param("weightCar") String weightCar, @Param("emptyCar") String emptyCar, @Param("list")List<String> list);
 

+ 2 - 21
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml

@@ -158,17 +158,7 @@
           and c.item_id = #{itemId};
 
     </select>
-    <select id="checkCarBusinessType" resultType="java.lang.Integer">
-        SELECT count(a.id)
-        FROM tb_business_car a,
-             tb_business b,
-             tb_business_item c
-        WHERE a.id = b.business_car_id
-          AND b.id = c.business_id
-          AND a.car_no = #{carNo}
-          and c.business_type = #{typeId}
-          and DATE_FORMAT(b.operate_time, '%Y-%m-%d %H:%i:%s') &gt; #{timeEnd}
-    </select>
+
     <select id="findOtherBusinessCar" resultType="com.pj.project.tb_business_car.TbBusinessCar">
         select distinct a.*
         from tb_business_car a,
@@ -176,16 +166,7 @@
         where a.id = b.business_car_id
           and b.business_id = #{businessId}
     </select>
-    <select id="searchForPayCar" resultType="com.pj.project.tb_business_car.TbBusinessCar">
-        SELECT distinct a.*
-        FROM tb_business_car a,
-             relation_business_car b,
-             tb_business c
-        WHERE a.id = b.business_car_id
-          AND b.business_id = c.id
-          AND (c.pay_money &lt; c.item_price or a.pay = 0)
-          AND a.car_no LIKE CONCAT('%', #{carNo}, '%');
-    </select>
+
     <select id="staticsCar" resultType="com.pj.project.tb_business_car.statics.CarStatics">
         SELECT SUM(CASE
                        WHEN DATE_FORMAT(real_in_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') THEN 1

+ 15 - 22
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -273,13 +273,6 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
                 .setRemark(t.getRemark())
                 .setOutRemark(t.getOutRemark())
                 .setTimeUpdate(now);
-        if (t.getRealOutTime() != null && db.getPay() == 0) {
-            db.setPay(1);
-            if (!StrUtil.equals(db.getPayType(), TbBusinessCar.PayTypeEnum.FEE_TYPE.getType())) {
-                db.setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
-            }
-        }
-
         //车牌没改
         if (StrUtil.equals(oldCarNo, newCarNo)) {
             tbBusinessCarMapper.updateRecord(db);
@@ -399,9 +392,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         return tbBusinessCarMapper.findTodayRecord(carNo, itemId);
     }
 
-    public int checkCarBusinessType(String typeId, String carNo, String timeEnd) {
-        return tbBusinessCarMapper.checkCarBusinessType(typeId, carNo, timeEnd);
-    }
+
 
     public List<TbBusinessCar> findNotOutCarLike(String carNo) {
         if (StrUtil.isEmpty(carNo) || StrUtil.length(carNo) < 3) {
@@ -416,15 +407,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         return list.stream().distinct().collect(Collectors.toList());
     }
 
-    public TbBusinessCar searchOtherBusinessCarNotOut(String carNo) {
-        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
-        ew.isNull("real_out_time")
-                .isNull("business_id")
-                .eq("car_no", carNo.trim().toUpperCase())
-                .orderByDesc("time_update");
-        List<TbBusinessCar> list = list(ew);
-        return list.isEmpty() ? null : list.get(0);
-    }
+
 
     public List<TbBusinessCar> searchByNo(String carNo) {
         if (StrUtil.length(carNo) < 3) {
@@ -442,9 +425,6 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     }
 
 
-    public List<TbBusinessCar> searchForPayCar(String carNo) {
-        return tbBusinessCarMapper.searchForPayCar(carNo);
-    }
 
     public void outCar(String id, String outChannel, Date realOutTime) {
         Date now = new Date();
@@ -524,4 +504,17 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
             });
         });
     }
+
+    /**
+     * 未支付的车
+     * @param carNo
+     * @return
+     */
+    public List<TbBusinessCar> findNotPayByCarNo(String carNo) {
+        QueryWrapper<TbBusinessCar>ew=new QueryWrapper<>();
+        ew.lambda().like(TbBusinessCar::getCarNo,carNo)
+                .eq(TbBusinessCar::getPay,0)
+                .eq(TbBusinessCar::getPayType,TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType());
+        return list(ew);
+    }
 }