diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java index 0d1c0868c..289555e5c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java @@ -18,6 +18,7 @@ package com.logpm.distribution.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.entity.DistributionStockupEntity; import com.logpm.distribution.excel.DistributionCityExcel; @@ -203,13 +204,8 @@ public class DistributionStockupController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "查询备货人员信息", notes = "传入distributionStockup") public R> listUser() { - //获取当前登录用户 - BladeUser user = AuthUtil.getUser(); - //查询备货岗位 - - - List cc = distributionStockupService.getRoleList(user.getDeptId(), user.getTenantId()); + List cc = distributionStockupService.getRoleList(); // List cc = distributionStockupService.getRoleList(user.getDeptId(), user.getTenantId(), "叉车"); return R.data(cc); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java index 60002f6b2..d51151e78 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java @@ -216,9 +216,10 @@ public interface IDistributionStockupService extends BaseService getLocationMarketSelectionOrder(StockupDTO stockupDTO); /** + * 查询备货人员 * @return */ - List getRoleList(String deptId, String tenantId); + List getRoleList(); /** * 修改备货任务的备货区 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 9b99a089b..5730bbed6 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 @@ -2318,20 +2318,26 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl getRoleList(String deptId, String tenantId) { + public List getRoleList() { + //获取当前登录用户 + BladeUser user = AuthUtil.getUser(); + String tenantId = user.getTenantId(); +// String deptId = user.getDeptId(); + //查询备货岗位 List warehouseType = DictBizCache.getList("stock_personnel"); if (warehouseType.isEmpty()) { throw new ServiceException("注意,注意!拣货人员字典未配置!请配置!"); } else { List stringList = new ArrayList<>(); warehouseType.stream().forEach(i -> { + //查询这个角色ID R roleId = sysClient.getRoleIds(tenantId, i.getDictValue()); if (ObjectUtils.isNotNull(roleId.getData())) { stringList.add(roleId.getData()); } }); String roleIds = stringList.stream().collect(Collectors.joining(",")); - R> listR = userSearchClient.listByRole(roleIds); + R> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据 BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); //有没有选择仓库信息 if (ObjectUtils.isNotNull(myCurrentWarehouse)) { @@ -2950,6 +2956,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImplquery().lambda() .eq(DistributionStockListEntity::getIncomingBatch, byId.getOrderCode()) .eq(DistributionStockListEntity::getWarehouseId,myCurrentWarehouse.getId()) + .eq(DistributionStockListEntity::getCargoNumber,stockupDTO.getCargoNumber()) ); if(ObjectUtils.isNull(distributionStockListEntity)){ return R.fail("该包件不是库存品!");