| | |
| | | .eq(StringUtils.isNotBlank(carNo),WhiteList::getCarNo,carNo); |
| | | Page<WhiteList> page1 = whiteListService.page(page, wrapper); |
| | | for (WhiteList record : page1.getRecords()) { |
| | | if(record.getParkIds() != null){ |
| | | if(StringUtils.isNotBlank(record.getParkIds())){ |
| | | String s = ""; |
| | | String parkIds = record.getParkIds(); |
| | | String[] split = parkIds.split(","); |
| | |
| | | |
| | | public void outLedShow(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(); |
| | | ledBean.setcolor1(0); |
| | | ledBean.setcolor2(0); |
| | |
| | | if(type == 0){ |
| | | //开闸 |
| | | open(request,response,data1); |
| | | redisTemplate.opsForValue().set("park_change_in_"+parkId,"true",1, TimeUnit.DAYS); |
| | | int i = Integer.parseInt(redisnum); |
| | | i--; |
| | | if(i<0){ |
| | |
| | | if(type == 0){ |
| | | //开闸 |
| | | open(request,response,data1); |
| | | redisTemplate.opsForValue().set("park_change_in_"+parkId,"true",1, TimeUnit.DAYS); |
| | | int i = Integer.parseInt(redisnum); |
| | | i--; |
| | | if(i<0){ |
| | |
| | | import com.boying.common.SystemConfigProperties; |
| | | import com.boying.entity.*; |
| | | import com.boying.service.*; |
| | | import com.boying.util.DateUtilOther; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | */ |
| | | @GetMapping("/getByQueryId") |
| | | public Object getByQueryId(Long queryId){ |
| | | if(queryId == null){ |
| | | return R.failed("参数为空"); |
| | | } |
| | | OutPark byId = outParkService.getById(queryId); |
| | | if(byId.getTime() > 0){ |
| | | byId.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(byId.getTime()).longValue())); |
| | | } |
| | | return R.ok(byId,"请求成功"); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | if(outPark.getStatus() == 0){ |
| | | return R.ok("跳转邮储支付", "https://hbfs.govpay.ccb.com/online/fssm?fee=130000000001&PyfScnCgycd=01&pyfTpcd=3&BNo="+outPark.getPayCode()); |
| | | // return R.ok("跳转邮储支付", "https://hbfs.govpay.ccb.com/online/fssm?fee=130000000001&PyfScnCgycd=01&pyfTpcd=3&BNo="+outPark.getPayCode()); |
| | | // return R.ok("跳转邮储支付", "http://wxtest.smeia.cn/h5/?appid=CUP11234601101¶ms={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}"); |
| | | return R.ok("跳转邮储支付", "http://wxtest.smeia.cn/h5/static/router.html?rurl=router&router=psbc&appid=CUP16522400671¶ms={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}"); |
| | | |
| | | }else if(outPark.getStatus() == 1){ |
| | | return R.failed("已缴费"); |
| | | }else { |
| | |
| | | //修改订单状态 0成功 |
| | | if(success==0){ |
| | | updateOrderRecord(queryId,"03"); |
| | | return R.ok(null,"请求成功"); |
| | | return R.ok(null,"回调成功"); |
| | | }else { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss"); |
| | | String logs = sdf.format(new Date())+" 出场id为:"+queryId+",缴费失败------》\n"; |
| | |
| | | writeTxt(logs); |
| | | } |
| | | } |
| | | return R.ok(byId,"请求成功"); |
| | | return R.ok(byId,"回调成功"); |
| | | } |
| | | |
| | | /** |
| | |
| | | import java.time.ZoneId; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * @author kdq |
| | |
| | | return true; |
| | | }else { |
| | | //判断停车场是否有了车位 |
| | | String num = redisTemplate.opsForValue().get("car_park_" + enterPark.getParkId()); |
| | | if(num == null){ |
| | | num = "0"; |
| | | } |
| | | Park byId = parkMapper.selectById(enterPark.getParkId()); |
| | | int i = byId.getNum() - Integer.parseInt(num); |
| | | if(i<=0){ |
| | | return false; |
| | | }else { |
| | | String s = redisTemplate.opsForValue().get("park_change_in_" + enterPark.getParkId()); |
| | | if("true".equals(s)){ |
| | | redisTemplate.opsForValue().set("park_change_in_"+enterPark.getParkId(),"false",1, TimeUnit.DAYS); |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | |