diff --git a/src/main/java/com/chint/application/queryies/OrderDetailQuery.java b/src/main/java/com/chint/application/queryies/OrderDetailQuery.java index 12dea0b8..8fd99960 100644 --- a/src/main/java/com/chint/application/queryies/OrderDetailQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderDetailQuery.java @@ -169,7 +169,8 @@ public class OrderDetailQuery { !hotelOrderDetail.getOrderStatus().equals(FSSC_ORDER_STATUS_CANCEL) && systemType.equals(hotelOrderDetail.getBelongSysType())) { - if (hotelOrderDetail.getCreateTime().contains("1900") || hotelOrderDetail.getCreateTime().contains("2999")) { + String createTime = hotelOrderDetail.getCreateTime(); + if (createTime != null && (createTime.contains("1900") || createTime.contains("2999"))) { return null; } @@ -199,7 +200,8 @@ public class OrderDetailQuery { !trainOrderDetail.getOrderStatus().equals(FSSC_ORDER_STATUS_CANCEL) && systemType.equals(trainOrderDetail.getBelongSysType())) { - if (trainOrderDetail.getCreateTime().contains("1900") || trainOrderDetail.getCreateTime().contains("2999")) { + String createTime = trainOrderDetail.getCreateTime(); + if (createTime != null && (createTime.contains("1900") || createTime.contains("2999"))) { return null; } @@ -222,16 +224,17 @@ public class OrderDetailQuery { !carOrderDetail.getOrderStatus().equals(FSSC_ORDER_STATUS_CANCEL) && systemType.equals(carOrderDetail.getBelongSysType())) { - if (carOrderDetail.getCreateTime().contains("1900") || carOrderDetail.getCreateTime().contains("2999")) { + String createTime = carOrderDetail.getCreateTime(); + if (createTime != null && (createTime.contains("1900") || createTime.contains("2999"))) { return null; } if (carOrderDetail.getStartTime() != null && carOrderDetail.getStartTime().contains("1900")) { - carOrderDetail.setStartTime(carOrderDetail.getCreateTime()); + carOrderDetail.setStartTime(createTime); } if (carOrderDetail.getArriveTime() != null && carOrderDetail.getArriveTime().contains("1900")) { - carOrderDetail.setArriveTime(carOrderDetail.getCreateTime()); + carOrderDetail.setArriveTime(createTime); } String receiptsNum = carOrderDetail.getReceiptsNum(); @@ -260,7 +263,8 @@ public class OrderDetailQuery { !flightOrderDetail.getOrderStatus().equals(FSSC_ORDER_STATUS_CANCEL) && systemType.equals(flightOrderDetail.getBelongSysType())) { - if (flightOrderDetail.getCreateTime().contains("1900") || flightOrderDetail.getCreateTime().contains("2999")) { + String createTime = flightOrderDetail.getCreateTime(); + if (createTime != null && (createTime.contains("1900") || createTime.contains("2999"))) { return null; } @@ -310,4 +314,5 @@ public class OrderDetailQuery { List OrderDetailResList = res.stream().sorted(Comparator.comparing(OrderDetail::getUpdateTime).reversed()).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(OrderDetailMapper::copyFromExtension).toList(); return new PageResult<>(total, OrderDetailResList); } + } diff --git a/src/main/java/com/chint/application/queryies/util/QueryUtil.java b/src/main/java/com/chint/application/queryies/util/QueryUtil.java index 87db7cb3..3583d9ee 100644 --- a/src/main/java/com/chint/application/queryies/util/QueryUtil.java +++ b/src/main/java/com/chint/application/queryies/util/QueryUtil.java @@ -3,11 +3,14 @@ package com.chint.application.queryies.util; public class QueryUtil { public static String reGetReceiptsNum(String receiptsNum) { + if (receiptsNum == null || receiptsNum.isEmpty()) { + return null; + } if (receiptsNum.contains("-")) { String[] split = receiptsNum.split("-"); receiptsNum = split[1]; } - if(receiptsNum.contains("#")){ + if (receiptsNum.contains("#")) { String[] split1 = receiptsNum.split("#"); receiptsNum = split1[0]; } diff --git a/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java b/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java index c276c495..40eb04cb 100644 --- a/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java +++ b/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java @@ -164,7 +164,7 @@ public class CTripNoteController { } if (etaReason == null) { String agreementRCInfo = hotelOrderInfoEntity.getAgreementRCInfo(); - if(agreementRCInfo.startsWith("其他")){ + if(agreementRCInfo != null && agreementRCInfo.startsWith("其他")){ etaReason = hotelOrderInfoEntity.getLowPriceRC_W(); } else { etaReason = agreementRCInfo;