提交结算代码

This commit is contained in:
lulz1 2024-03-27 21:30:18 +08:00
parent 5ba9a05f34
commit 28aa7bdac5
20 changed files with 41 additions and 22 deletions

View File

@ -1,6 +1,8 @@
package com.chint.application.in;
import com.chint.domain.factoriy.order_record.LyStatementOrder;
import com.chint.infrastructure.echo_framework.command.Command;
import com.chint.infrastructure.util.Result;
import com.chint.interfaces.rest.ctrip.order.CTripOrderRecordAutoSave;
import io.swagger.annotations.ApiOperation;
@ -9,7 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chint.application.commands.OrderRecordGenerateCommand;
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
@RestController

View File

@ -1,6 +1,5 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.MappedCollection;
import org.springframework.data.relational.core.mapping.Table;

View File

@ -1,4 +1,4 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import cn.hutool.core.bean.BeanUtil;
import com.chint.interfaces.rest.ctrip.dto.order.OrderFlightResponse;

View File

@ -1,4 +1,4 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import lombok.Data;
import org.springframework.data.annotation.Id;
@ -10,6 +10,7 @@ import org.springframework.data.relational.core.mapping.Table;
public class CTripFlightRecord {
@Id
private Long id;
private String recordId;
@MappedCollection(idColumn = "c_trip_flight_record_id")
private CTripFlightRecordBase cTripFlightRecordBase;
@MappedCollection(idColumn = "c_trip_flight_record_id")

View File

@ -1,4 +1,4 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import com.chint.interfaces.rest.ctrip.dto.order.OrderFlightResponse;
import lombok.Data;

View File

@ -0,0 +1,17 @@
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.MappedCollection;
import org.springframework.data.relational.core.mapping.Table;
@Data
@Table("c_trip_flight_record")
public class CTripHotelRecord {
@Id
private Long id;
private String recordId;
@MappedCollection(idColumn = "c_trip_hotel_record_id")
private CTripHotelRecordBase cTripHotelRecordBase;
}

View File

@ -1,4 +1,4 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.chint.domain.aggregates.order.ctrip;
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
import com.chint.interfaces.rest.ctrip.dto.order.OrderTrainResponse;
import lombok.Data;

View File

@ -24,7 +24,6 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFa
@Override
public OrderCarRecord createCarOrderRecord(Object orderCarRecordData) {
return null;
}

View File

@ -1,6 +1,6 @@
package com.chint.domain.repository;
import com.chint.domain.aggregates.order.ctrip.*;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
import java.util.List;

View File

@ -62,12 +62,14 @@ public class LegDomainService {
List<OrderDetail> details = orderDetailList.stream().filter(orderDetail -> orderDetail.getOrderStatus().equals(ORDER_EVENT_ORDERED_NAME) ||
orderDetail.getOrderStatus().equals(ORDER_EVENT_PAYED_NAME)).toList();
if (!details.isEmpty() && leg.getLegStatus() < LegConstant.LEG_EVENT_ORDERED) {
LegEvent legEvent = legEventFactory.creatLegEvent(LegConstant.LEG_EVENT_ORDERED);
if (!details.isEmpty() && leg.getLegStatus() < LEG_EVENT_ORDERED) {
LegEvent legEvent = legEventFactory.creatLegEvent(LEG_EVENT_ORDERED);
leg.addEvent(legEvent);
return legRepository.save(leg);
}
if(leg.getLegStatus().equals(LEG_STATUS_CHANGE)){
//如果发现该订单
LegEvent legEvent = legEventFactory.creatLegEvent(LEG_EVENT_APPROVAL);

View File

@ -1,6 +1,6 @@
package com.chint.infrastructure.repository;
import com.chint.domain.aggregates.order.ctrip.*;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
import com.chint.domain.repository.CTripOrderDetailRepository;
import com.chint.infrastructure.repository.jdbc.*;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,7 +1,6 @@
package com.chint.infrastructure.repository.jdbc;
import com.chint.domain.aggregates.order.ctrip.CTripFlightRecord;
import org.springframework.beans.factory.annotation.Autowired;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripFlightRecord;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

View File

@ -1,6 +1,6 @@
package com.chint.infrastructure.repository.jdbc;
import com.chint.domain.aggregates.order.ctrip.CTripCarRecordBase;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecordBase;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

View File

@ -1,6 +1,6 @@
package com.chint.infrastructure.repository.jdbc;
import com.chint.domain.aggregates.order.ctrip.CTripFlightRecordBase;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripFlightRecordBase;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

View File

@ -1,6 +1,6 @@
package com.chint.infrastructure.repository.jdbc;
import com.chint.domain.aggregates.order.ctrip.CTripHotelRecordBase;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecordBase;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

View File

@ -1,6 +1,6 @@
package com.chint.infrastructure.repository.jdbc;
import com.chint.domain.aggregates.order.ctrip.CTripTrainRecordBase;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripTrainRecordBase;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

View File

@ -1,6 +1,6 @@
package com.chint.interfaces.rest.ctrip.order;
import com.chint.domain.aggregates.order.ctrip.*;
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
import com.chint.domain.repository.CTripOrderDetailRepository;
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
import com.chint.interfaces.rest.ctrip.dto.order.OrderFlightResponse;

View File

@ -269,7 +269,7 @@ class RouteApplicationTests {
@Test
void loginSignProd() {
String sfno = "181203012";
String sfno = "231201060";
String syscode = "FSSC";
String billcode = "CLSQ240225000099";
String companycode = "正泰集团股份有限公司";