修改测试文件
This commit is contained in:
parent
3098af9a24
commit
404847cb07
|
@ -5,15 +5,15 @@ import com.chint.domain.aggregates.location.basedata.DistrictPOIInfoEntity;
|
|||
import com.chint.domain.aggregates.location.basedata.PrefectureLevelCityInfoEntity;
|
||||
import com.chint.domain.aggregates.order.Location;
|
||||
import com.chint.domain.aggregates.order.RouteOrder;
|
||||
import com.chint.domain.aggregates.order.ctrip.CtripCarOrderDetail;
|
||||
import com.chint.domain.aggregates.order.ctrip.CtripFlightOrderDetail;
|
||||
import com.chint.domain.aggregates.order.ctrip.CtripHotelOrderDetail;
|
||||
import com.chint.domain.aggregates.order.ctrip.CtripTrainOrderDetail;
|
||||
import com.chint.domain.aggregates.order.order_record.OrderFlightRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.domain.repository.*;
|
||||
import com.chint.domain.service.order_sync.CTripOrderSyncAdapter;
|
||||
import com.chint.domain.service.supplier.SupplierService;
|
||||
import com.chint.domain.value_object.SupplierCallbackData;
|
||||
import com.chint.infrastructure.repository.CTripOrderDetailImpl;
|
||||
import com.chint.infrastructure.repository.OrderFlightRecordRepositoryImpl;
|
||||
import com.chint.infrastructure.util.BaseContext;
|
||||
import com.chint.infrastructure.util.Digest;
|
||||
import com.chint.infrastructure.util.PinyinUtil;
|
||||
|
@ -124,6 +124,12 @@ public class CTripTest {
|
|||
@Value("${cTrip.requestSecret}")
|
||||
private String C_TRIP_REQUEST_SECRET;
|
||||
|
||||
@Autowired
|
||||
private OrderFlightRecordRepository orderFlightRecordRepository;
|
||||
|
||||
@Autowired
|
||||
private CTripOrderDetailImpl cTripOrderDetail;
|
||||
|
||||
|
||||
private User user = new User(1L, "230615020", 1, "卢麟哲", "1033719135@qq.com", "15857193365", "A30000001");
|
||||
|
||||
|
@ -236,10 +242,10 @@ public class CTripTest {
|
|||
System.out.println(gson.toJson(estimate));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void search() {
|
||||
BaseContext.setCurrentUser(user);
|
||||
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("31108053999");
|
||||
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("31288249965");
|
||||
System.out.println(response);
|
||||
}
|
||||
|
||||
|
@ -488,7 +494,7 @@ public class CTripTest {
|
|||
OrderFlightResponse.FlightOrderSettlementBaseInfo orderSettlementBaseInfo =
|
||||
flightOrderSettlementInfo.getOrderSettlementBaseInfo();
|
||||
if (orderSettlementBaseInfo != null) {
|
||||
CtripFlightOrderDetail ctripFlightOrderDetail = new CtripFlightOrderDetail();
|
||||
CTripFlightRecordBase ctripFlightOrderDetail = new CTripFlightRecordBase();
|
||||
ctripFlightOrderDetail = ctripFlightOrderDetail.changeInfo(orderSettlementBaseInfo);
|
||||
ctripOrderDetailRepository.save(ctripFlightOrderDetail);
|
||||
}
|
||||
|
@ -510,7 +516,7 @@ public class CTripTest {
|
|||
OrderTrainResponse.CorpTrainSettlementDetail trainSettlementDetail =
|
||||
corpTrainSettlementInfo.getTrainSettlementDetail();
|
||||
if (trainSettlementDetail != null) {
|
||||
CtripTrainOrderDetail ctripTrainOrderDetail = new CtripTrainOrderDetail();
|
||||
CTripTrainRecordBase ctripTrainOrderDetail = new CTripTrainRecordBase();
|
||||
ctripTrainOrderDetail = ctripTrainOrderDetail.changeInfo(trainSettlementDetail);
|
||||
ctripOrderDetailRepository.save(ctripTrainOrderDetail);
|
||||
}
|
||||
|
@ -531,7 +537,7 @@ public class CTripTest {
|
|||
OrderHotelResponse.LstHotelSettlementDetail hotelSettlementDetail = LstHotelSettlementDetail.get(0);
|
||||
OrderHotelResponse.SettlementDetail settlementDetail = hotelSettlementDetail.getSettlementDetail();
|
||||
if (settlementDetail != null) {
|
||||
CtripHotelOrderDetail ctripFlightOrderDetail = new CtripHotelOrderDetail();
|
||||
CTripHotelRecordBase ctripFlightOrderDetail = new CTripHotelRecordBase();
|
||||
ctripFlightOrderDetail = ctripFlightOrderDetail.changeInfo(settlementDetail);
|
||||
ctripOrderDetailRepository.save(ctripFlightOrderDetail);
|
||||
}
|
||||
|
@ -553,7 +559,7 @@ public class CTripTest {
|
|||
OrderCarResponse.CarOrderSettlementDetail carOrderSettlementDetail = carSettlementDetailList.get(0);
|
||||
OrderCarResponse.CarOrderSettlementBaseInfo settlementBaseInfo = carOrderSettlementDetail.getSettlementBaseInfo();
|
||||
if (settlementBaseInfo != null) {
|
||||
CtripCarOrderDetail ctripCarOrderDetail = new CtripCarOrderDetail();
|
||||
CTripCarRecordBase ctripCarOrderDetail = new CTripCarRecordBase();
|
||||
ctripCarOrderDetail = ctripCarOrderDetail.changeInfo(settlementBaseInfo);
|
||||
ctripOrderDetailRepository.save(ctripCarOrderDetail);
|
||||
}
|
||||
|
@ -586,4 +592,25 @@ public class CTripTest {
|
|||
|
||||
}
|
||||
|
||||
// @Test
|
||||
void findRecord(){
|
||||
CTripFlightRecord byId = cTripOrderDetail.findFlightRecordById(14513L);
|
||||
Gson gson = new Gson();
|
||||
System.out.println(gson.toJson(byId));
|
||||
}
|
||||
|
||||
// @Test
|
||||
void findHotelRecord(){
|
||||
CTripHotelRecord byId = cTripOrderDetail.findHotelRecordByRecordId("97211839");
|
||||
Gson gson = new Gson();
|
||||
System.out.println(gson.toJson(byId));
|
||||
}
|
||||
|
||||
// @Test
|
||||
void findCarRecord(){
|
||||
CTripCarRecord byId = cTripOrderDetail.findCarRecordByRecordId("50597248");
|
||||
Gson gson = new Gson();
|
||||
System.out.println(gson.toJson(byId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.chint.infrastructure.echo_framework.command.Command;
|
|||
import com.chint.infrastructure.repository.jdbc.JdbcOrderDetailRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcOrderTravelRepository;
|
||||
import com.chint.infrastructure.util.BaseContext;
|
||||
import com.chint.infrastructure.util.Digest;
|
||||
import com.chint.interfaces.rest.base.PostRequest;
|
||||
import com.chint.interfaces.rest.bpm.BPMRequest;
|
||||
import com.chint.interfaces.rest.bpm.XNBPM.ClientFactory;
|
||||
|
@ -886,7 +887,7 @@ public class LYTest {
|
|||
|
||||
// @Test
|
||||
void sendMsg() {
|
||||
commonController.sendMsg("T24032167509127504");
|
||||
commonController.sendMsg("T24032868351668790");
|
||||
}
|
||||
|
||||
|
||||
|
@ -920,14 +921,14 @@ public class LYTest {
|
|||
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
void syncToSupplierOne(){
|
||||
RouteOrder routeOrder = routeRepository.queryById(665L);
|
||||
lyOrderSyncAdapter.syncSupplierOrder(routeOrder);
|
||||
}
|
||||
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
void queryHotelCustom(){
|
||||
OrderDetail byId = orderDetailRepository.findById(2569L);
|
||||
HotelOrderDetailDto hotelOrderDetailDto = HotelOrderDetailDto.copyFrom(byId.getHotelOrderDetail());
|
||||
|
|
|
@ -11,11 +11,15 @@ import com.chint.domain.aggregates.location.basedata.PrefectureLevelCityInfoEnti
|
|||
import com.chint.domain.aggregates.order.Leg;
|
||||
import com.chint.domain.aggregates.order.Location;
|
||||
import com.chint.domain.aggregates.order.RouteOrder;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecord;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.domain.repository.*;
|
||||
import com.chint.domain.service.JTCompanyDomainService;
|
||||
import com.chint.domain.service.OrderDomainService;
|
||||
import com.chint.domain.service.order_sync.LYOrderSyncAdapter;
|
||||
import com.chint.domain.value_object.RanksData;
|
||||
import com.chint.infrastructure.repository.CTripOrderDetailImpl;
|
||||
import com.chint.infrastructure.util.DateTimeUtil;
|
||||
import com.chint.infrastructure.util.Digest;
|
||||
import com.chint.infrastructure.util.PinyinUtil;
|
||||
import com.chint.interfaces.rest.base.PostRequest;
|
||||
|
@ -138,6 +142,12 @@ class RouteApplicationTests {
|
|||
@Autowired
|
||||
private RankController rankController;
|
||||
|
||||
@Autowired
|
||||
private CTripOrderDetailImpl cTripOrderDetail;
|
||||
|
||||
@Autowired
|
||||
private OrderDomainService orderDomainService;
|
||||
|
||||
void test3() {
|
||||
FlyOkDTO freightDTO = new FlyOkDTO();
|
||||
ParamFly param = new ParamFly();
|
||||
|
@ -156,7 +166,7 @@ class RouteApplicationTests {
|
|||
System.out.println(postRequest.getReDirectUrl("http://10.10.100.129:8089" + "/MobileOA/api/FsscSSO?loginUser=230615020&data=%2F%23%2Fexpenseclaim%3FbillDefineId%3Dfcc76666fb1211e98e2019f4db5548fd%26scene%3DWRITE%26isNew%3Dtrue%26goback%3Dfalse"));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void syncUserTo() {
|
||||
User user = new User();
|
||||
user.setCompanyCode("A10000001");
|
||||
|
@ -267,7 +277,7 @@ class RouteApplicationTests {
|
|||
// log.trace("trace");
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void loginSignProd() {
|
||||
String sfno = "231201060";
|
||||
String syscode = "FSSC";
|
||||
|
@ -312,7 +322,7 @@ class RouteApplicationTests {
|
|||
routeRepository.deleteById(875L);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void deleteOrderDetail() {
|
||||
orderDetailRepository.deleteById(2609L);
|
||||
}
|
||||
|
@ -1000,7 +1010,7 @@ class RouteApplicationTests {
|
|||
pushUser.getUserSFDataFromOpenApiBatch();
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void deleteByOrderId() {
|
||||
orderDetailRepository.deleteById(1647L);
|
||||
orderDetailRepository.deleteById(1648L);
|
||||
|
@ -1046,7 +1056,7 @@ class RouteApplicationTests {
|
|||
locationRepository.saveAll(allLevelThreeAndFour);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void generateIfAirport() {
|
||||
List<Location> airportLocation = new ArrayList<>();
|
||||
AirportSearchResponse response = cTripAirportRequest.getAirport();
|
||||
|
@ -1092,7 +1102,7 @@ class RouteApplicationTests {
|
|||
locationRepository.saveAll(airportLocation);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void updateCounty() {
|
||||
List<Location> byLocationType = locationRepository.findByLocationType(5);
|
||||
for (Location location : byLocationType) {
|
||||
|
@ -1103,7 +1113,7 @@ class RouteApplicationTests {
|
|||
locationRepository.saveAll(byLocationType);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void updateAirportPath() {
|
||||
List<Location> byLocationType = locationRepository.findByLocationType(7);
|
||||
for (Location location : byLocationType) {
|
||||
|
@ -1113,7 +1123,7 @@ class RouteApplicationTests {
|
|||
locationRepository.saveAll(byLocationType);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void generateLocationType() {
|
||||
List<Location> all = locationRepository.findAll();
|
||||
all.forEach(it -> {
|
||||
|
@ -1183,12 +1193,18 @@ class RouteApplicationTests {
|
|||
cTripStatusNotification.setStatusIDs(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
// YB_STANDARD_LEVEL_ONE m2.p2及以下
|
||||
// YB_STANDARD_LEVEL_TWO m3-m4 p3-p4
|
||||
// YB_STANDARD_LEVEL_THREE m5-m7 p5-p7
|
||||
// YB_STANDARD_LEVEL_FOUR m8.p8及以上
|
||||
//浙江正泰仪器仪表有限责任公司 A10160001
|
||||
// @Test
|
||||
void addRanks() {
|
||||
|
||||
RanksData ranksData = new RanksData();
|
||||
ranksData.setIndustry("浙江正泰物联技术有限公司");
|
||||
ranksData.setCompanyCode("A70000059");
|
||||
ranksData.setIndustry("浙江正泰仪器仪表有限责任公司");
|
||||
ranksData.setCompanyCode("A10160001");
|
||||
for (int i = 1; i < 13; i++) {
|
||||
if (i <= 2) {
|
||||
ranksData.setLevel(4);
|
||||
|
@ -1209,10 +1225,27 @@ class RouteApplicationTests {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void testQueryCity() {
|
||||
Location location = locationRepository.findById(373L);
|
||||
Location cityLocation = lyOrderSyncAdapter.getCityLocation(location);
|
||||
System.out.println(cityLocation);
|
||||
}
|
||||
|
||||
// @Test
|
||||
void testTimeFor(){
|
||||
LocalDateTime localDateTime = DateTimeUtil.strToTimeMM("2024-03-04 00:23:26.727");
|
||||
System.out.println(localDateTime);
|
||||
}
|
||||
|
||||
// @Test
|
||||
void testFindOrderRecord(){
|
||||
CTripHotelRecord hotelRecordByRecordId = cTripOrderDetail.findHotelRecordByRecordId("98494942");
|
||||
System.out.println(hotelRecordByRecordId);
|
||||
}
|
||||
|
||||
// @Test
|
||||
void testInBlackList(){
|
||||
orderDomainService.checkCompanyNameIfBlack("乐清正泰电器销售有限公司");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue