From a2312c7a34971aa5d0122fa179f5b8d1da28e78c Mon Sep 17 00:00:00 2001 From: kongdeqiang <kongdeqiang960204@163.com> Date: 星期五, 19 四月 2024 11:20:27 +0800 Subject: [PATCH] fix:新增手持接口 --- src/main/java/com/boying/controller/car/PlateServlet3.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/boying/controller/car/PlateServlet3.java b/src/main/java/com/boying/controller/car/PlateServlet3.java index 9cde223..afd3e77 100644 --- a/src/main/java/com/boying/controller/car/PlateServlet3.java +++ b/src/main/java/com/boying/controller/car/PlateServlet3.java @@ -132,6 +132,14 @@ out.close(); } + protected void easyOpen2(HttpServletRequest request, HttpServletResponse response) throws IOException { + response.setContentType("text/json"); + PrintWriter out = response.getWriter(); + out.println("{\"Response_AlarmInfoPlate\":{\"ivs_ioctrl\":{\"delay\":1000,\"io\":0,\"value\":2}}}"); + out.flush(); + out.close(); + } + protected void easyNoOpen(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/json"); PrintWriter out = response.getWriter(); @@ -653,7 +661,7 @@ writeTxt2(s); String jsonValue = JSON.toJSONString(outPark); redisTemplate.opsForValue().set("outPark_dif_"+ barrierId, jsonValue); - outLedShow(barrier.getCode(),barrier.getCarNo(),outPark.getPrice(),toDayHrMinSec,barrier.getParkId(),request,response,0); + outLedShow(outPark,barrier.getCode(),barrier.getCarNo(),outPark.getPrice(),toDayHrMinSec,barrier.getParkId(),request,response,0); }else { //闇�瑕佺即璐规垨鑰呮湁杩濈珷 System.out.println(outPark.getCarNo()+"璇ヨ溅闇�瑕佺即璐�"+outPark.getPrice()); @@ -665,7 +673,7 @@ outParkLogService.saveOrUpdate(byOutPark); String jsonValue = JSON.toJSONString(outPark); redisTemplate.opsForValue().set("outPark_dif_"+ barrierId, jsonValue); - outLedShow(barrier.getCode(),barrier.getCarNo(),outPark.getPrice(),toDayHrMinSec,barrier.getParkId(),request,response,1); + outLedShow(outPark,barrier.getCode(),barrier.getCarNo(),outPark.getPrice(),toDayHrMinSec,barrier.getParkId(),request,response,1); } return money; } @@ -818,7 +826,7 @@ noOpen(request,response,data1);//鍏ュ満寮�闂� } - public void outLedShow(String ledId,String carNo,Double price,String timeStamp,Integer parkId,HttpServletRequest request, HttpServletResponse response,int type) throws ServletException, IOException { + public void outLedShow(OutPark outPark,String ledId,String carNo,Double price,String timeStamp,Integer parkId,HttpServletRequest request, HttpServletResponse response,int type) throws ServletException, IOException { String redisnum = redisTemplate.opsForValue().get("car_park_" + parkId); Park park = parkService.getById(parkId); LedBean ledBean = new LedBean(); @@ -870,6 +878,11 @@ }else { //寮�闂� open(request,response,data1); + + //缂撳瓨鍦╮edis閲�,蹇冭烦鎺ュ彛鍘绘姮鏉� + String jsonValue = JSON.toJSONString(outPark); + redisTemplate.opsForValue().set("outPark-"+outPark.getBarrierId(), jsonValue); + enterParkService.deleteByCarNo(carNo, parkId); redisTemplate.opsForValue().set("park_change_in_"+parkId,"true",1, TimeUnit.DAYS); int i = Integer.parseInt(redisnum); -- Gitblit v1.9.1