| | |
| | | if(StringUtils.isBlank(outPark.getPayCode())){ |
| | | String logs = sdf.format(new Date())+" 车牌号为:"+outPark.getCarNo()+",申请缴费------》\n"; |
| | | writeTxt(logs); |
| | | List<EnterPark> byCarNo = enterParkService.findByCarNo(outPark.getCarNo(),outPark.getParkId()); |
| | | if(byCarNo.size()>0){ |
| | | EnterPark enterPark = byCarNo.get(0); |
| | | if(enterPark != null && enterPark.getIsPay() == 1){ |
| | | if(outPark.getPrice()==enterPark.getPrice()){ |
| | | return R.failed("已缴费"); |
| | | }else { |
| | | outPark.setPrice(outPark.getPrice()-enterPark.getPrice()); |
| | | outParkService.updateById(outPark); |
| | | } |
| | | } |
| | | } |
| | | addOrderRecord(outPark); |
| | | return R.ok("跳转邮储支付","https://openpayment.psbc.com/h5/static/router.html?rurl=router&router=psbc&appid=CUP14094502391¶ms={\"payMode\":\"B\",\"payItemNo\":\"41304508000500\",\"userNo\":"+id+"}"); |
| | | }else { |
| | |
| | | updateOrderRecord(queryId,"03"); |
| | | String logs = sdf.format(new Date())+" 车牌号为:"+byId.getCarNo()+",缴费成功------》\n"; |
| | | writeTxt(logs); |
| | | List<EnterPark> byCarNo = enterParkService.findByCarNo(byId.getCarNo(),byId.getParkId()); |
| | | if(byCarNo.size()>0){ |
| | | EnterPark enterPark = byCarNo.get(0); |
| | | enterPark.setIsPay(1); |
| | | enterParkService.updateById(enterPark); |
| | | } |
| | | return R.ok(null,"回调成功"); |
| | | }else { |
| | | String logs = sdf.format(new Date())+" 出场id为:"+queryId+",缴费失败------》\n"; |
| | |
| | | String logs = sdf.format(new Date())+" 车牌号为:"+outPark.getCarNo()+",创建订单------》\n"; |
| | | writeTxt(logs); |
| | | outPark.setPayCode(outPark.getId()+""); |
| | | List<EnterPark> byCarNo = enterParkService.findByCarNo(outPark.getCarNo(),outPark.getParkId()); |
| | | outParkService.updateById(outPark); |
| | | Park park = parkService.getById(outPark.getParkId()); |
| | | OrderRecord orderRecord = new OrderRecord(); |
| | | if(byCarNo.size() >0){ |
| | | EnterPark enterPark = byCarNo.get(0); |
| | | if(enterPark != null && enterPark.getImgId() != null){ |
| | | orderRecord.setImgInId(enterPark.getImgId()); |
| | | } |
| | | } |
| | | orderRecord.setAddress(park.getName()); |
| | | orderRecord.setCarNo(outPark.getCarNo()); |
| | | orderRecord.setCode(outPark.getCode()); |
| | |
| | | orderRecord.setPayCode(outPark.getPayCode()); |
| | | if(outPark.getImgId() != null){ |
| | | orderRecord.setImgOutId(outPark.getImgId()); |
| | | } |
| | | List<EnterPark> byCarNo = enterParkService.findByCarNo(outPark.getCarNo(),outPark.getParkId()); |
| | | if(byCarNo.size() >0){ |
| | | EnterPark enterPark = byCarNo.get(0); |
| | | if(enterPark != null && enterPark.getImgId() != null){ |
| | | orderRecord.setImgInId(enterPark.getImgId()); |
| | | } |
| | | } |
| | | orderRecordService.saveOrUpdate(orderRecord); |
| | | } |