kongdeqiang
2023-08-15 15b3290a092ea16be998d5ce3c1df06ec3752bb5
提交更新
10个文件已修改
105 ■■■■ 已修改文件
src/main/java/com/boying/controller/car/PlateServlet3.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/phone/TicketController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/phone/YCPayController.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/entity/EnterPark.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/job/YCEticketScheduled.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/job/YCGetEticketScheduled.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/util/FileUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/EnterParkMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OutParkMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/car/PlateServlet3.java
@@ -359,6 +359,8 @@
                        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);
@@ -409,6 +411,15 @@
                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();
            }
@@ -486,6 +497,8 @@
        }else {
            enterParkService.deleteByCarNo(carNo,parkId);
            EnterPark enterPark = new EnterPark();
            enterPark.setIsPay(0);
            enterPark.setPrice(0);
            enterPark.setCarNo(carNo);
            enterPark.setBarrierId(barrierId);
            enterPark.setParkId(parkId);
@@ -528,6 +541,15 @@
                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();
            }
@@ -556,7 +578,7 @@
                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;
@@ -570,7 +592,7 @@
                                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;
src/main/java/com/boying/controller/phone/TicketController.java
@@ -174,15 +174,15 @@
        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);
        }
@@ -226,12 +226,8 @@
    //与执法对接
    @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){
src/main/java/com/boying/controller/phone/YCPayController.java
@@ -107,6 +107,18 @@
        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&params={\"payMode\":\"B\",\"payItemNo\":\"41304508000500\",\"userNo\":"+id+"}");
        }else {
@@ -131,6 +143,12 @@
                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";
@@ -259,9 +277,16 @@
        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());
@@ -273,13 +298,6 @@
        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);
    }
src/main/java/com/boying/entity/EnterPark.java
@@ -47,6 +47,12 @@
    @Column(columnDefinition = "int comment '图片id'")
    private Integer imgId;
    @ApiModelProperty(value = "是否支付")
    @Column(columnDefinition = "int comment '是否支付'")
    private Integer isPay;
    private double price;
    @Transient
    @TableField(exist = false)
src/main/java/com/boying/job/YCEticketScheduled.java
@@ -64,7 +64,7 @@
            }
            //开取发票
            for (OrderRecord orderRecord : list) {
                System.out.println("正在申请开票文件:" + orderRecord);
               // System.out.println("正在申请开票文件:" + orderRecord);
                doTicket(orderRecord);
            }
        }
@@ -91,7 +91,7 @@
            writeTxt(txt);
            doTicketGet(mapTypes,orderRecord);
        }else {
            System.out.println(entity.getBody());
          //  System.out.println(entity.getBody());
            txt += "查询有误,"+entity.getBody()+"\n";
            writeTxt(txt);
        }
@@ -111,7 +111,7 @@
        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);
src/main/java/com/boying/job/YCGetEticketScheduled.java
@@ -55,7 +55,7 @@
            }
            //开取发票
            for (OrderRecord orderRecord : list) {
                System.out.println("正在申请开票:" + orderRecord);
              //  System.out.println("正在申请开票:" + orderRecord);
                doTicket(orderRecord);
            }
        }
src/main/java/com/boying/util/FileUtil.java
@@ -121,7 +121,7 @@
            // 创建链接
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod(requestMethod);
            conn.setConnectTimeout(10 * 1000);
            conn.setConnectTimeout(20000);
            if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {
                //连接失败/链接失效/文件不存在
src/main/resources/application.yml
@@ -44,7 +44,7 @@
#项目配置
ffpark:
  #图片上传地址
  uploadPath: D:/project/img/
  uploadPath: D:/FFproject/img/
  showImg: ticket/showImg?result=
  #服务端ip地址
  ip: http://183.196.93.178:8088/
@@ -74,8 +74,15 @@
  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
src/main/resources/mapper/EnterParkMapper.xml
@@ -18,7 +18,7 @@
        <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}
src/main/resources/mapper/OutParkMapper.xml
@@ -27,7 +27,7 @@
          <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}