| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |