| | |
| | | * Servlet implementation class PlateServlet |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/car") |
| | | @RequestMapping("/car1") |
| | | @RequiredArgsConstructor |
| | | public class PlateServlet extends HttpServlet { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | s+="查询道闸为空\n"; |
| | | }else{ |
| | | if(barrier.getType()==0){ |
| | | //noOpen(request,response); |
| | | outPark(license, barrier.getId(), barrier.getParkId()); |
| | | s+=license+"-保存出场记录\n"; |
| | | }else{ |
| | |
| | | if(Integer.parseInt(num) >= byId.getNum() ){ |
| | | //led显示 |
| | | Boolean aBoolean = inLedFullShow(code, license,barrier.getParkId()); |
| | | noOpen(request,response); |
| | | }else { |
| | | //led显示 |
| | | Boolean aBoolean = inLedShow(code, license,barrier.getParkId()); |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | outLedShow(barrier.getCode(),barrier.getCarNo(),outPark.getPrice(),toDayHrMinSec,barrier.getParkId()); |
| | | if(outPark.getPrice()==0&&outPark.getStatus3()==0){ |
| | | System.out.println(outPark.getCarNo()+"该车不需要缴费"); |
| | | barrier.setType2(1); |
| | | } |
| | | barrierService.saveOrUpdate(barrier); |