修复代码逻辑
This commit is contained in:
parent
f1e11aa043
commit
fcec95f5c2
|
@ -11,8 +11,7 @@ import java.io.Serial;
|
|||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chint.infrastructure.constant.FSSCConstant.FSSC_HOTEL_STATUS_REFUND;
|
||||
import static com.chint.infrastructure.constant.FSSCConstant.FSSC_HOTEL_STATUS_SUCCESS;
|
||||
import static com.chint.infrastructure.constant.FSSCConstant.*;
|
||||
import static com.chint.infrastructure.constant.OrderConstant.*;
|
||||
|
||||
@Data
|
||||
|
@ -41,12 +40,12 @@ public class OrderEvent implements Serializable {
|
|||
case ORDER_EVENT_PREPARE -> OrderConstant.ORDER_EVENT_PREPARE_NAME;
|
||||
case ORDER_EVENT_PAYED -> OrderConstant.ORDER_EVENT_PAYED_NAME;
|
||||
case ORDER_EVENT_CHANGE -> OrderConstant.ORDER_EVENT_CHANGE_NAME;
|
||||
case OrderConstant.ORDER_EVENT_CANCEL -> OrderConstant.ORDER_EVENT_CANCEL_NAME;
|
||||
case OrderConstant.ORDER_EVENT_ORDERED -> OrderConstant.ORDER_EVENT_ORDERED_NAME;
|
||||
case OrderConstant.ORDER_EVENT_REFUND -> OrderConstant.ORDER_EVENT_REFUND_NAME;
|
||||
case OrderConstant.ORDER_EVENT_UNKNOWN -> OrderConstant.ORDER_EVENT_UNKNOWN_NAME;
|
||||
case OrderConstant.ORDER_EVENT_FINISH -> OrderConstant.ORDER_EVENT_FINISH_NAME;
|
||||
case OrderConstant.ORDER_EVENT_ETA -> OrderConstant.ORDER_EVENT_ETA_NAME;
|
||||
case ORDER_EVENT_CANCEL -> OrderConstant.ORDER_EVENT_CANCEL_NAME;
|
||||
case ORDER_EVENT_ORDERED -> OrderConstant.ORDER_EVENT_ORDERED_NAME;
|
||||
case ORDER_EVENT_REFUND -> OrderConstant.ORDER_EVENT_REFUND_NAME;
|
||||
case ORDER_EVENT_UNKNOWN -> OrderConstant.ORDER_EVENT_UNKNOWN_NAME;
|
||||
case ORDER_EVENT_FINISH -> OrderConstant.ORDER_EVENT_FINISH_NAME;
|
||||
case ORDER_EVENT_ETA -> OrderConstant.ORDER_EVENT_ETA_NAME;
|
||||
default -> "未知事件";
|
||||
};
|
||||
}
|
||||
|
@ -68,15 +67,15 @@ public class OrderEvent implements Serializable {
|
|||
|
||||
public String mapToFlightOrderDetailStatus(){
|
||||
return switch (this.eventType) {
|
||||
case ORDER_EVENT_PREPARE -> "1";
|
||||
case ORDER_EVENT_PAYED -> "1";
|
||||
case ORDER_EVENT_PREPARE -> FSSC_FLIGHT_STATUS_SUCCESS;
|
||||
case ORDER_EVENT_PAYED -> FSSC_FLIGHT_STATUS_SUCCESS;
|
||||
case ORDER_EVENT_CHANGE -> "2";
|
||||
case ORDER_EVENT_CANCEL -> "3";
|
||||
case ORDER_EVENT_ORDERED -> "1";
|
||||
case ORDER_EVENT_ORDERED -> FSSC_FLIGHT_STATUS_SUCCESS;
|
||||
case ORDER_EVENT_REFUND -> "3";
|
||||
case ORDER_EVENT_UNKNOWN -> "1";
|
||||
case ORDER_EVENT_FINISH -> "1";
|
||||
case ORDER_EVENT_ETA -> "1";
|
||||
case ORDER_EVENT_UNKNOWN -> FSSC_FLIGHT_STATUS_SUCCESS;
|
||||
case ORDER_EVENT_FINISH -> FSSC_FLIGHT_STATUS_SUCCESS;
|
||||
case ORDER_EVENT_ETA -> FSSC_FLIGHT_STATUS_SUCCESS;
|
||||
default -> "未知事件";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -492,6 +492,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
hotelOrderDetail.setNightCount(hotelOrderInfoEntity.getRoomDays()); //退订夜间数
|
||||
hotelOrderDetail.setRoomCount(hotelOrderInfoEntity.getRoomQuantity()); //退订夜间数
|
||||
hotelOrderDetail.setRoomTypeName(hotelOrderInfoEntity.getRoomName()); //房型
|
||||
|
||||
if (Double.parseDouble(hotelOrderInfoEntity.getSettlementACCNTAmt()) > 0) {
|
||||
hotelOrderDetail.setCompanyAmount(hotelOrderInfoEntity.getSettlementACCNTAmt());
|
||||
hotelOrderDetail.setCompanyRefundAmount(KEEP_TWO_DECIMAL_ZERO);
|
||||
|
@ -501,20 +502,19 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
hotelOrderDetail.setCompanyAmount(KEEP_TWO_DECIMAL_ZERO);
|
||||
hotelOrderDetail.setCompanyRefundAmount(hotelOrderInfoEntity.getSettlementACCNTAmt());
|
||||
hotelOrderDetail.setPaymentType("0");
|
||||
|
||||
}
|
||||
if (Double.parseDouble(hotelOrderInfoEntity.getSettlementPersonAmt()) > 0) {
|
||||
hotelOrderDetail.setPersonalAmount(hotelOrderInfoEntity.getSettlementPersonAmt());
|
||||
hotelOrderDetail.setPersonalRefundAmount(KEEP_TWO_DECIMAL_ZERO);
|
||||
hotelOrderDetail.setPaymentType("1");
|
||||
|
||||
} else {
|
||||
hotelOrderDetail.setPersonalAmount(KEEP_TWO_DECIMAL_ZERO);
|
||||
hotelOrderDetail.setPersonalRefundAmount(hotelOrderInfoEntity.getSettlementPersonAmt());
|
||||
hotelOrderDetail.setPaymentType("1");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (Double.parseDouble(hotelOrderInfoEntity.getAmount()) > 0) {
|
||||
hotelOrderDetail.setOrderAmount(hotelOrderInfoEntity.getAmount());
|
||||
// hotelOrderDetail.setRefundAmount(KEEP_TWO_DECIMAL_ZERO);
|
||||
|
|
|
@ -6,4 +6,5 @@ public class Constant {
|
|||
public static final int STATUS_DISABLED = 0;
|
||||
//system
|
||||
public static final String AES_SECRET = "chint";//国内
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,13 @@ public class FSSCConstant {
|
|||
public static final String FSSC_HOTEL_STATUS_SUCCESS = "1";//申请单类型
|
||||
public static final String FSSC_HOTEL_STATUS_REFUND = "3";//申请单类型
|
||||
public static final String FSSC_HOTEL_STATUS_PART_REFUND = "4";//申请单类型
|
||||
// public static final String XN_FSSC_REDIRECT_PATH_APPROVAL_ONE = "/XNFsscSSO?loginUser=";//申请单类型
|
||||
public static final String FSSC_FLIGHT_STATUS_SUCCESS = "1";//申请单类型
|
||||
public static final String FSSC_FLIGHT_STATUS_CHANGE = "2";//申请单类型
|
||||
public static final String FSSC_FLIGHT_STATUS_REFUND = "3";//申请单类型
|
||||
public static final String FSSC_TRAIN_STATUS_SUCCESS = "1";//申请单类型
|
||||
public static final String FSSC_TRAIN_STATUS_CHANGE = "2";//申请单类型
|
||||
public static final String FSSC_TRAIN_STATUS_REFUND = "3";//申请单类型
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,14 +43,14 @@ public class LYOrderUtil {
|
|||
case "60" -> ORDER_EVENT_CHANGE; //改签待审批
|
||||
case "63" -> ORDER_EVENT_CHANGE; //改签成功
|
||||
case "64" -> ORDER_EVENT_CHANGE; //部分改签
|
||||
case "66" -> ORDER_EVENT_ORDERED; //取消改签
|
||||
case "66" -> ORDER_EVENT_CANCEL; //取消改签
|
||||
case "67" -> ORDER_EVENT_CANCEL; //改签失败
|
||||
case "68" -> ORDER_EVENT_ORDERED; //改签审批不通过
|
||||
case "92" -> ORDER_EVENT_ORDERED; //待确认
|
||||
case "93" -> ORDER_EVENT_CHANGE; //改签中
|
||||
case "94" -> ORDER_EVENT_REFUND; //部分退票
|
||||
case "95" -> ORDER_EVENT_REFUND; //退票成功
|
||||
case "96" -> ORDER_EVENT_REFUND; //已取消
|
||||
case "96" -> ORDER_EVENT_CANCEL; //已取消
|
||||
case "97" -> ORDER_EVENT_ORDERED; //已出票
|
||||
case "98" -> ORDER_EVENT_ORDERED; //出票中
|
||||
case "99" -> ORDER_EVENT_ORDERED; //待付款
|
||||
|
@ -65,14 +65,14 @@ public class LYOrderUtil {
|
|||
case "1" -> ORDER_EVENT_ORDERED; //待支付
|
||||
case "3" -> ORDER_EVENT_ORDERED; //待提交
|
||||
case "4" -> ORDER_EVENT_ORDERED; //待审批
|
||||
case "10" -> ORDER_EVENT_PREPARE; //超时未支付
|
||||
case "10" -> ORDER_EVENT_CANCEL; //超时未支付
|
||||
case "11" -> ORDER_EVENT_CANCEL; //客户申请取消
|
||||
case "12" -> ORDER_EVENT_PREPARE; //确认无房
|
||||
case "13" -> ORDER_EVENT_ORDERED; //审核不通过取消
|
||||
case "14" -> ORDER_EVENT_ORDERED; //超时未审批
|
||||
case "13" -> ORDER_EVENT_CANCEL; //审核不通过取消
|
||||
case "14" -> ORDER_EVENT_CANCEL; //超时未审批
|
||||
case "15" -> ORDER_EVENT_CANCEL; //客服取消
|
||||
case "16" -> ORDER_EVENT_ORDERED; //确认后用户申请取消
|
||||
case "17" -> ORDER_EVENT_ORDERED; //确认后客服取消
|
||||
case "16" -> ORDER_EVENT_CANCEL; //确认后用户申请取消
|
||||
case "17" -> ORDER_EVENT_CANCEL; //确认后客服取消
|
||||
case "18" -> ORDER_EVENT_CANCEL; //下单失败取消
|
||||
case "22" -> ORDER_EVENT_ORDERED; //已付款,确认中
|
||||
case "23" -> ORDER_EVENT_ORDERED; //已确认
|
||||
|
|
Loading…
Reference in New Issue