puzhibing
2026-07-08 0911dabe2e8dff4d79c1243d2d613600b3eeeb4d
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java
@@ -319,6 +319,15 @@
                        order.setStatus(-1);
                        chargingOrderService.updateById(order);
                    }
                }else{
                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    LocalDateTime dateTime = LocalDateTime.parse(sdf.format(dataByOrderCode.get(0).getCreate_time()), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault()));
                    if(dateTime.plusMinutes(30).isBefore(LocalDateTime.now())){
                        order.setStartTime(LocalDateTime.parse(sdf.format(dataByOrderCode.get(dataByOrderCode.size() - 1).getCreate_time()), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault())));
                        order.setEndTime(dateTime);
                        order.setStatus(4);
                        chargingOrderService.updateById(order);
                    }
                }
            }