kongdeqiang
2023-01-28 255375c2c36be6462d9aeed4b12ac5bdd368f04e
src/main/java/com/boying/controller/car/PlateServlet.java
@@ -348,31 +348,32 @@
      wrapper.lambda()
            .eq(WhiteList::getCarNo,carNo);
      List<WhiteList> all = whiteListService.list(wrapper);
      for(WhiteList w : all){
         if(w.getType()==0){
            outLedShow2(barrier.getCode(),barrier.getCarNo(),"月租车",toDayHrMinSec,barrier.getParkId());
            barrier.setType2(1);
            barrierService.saveOrUpdate(barrier);
            OutPark byCarNoAndBarrierId = outParkService.findByCarNoAndBarrierId(carNo, barrierId);
            byCarNoAndBarrierId.setStatus(1);
            outParkService.saveOrUpdate(byCarNoAndBarrierId);
            return 0.0;
         }else{
            if(w.getParkIds()!=null){
               if(w.getEndTime()!=null){
                  String parkIds = w.getParkIds();
                  String[] split = parkIds.split(",");
                  for (String s : split) {
                     int pid = Integer.parseInt(s);
                     if(pid == outPark.getParkId() && System.currentTimeMillis()<w.getEndTime().getTime()){
                        outLedShow2(barrier.getCode(),barrier.getCarNo(),"月租车",toDayHrMinSec,barrier.getParkId());
                        barrier.setType2(1);
                        barrierService.saveOrUpdate(barrier);
                        OutPark byCarNoAndBarrierId = outParkService.findByCarNoAndBarrierId(carNo, barrierId);
                        byCarNoAndBarrierId.setStatus(1);
                        outParkService.saveOrUpdate(byCarNoAndBarrierId);
                        return 0.0;
      if(all.size() >0){
         for(WhiteList w : all){
            if(w.getType()==0){
               outLedShow2(barrier.getCode(),barrier.getCarNo(),"月租车",toDayHrMinSec,barrier.getParkId());
               barrier.setType2(1);
               barrierService.saveOrUpdate(barrier);
               OutPark byCarNoAndBarrierId = outParkService.findByCarNoAndBarrierId(carNo, barrierId);
               byCarNoAndBarrierId.setStatus(1);
               outParkService.saveOrUpdate(byCarNoAndBarrierId);
               return 0.0;
            }else{
               if(w.getParkIds()!=null){
                  if(w.getEndTime()!=null){
                     String parkIds = w.getParkIds();
                     String[] split = parkIds.split(",");
                     for (String s : split) {
                        int pid = Integer.parseInt(s);
                        if(pid == outPark.getParkId() && System.currentTimeMillis()<w.getEndTime().getTime()){
                           outLedShow2(barrier.getCode(),barrier.getCarNo(),"月租车",toDayHrMinSec,barrier.getParkId());
                           barrier.setType2(1);
                           barrierService.saveOrUpdate(barrier);
                           OutPark byCarNoAndBarrierId = outParkService.findByCarNoAndBarrierId(carNo, barrierId);
                           byCarNoAndBarrierId.setStatus(1);
                           outParkService.saveOrUpdate(byCarNoAndBarrierId);
                           return 0.0;
                        }
                     }
                  }
               }