|
|
|
@ -2318,20 +2318,26 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public List<User> getRoleList(String deptId, String tenantId) { |
|
|
|
|
public List<User> getRoleList() { |
|
|
|
|
//获取当前登录用户
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
String tenantId = user.getTenantId(); |
|
|
|
|
// String deptId = user.getDeptId();
|
|
|
|
|
//查询备货岗位
|
|
|
|
|
List<DictBiz> warehouseType = DictBizCache.getList("stock_personnel"); |
|
|
|
|
if (warehouseType.isEmpty()) { |
|
|
|
|
throw new ServiceException("注意,注意!拣货人员字典未配置!请配置!"); |
|
|
|
|
} else { |
|
|
|
|
List<String> stringList = new ArrayList<>(); |
|
|
|
|
warehouseType.stream().forEach(i -> { |
|
|
|
|
//查询这个角色ID
|
|
|
|
|
R<String> roleId = sysClient.getRoleIds(tenantId, i.getDictValue()); |
|
|
|
|
if (ObjectUtils.isNotNull(roleId.getData())) { |
|
|
|
|
stringList.add(roleId.getData()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
String roleIds = stringList.stream().collect(Collectors.joining(",")); |
|
|
|
|
R<List<User>> listR = userSearchClient.listByRole(roleIds); |
|
|
|
|
R<List<User>> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
//有没有选择仓库信息
|
|
|
|
|
if (ObjectUtils.isNotNull(myCurrentWarehouse)) { |
|
|
|
@ -2950,6 +2956,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
DistributionStockListEntity distributionStockListEntity = distributionStockListMapper.selectOne(Wrappers.<DistributionStockListEntity>query().lambda() |
|
|
|
|
.eq(DistributionStockListEntity::getIncomingBatch, byId.getOrderCode()) |
|
|
|
|
.eq(DistributionStockListEntity::getWarehouseId,myCurrentWarehouse.getId()) |
|
|
|
|
.eq(DistributionStockListEntity::getCargoNumber,stockupDTO.getCargoNumber()) |
|
|
|
|
); |
|
|
|
|
if(ObjectUtils.isNull(distributionStockListEntity)){ |
|
|
|
|
return R.fail("该包件不是库存品!"); |
|
|
|
|