1.修改获取数据的类型判断

This commit is contained in:
wanglf3 2024-03-13 20:08:08 +08:00
parent fb37fdb423
commit 939e3c0bb7
1 changed files with 39 additions and 41 deletions

View File

@ -47,54 +47,52 @@ public class OrderDetailQuery {
targetTimeEnd);
List<Object> orderDetailResList = new ArrayList<>();
for (OrderDetail orderDetail : orderDetailList) {
if (orderDetail.getProductType().equals(productType)) {
if (productType == 1) {
FlightOrderDetail flightOrderDetail = orderDetail.getFlightOrderDetail();
if (productType == 1) {
FlightOrderDetail flightOrderDetail = orderDetail.getFlightOrderDetail();
if (flightOrderDetail != null) {
String receiptsNum = flightOrderDetail.getReceiptsNum();
if (receiptsNum != null){
flightOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (flightOrderDetail.getBelongSysType() != null && flightOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(flightOrderDetail);
}
if (flightOrderDetail != null) {
String receiptsNum = flightOrderDetail.getReceiptsNum();
if (receiptsNum != null){
flightOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (flightOrderDetail.getBelongSysType() != null && flightOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(flightOrderDetail);
}
}
if (productType == 2) {
HotelOrderDetail hotelOrderDetail = orderDetail.getHotelOrderDetail();
if (hotelOrderDetail != null) {
String receiptsNum = hotelOrderDetail.getReceiptsNum();
if (receiptsNum != null){
hotelOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (hotelOrderDetail.getBelongSysType() != null && hotelOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(hotelOrderDetail);
}
}
if (productType == 2) {
HotelOrderDetail hotelOrderDetail = orderDetail.getHotelOrderDetail();
if (hotelOrderDetail != null) {
String receiptsNum = hotelOrderDetail.getReceiptsNum();
if (receiptsNum != null){
hotelOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (hotelOrderDetail.getBelongSysType() != null && hotelOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(hotelOrderDetail);
}
}
if (productType == 3) {
TrainOrderDetail trainOrderDetail = orderDetail.getTrainOrderDetail();
if (trainOrderDetail != null) {
String receiptsNum = trainOrderDetail.getReceiptsNum();
if (receiptsNum != null){
trainOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (trainOrderDetail.getBelongSysType() != null && trainOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(trainOrderDetail);
}
}
if (productType == 3) {
TrainOrderDetail trainOrderDetail = orderDetail.getTrainOrderDetail();
if (trainOrderDetail != null) {
String receiptsNum = trainOrderDetail.getReceiptsNum();
if (receiptsNum != null){
trainOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (trainOrderDetail.getBelongSysType() != null && trainOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(trainOrderDetail);
}
}
if (productType == 4) {
CarOrderDetail carOrderDetail = orderDetail.getCarOrderDetail();
if (carOrderDetail != null) {
String receiptsNum = carOrderDetail.getReceiptsNum();
if (receiptsNum != null){
carOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (carOrderDetail.getBelongSysType() != null && carOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(carOrderDetail);
}
}
if (productType == 4) {
CarOrderDetail carOrderDetail = orderDetail.getCarOrderDetail();
if (carOrderDetail != null) {
String receiptsNum = carOrderDetail.getReceiptsNum();
if (receiptsNum != null){
carOrderDetail.setReceiptsNum(regetReceiptsNum(receiptsNum));
}
if (carOrderDetail.getBelongSysType() != null && carOrderDetail.getBelongSysType().equals(systemType)) {
orderDetailResList.add(carOrderDetail);
}
}
}