From e168a875dddde44320ac80fcb1fd4946df83ffab Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Tue, 6 Aug 2024 14:56:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=AE=9A=E5=88=B6=E5=93=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=B6=85=E6=97=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/WarehouseUpdownGoodsLogMapper.xml | 10 +++++-- .../WarehouseUpdownGoodsLogServiceImpl.java | 28 +++++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsLogMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsLogMapper.xml index 0d85b4cf5..bddd7ce1c 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsLogMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsLogMapper.xml @@ -68,19 +68,23 @@ lwup.is_deleted = 0 - and ldpl.warehouse like concat('%',#{param.warehouseName},'%') + and ldpl.warehouse like concat(#{param.warehouseName},'%') - and ldpl.order_code like concat('%',#{param.orderCode},'%') + and ldpl.order_code like concat(#{param.orderCode},'%') and lwup.warehouse_id in #{item} + AND ldpl.warehouse_id IN + + #{item} + - and ldpl.order_package_code like concat('%',#{param.orderPackageCode},'%') + and ldpl.order_package_code like concat(#{param.orderPackageCode},'%') and lwup.binding_type = #{param.bindingType} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java index 6d10ec5c1..a4504a717 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java @@ -62,17 +62,23 @@ public class WarehouseUpdownGoodsLogServiceImpl extends BaseServiceImpl selectWarehouseUpdownGoodsLogPage(IPage page, WarehouseUpdownGoodsLogVO warehouseUpdownGoodsLog) { - //获取当前登录人仓库 - List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); - List collect = myWatchWarehouse.stream() - .map(BasicdataWarehouseEntity::getId) - .collect(Collectors.toList()); - warehouseUpdownGoodsLog.setWarehouseIdList(collect); - //查询操作员 -// if (null != warehouseUpdownGoodsLog.getCreateUserName()){ -// R> listR = userSearchClient.listByName(warehouseUpdownGoodsLog.getCreateUserName()); -// log.info("listR>>>>{}",listR); -// } + + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if(ObjectUtils.isEmpty(myCurrentWarehouse)){ + List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); + List collect = myWatchWarehouse.stream() + .map(BasicdataWarehouseEntity::getId) + .collect(Collectors.toList()); + warehouseUpdownGoodsLog.setWarehouseIdList(collect); + }else{ + //获取当前登录人仓库 + List collect = Arrays.asList(myCurrentWarehouse.getId()); + warehouseUpdownGoodsLog.setWarehouseIdList(collect); + } + + + + List warehouseUpdownGoodsLogVOS = baseMapper.selectWarehouseUpdownGoodsLogPage(page, warehouseUpdownGoodsLog); return page.setRecords(warehouseUpdownGoodsLogVOS); }