diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index f94ea784b..7c30ca8ed 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -4831,7 +4831,27 @@ public class OpenOrderServiceImpl implements IOpenOrderService { @Override public R findAdvanceDetailListByWaybillId(AdvanceDTO advanceDTO) { - List advanceDetailVOList = advanceDetailService.findAdvanceDetailListByWaybillId(advanceDTO); + List advanceDetailVOList = new ArrayList<>(); + + Long clientId = advanceDTO.getClientId(); + if(!Objects.isNull(clientId)){ + Long waybillId = advanceDTO.getWaybillId(); + + List trunklineAdvanceEntityList = trunklineWaybillOrderService.findListByWaybillId(waybillId); + //取出trunklineAdvanceEntityList中的所有id放入一个List + List advanceIds = trunklineAdvanceEntityList.stream().map(TrunklineAdvanceEntity::getId).collect(Collectors.toList()); + + BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId); + if(!Objects.isNull(basicdataClientEntity)){ + advanceDTO.setMainId(basicdataClientEntity.getMainId()); + advanceDTO.setAdvanceIds(advanceIds); + advanceDetailVOList = advanceDetailService.findAdvanceDetailListByAdvanceIds(advanceDTO); + }else{ + advanceDetailVOList = advanceDetailService.findAdvanceDetailListByWaybillId(advanceDTO); + } + }else{ + advanceDetailVOList = advanceDetailService.findAdvanceDetailListByWaybillId(advanceDTO); + } return R.data(advanceDetailVOList); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 4cf3a8f31..924b3ffa7 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -11533,13 +11533,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl