Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
ee71c07052
|
@ -155,7 +155,7 @@ public class CommonController {
|
|||
changeTrain(ruleViolate, subNotifyType, orderTrain.getOrderNo());
|
||||
}
|
||||
String foulReason = orderTrain.getFoulReason();//超标原因
|
||||
lyCallBackDataHandler.trainCallBackData(orderTrain.getOrderNo(), Integer.valueOf(ruleViolate), foulReason);
|
||||
lyCallBackDataHandler.trainCallBackData(orderTrain.getOrderNo(), Integer.valueOf(ruleViolate), foulReason,subNotifyType);
|
||||
if (subNotifyType == 2 || subNotifyType == 3 || subNotifyType == 1) {
|
||||
sendMsg(orderTrain.getTravelData().getTravelApplyNo());
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ public class CommonController {
|
|||
}
|
||||
String foulReason = dataObject.getOrderDetails().getFoulReason();//超标原因
|
||||
//正常流程
|
||||
lyCallBackDataHandler.flightCallBackData(orderSerialNo, ruleViolate, foulReason);
|
||||
lyCallBackDataHandler.flightCallBackData(orderSerialNo, ruleViolate, foulReason,subNotifyType);
|
||||
if (subNotifyType == 2 || subNotifyType == 3 || subNotifyType == 1) {
|
||||
sendMsg(dataObject.getOrderDetails().getTravelOrderNo());
|
||||
}
|
||||
|
@ -238,6 +238,7 @@ public class CommonController {
|
|||
* @return
|
||||
*/
|
||||
public LYNoteResponse getOrderType(Notification notification) {
|
||||
int subNotifyType = notification.getSubNotifyType();
|
||||
Class<?> objClass = notification.getClass();
|
||||
Object object = GetObjectNature.getObject(objClass, "notifyData", notification);
|
||||
Gson gson = new Gson();
|
||||
|
@ -260,8 +261,13 @@ public class CommonController {
|
|||
orderTravel.setOrderNo(flyOrder.getOrderSerialNo());
|
||||
orderTravel.setTravelNo(flyOrder.getTravelOrderNo());
|
||||
saveOrderTravel(orderTravel);
|
||||
int ruleViolate = flyOrder.getRuleViolate() ? 1 : 0;
|
||||
//改签
|
||||
if (subNotifyType == 9) {
|
||||
changeFlight(ruleViolate, subNotifyType, flyOrder.getOrderSerialNo());
|
||||
}
|
||||
String foulReason = flyOrder.getFoulReason();//超标原因
|
||||
return lyCallBackDataHandler.flightCallBackData(flyOrder.getOrderSerialNo(), flyOrder.getRuleViolate() ? 1 : 0, foulReason);
|
||||
return lyCallBackDataHandler.flightCallBackData(flyOrder.getOrderSerialNo(), flyOrder.getRuleViolate() ? 1 : 0, foulReason,subNotifyType);
|
||||
|
||||
} else if (emptyTrain) {//火车票
|
||||
NotifyData.TrainOrderList.OrderTrain orderTrain = common.getTravelBizOrderList().getTrainOrderList().get(0);
|
||||
|
@ -269,8 +275,12 @@ public class CommonController {
|
|||
orderTravel.setOrderNo(orderTrain.getOrderNo());
|
||||
orderTravel.setTravelNo(common.getTravelBizOrder().getTravelOrderNo());
|
||||
saveOrderTravel(orderTravel);
|
||||
int ruleViolate = orderTrain.getRuleViolate() ? 1 : 0;
|
||||
if (subNotifyType == 16) {
|
||||
changeTrain(ruleViolate, subNotifyType, orderTrain.getOrderNo());
|
||||
}
|
||||
String foulReason = orderTrain.getFoulReason();//超标原因
|
||||
return lyCallBackDataHandler.trainCallBackData(orderTrain.getOrderNo(), orderTrain.getRuleViolate() ? 1 : 0, foulReason);
|
||||
return lyCallBackDataHandler.trainCallBackData(orderTrain.getOrderNo(), orderTrain.getRuleViolate() ? 1 : 0, foulReason,subNotifyType);
|
||||
} else if (emptyCar) {
|
||||
NotifyData.CarOrderList.Order orderCar = common.getTravelBizOrderList().getCarOrderList().get(0).getOrder();
|
||||
OrderTravel orderTravel = new OrderTravel();
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import static com.chint.infrastructure.constant.LYConstant.*;
|
||||
import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_ETA;
|
||||
import static com.chint.infrastructure.constant.OrderConstant.*;
|
||||
|
||||
@Component
|
||||
public class LYCallBackDataHandler {
|
||||
|
@ -50,7 +50,7 @@ public class LYCallBackDataHandler {
|
|||
private JdbcOrderTravelRepository travelRepository;
|
||||
|
||||
|
||||
public LYNoteResponse trainCallBackData(String orderNo, Integer isRuleViolate, String foulReason) {
|
||||
public LYNoteResponse trainCallBackData(String orderNo, Integer isRuleViolate, String foulReason, int subNotifyType) {
|
||||
TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail(orderNo);
|
||||
TrainDetailResponse.TrainDetailData data = trainOrderDetail.getData();
|
||||
TrainDetailResponse.TravelData travelData = data.getTravelData();
|
||||
|
@ -58,11 +58,11 @@ public class LYCallBackDataHandler {
|
|||
Integer productType = L_Y_PRODUCT_TYPE_TRAIN;
|
||||
String travelNo = travelData.getTravelApplyNo();
|
||||
Integer evenType = LYOrderUtil.mapTrainStatus(data.getOrderStatus());
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, foulReason);
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, foulReason, subNotifyType);
|
||||
}
|
||||
|
||||
|
||||
public LYNoteResponse flightCallBackData(String orderNo, Integer isRuleViolate, String foulReason) {
|
||||
public LYNoteResponse flightCallBackData(String orderNo, Integer isRuleViolate, String foulReason, int subNotifyType) {
|
||||
FlightOrderResponse flightOrderDetail = lySearchRequest.getFlightOrderDetail(orderNo);
|
||||
FlightOrderResponse.Data data = flightOrderDetail.getData();
|
||||
FlightOrderResponse.OrderDetails orderDetails = data.getOrderDetails();
|
||||
|
@ -70,7 +70,7 @@ public class LYCallBackDataHandler {
|
|||
String outStatus = orderDetails.getOrderStatusText();
|
||||
Integer evenType = LYOrderUtil.mapFlightStatus(orderDetails.getOrderStatus().toString());
|
||||
Integer productType = L_Y_PRODUCT_TYPE_FLY;
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, foulReason);
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, foulReason, subNotifyType);
|
||||
}
|
||||
|
||||
public LYNoteResponse hotelCallBackData(String orderNo, Integer isRuleViolate, String foulReason) {
|
||||
|
@ -83,7 +83,7 @@ public class LYCallBackDataHandler {
|
|||
orderInfo.getOrderStatus()
|
||||
));
|
||||
Integer productType = L_Y_PRODUCT_TYPE_HOTEL;
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, foulReason);
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, foulReason, 0);
|
||||
}
|
||||
|
||||
public LYNoteResponse carCallBackData(String orderNo, Integer isRuleViolate) {
|
||||
|
@ -96,12 +96,12 @@ public class LYCallBackDataHandler {
|
|||
Integer evenType = LYOrderUtil.mapCarStatus(orderDetailInfo.getOrderStatus()
|
||||
);
|
||||
Integer productType = L_Y_PRODUCT_TYPE_CAR;
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, "其它");
|
||||
return dataHandler(orderNo, isRuleViolate, travelNo, data, productType, outStatus, evenType, "其它", 0);
|
||||
}
|
||||
|
||||
private LYNoteResponse dataHandler(String orderNo, Integer isRuleViolate, String travelNo,
|
||||
Object data, Integer productType,
|
||||
String outStatus, Integer evenType, String foulReason) {
|
||||
String outStatus, Integer evenType, String foulReason, int subNotifyType) {
|
||||
RouteOrder byOrderNo = routeRepository.findByOrderNo(travelNo);
|
||||
SupplierCallbackData supplierCallbackData =
|
||||
SupplierCallbackData.of(SupplierNameConstant.SUPPLIER_L_Y, byOrderNo.getUserId())
|
||||
|
@ -125,7 +125,9 @@ public class LYCallBackDataHandler {
|
|||
.eventType(ORDER_EVENT_ETA)
|
||||
.extension(foulReason)//超标原因
|
||||
.sendToQueue();
|
||||
} else if (isRuleViolate.equals(L_Y_IS_RULE_VIOLATE)) {
|
||||
} else if (isRuleViolate.equals(L_Y_IS_RULE_VIOLATE) &&
|
||||
!(subNotifyType == 16 || subNotifyType == 9 || ORDER_EVENT_CHANGE == evenType || ORDER_EVENT_REFUND == evenType)
|
||||
) {
|
||||
//已经推送过的超标
|
||||
return new LYNoteResponse("100", "OK");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue