h3bpm实用实际单号来更新行程规划单号 , 携程机票结算修改改签费和改签差价费字段

This commit is contained in:
lulz1 2024-04-03 15:55:59 +08:00
parent 80f147abc3
commit d7a607571b
4 changed files with 26 additions and 5 deletions

View File

@ -20,6 +20,7 @@ public class CTripFlightRecord implements Serializable {
private String recordId; private String recordId;
public LocalDateTime createTime; public LocalDateTime createTime;
private String routeOrderNo; private String routeOrderNo;
private String ticketNo;
@MappedCollection(idColumn = "c_trip_flight_record_id") @MappedCollection(idColumn = "c_trip_flight_record_id")
private CTripFlightRecordBase cTripFlightRecordBase; private CTripFlightRecordBase cTripFlightRecordBase;
@MappedCollection(idColumn = "c_trip_flight_record_id") @MappedCollection(idColumn = "c_trip_flight_record_id")

View File

@ -288,12 +288,12 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
// 加载机票信息 // 加载机票信息
if (cTripFlightTripInfo != null) { if (cTripFlightTripInfo != null) {
orderFlightRecord.loadTicketInfo(cTripFlightTripInfo.getTicketNo(), orderFlightRecord.loadTicketInfo(cTripFlightRecord.getTicketNo(),
String.valueOf(cTripFlightRecordBase.getPrice()), String.valueOf(cTripFlightRecordBase.getPrice()),
cTripFlightTripInfo.getTicketNoStatusName()); cTripFlightTripInfo.getTicketNoStatusName());
} else { } else {
orderFlightRecord.loadTicketInfo(String.valueOf(cTripFlightRecordBase.getPrice()), orderFlightRecord.loadTicketInfo(cTripFlightRecord.getTicketNo(),
"", String.valueOf(cTripFlightRecordBase.getPrice()),
"无机票信息"); "无机票信息");
} }
@ -317,9 +317,9 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
// 加载费用信息, 服务费 改签费 退票费 , 升舱费 // 加载费用信息, 服务费 改签费 退票费 , 升舱费
orderFlightRecord.loadExtraFeeInfo(String.valueOf(cTripFlightRecordBase.getPostServiceFee()), orderFlightRecord.loadExtraFeeInfo(String.valueOf(cTripFlightRecordBase.getPostServiceFee()),
String.valueOf(cTripFlightRecordBase.getRebookQueryFee()), String.valueOf(cTripFlightRecordBase.getDateChangeFee()),
String.valueOf(cTripFlightRecordBase.getRefund()), String.valueOf(cTripFlightRecordBase.getRefund()),
cTripFlightRecordBase.getOrderDetailType().equals("改签") ? String.valueOf(cTripFlightRecordBase.getAmount()) : KEEP_TWO_DECIMAL_ZERO, String.valueOf(cTripFlightRecordBase.getPriceDifferential()),
String.valueOf(cTripFlightRecordBase.getSettItineraryFee())); String.valueOf(cTripFlightRecordBase.getSettItineraryFee()));
// 加载来源 // 加载来源

View File

@ -23,11 +23,13 @@ import com.chint.infrastructure.constant.LegConstant;
import com.chint.infrastructure.constant.RouteConstant; import com.chint.infrastructure.constant.RouteConstant;
import com.chint.infrastructure.echo_framework.dispatch.ResultContainer; import com.chint.infrastructure.echo_framework.dispatch.ResultContainer;
import com.chint.infrastructure.util.BaseContext; import com.chint.infrastructure.util.BaseContext;
import com.chint.infrastructure.util.OrderNo;
import com.chint.interfaces.rest.bpm.BPMRequest; import com.chint.interfaces.rest.bpm.BPMRequest;
import com.chint.interfaces.rest.bpm.dto.JTH3ChangeDto; import com.chint.interfaces.rest.bpm.dto.JTH3ChangeDto;
import com.chint.interfaces.rest.bpm.dto.XNChangeDto; import com.chint.interfaces.rest.bpm.dto.XNChangeDto;
import com.chint.interfaces.rest.bpm.dto.ZWChangeDto; import com.chint.interfaces.rest.bpm.dto.ZWChangeDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -86,6 +88,10 @@ public class LegEventHandler implements LegEventService {
@Autowired @Autowired
private OrderDomainService orderDomainService; private OrderDomainService orderDomainService;
@Value("${chint.envMark}")
private String envMark;
private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
private DateTimeFormatter formatterWithT = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'hh:mm"); private DateTimeFormatter formatterWithT = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'hh:mm");
@ -130,6 +136,16 @@ public class LegEventHandler implements LegEventService {
String startTime = data.getStartTime(); String startTime = data.getStartTime();
String endTime = data.getEndTime(); String endTime = data.getEndTime();
//当sysCode为H3BPM的时候 实用单号更新行程规划单的单号
if (data.getSysCode().equals(H3_BPM)) {
String generate = OrderNo.generate(H3_BPM, data.getActualOrderNo());
if (!envMark.equals("prod")) {
routeOrder.setRouteOrderNo(generate + envMark);
} else {
routeOrder.setRouteOrderNo(generate);
}
}
if (startTime != null && endTime != null) { if (startTime != null && endTime != null) {
if (startTime.contains("T") && endTime.contains("T")) { if (startTime.contains("T") && endTime.contains("T")) {
//如果包含T就截取时间信息前10位 //如果包含T就截取时间信息前10位

View File

@ -80,6 +80,10 @@ public class CTripOrderRecordAutoSave {
//补充额外的字段 //补充额外的字段
OrderFlightResponse.FlightOrderBaseInfo orderBaseInfo = it.getOrderBaseInfo(); OrderFlightResponse.FlightOrderBaseInfo orderBaseInfo = it.getOrderBaseInfo();
record.setRouteOrderNo(orderBaseInfo.getJourneyID()); record.setRouteOrderNo(orderBaseInfo.getJourneyID());
OrderFlightResponse.FlightOrderPassenger orderPassengerInfo = it.getOrderPassengerInfo();
if(orderPassengerInfo != null){
record.setTicketNo(orderPassengerInfo.getTicketNo());
}
return record; return record;
}).toList(); }).toList();
cTripOrderDetailRepository.saveAllCTripFlightRecord(cTripFlightRecords); cTripOrderDetailRepository.saveAllCTripFlightRecord(cTripFlightRecords);