diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java index 5bf504815..1a5e61d73 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java @@ -26,6 +26,7 @@ import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; import java.util.Date; +import java.util.List; /** * 备货信息表 实体类 @@ -198,6 +199,10 @@ public class DistributionStockupEntity extends TenantEntity { @ApiModelProperty(value = "仓库Id") private Long warehouseId; + @ApiModelProperty(value = "仓库Id") + @TableField(exist = false) + private List warehouseIdList; + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index 8285df34a..0c9ac3a85 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -106,7 +106,15 @@ and lds.forklift_name like concat('%', #{param.forkliftName},'%') and lds.loader_name like concat('%', #{param.loaderName},'%') - and lds.type_service = #{param.typeService} + + and lds.warehouse_id = #{param.warehouseId} + + and lds.warehouse_id in + + #{a} + + + GROUP BY lds.id @@ -162,6 +170,13 @@ and lds.forklift_name like concat('%', #{param.forkliftName},'%') and lds.loader_name like concat('%', #{param.loaderName},'%') and lds.type_service = #{param.typeService} + and lds.warehouse_id = #{param.warehouseId} + + and lds.warehouse_id in + + #{a} + + GROUP BY lds.id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index 1ea89c162..4ffb8ebca 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -226,11 +226,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl pageList(IPage page, Map distributionStockup) { DistributionStockupEntity distributionStockupEntity = JSON.parseObject(JSON.toJSONString(distributionStockup), DistributionStockupEntity.class); -// //获取当前登录人仓库 -// List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); -// //取出id -// List collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); - + //获取当前登录人仓库 + List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); + //取出id + List collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + distributionStockupEntity.setWarehouseIdList(collect); distributionStockupEntity.setTenantId(AuthUtil.getTenantId()); if (distributionStockupEntity.getTypeService().equals("3")) { return baseMapper.pageOweList(page, distributionStockupEntity);