From 2ccf1e215830e028e575098d8efc443280f343a6 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Tue, 30 Apr 2024 09:28:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E9=AB=98=E5=BE=B7=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplier/AmapRouteRelationship.java | 2 + .../AmapOrderExtensionFactoryImpl.java | 54 ++++++++++++ .../LyOrderRecordExtensionFactory.java | 2 +- .../factoriy/ranks/RanksFactoryImpl.java | 1 + .../service/RouteRequestDomainService.java | 2 + .../order_sync/AmapOrderSyncAdapter.java | 83 +++++++++++-------- .../service/order_sync/SupplierOrderSync.java | 4 +- .../infrastructure/constant/RankConstant.java | 14 ++++ .../TravelApplicationDto.java | 3 +- .../rest/ctrip/in/CTripNoteController.java | 26 +++--- .../java/com/chint/RouteApplicationTests.java | 10 +-- 11 files changed, 146 insertions(+), 55 deletions(-) create mode 100644 src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java diff --git a/src/main/java/com/chint/domain/aggregates/supplier/AmapRouteRelationship.java b/src/main/java/com/chint/domain/aggregates/supplier/AmapRouteRelationship.java index 8e16e49e..82e8f1bd 100644 --- a/src/main/java/com/chint/domain/aggregates/supplier/AmapRouteRelationship.java +++ b/src/main/java/com/chint/domain/aggregates/supplier/AmapRouteRelationship.java @@ -14,6 +14,8 @@ import java.util.List; public class AmapRouteRelationship implements Serializable { @Serial private static final long serialVersionUID = 1L; + @Id + private Long id; private String applyRecordId; private String outApplyRecordId; } diff --git a/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java b/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java new file mode 100644 index 00000000..89c08f7c --- /dev/null +++ b/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java @@ -0,0 +1,54 @@ +package com.chint.domain.factoriy.order_detail; + +import com.chint.domain.aggregates.order.*; +import lombok.Data; +import org.springframework.stereotype.Component; + + +@Component +public class AmapOrderExtensionFactoryImpl implements OrderExtensionFactory{ + @Override + public CarOrderDetail createCarOrderDetail(Object carOrderDetailData) { + return null; + } + + @Override + public CarOrderDetail updateCarOrderDetailData(CarOrderDetail carOrderDetail, Object carOrderDetailData) { + return null; + } + + @Override + public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) { + return null; + } + + @Override + public TrainOrderDetail updateTrainOrderDetailData(TrainOrderDetail flightOrderDetail, Object trainOrderInfo) { + return null; + } + + @Override + public FlightOrderDetail createFlightOrderDetail(Object flightOrderDetailData) { + return null; + } + + @Override + public FlightOrderDetail updateFlightOrderDetailData(FlightOrderDetail flightOrderDetail, Object flightOrderInfo) { + return null; + } + + @Override + public HotelOrderDetail createHotelOrderDetail(Object hotelOrderDetailData) { + return null; + } + + @Override + public HotelOrderDetail updateHotelOrderDetailData(HotelOrderDetail hotelOrderDetail, Object hotelOrderInfo) { + return null; + } + + @Override + public OtherOrderDetail createOtherOrderDetail(Object otherOrderDetailData) { + return null; + } +} diff --git a/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java b/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java index 8a61061c..32584d12 100644 --- a/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java +++ b/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java @@ -713,7 +713,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor case BELONG_SYS_CODE_H3BPM -> BELONG_SYS_TYPE_H3BPM; case BELONG_SYS_CODE_XNFSSC -> BELONG_SYS_TYPE_XNFSSC; case BELONG_SYS_CODE_ANFSSC -> BELONG_SYS_TYPE_ANFSSC; - default -> null; + default -> BELONG_SYS_TYPE_NULL; }; } diff --git a/src/main/java/com/chint/domain/factoriy/ranks/RanksFactoryImpl.java b/src/main/java/com/chint/domain/factoriy/ranks/RanksFactoryImpl.java index d87460ab..fae6ce67 100644 --- a/src/main/java/com/chint/domain/factoriy/ranks/RanksFactoryImpl.java +++ b/src/main/java/com/chint/domain/factoriy/ranks/RanksFactoryImpl.java @@ -27,6 +27,7 @@ public class RanksFactoryImpl implements RanksFactory { case STANDARD_LEVEL_YB_CODE -> STANDARD_LEVEL_YB; case STANDARD_LEVEL_WL_CODE -> STANDARD_LEVEL_WL; case STANDARD_LEVEL_AN_CODE -> STANDARD_LEVEL_AN; + case STANDARD_LEVEL_GY_CODE -> STANDARD_LEVEL_GY; // case STANDARD_LEVEL_SZKJ_CODE -> STANDARD_LEVEL_SZKJ; case STANDARD_LEVEL_SDZN_CODE -> STANDARD_LEVEL_SDZN; // case STANDARD_LEVEL_DQXS_CODE -> STANDARD_LEVEL_DQXS; diff --git a/src/main/java/com/chint/domain/service/RouteRequestDomainService.java b/src/main/java/com/chint/domain/service/RouteRequestDomainService.java index f9176510..ed2980eb 100644 --- a/src/main/java/com/chint/domain/service/RouteRequestDomainService.java +++ b/src/main/java/com/chint/domain/service/RouteRequestDomainService.java @@ -103,6 +103,8 @@ public class RouteRequestDomainService { routeRequest.addEvent(RouteRequestEvent.sync(syncLegData.getSupplierName())); //通过保存聚合根来保存差旅申请单 routeRepository.save(routeOrder); + } else { + throw new CommandException("同步差旅申请单失败,联系管理员"); } return routeRequest; } diff --git a/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java b/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java index db1c0380..e14ca438 100644 --- a/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java +++ b/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java @@ -6,17 +6,18 @@ import com.chint.domain.aggregates.user.User; import com.chint.domain.repository.UserRepository; import com.chint.domain.service.LegDomainService; import com.chint.infrastructure.repository.jdbc.JdbcAmapRouteRelationshipRepository; +import com.chint.infrastructure.util.DateTimeUtil; import com.chint.interfaces.rest.amap.AmapLocationRequest; import com.chint.interfaces.rest.amap.dto.travelapplication.ProcessContent; import com.chint.interfaces.rest.amap.dto.travelapplication.TravelApplicationDto; import com.chint.interfaces.rest.amap.dto.travelapplication.TravelApplicationDtoResponse; import com.chint.interfaces.rest.amap.request.TravelApplicationRequest; -import com.chint.interfaces.rest.ctrip.dto.approval.ApprovalRequest; import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -25,7 +26,7 @@ import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_TAXI; @Slf4j @Component -public class AmapOrderSyncAdapter implements SupplierOrderSync{ +public class AmapOrderSyncAdapter implements SupplierOrderSync { @Autowired private UserRepository userRepository; @@ -42,6 +43,8 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync{ @Autowired private LegDomainService legDomainService; + private Gson gson = new Gson(); + @Override public boolean syncSupplierOrder(RouteOrder order) { return false; @@ -49,58 +52,71 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync{ @Override public boolean syncRouteRequest(RouteRequest routeRequest) { - TravelApplicationDto dto=new TravelApplicationDto(); + TravelApplicationDto dto = new TravelApplicationDto(); RouteRequestFields routeRequestFields = routeRequest.getRouteRequestFields(); - TravelApplicationDto travelApplicationDto=generateTravelApplicationInfo(dto,routeRequest,routeRequestFields); - TravelApplicationDtoResponse response=travelApplicationRequest.apply(travelApplicationDto); - if (!response.getCode().equals(1)){ + TravelApplicationDto travelApplicationDto = generateTravelApplicationInfo(dto, routeRequest, routeRequestFields); + TravelApplicationDtoResponse response = travelApplicationRequest.apply(travelApplicationDto); + if (!response.getCode().equals(1)) { Gson gson = new Gson(); log.error(gson.toJson(response)); return false; } //存入关联表 - AmapRouteRelationship amapRouteRelationship=new AmapRouteRelationship(); + AmapRouteRelationship amapRouteRelationship = new AmapRouteRelationship(); amapRouteRelationship.setApplyRecordId(response.getData()); amapRouteRelationship.setOutApplyRecordId(routeRequest.getRouteRequestNo()); jdbcAmapRouteRelationshipRepository.save(amapRouteRelationship); return response.getCode().equals(1); } - private TravelApplicationDto generateTravelApplicationInfo(TravelApplicationDto dto, RouteRequest routeRequest,RouteRequestFields routeRequestFields) { + private TravelApplicationDto generateTravelApplicationInfo(TravelApplicationDto dto, RouteRequest routeRequest, RouteRequestFields routeRequestFields) { dto.setOutApplyRecordId(routeRequest.getRouteRequestNo()); //公司信息写入备注 - dto.setRemark(routeRequestFields.getAccountCompanyName()+"-" - +routeRequestFields.getAccountCompanyCode()+"-" - +routeRequestFields.getProjectName()+"-" - +routeRequestFields.getCostCenter()+"-" - +routeRequestFields.getSysCode()+"-" - +routeRequestFields.getActualOrderNo()); + dto.setRemark(routeRequestFields.getAccountCompanyName() + "-" + + routeRequestFields.getAccountCompanyCode() + "-" + + routeRequestFields.getProjectName() + "-" + + routeRequestFields.getCostCenter() + "-" + + routeRequestFields.getSysCode() + "-" + + routeRequestFields.getActualOrderNo()); dto.setApplyEUserId(routeRequestFields.getUserId()); - User user=userRepository.findByUserEmployeeNo(routeRequestFields.getUserId()); + User user = userRepository.findByUserEmployeeNo(routeRequestFields.getUserId()); dto.setApplyMobile(user.getPhoneNumber()); dto.setApplyName(user.getName()); //审批单 - List legList=routeRequest.getRouteRequestLegList().stream().map(RouteRequestLeg::getLeg).toList(); - legList=legList.stream().filter(u->u.getLegType().equals(LEG_TYPE_TAXI)).toList(); + List legList = routeRequest.getRouteRequestLegList().stream().map(RouteRequestLeg::getLeg).toList(); + legList = legList.stream().filter(u -> u.getLegType().equals(LEG_TYPE_TAXI)).toList(); dto.setTemplateCode("travel"); - ProcessContent processContent=new ProcessContent(); - processContent.setStartTime(legList.stream().sorted(Comparator.comparing(Leg::getStartTime)).toList().get(0).getStartTime().toString()); - processContent.setEndTime(legList.stream().sorted(Comparator.comparing(Leg::getEndTime).reversed()).toList().get(0).getEndTime().toString()); + ProcessContent processContent = new ProcessContent(); + + LocalDateTime startTime = legList + .stream() + .sorted(Comparator.comparing(Leg::getStartTime)) + .toList() + .get(0) + .getStartTime(); + processContent.setStartTime(DateTimeUtil.timeToStr(startTime)); + LocalDateTime endTime = legList.stream() + .sorted(Comparator.comparing(Leg::getEndTime).reversed()) + .toList() + .get(0) + .getEndTime(); + processContent.setEndTime(DateTimeUtil.timeToStr(endTime)); //areacode处理 - List legExtensionFields=legDomainService.queryLocation(legList).stream().map(Leg::getLegExtensionField).toList(); - List locationList=new ArrayList<>(); - for (LegExtensionField leg:legExtensionFields){ + List legExtensionFields = legDomainService.queryLocation(legList).stream().map(Leg::getLegExtensionField).toList(); + List locationList = new ArrayList<>(); + for (LegExtensionField leg : legExtensionFields) { locationList.addAll(leg.getLocationList()); } - List areaCodes=new ArrayList<>(); - for (Location location:locationList){ + List areaCodes = new ArrayList<>(); + for (Location location : locationList) { areaCodes.add(amapLocationRequest.getACodeByLocationName(location.getLocationName())); } processContent.setValidCityList(areaCodes); processContent.setAmountLimited(1); processContent.setAllowCrossCity(1); - dto.setProcessContent(processContent); - dto.setStatus(routeRequest.getStatus().toString()); + + dto.setProcessContent(gson.toJson(processContent)); + dto.setStatus("1"); return dto; } @@ -111,17 +127,18 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync{ @Override public boolean cancelRouteRequest(RouteRequest routeRequest) { - TravelApplicationDto dto=new TravelApplicationDto(); + TravelApplicationDto dto = new TravelApplicationDto(); RouteRequestFields routeRequestFields = routeRequest.getRouteRequestFields(); - TravelApplicationDto travelApplicationDto=generateTravelApplicationInfo(dto,routeRequest,routeRequestFields); + TravelApplicationDto travelApplicationDto = generateTravelApplicationInfo(dto, routeRequest, routeRequestFields); + travelApplicationDto.setStatus("0"); //查询关联表 - AmapRouteRelationship amapRouteRelationship=jdbcAmapRouteRelationshipRepository.findAmapRouteRelationshipByApplyRecordId(routeRequest.getRouteRequestNo()); - if (amapRouteRelationship==null){ - log.info("无企业订单信息",dto.getOutApplyRecordId()); + AmapRouteRelationship amapRouteRelationship = jdbcAmapRouteRelationshipRepository.findAmapRouteRelationshipByApplyRecordId(routeRequest.getRouteRequestNo()); + if (amapRouteRelationship == null) { + log.info("无企业订单信息", dto.getOutApplyRecordId()); return false; } travelApplicationDto.setApplyRecordId(amapRouteRelationship.getApplyRecordId()); - TravelApplicationDtoResponse response=travelApplicationRequest.modify(travelApplicationDto); + TravelApplicationDtoResponse response = travelApplicationRequest.modify(travelApplicationDto); return response.getCode().equals(1); } } diff --git a/src/main/java/com/chint/domain/service/order_sync/SupplierOrderSync.java b/src/main/java/com/chint/domain/service/order_sync/SupplierOrderSync.java index c9dfcd24..815f989d 100644 --- a/src/main/java/com/chint/domain/service/order_sync/SupplierOrderSync.java +++ b/src/main/java/com/chint/domain/service/order_sync/SupplierOrderSync.java @@ -3,11 +3,13 @@ package com.chint.domain.service.order_sync; import com.chint.domain.aggregates.order.RouteOrder; import com.chint.domain.aggregates.order.RouteRequest; -import com.chint.domain.factoriy.order.RouteOrderFactory; public interface SupplierOrderSync { boolean syncSupplierOrder(RouteOrder order); + boolean syncRouteRequest(RouteRequest routeRequest); + boolean cancelSyncSupplierOrder(RouteOrder order); + boolean cancelRouteRequest(RouteRequest routeRequest); } diff --git a/src/main/java/com/chint/infrastructure/constant/RankConstant.java b/src/main/java/com/chint/infrastructure/constant/RankConstant.java index 0127a2e8..4c68f66d 100644 --- a/src/main/java/com/chint/infrastructure/constant/RankConstant.java +++ b/src/main/java/com/chint/infrastructure/constant/RankConstant.java @@ -9,9 +9,11 @@ public class RankConstant { public static final String STANDARD_LEVEL_YB_CODE = "A10160001";//仪表编号 public static final String STANDARD_LEVEL_WL_CODE = "A70000059";//仪表编号 public static final String STANDARD_LEVEL_AN_CODE = "A70000021";//仪表编号 + public static final String STANDARD_LEVEL_GY_CODE = "A20000001";//正泰电气股份有限公司 public static final String STANDARD_LEVEL_YB = "YB_";//浙江正泰仪器仪表有限责任公司 public static final String STANDARD_LEVEL_WL = "WL_";//浙江正泰仪器仪表有限责任公司 public static final String STANDARD_LEVEL_AN = "AN_";//浙江正泰仪器仪表有限责任公司 + public static final String STANDARD_LEVEL_GY = "GY_";//正泰电气股份有限公司 public static final String STANDARD_LEVEL_SZKJ_CODE = "";//数智科技编号 public static final String STANDARD_LEVEL_SZKJ = "SZKJ_";//数智科技 public static final String STANDARD_LEVEL_SDZN_CODE = "A70000067";//山东智能编号 @@ -56,4 +58,16 @@ public class RankConstant { public static final String STANDARD_LEVEL_TWO_WL = "WL_STANDARD_LEVEL_TWO";//差标2 public static final String STANDARD_LEVEL_THREE_WL = "WL_STANDARD_LEVEL_THREE";//差标3 public static final String STANDARD_LEVEL_FOUR_WL = "WL_STANDARD_LEVEL_FOUR";//差标4 + + //安能 + public static final String STANDARD_LEVEL_ONE_AN = "AN_STANDARD_LEVEL_ONE";//差标1 + public static final String STANDARD_LEVEL_TWO_AN = "AN_STANDARD_LEVEL_TWO";//差标2 + public static final String STANDARD_LEVEL_THREE_AN = "AN_STANDARD_LEVEL_THREE";//差标3 + public static final String STANDARD_LEVEL_FOUR_AN = "AN_STANDARD_LEVEL_FOUR";//差标4 + + //高压 + public static final String STANDARD_LEVEL_ONE_GY = "GY_STANDARD_LEVEL_ONE";//差标1 + public static final String STANDARD_LEVEL_TWO_GY = "GY_STANDARD_LEVEL_TWO";//差标2 + public static final String STANDARD_LEVEL_THREE_GY = "GY_STANDARD_LEVEL_THREE";//差标3 + public static final String STANDARD_LEVEL_FOUR_GY = "GY_STANDARD_LEVEL_FOUR";//差标4 } diff --git a/src/main/java/com/chint/interfaces/rest/amap/dto/travelapplication/TravelApplicationDto.java b/src/main/java/com/chint/interfaces/rest/amap/dto/travelapplication/TravelApplicationDto.java index 9e0a35bc..a0e68412 100644 --- a/src/main/java/com/chint/interfaces/rest/amap/dto/travelapplication/TravelApplicationDto.java +++ b/src/main/java/com/chint/interfaces/rest/amap/dto/travelapplication/TravelApplicationDto.java @@ -27,7 +27,7 @@ public class TravelApplicationDto extends BaseRequestParam { //审批模板Code :travel private String templateCode; //申请单【审批模板】内容(JSON格式) - private ProcessContent processContent; + private String processContent; //审批状态 1有效 0无效 private String status; @@ -73,4 +73,5 @@ public class TravelApplicationDto extends BaseRequestParam { private String customSceneLabel; //同行人信息(具体字段见【同行人信息】) private List companions; + } diff --git a/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java b/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java index cc650120..65fc79b4 100644 --- a/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java +++ b/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java @@ -54,7 +54,7 @@ public class CTripNoteController { private SupplierCallBackLogRepository supplierCallBackLogRepository; @Autowired - public RedisTemplate redisTemplate; + public RedisTemplate redisTemplate; private static final String NO_ETA_AVAILABLE = "暂无"; @@ -91,13 +91,13 @@ public class CTripNoteController { Integer legType = translateLegType(productType); String orderStatus = cTripStatusNotification.getOrderStatus(); - if(legType == LEG_TYPE_AIRPLANE && !CTripUtils.checkFlightStatus(orderStatus)) { + if (legType == LEG_TYPE_AIRPLANE && !CTripUtils.checkFlightStatus(orderStatus)) { return Result.Success(ORDER_STATUS_REFUSE_MSG); } - if(legType == LEG_TYPE_HOTEL && !CTripUtils.checkHotelStatus(orderStatus)) { + if (legType == LEG_TYPE_HOTEL && !CTripUtils.checkHotelStatus(orderStatus)) { return Result.Success(ORDER_STATUS_REFUSE_MSG); } - if(legType == LEG_TYPE_TAXI && !CTripUtils.checkCarStatus(orderStatus)) { + if (legType == LEG_TYPE_TAXI && !CTripUtils.checkCarStatus(orderStatus)) { return Result.Success(ORDER_STATUS_REFUSE_MSG); } @@ -107,13 +107,13 @@ public class CTripNoteController { return Result.error("sign错误"); } if (orderStatus != null && orderId != null) { - CtripBack notification=new CtripBack(); + CtripBack notification = new CtripBack(); notification.setOrderStatus(orderStatus); notification.setOrderId(orderId); notification.setLegType(legType); String ctripBack = gson.toJson(notification); - log.info("存入Redis{}",ctripBack); - redisTemplate.opsForList().leftPush(CTripConstant.C_TRIP_BACK,ctripBack); + log.info("存入Redis{}", ctripBack); + redisTemplate.opsForList().leftPush(CTripConstant.C_TRIP_BACK, ctripBack); return Result.Success("成功收到消息"); // return handlerData(orderId, orderStatus, legType); } @@ -121,19 +121,19 @@ public class CTripNoteController { } - @Scheduled(cron="0/10 * * * * ?") + @Scheduled(cron = "0/10 * * * * ?") @Async public void scanCtripPendingMsg() { - int i=0; + int i = 0; while (true) { Object object = redisTemplate.opsForList().rightPop(CTripConstant.C_TRIP_BACK, 1, TimeUnit.SECONDS); if (null == object) { return; } - CtripBack notification=gson.fromJson(String.valueOf(object),CtripBack.class); - handlerData(notification.getOrderId(),notification.getOrderStatus(),notification.getLegType()); + CtripBack notification = gson.fromJson(String.valueOf(object), CtripBack.class); + handlerData(notification.getOrderId(), notification.getOrderStatus(), notification.getLegType()); i++; - if (i>5){ + if (i > 5) { log.info("CtripBack处理结束"); return; } @@ -141,7 +141,7 @@ public class CTripNoteController { } - public Result handlerData(String orderId, String orderStatus, Integer legType ) { + public Result handlerData(String orderId, String orderStatus, Integer legType) { SupplierCallbackData supplierCallbackData = SupplierCallbackData.of(SUPPLIER_C_TRIP); SearchOrderResponse response = cTripOrderSearchRequest diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index 756939a3..a083c865 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -1200,16 +1200,15 @@ class RouteApplicationTests { // @Test void addRanks() { - RanksData ranksData = new RanksData(); - ranksData.setIndustry("正泰安能数字能源(浙江)股份有限公司"); - ranksData.setCompanyCode("A70000021"); + ranksData.setIndustry("正泰电气股份有限公司"); + ranksData.setCompanyCode("A20000001"); for (int i = 1; i < 13; i++) { if (i <= 1) { - ranksData.setLevel(4); + ranksData.setLevel(3); } else if (i <= 4) { ranksData.setLevel(3); - } else if (i <= 7) { + } else if (i <= 8) { ranksData.setLevel(2); } else { ranksData.setLevel(1); @@ -1227,7 +1226,6 @@ class RouteApplicationTests { ranksData.setRankName("PR" + i); rankController.saveRanks(ranksData); } - } // @Test