| | |
| | | if(tickets.size()>0){ |
| | | enterPark.setStatus(1);//发现有违章 |
| | | } |
| | | enterPark.setIsPay(0); |
| | | enterPark.setPrice(0); |
| | | enterParkService.deleteByCarNo(enterPark.getCarNo(),enterPark.getParkId()); |
| | | enterParkService.save(enterPark); |
| | | barrier.setType2(1); |
| | |
| | | outPark.setTime(l/(1000*60)); |
| | | toDayHrMinSec = DateUtilOther.millisToDayHrMinSec(l/(1000*60)); |
| | | money = costRuleService.getMoney(one.getParkId(), outPark.getEnterTime(), outPark.getCreateTime(), 1); |
| | | |
| | | //入场记录保存一下 |
| | | if(one.getIsPay()==1){ |
| | | money = money - one.getPrice(); |
| | | }else { |
| | | one.setPrice(money); |
| | | one.setIsPay(0); |
| | | enterParkService.updateById(one); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | }else { |
| | | enterParkService.deleteByCarNo(carNo,parkId); |
| | | EnterPark enterPark = new EnterPark(); |
| | | enterPark.setIsPay(0); |
| | | enterPark.setPrice(0); |
| | | enterPark.setCarNo(carNo); |
| | | enterPark.setBarrierId(barrierId); |
| | | enterPark.setParkId(parkId); |
| | |
| | | outPark.setTime(l/(1000*60)); |
| | | toDayHrMinSec = DateUtilOther.millisToDayHrMinSec(l/(1000*60)); |
| | | money = costRuleService.getMoney(parkId, outPark.getEnterTime(), outPark.getCreateTime(), 1); |
| | | |
| | | //入场记录保存一下 |
| | | if(enterPark.getIsPay() != null && enterPark.getIsPay()==1){ |
| | | money = money - enterPark.getPrice(); |
| | | }else { |
| | | enterPark.setPrice(money); |
| | | enterPark.setIsPay(0); |
| | | enterParkService.updateById(enterPark); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | if(w.getType()==0){ |
| | | outLedShowYueZu(barrier.getCarNo(),"月租车",parkId,request,response,0); |
| | | OutPark byCarNoAndBarrierId = outParkService.findByCarNoAndBarrierId(carNo, barrierId); |
| | | byCarNoAndBarrierId.setStatus(1); |
| | | byCarNoAndBarrierId.setStatus(2); |
| | | byCarNoAndBarrierId.setStatus2(1); |
| | | outParkService.saveOrUpdate(byCarNoAndBarrierId); |
| | | return 0.0; |
| | |
| | | if(pid == outPark.getParkId() && System.currentTimeMillis()<w.getEndTime().getTime()){ |
| | | outLedShowYueZu(barrier.getCarNo(),"月租车",parkId,request,response,0); |
| | | OutPark byCarNoAndBarrierId = outParkService.findByCarNoAndBarrierId(carNo, barrierId); |
| | | byCarNoAndBarrierId.setStatus(1); |
| | | byCarNoAndBarrierId.setStatus(2); |
| | | byCarNoAndBarrierId.setStatus2(1); |
| | | outParkService.saveOrUpdate(byCarNoAndBarrierId); |
| | | return 0.0; |
| | |
| | | String shouQianMing = byId.getShouQianMing(); |
| | | String zfQianMing1 = byId.getZfQianMing1(); |
| | | String zfQianMing2 = byId.getZfQianMing2(); |
| | | if(shouQianMing != null){ |
| | | if(StringUtils.isNotBlank(shouQianMing)){ |
| | | String get = FileUtil.netSourceToBase64(shouQianMing, "GET"); |
| | | byId.setShouQianMing("data:image/png;base64,"+get); |
| | | } |
| | | if(zfQianMing1 != null){ |
| | | if(StringUtils.isNotBlank(zfQianMing1)){ |
| | | String get = FileUtil.netSourceToBase64(zfQianMing1, "GET"); |
| | | byId.setZfQianMing1("data:image/png;base64,"+get); |
| | | } |
| | | if(zfQianMing2 != null){ |
| | | if(StringUtils.isNotBlank(zfQianMing2)){ |
| | | String get = FileUtil.netSourceToBase64(zfQianMing2, "GET"); |
| | | byId.setZfQianMing2("data:image/png;base64,"+get); |
| | | } |
| | |
| | | //与执法对接 |
| | | @GetMapping("/getResult") |
| | | public Object getResult(Ticket ticket){ |
| | | if(StringUtils.isNotBlank(ticket.getShouQianMing())){ |
| | | ticketService.updateById(ticket); |
| | | return R.ok(); |
| | | }else { |
| | | return R.failed("更新失败"); |
| | | } |
| | | ticketService.updateById(ticket); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public void saveLogo(String name,String lng,String lat){ |
| | |
| | | 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); |
| | | } |
| | |
| | | @Column(columnDefinition = "int comment '图片id'") |
| | | private Integer imgId; |
| | | |
| | | @ApiModelProperty(value = "是否支付") |
| | | @Column(columnDefinition = "int comment '是否支付'") |
| | | private Integer isPay; |
| | | |
| | | private double price; |
| | | |
| | | |
| | | @Transient |
| | | @TableField(exist = false) |
| | |
| | | } |
| | | //开取发票 |
| | | for (OrderRecord orderRecord : list) { |
| | | System.out.println("正在申请开票文件:" + orderRecord); |
| | | // System.out.println("正在申请开票文件:" + orderRecord); |
| | | doTicket(orderRecord); |
| | | } |
| | | } |
| | |
| | | writeTxt(txt); |
| | | doTicketGet(mapTypes,orderRecord); |
| | | }else { |
| | | System.out.println(entity.getBody()); |
| | | // System.out.println(entity.getBody()); |
| | | txt += "查询有误,"+entity.getBody()+"\n"; |
| | | writeTxt(txt); |
| | | } |
| | |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | ResponseEntity<ReturnData> entity = restTemplate.postForEntity(urlIp+urlRoad, HTTPEntityUtil.setEntity(map1), ReturnData.class); |
| | | if(entity.getBody().getCode() == 1){ |
| | | System.out.println(entity.getBody()); |
| | | // System.out.println(entity.getBody()); |
| | | txt += entity.getBody()+",\n"; |
| | | Object o1 = entity.getBody().getData().get(0); |
| | | String s1 = JSON.toJSONString(o1); |
| | |
| | | } |
| | | //开取发票 |
| | | for (OrderRecord orderRecord : list) { |
| | | System.out.println("正在申请开票:" + orderRecord); |
| | | // System.out.println("正在申请开票:" + orderRecord); |
| | | doTicket(orderRecord); |
| | | } |
| | | } |
| | |
| | | // 创建链接 |
| | | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); |
| | | conn.setRequestMethod(requestMethod); |
| | | conn.setConnectTimeout(10 * 1000); |
| | | conn.setConnectTimeout(20000); |
| | | |
| | | if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) { |
| | | //连接失败/链接失效/文件不存在 |
| | |
| | | #项目配置 |
| | | ffpark: |
| | | #图片上传地址 |
| | | uploadPath: D:/project/img/ |
| | | uploadPath: D:/FFproject/img/ |
| | | showImg: ticket/showImg?result= |
| | | #服务端ip地址 |
| | | ip: http://183.196.93.178:8088/ |
| | |
| | | DIRECTMKOTEINVOICE: directmkoteinvoice |
| | | #获取电子票据文件 |
| | | GETEINVOICEBYBIZCODE: geteinvoicebybizcode |
| | | logPath: D:/project/log/ |
| | | filePath: D:/project/file/ |
| | | logPath: D:/FFproject/log/ |
| | | filePath: D:/FFproject/file/ |
| | | |
| | | #项目配置 |
| | | ffzf: |
| | | ip: http://36.134.129.218:6060/ |
| | | loginIp: http://36.134.129.218:9999/auth/oauth/token |
| | | info: api/getInfo |
| | | getNumber: api/getNumber |
| | | |
| | | |
| | | |
| | |
| | | <where> |
| | | 1=1 |
| | | <if test="carNo != null and carNo != ''"> |
| | | and car_no = #{carNo} |
| | | and car_no like concat('%',#{carNo},'%') |
| | | </if> |
| | | <if test="parkId != null and parkId != ''"> |
| | | and park_id = #{parkId} |
| | |
| | | <where> |
| | | 1=1 |
| | | <if test="carNo != null and carNo != ''"> |
| | | and car_no = #{carNo} |
| | | and car_no like concat('%',#{carNo},'%') |
| | | </if> |
| | | <if test="payCode != null and payCode != ''"> |
| | | and pay_code = #{payCode} |