超标推送调整
This commit is contained in:
parent
2491d4f8fc
commit
4008029103
|
@ -153,7 +153,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());
|
||||
}
|
||||
|
@ -220,7 +220,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());
|
||||
}
|
||||
|
@ -236,6 +236,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();
|
||||
|
@ -258,8 +259,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);
|
||||
|
@ -267,8 +273,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();
|
||||
|
|
|
@ -27,7 +27,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 {
|
||||
|
@ -49,7 +49,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();
|
||||
|
@ -57,11 +57,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();
|
||||
|
@ -69,7 +69,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) {
|
||||
|
@ -82,7 +82,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) {
|
||||
|
@ -95,12 +95,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())
|
||||
|
@ -124,7 +124,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