diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index f679fa9f1..ca0243190 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -164,4 +164,7 @@ public interface IDistributionParcelListClient { @PostMapping(API_PREFIX+"/clearParceListWaybillByAdvanceIds") void clearParceListWaybillByAdvanceIds(@RequestBody List advanceIds); + + @GetMapping(API_PREFIX+"/findListByWaybillId") + List findListByWaybillId(@RequestParam Long waybillId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index bac72f0c1..65ca9f50b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -376,4 +376,12 @@ public class DistributionParcelListClient implements IDistributionParcelListClie public void clearParceListWaybillByAdvanceIds(List advanceIds) { distributionParcelListService.clearParceListWaybillByAdvanceIds(advanceIds); } + + @Override + public List findListByWaybillId(Long waybillId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("waybill_id",waybillId); + + return distributionParcelListService.list(queryWrapper); + } } 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 040e55aeb..2c8e111aa 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 @@ -3548,6 +3548,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService { log.info("###################verifyUpdateData: 验证改单数据"); StringBuilder stringBuilder = new StringBuilder(); + Long waybillId = waybillEntity.getId(); + String newDeparture = openOrderDTO.getDeparture(); String departure = waybillEntity.getDeparture(); if(!ObjectUtil.equals(newDeparture,departure)){ @@ -3600,6 +3602,19 @@ public class OpenOrderServiceImpl implements IOpenOrderService { stringBuilder.append("目的仓:").append(departureWarehouseName).append("-->").append(newDestinationWarehouseName).append(";"); waybillEntity.setDestinationWarehouseId(newDestinationWarehouseId); waybillEntity.setDestinationWarehouseName(newDestinationWarehouseName); + //查询所有该运单的包件 + List parcelListEntityList = distributionParcelListClient.findListByWaybillId(waybillId); + parcelListEntityList.forEach(parcelListEntity -> { + Long warehouseId = parcelListEntity.getWarehouseId(); + parcelListEntity.setAcceptWarehouseId(newDestinationWarehouseId); + parcelListEntity.setAcceptWarehouseName(newDestinationWarehouseName); + if(warehouseId.equals(newDestinationWarehouseId)){ + parcelListEntity.setIsTransfer(0); + }else{ + parcelListEntity.setIsTransfer(1); + } + }); + distributionParcelListClient.updateList(parcelListEntityList); } Long newShipperId = openOrderDTO.getShipperId(); String newShipper = openOrderDTO.getShipper(); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java index 4878f926a..498bb5e3a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java @@ -57,4 +57,14 @@ public class WarehouseWaybillDTO extends WarehouseWaybillEntity { private Date createTimeStartDate; private Date createTimeEndDate; + private String abolishTimeStartStr; + private String abolishTimeEndStr; + private Date abolishTimeStartDate; + private Date abolishTimeEndDate; + + private String freezeTimeStartStr; + private String freezeTimeEndStr; + private Date freezeTimeStartDate; + private Date freezeTimeEndDate; + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml index 03798b08f..67d6b9d10 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml @@ -263,6 +263,18 @@ and total_volume = #{param.totalVolume} + + and abolish_time >= #{param.abolishTimeStartDate} + + + and abolish_time <= #{param.abolishTimeEndDate} + + + and freeze_time >= #{param.freezeTimeStartDate} + + + and freeze_time <= #{param.freezeTimeEndDate} + order by create_time desc diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index 5ac7d6d41..de6f5fc7e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -674,6 +674,10 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl pageList = baseMapper.pageList(page, waybillDTO); List records = pageList.getRecords();