fix:修复安能新增和修改行程的审批单传参

This commit is contained in:
lulz1 2024-07-04 12:45:31 +08:00
parent c41bf4524f
commit 7e44165f75
1 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import com.chint.domain.repository.SupplierRepository;
import com.chint.infrastructure.constant.BPMConstant; import com.chint.infrastructure.constant.BPMConstant;
import com.chint.infrastructure.util.DateTimeUtil; import com.chint.infrastructure.util.DateTimeUtil;
import com.chint.infrastructure.util.DelayDispatch; import com.chint.infrastructure.util.DelayDispatch;
import com.chint.infrastructure.util.Json;
import com.chint.interfaces.rest.base.PostRequest; import com.chint.interfaces.rest.base.PostRequest;
import com.chint.interfaces.rest.bpm.dto.ANExceedStandardDto; import com.chint.interfaces.rest.bpm.dto.ANExceedStandardDto;
import jakarta.annotation.PostConstruct; import jakarta.annotation.PostConstruct;
@ -100,6 +101,7 @@ public class ApprovalPlatformAN implements ApprovalPlatform {
approvalPlatformInfo.changeUrl() approvalPlatformInfo.changeUrl()
.ifPresent(url -> { .ifPresent(url -> {
ApprovalScheduleParam approvalScheduleParam = createApprovalScheduleParam(approvalData); ApprovalScheduleParam approvalScheduleParam = createApprovalScheduleParam(approvalData);
System.out.println(Json.gson().toJson(approvalScheduleParam));
CompletableFuture.runAsync(() -> DelayDispatch.attemptToSend(() -> postRequest.post(url, approvalScheduleParam, ANResponse.class) CompletableFuture.runAsync(() -> DelayDispatch.attemptToSend(() -> postRequest.post(url, approvalScheduleParam, ANResponse.class)
.getSuccess(), 0)); .getSuccess(), 0));
}); });
@ -155,11 +157,11 @@ public class ApprovalPlatformAN implements ApprovalPlatform {
} }
private void carLegLocation(Leg newLeg, Leg oldLeg, ScheduleItem scheduleItem) { 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.setFromAddress(getCarLegLocationStr(newLeg));
scheduleItem.setToAddress(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.setOriginalFromAddress(getCarLegLocationStr(oldLeg));
scheduleItem.setOriginalToAddress(getCarLegLocationStr(oldLeg)); scheduleItem.setOriginalToAddress(getCarLegLocationStr(oldLeg));
} }