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