diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java index 20e3dac27..7cb58f1f8 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java @@ -45,6 +45,7 @@ public class DistributionReservationEntity extends TenantEntity { */ @ApiModelProperty(value = "订单自编号;订单自编号,关联订单表") private String stockArticleId; +// private String orderCodes; /** * 收货人 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java index 25112912e..cad6a2b4d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java @@ -90,7 +90,7 @@ public interface DistributionStockArticleMapper extends BaseMapper fingListByServiceNumber(@Param("serviceNumber") String serviceNumber,@Param("warehouseId") Long warehouseId); void updateGroundingStatus(@Param("orderCode") String orderCode, @Param("groundingStatus") String groundingStatus,@Param("warehouseId") Long warehouseId); - IPage pageListOwe(IPage page,@Param("param")DistributionStockArticleOweDTO stockArticleEntity); + IPage pageListOwe(IPage page,@Param("param")DistributionStockArticleOweDTO stockArticleEntity,@Param("warehouseIds")List warehouseIds); queryOrderVO selectOneByWrap(@Param("condition") String condition,@Param("collect") List collect); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 82e3242a4..5951d024f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -411,8 +411,7 @@ HAVING count(ldpl.id) > 0 - select ldsa.id, ldsa.tenant_id, ldsa.create_user, ldsa.create_time, @@ -440,12 +439,10 @@ dealerName, ldsa.dealer_code, ldsa.train_number, ldsa.factory_train, ldsa.sending, ldsa.send_warehouse_id, ldsa.send_warehouse_name, ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status, - GROUP_CONCAT( DISTINCT lwtg.tray_code ) trays, - GROUP_CONCAT( DISTINCT lwug.position_code ) allocation + ldsa.trays trays, + ldsa.allocation allocation from logpm_distribution_stock_article ldsa LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id - LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id - LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id ldsa.is_deleted = 0 and ldsa.order_status in ('10','20','30','40','50','60','70') and ldsa.hand_quantity > 0 @@ -455,6 +452,12 @@ #{a} + + and ldsa.warehouse_id in + + #{s} + + and ldsa.order_code like concat('%',#{param.orderCodeNumLike},'%') @@ -477,16 +480,9 @@ concat('%',#{param.waybillNumLike},'%') - and ldsa.type_service = #{param.typeService} - - and ldsa.warehouse_id in - - #{a} - - - and ldsa.warehouse_id = - #{param.warehouseId} + and ldsa.type_service =#{param.typeService} + and ldsa.id in #{a} @@ -533,27 +529,27 @@ and ldsa.grounding_status = #{param.groundingStatus} - and ldsa.genre = #{param.genre} - and ldsa.freeze_status = + and ldsa.genre=#{param.genre} + and ldsa.freeze_status = #{param.freezeStatus} - and ldsa.order_status = + and ldsa.order_status = #{param.orderStatus} - and ldsa.reservation_status = + and ldsa.reservation_status = #{param.reservationStatus} - and ldsa.stockup_status = + and ldsa.stockup_status = #{param.stockupStatus} and ldsa.notification = #{param.notification} - and ldsa.order_receive_status + and ldsa.order_receive_status = #{param.orderReceiveStatus} - and ldsa.complete_set like concat('%',#{param.completeSet},'%') + and ldsa.complete_set =#{param.completeSet} and ldsa.customer_name like concat('%',#{param.customerName},'%') @@ -567,11 +563,11 @@ and ldsa.customer_address like concat('%',#{param.customerAddress},'%') - and lwtg.tray_code like - concat('%',#{param.trays},'%') + + and ldsa.trays like concat('%',#{param.trays},'%') - and lwug.position_code like - concat('%',#{param.allocation},'%') + + and ldsa.allocation like concat('%',#{param.allocation},'%') group by ldsa.id order by ldsa.warehouse_entry_time desc diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java index 754539272..4d38140a3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java @@ -77,7 +77,6 @@ public interface DistributionStockupMapper extends BaseMapper detailReservationOwn(IPage page,@Param("param")DistributionStockupVO distributionStockupVO); @@ -244,7 +243,6 @@ public interface DistributionStockupMapper extends BaseMapper exportStockUptOrderDetail(@Param("ids") List ids); @@ -258,15 +256,12 @@ public interface DistributionStockupMapper extends BaseMapper myWarehouseList = warehouseClient.getMyWatchWarehouse(); - List collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); - if (collect.size() > 1) { - stockArticleEntity.setWarehouseIdList(collect); - } else if (collect.size() == 1) { - stockArticleEntity.setWarehouseId(collect.get(0)); - } - IPage distributionStockArticleEntityIPage = baseMapper.pageListOwe(page, stockArticleEntity); - distributionStockArticleEntityIPage.getRecords().stream().forEach(i -> { -/* DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.getStockArticleQueryQuantity(i.getId()); - i.setDeliveryQuantity(distributionStockArticleEntity.getDeliveryQuantity()); - List list = distributionParcelListService.list(Wrappers.query().lambda() - .eq(DistributionParcelListEntity::getStockArticleId, i.getId()) - .eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue()) - ); - i.setSigninQuantity(distributionStockArticleEntity.getSigninQuantity() + list.size() );*/ - if ("1".equals(i.getIsZero())) { - //查询托盘 - WarehouseTrayGoodsEntity warehouseTrayGoods = new WarehouseTrayGoodsEntity(); - warehouseTrayGoods.setAssociationId(i.getId()); - warehouseTrayGoods.setAssociationType("1"); - warehouseTrayGoods.setAssociationValue(i.getOrderCode()); - warehouseTrayGoods.setWarehouseId(collect.get(0)); - List trayList = warehouseTrayGoodsClient.getTrayList(warehouseTrayGoods); - if (!trayList.isEmpty()) { - String collect1 = trayList.stream().map(WarehouseTrayGoodsEntity::getTrayCode).collect(Collectors.joining(",")); - i.setTrays(collect1); - } - //查询货位 - WarehouseUpdownGoodsEntity updownGoodsEntity = new WarehouseUpdownGoodsEntity(); - updownGoodsEntity.setAssociationId(i.getId()); - updownGoodsEntity.setAssociationType("1"); - updownGoodsEntity.setWarehouseId(collect.get(0)); - updownGoodsEntity.setAssociationValue(i.getOrderCode()); - List information = warehouseUpdownGoodsClient.getLocationStockListInformation(updownGoodsEntity); - if (ObjectUtils.isNotNull(information) && !information.isEmpty()) { - String collect1 = information.stream().map(WarehouseUpdownGoodsEntity::getPositionCode).collect(Collectors.joining(",")); - i.setAllocation(collect1); - } - } - }); +// } + List warehouseIdList = new ArrayList<>(); + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Func.isEmpty(myCurrentWarehouse)){ + List myWarehouseList = warehouseClient.getMyWarehouseList(); + List collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + warehouseIdList.addAll(collect); + }else{ + warehouseIdList.add(myCurrentWarehouse.getId()); + } + + IPage distributionStockArticleEntityIPage = baseMapper.pageListOwe(page, stockArticleEntity,warehouseIdList); return distributionStockArticleEntityIPage; }