fix:修复因打车行程缺失地点信息无法推送审批的问题
This commit is contained in:
parent
453a951122
commit
c2897e8a80
|
@ -23,6 +23,7 @@ import java.time.LocalDateTime;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import static com.chint.infrastructure.constant.LegConstant.*;
|
||||
|
||||
|
@ -98,7 +99,8 @@ public class ApprovalPlatformAN implements ApprovalPlatform {
|
|||
approvalPlatformInfo.changeUrl()
|
||||
.ifPresent(url -> {
|
||||
ApprovalScheduleParam approvalScheduleParam = createApprovalScheduleParam(approvalData);
|
||||
DelayDispatch.attemptToSend(() -> postRequest.post(url, approvalScheduleParam, ANResponse.class).getSuccess(), 0);
|
||||
CompletableFuture.runAsync(()-> DelayDispatch.attemptToSend(() -> postRequest.post(url, approvalScheduleParam, ANResponse.class)
|
||||
.getSuccess(), 0));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -124,10 +126,10 @@ public class ApprovalPlatformAN implements ApprovalPlatform {
|
|||
ScheduleItem scheduleItem = new ScheduleItem();
|
||||
scheduleItem.orderType = ANProductType(newLeg.getLegType()); // 示例值,可根据需要动态分配
|
||||
scheduleItem.changeType = "2"; // 示例值,可根据需要动态分配
|
||||
scheduleItem.fromAddress = newLeg.getOriginLocation().getLocationName();
|
||||
scheduleItem.toAddress = newLeg.getDestinationLocation().getLocationName();
|
||||
scheduleItem.originalFromAddress = oldLeg.getOriginLocation().getLocationName();
|
||||
scheduleItem.originalToAddress = oldLeg.getDestinationLocation().getLocationName();
|
||||
scheduleItem.fromAddress = newLeg.getOriginLocation() != null ? newLeg.getOriginLocation().getLocationName() : null;
|
||||
scheduleItem.toAddress = newLeg.getDestinationLocation() != null ? newLeg.getDestinationLocation().getLocationName() : null;
|
||||
scheduleItem.originalFromAddress = oldLeg.getOriginLocation() != null ? oldLeg.getOriginLocation().getLocationName() : null;
|
||||
scheduleItem.originalToAddress = oldLeg.getDestinationLocation() != null ? oldLeg.getDestinationLocation().getLocationName() : null;
|
||||
scheduleItem.startTime = DateTimeUtil.timeToStrCommon(newLeg.getStartTime());
|
||||
scheduleItem.endTime = DateTimeUtil.timeToStrCommon(newLeg.getEndTime());
|
||||
scheduleItem.originalStartTime = DateTimeUtil.timeToStrCommon(oldLeg.getStartTime());
|
||||
|
@ -139,8 +141,8 @@ public class ApprovalPlatformAN implements ApprovalPlatform {
|
|||
ScheduleItem scheduleItem = new ScheduleItem();
|
||||
scheduleItem.orderType = ANProductType(leg.getLegType()); // 示例值,可根据需要动态分配
|
||||
scheduleItem.changeType = "1"; // 示例值,可根据需要动态分配
|
||||
scheduleItem.fromAddress = leg.getOriginLocation().getLocationName();
|
||||
scheduleItem.toAddress = leg.getDestinationLocation().getLocationName();
|
||||
scheduleItem.fromAddress = leg.getOriginLocation() != null ? leg.getOriginLocation().getLocationName() : null;
|
||||
scheduleItem.toAddress = leg.getDestinationLocation() != null ? leg.getDestinationLocation().getLocationName(): null;
|
||||
scheduleItem.startTime = DateTimeUtil.timeToStrCommon(leg.getStartTime());
|
||||
scheduleItem.endTime = DateTimeUtil.timeToStrCommon(leg.getEndTime());
|
||||
scheduleItem.amount = new BigDecimal(leg.getEstimateAmount());
|
||||
|
|
Loading…
Reference in New Issue