kongdeqiang
2023-03-31 329f524e2c112978aecfc05c6c2608f1b7559d53
默认变更列表
2个文件已修改
73 ■■■■ 已修改文件
src/main/java/com/boying/controller/car/PlateServlet3.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/phone/YCPayController.java 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/car/PlateServlet3.java
@@ -433,7 +433,7 @@
                    outParkService.saveOrUpdate(byCarNoAndBarrierId);
                    return 0.0;
                }else{
                    if(w.getParkIds()!=null){
                    if(StringUtils.isNotBlank(w.getParkIds())){
                        if(w.getEndTime()!=null){
                            String parkIds = w.getParkIds();
                            String[] split = parkIds.split(",");
@@ -507,10 +507,12 @@
                carType = "月租车";
            }else {
                //白名单固定停车场车辆
                if(byCarNo.getParkId().equals(barrier.getParkId())){
                if(StringUtils.isNotBlank(byCarNo.getParkIds()) && byCarNo.getParkIds().contains(barrier.getParkId()+"")){
                    carType = "月租车";
                    long l = (byCarNo.getEndTime().getTime() - byCarNo.getStartTime().getTime()) / (24 * 3600 * 1000);
                    carDay = "有效期还有"+l+"天";
                }else {
                    carType = "临时车";
                }
            }
        }
@@ -554,10 +556,10 @@
                carType = "月租车";
            }else {
                //白名单固定停车场车辆
                if(byCarNo.getParkId().equals(barrier.getParkId())){
                if(StringUtils.isNotBlank(byCarNo.getParkIds()) && byCarNo.getParkIds().contains(barrier.getParkId()+"")){
                    carType = "月租车";
                    long l = (byCarNo.getEndTime().getTime() - byCarNo.getStartTime().getTime()) / (24 * 3600 * 1000);
                    carDay = "有效期还有"+l+"天";
                }else {
                    carType = "临时车";
                }
            }
        }
src/main/java/com/boying/controller/phone/YCPayController.java
@@ -32,6 +32,7 @@
@RequiredArgsConstructor
public class YCPayController {
    private final OutParkService outParkService;
    private final ParkService parkService;
    private final OrderRecordService orderRecordService;
    private final TicketService ticketService;
    private final TicketBlackService ticketBlackService;
@@ -76,25 +77,30 @@
                updateOutPark(outPark.getId(),"03");
                return R.failed("本次停车无需支付费用!");
            }else{
                if(w.getParkId()!=null){
                    if(w.getEndTime()!=null){
                        if(w.getParkId().equals(outPark.getParkId())&&System.currentTimeMillis()<w.getEndTime().getTime()){
                            updateOutPark(outPark.getId(),"03");
                            return R.failed("本次停车无需支付费用!");
                if(StringUtils.isNotBlank(w.getParkIds())){
                    if(w.getParkIds().contains(outPark.getParkId()+"")){
                        if(w.getEndTime()!=null){
                            if(System.currentTimeMillis()<w.getEndTime().getTime()){
                                updateOutPark(outPark.getId(),"03");
                                return R.failed("本次停车无需支付费用!");
                            }
                        }
                    }
                }
            }
        }
        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("跳转邮储支付", "http://wxtest.smeia.cn/h5/?appid=CUP11234601101&params={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
        if(StringUtils.isNotBlank(outPark.getPayCode()) && outPark.getStatus() == 0){
            return R.ok("跳转邮储支付", "http://wxtest.smeia.cn/h5/static/router.html?rurl=router&router=psbc&appid=CUP16522400671&params={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
        }else if(outPark.getStatus() == 1){
        }else if(StringUtils.isNotBlank(outPark.getPayCode()) && outPark.getStatus() == 1){
            return R.failed("已缴费");
        }
        if(StringUtils.isBlank(outPark.getPayCode())){
            addOrderRecord(outPark);
            return R.ok("跳转邮储支付", "http://wxtest.smeia.cn/h5/static/router.html?rurl=router&router=psbc&appid=CUP16522400671&params={\"payMode\":\"B\",\"payItemNo\":\"41301106100124\",\"userNo\":"+id+"}");
        }else {
            return R.failed("系统异常");
            return R.failed("出错");
        }
    }
@@ -230,6 +236,39 @@
        }
    }
    //插入停车订单记录
    public void addOrderRecord(OutPark outPark){
        outPark.setPayCode(outPark.getId()+"");
        outParkService.saveOrUpdate(outPark);
        Park park = parkService.getById(outPark.getParkId());
        OrderRecord orderRecord = new OrderRecord();
        orderRecord.setAddress(park.getName());
        orderRecord.setCarNo(outPark.getCarNo());
        orderRecord.setCode(outPark.getCode());
        orderRecord.setCode2(outPark.getCode2());
        orderRecord.setMoney(outPark.getPrice());
        orderRecord.setQueryId(outPark.getId());
        orderRecord.setType(1);
        orderRecord.setTicketStatus(0);
        orderRecord.setPayCode(outPark.getPayCode());
        orderRecordService.saveOrUpdate(orderRecord);
    }
    //插入执法订单记录
    public void addOrderRecord2(Ticket ticket){
        OrderRecord orderRecord = new OrderRecord();
        orderRecord.setAddress(ticket.getAddress());
        orderRecord.setCarNo(ticket.getCarNo());
        orderRecord.setCode(ticket.getCode());
        orderRecord.setMoney(ticket.getMoney());
        orderRecord.setQueryId(ticket.getId());
        orderRecord.setType(0);
        orderRecord.setPayCode(ticket.getPayCode());
        orderRecordService.saveOrUpdate(orderRecord);
    }
    private void writeTxt( String txt)
    {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");