From 87caf7e7539557938257b1eb2cde61b041244f39 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 13 Aug 2024 12:14:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=BA=93=E4=BD=8D=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=B8=85=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicdataGoodsAllocationServiceImpl.java | 21 +++++++++++++++---- .../impl/BasicdataGoodsShelfServiceImpl.java | 20 ++++++++++++++++-- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java index a3681cdef..658f0a4e6 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java @@ -48,6 +48,7 @@ import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; @@ -57,10 +58,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -88,6 +86,8 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl selectBasicdataGoodsAllocationPage(IPage page, BasicdataGoodsAllocationVO BasicdataGoodsAllocation) { @@ -278,6 +278,12 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl().lambda() .set(BasicdataGoodsAllocationEntity::getEnableStatus, 1) .in(BasicdataGoodsAllocationEntity::getId, Func.toLongList(ids))); + + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseService.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + bladeRedis.del("warehouse:all:allocationIds:" + myCurrentWarehouse.getId()); + } + return update ? R.success("成功") : R.fail("失败"); } @@ -293,6 +299,13 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl().lambda() .set(BasicdataGoodsAllocationEntity::getEnableStatus, 2) .in(BasicdataGoodsAllocationEntity::getId, Func.toLongList(ids))); + + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if(!Objects.isNull(myCurrentWarehouse)){ + bladeRedis.del("warehouse:all:allocationIds:" + myCurrentWarehouse.getId()); + } + + return update ? R.success("成功") : R.fail("失败"); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java index 301d2bb0d..f91d05ded 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsShelfServiceImpl.java @@ -28,10 +28,8 @@ import com.logpm.basic.feign.IBasicPrintTemplateClient; import com.logpm.basic.feign.IBasicTenantCodeClient; import com.logpm.basicdata.dto.BasicdataGoodsShelfDTO; import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity; -import com.logpm.basicdata.entity.BasicdataGoodsAreaEntity; import com.logpm.basicdata.entity.BasicdataGoodsShelfEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; -import com.logpm.basicdata.excel.BasicdataGoodsAreaExcel; import com.logpm.basicdata.excel.BasicdataGoodsShelfExcel; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.mapper.BasicdataGoodsAllocationMapper; @@ -47,6 +45,7 @@ import org.springblade.common.utils.FileUtil; import org.springblade.common.utils.QRCodeUtil; import org.springblade.common.utils.TemplateUtil; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; @@ -93,6 +92,8 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl 0 ? R.success("删除成功") : R.fail("删除失败"); } @@ -662,6 +677,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl