puzhibing
2026-03-11 44b70260e23bbdc7b4e4356be45f04ad46e25e68
修改排班保存bug
2个文件已修改
15 ■■■■■ 已修改文件
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpSchedulingDetailServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpElectronicFenceServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpSchedulingDetailServiceImpl.java
@@ -436,7 +436,6 @@
                LocalDate parse = LocalDate.parse(day.getDayTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                //查询判断数据是否存在
                XpSchedulingDetail schedulingDetail = list.stream().filter(s -> s.getFleetId().equals(fleetId)
                        && s.getShiftId().equals(shiftId)
                        && s.getPlanTime().equals(parse)
                ).findAny().orElse(null);
                //构建存储对象
@@ -479,9 +478,9 @@
                XpShift xpShift = xpShifts.stream().filter(s -> s.getId().equals(shiftId)).findAny().orElse(null);
                if (null != xpShift) {
                    schedulingDetail.setIsAllDay(xpShift.getShiftName().contains("全天"));
                    schedulingDetail.setPlanTime(parse);
                    schedulingDetails.add(schedulingDetail);
                }
                schedulingDetail.setPlanTime(parse);
                schedulingDetails.add(schedulingDetail);
            }
        }
        //批量保存排班明细数据
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpElectronicFenceServiceImpl.java
@@ -320,13 +320,13 @@
            // 检查更新后的区域与现有运营区域是否有重叠
            for (XpElectronicFenceArea updatedArea : updatedElectronicFenceAreas) {
                //处理围栏闭合
                String[] split = updatedArea.getFencePoints().split(",");
                if(split[0].equals(split[split.length - 1])){
                    updatedArea.setFencePoints(updatedArea.getFencePoints() + "," + split[0]);
                }
                if (updatedArea.getAreaType() == 1) { // 只检查运营区域
                    for (XpElectronicFenceArea existingArea : existingOperationAreas) {
                        //处理围栏闭合
                        String[] split = existingArea.getFencePoints().split(",");
                        if(split[0].equals(split[split.length - 1])){
                            existingArea.setFencePoints(existingArea.getFencePoints() + "," + split[0]);
                        }
                        if (polygonOverlapService.checkPolygonOverlap(
                                updatedArea.getFencePoints(),
                                existingArea.getFencePoints())) {