diff --git a/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java b/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java index 4bd23b4f..46201b78 100644 --- a/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java +++ b/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java @@ -10,6 +10,7 @@ import com.chint.domain.repository.SupplierRepository; import com.chint.infrastructure.constant.BPMConstant; import com.chint.infrastructure.util.DateTimeUtil; import com.chint.infrastructure.util.DelayDispatch; +import com.chint.infrastructure.util.Json; import com.chint.interfaces.rest.base.PostRequest; import com.chint.interfaces.rest.bpm.dto.ANExceedStandardDto; import jakarta.annotation.PostConstruct; @@ -100,6 +101,7 @@ public class ApprovalPlatformAN implements ApprovalPlatform { approvalPlatformInfo.changeUrl() .ifPresent(url -> { ApprovalScheduleParam approvalScheduleParam = createApprovalScheduleParam(approvalData); + System.out.println(Json.gson().toJson(approvalScheduleParam)); CompletableFuture.runAsync(() -> DelayDispatch.attemptToSend(() -> postRequest.post(url, approvalScheduleParam, ANResponse.class) .getSuccess(), 0)); }); @@ -155,11 +157,11 @@ public class ApprovalPlatformAN implements ApprovalPlatform { } private void carLegLocation(Leg newLeg, Leg oldLeg, ScheduleItem scheduleItem) { - if (newLeg != null && LEG_TYPE_TAXI != newLeg.getLegType()) { + if (newLeg != null && LEG_TYPE_TAXI == newLeg.getLegType()) { scheduleItem.setFromAddress(getCarLegLocationStr(newLeg)); scheduleItem.setToAddress(getCarLegLocationStr(newLeg)); } - if (oldLeg != null && LEG_TYPE_TAXI != oldLeg.getLegType()) { + if (oldLeg != null && LEG_TYPE_TAXI == oldLeg.getLegType()) { scheduleItem.setOriginalFromAddress(getCarLegLocationStr(oldLeg)); scheduleItem.setOriginalToAddress(getCarLegLocationStr(oldLeg)); }